autoresearch
Autonomous iteration loop: modify, verify, keep/discard against any metric
STRIDE + OWASP security audit with red-team adversarial personas
> /plugin marketplace add uditgoenka/autoresearch > /plugin install autoresearch@autoresearch
How it fires
How this command gets triggered: by you, by Claude, or both.
/securityContext preview
What this command does when you run it.
STRIDE + OWASP security audit with red-team adversarial personas
name: autoresearch:security description: "STRIDE + OWASP security audit with red-team adversarial personas" argument-hint: "[Scope: <glob>] [Focus: <area>] [Iterations: N] [--diff] [--fix] [--fail-on <severity>] [--evals]"
EXECUTE IMMEDIATELY.
Extract from $ARGUMENTS:
If Scope missing and no --diff: 1. Scan codebase for tech stack, frameworks, API routes 2. AskUserQuestion (single batch): Q1 (Scope): "What to audit?" — entire codebase, API + middleware, auth, external-facing Q2 (Depth): "How thorough?" — quick (5), standard (15), deep (30+), unlimited Q3 (Action): "What to do with findings?" — report only, report + auto-fix, report + CI gate If all provided → skip.
1. **Reconnaissance** — scan: package.json/requirements.txt (deps), .env.example (secrets), Dockerfile (infra), API route files (attack surface), auth/middleware (trust boundaries), DB schemas (data assets), CI/CD configs (supply chain) 2. **Asset Identification** — catalog data stores, auth systems, external services, user inputs 3. **Trust Boundary Mapping** — browser↔server, public↔authenticated, user↔admin, CI↔prod 4. **STRIDE Threat Model** — generate threats per category. Load `references/security-checklist.md` for checklist. 5. **Attack Surface Map** — entry points, data flows, abuse paths 6. **Baseline** — count known issues, initialize coverage tracking
Create output directory: `autoresearch/security-{YYMMDD}-{HHMM}/` Write: overview.md, threat-model.md, attack-surface-map.md TSV header: `# metric_direction: higher_is_better\niteration\ttimestamp\tfinding\tseverity\towasp\tstride\tevidence\tfile_line`
`OWASP: [A01✓ A02✓ A03✗ ...] X/10 | STRIDE: [S✓ T✓ R✗ ...] Y/6 | Score: Z`
`score = (owasp_tested/10)*50 + (stride_tested/6)*30 + min(findings, 20)`
If --evals: check if current_iteration % interval == 0 → run checkpoint.
If bounded: current_iteration >= max_iterations → exit loop.
1. Write `findings.md` (severity-ranked) 2. Write `owasp-coverage.md` 3. Write `recommendations.md` 4. If `--fix` → chain to fix with Critical/High findings 5. If `--fail-on` → check findings against threshold, exit non-zero if exceeded
Print: total findings by severity, OWASP coverage X/10, STRIDE coverage Y/6, composite score.
If --evals present:
After completion, write handoff.json to output directory: version "2.1.0", source "security", timestamp, status (COMPLETE|USER_INTERRUPT|BOUNDED|ERROR), results_tsv path, findings = all findings with severity + OWASP + STRIDE + file:line, config{scope, focus, depth}. Invoke next target in --chain order. Propagate --evals flag.
Turn Claude Code, OpenCode, or OpenAI Codex into a relentless improvement engine. Based on Karpathy's autoresearch — constraint + mechanical metric + autonomous iteration = compounding gains.
Repo: uditgoenka/autoresearch
Autonomous iteration loop: modify, verify, keep/discard against any metric
Analyze iteration results: trends, plateaus, regressions, recommendations
Scout codebase and auto-generate docs — or a navigable wiki knowledge base — with validation-fix loop