/indra:sh-memory [recall <query> | record <run_dir> | remember <learning> | graph] [target path]from Indra
Persists security review knowledge across runs using graph-based Markdown notes managed by the indra CLI. Recall past findings, false positives, and framework pitfalls; record new learnings; visualize the knowledge graph.
Ships in Indra. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
A review that forgets everything when it ends will re-report the same false positive next week and
re-learn the same framework quirk on every codebase. This skill gives the harness a memory that persists
across runs, stored as a graph of small Markdown notes managed by indra mem.
A single static binary (Rust, Linux/macOS/Windows). A vault is an ordinary folder of Markdown notes:
---
title: Django extra() is a raw SQL sink
type: learning
tags: [sqli, django]
---
QuerySet.extra(where=[...]) takes raw SQL. Any f-string into it is a SQLi sink.
## Relations
- instance-of:: [[sql-injection]]
- mitigated-by:: [[parameterized-queries]]
Plain [[links]] are related; rel:: [[target]] lines are typed edges. The folder opens as-is in
Obsidian, so a human can browse and edit the same memory the agents use.
indra --version
If it fails, try the install in ${CLAUDE_PLUGIN_ROOT}/references/tooling-setup.md (section indra). If
it still is not available, skip memory entirely and say so once. Never block a review on it, and never
hand-write vault files as a substitute: the CLI handles locking for parallel writers, link resolution and
safe file names.
| Vault | Path | Holds | Never holds |
|---|---|---|---|
| Target | <TARGET>/.security-harness/memory/ | Codebase-specific knowledge: its sanitizers and guards, confirmed false positives, past findings, auth model, risky files | - (it stays on the machine and is gitignored with the rest of .security-harness/) |
| Global | indra mem where (the per-user default, or $MEMEX_VAULT) | Portable knowledge: framework pitfalls, bypass techniques, false-positive patterns that generalise, tool tips | Code from the target, file paths, hostnames, customer or product names, secrets, tokens, credentials, PII, payloads |
Always pass the target vault explicitly: indra mem --vault "<TARGET>/.security-harness/memory" .... Use the
global vault only with plain indra mem ... (no --vault) and only for content that would be safe to publish.
Never store secrets. Not in either vault, not redacted-but-guessable, not in a source: field. For a
secrets finding, record the location and the fix, never the value.
recall runs ranked search, then walks the graph from each hit, so it also returns the mitigation, the
false positive or the sibling finding that is one link away, and says which link brought it in.
indra mem --vault "$TV" recall "<class> <framework> <key files or sinks>" -n 8 --max-chars 5000
indra mem recall "<class> <framework>" -n 5 --max-chars 2500 # global vault
recall "sqli django cursor.execute raw" -n 8.--type learning or --tag false-positive narrows it; --json gives structured output.The bundled script turns verified.jsonl into notes: one per verified / needs-runtime finding, one
false-positive learning per refuted candidate, hubs per class and per affected file, and chains-with
edges. Findings seen in an earlier run are matched by fingerprint and marked "seen again" instead of
duplicated. It never copies evidence, payload, poc or data_flow.
PY="$(command -v python3 || command -v python)"
"$PY" "${CLAUDE_PLUGIN_ROOT}/skills/sh-memory/scripts/sh-memory-record.py" "<run_dir>"
# --vault DIR to override, --dry-run to preview the indra commands
Then write at most five learnings that a future reviewer would want, each one small and specific. Good learnings are surprising, reusable and checkable:
sanitize_sql() is safe, here is why);requests follows redirects by default);middleware/tenant.py, not per view).indra mem --vault "$TV" add "Tenant isolation lives in TenantMiddleware" -t learning \
--tag access-control --rel refines="Broken access control" \
--source "<run-id>" --upsert -b "Views never filter by org; middleware rewrites every queryset. ..."
Promote a learning to the global vault only after stripping everything target-specific:
indra mem add "DRF ModelSerializer with fields='__all__' enables mass assignment" -t learning \
--tag access-control --tag django --rel instance-of="Mass assignment" --upsert -b "..."
Use --upsert so repeating a learning merges into the existing note instead of failing.
Reuse these so the graph stays queryable. Invent a new one only when none fits.
| Relation | Meaning |
|---|---|
instance-of | finding or learning -> its vulnerability class or a broader pattern |
mitigated-by / defends-against | weakness -> fix, and fix -> weakness |
bypasses | technique -> the defence it defeats |
enables / enabled-by | one weakness makes another reachable |
exploits | technique -> weakness it uses |
refines | a narrower rule or exception to a broader note (false positives use this) |
located-in | finding -> file: <path> hub |
chains-with | findings that combine into an escalation |
supersedes | newer note replaces an outdated one (keep the old note, link it) |
related | anything else (plain [[link]]) |
Note types: vuln-class, finding, learning, pattern, technique, tool, file, decision.
indra mem --vault "$TV" show "<name>" # a note, its links and its backlinks
indra mem --vault "$TV" tree "SQL injection" # the graph around a note, as a text tree
indra mem --vault "$TV" tree # the whole memory graph, in the terminal
indra mem --vault "$TV" neighbors "file: app/db.py" -d 2
indra mem --vault "$TV" path "SQL injection" "Parameterized queries"
indra mem --vault "$TV" link "<from>" "<to>" --rel mitigated-by
indra mem --vault "$TV" check # unresolved links, ambiguous names
indra mem --vault "$TV" export -o "<run_dir>/reports/memory-graph.html" # interactive graph, offline
indra mem --vault "$TV" export -f mermaid # paste into Markdown
indra mem import copies notes from another tool into a vault, converting its links to
[[wikilinks]]. It never changes the source, skips notes that already exist (--overwrite
replaces them), and --dry-run shows what it would do.
indra mem --vault "$TV" import ~/notes/obsidian-vault # an Obsidian vault
indra mem --vault "$TV" import ~/Downloads/notion-export # an unzipped Notion "Markdown & CSV" export
indra mem --vault "$TV" import ./app.wiki --folder wiki # git clone https://github.com/<o>/<r>.wiki.git
indra mem --vault "$TV" import ./docs --from markdown --tag docs # any folder of Markdown
The source kind is detected (--from obsidian|notion|github-wiki|markdown to force it). Each
note gets source: <kind>:<path> so you can tell where it came from. To send findings the other
way, to Jira, Confluence, GitHub issues or Notion, use the sh-publish skill.
All commands accept --json. Names resolve by id, title, alias or slug, case-insensitively.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub dmdhrumilmistry/indra --plugin indra20 skills in this plugin
/indraindra - the entry point for application-security work. Dispatcher for the indra security harness. Use when the user asks for any application-security work - 'security review', 'audit this codebase', 'pentest', 'find vulnerabilities', 'check for SQLi/XSS/IDOR/SSRF', 'generate a security report/SARIF'. Interprets the request and routes it to the full sh-security-review pipeline, a single stage, or a single vulnerability-class knowledge base./sh-kb-access-controlKnowledge base for finding broken access control - IDOR/BOLA, missing function-level authorization, privilege escalation, and multi-tenant isolation failures. Use when hunting authorization issues or reviewing whether users can access resources/actions they shouldn't. CWE-284/285/639/862/863, OWASP A01:2021-Broken Access Control./sh-kb-authKnowledge base for finding authentication and session-management failures - weak login, broken JWT/session handling, password/reset flaws, MFA bypass, credential storage issues. Use when hunting authentication (not authorization - see sh-kb-access-control). CWE-287/384/613/620/640, OWASP A07:2021-Identification and Authentication Failures./sh-kb-cryptoKnowledge base for finding cryptographic failures - weak hashing/encryption, insecure randomness, hardcoded/static keys and IVs, ECB mode, missing integrity, and predictable tokens. Use when hunting crypto misuse. CWE-327/328/330/326/916, OWASP A02:2021-Cryptographic Failures./sh-kb-csrfKnowledge base for finding Cross-Site Request Forgery - state-changing requests that rely only on ambient credentials (cookies) with no anti-CSRF token or SameSite protection. Use when hunting CSRF. CWE-352, OWASP A01:2021-Broken Access Control./sh-kb-deserializationKnowledge base for finding insecure deserialization - untrusted data fed to object-deserialization APIs that can trigger RCE or object injection via gadget chains. Use when hunting deserialization issues. CWE-502, OWASP A08:2021-Software and Data Integrity Failures.Other plugins' skills for the same job