Start
Getting started
Install indra for Claude Code, Gemini CLI, Codex or opencode, and run your first review.
Install
The harness ships for several agents. Full packaging details and the release
checklist are in docs/DISTRIBUTION.md.
Claude Code - add this repo as a plugin marketplace and install the plugin:
/plugin marketplace add dmdhrumilmistry/indra
/plugin install indra@indra
/plugin marketplace add accepts any of: a GitHub owner/repo (as above), a full git URL
(https://github.com/dmdhrumilmistry/indra.git), or a local path to a clone
(e.g. /plugin marketplace add ./indra from the directory containing your checkout).
Then run /plugin install indra@indra and reload when prompted.
Gemini CLI - a native extension, manifest at the repo root:
gemini extensions install https://github.com/dmdhrumilmistry/indra
opencode, Codex, or any agentskills.io agent - copy the
skills into a discovery directory. Codex additionally picks up AGENTS.md on its own:
git clone https://github.com/dmdhrumilmistry/indra
cd indra
indra skills install --to agents # ~/.agents/skills
indra skills install --to opencode # ~/.config/opencode/skills
# without indra: mkdir -p ~/.agents/skills && cp -R skills/* ~/.agents/skills/
Graft is installed and set up automatically by the pipeline. Stage 0 runs `npm install -g
@nanonets/graftif it's missing (requires Node/npm), thengraft init <target> --no-agents --no-global`
to register the Graft MCP server and freshness hooks for the target repo. The graph itself (<target>/graft/,
auto-gitignored) is built during recon. To pre-install manually: npm install -g @nanonets/graft. Graft's
structural build is free and needs no API key; the optional --deep LLM pass uses GRAFT_API_KEY /
GRAFT_PROVIDER / GRAFT_MODEL when set.
The other tools are also auto-installed by Stage 0 when missing (via whatever package manager is on the
machine - winget/choco/scoop, brew, apt, npm/pip/go - see references/tooling-setup.md). Installs are
announced, prefer no-elevation methods, and never block the run: anything that can't be installed is simply
marked unavailable and the pipeline falls back. Stage 0 installs only what fills a missing capability group:
- SBOM:
syft· CVEs: one ofgrype(preferred),trivy, orosv-scanner - Reports:
wkhtmltopdforpandoc(for PDF/DOCX); otherwise you getreport.html(or a headless-Chrome PDF).
All of them are optional - the pipeline degrades gracefully to native search + manifest parsing if none install.
Usage
Ask /indra in plain language:
/indra full security review of ./api
/indra find SQLi and IDOR in src/
/indra just map this codebase # recon only
/indra threat model this service # trust boundaries and STRIDE threats
/indra re-review what changed since v1.2
Or call the pipeline directly:
/sh-security-review . classes:sqli,access-control,ssrf depth:deep
/sh-security-review . stage:report # regenerate reports for the latest run
/sh-security-review . since:main # only what changed since main (reuses the map and threat model)
/sh-threat-model . # a threat model on its own
/sh-threat-model . design:docs/payments.md # threat-model a design before it is built
Autopilot
Not sure which skill to use, or want the whole sequence? Give sh-autopilot a request in plain words.
It picks a flow, runs the other skills in order with a check after each step, and writes a report:
/sh-autopilot secure this repo
/sh-autopilot start my shift source:wazuh-prod
/sh-autopilot secure this repo dry-run # print the steps, run nothing
It never pushes, deploys a rule or takes a response action. See the autopilot guide.
Threat model and trust boundaries
Before hunting, sh-threat-modeler models the system from recon: actors, assets, components and data
flows, the trust boundaries they cross (internet to API, user to admin, tenant to tenant, app to
database, app to OS, app to third parties, LLM output to action) with the controls found at each
(file:line), and STRIDE threats on every crossing, each with a likelihood, impact, risk and status
(open, mitigated, accepted, design). It writes threat-model.md (with a Mermaid data flow
diagram), threat-model.json (shown on the run's page in the console) and a short focus brief per
class. Hunters then work the open threats only; findings link back to the threats they realise, and the
report lists open threats no finding covered and the design gaps. Run it alone with /sh-threat-model,
on a design document with design:<file>, or on a change with since:<ref>.
Model & cost control
Each stage runs on a model matched to its cognitive load, so tokens are spent where discovery quality actually depends on them and saved on mechanical work. This is the default - no arguments needed.
| Stage | Default model |
|---|---|
| recon | sonnet |
| threat | sonnet |
| hunt (per class) | haiku for pattern classes (secrets, crypto, open-redirect, csrf, misconfig) · sonnet for source→sink tracing (sqli, xss, ssrf, injection, path-traversal, xxe, file-upload, auth, ci-cd) · opus for deep-logic classes (access-control, race-conditions, deserialization, prompt-injection, business-logic) |
| chain | opus |
| verify | opus (the precision gate - kept strong) |
| report | haiku |
Override with the models: argument (passed through the router too):
/sh-security-review . # default tiered map above
/sh-security-review . models:max # every stage + hunter on opus (max quality, max cost)
/sh-security-review . models:cheap # aggressive downshift (trades some verify precision)
/sh-security-review . models:verify=opus,hunt=sonnet # per-stage overrides
/sh-security-review . models:report=sonnet,hunt.pattern=sonnet # per-hunter-tier override
Stages: setup, recon, threat, hunt, chain, verify, report. Models: opus, sonnet, haiku, inherit. For hunt,
a bare model flattens all hunters to it; hunt.pattern / hunt.trace / hunt.logic target one tier.
Other token savers are built in:
- Recon is reused when the code has not changed since the last run (
reuse:offto map afresh). - Only open threats are hunted. Classes whose every threat is mitigated are skipped, and each hunter
starts from a short focus brief instead of the whole recon (
threats:offto hunt everything). - Incremental reviews:
since:<ref>models and hunts only what changed. - Hunters query the Graft graph and read around each hit instead of whole files, skip probes already in the attempts ledger, and agents pass each other file paths, never file contents.
findings.json/SARIF are generated by a deterministic script rather than the model.
Output
Everything lands under <target>/.security-harness/<run-id>/:
recon.md,codebase-map.json- the map (stack, SBOM, CVEs, attack surface).findings.jsonl→chains.md→verified.jsonl- the working state (seereferences/state-files.md).reports/-README.md,findings.json,results.sarif,report.html,report.pdf(+report.docx).
Each published finding carries a payload, a PoC, the verification verdict, CWE/OWASP ids, CVSS, and a code-level mitigation.