agentleFS
ShulkwiSECShulkwiSEC/bb-huge/skills/curated/aikido-triage/SKILL.md

aikido-triage

Skill22 starsChanged 6 months agoMITView on GitHub

Triages an Aikido security findings CSV against a local codebase. For each finding, reads the flagged file, traces the code path, and verdicts it as KEEP OPEN or CLOSE with a specific reason. Outputs a reviewed CSV and a self-contained HTML evidence report. Run this at the end of a pentest when an Aikido CSV is available.

  • Reads credentials

The file

Show its rules and text

We split this skill into the rules it gives an agent

35 rules. About 0 are common, 18 are distinctive, and 17 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈18

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 17

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If either argument is missing, ask the user before proceeding.

    line 22
  2. Very specific:

    Read CSV_PATH with the Read tool.

    line 28
  3. Very specific:

    Use the Read tool on CODEBASE_PATH/affected_file.

    line 52
  4. Very specific:

    Read start_line to end_line (expand by ±3 lines for context).

    line 59
  5. Very specific:

    Check if secret_liveness column says active — if so, escalate to critical

    line 77
  6. Very specific:

    Read CODEBASE_PATH/affected_file at start_line ± 10 lines of context.

    line 86
  7. Very specific:

    Check CODEBASE_PATH/Gemfile and CODEBASE_PATH/package.json for NoSQL drivers.

    line 95
  8. Distinctive:

    If no NoSQL driver exists in the stack: CLOSE — False Positive

    line 96
  9. Distinctive:

    Read the flagged method. Check:

    line 99
  10. Distinctive:

    If raw interpolation exists but type coercion removes the injection vector: KEEP OPEN — Medium (dangerous pattern, mitigated)

    line 104
  11. Distinctive:

    If raw interpolation with no type coercion on a user-controlled string: KEEP OPEN — High

    line 105
  12. Distinctive:

    If interpolation is of a hardcoded or server-side-only value: CLOSE — False Positive

    line 106
  13. Distinctive:

    Read the workflow file at the flagged line.

    line 109
  14. Very specific:

    Check if uses: has a SHA pin (@abc123def...) or only a tag (@v2, @main).

    line 110
  15. Very specific:

    Read the flagged line. If value is ${{ secrets.* }}: CLOSE — False Positive

    line 115
  16. Distinctive:

    If hardcoded token value: KEEP OPEN

    line 116
  17. Distinctive:

    Read the flagged lines. Apply judgment: is the finding actually present in the code, or is it a pattern-match on a non-vulnerable construct?

    line 119
  18. Very specific:

    Use your knowledge of the CVE to identify what specific function/class is vulnerable.

    line 129
  19. Distinctive:

    Use Grep to search for imports of the package in the application source:

    line 133
  20. Very specific:

    Run /analyze-cve skill to do a full dataflow trace before rendering the verdict.

    line 148
  21. Very specific:

    Read the version file (.ruby-version, check package.json for the framework version).

    line 154
  22. Distinctive:

    Look up the EOL date from your knowledge.

    line 156
  23. Distinctive:

    If EOL date has passed: KEEP OPEN — Real Finding

    line 157
  24. Distinctive:

    Document the EOL date and recommended upgrade path.

    line 158
  25. Very specific:

    Write a new CSV to the same directory as the input CSV, named <original-name>-reviewed.csv.

    line 177
  26. Very specific:

    Use | (space-pipe-space) as separator within the evidence field — never commas

    line 188
  27. Very specific:

    Keep analyst_notes to one sentence with no commas

    line 189
  28. Distinctive:

    Every row must have exactly 11 fields

    line 190
  29. Very specific:

    Write a self-contained HTML file to the same directory as the CSV, named <project-name>-security-review.html.

    line 196
  30. Very specific:

    Use <pre> blocks with dark background.

    line 223
  31. Distinctive:

    Use a clean, professional light theme.

    line 251
  32. Distinctive:

    After writing both files, output a short summary:

    line 257
  33. Distinctive:

    Read every flagged file before rendering a verdict: Never close a finding based on the rule name alone.

    line 282
  34. Very specific:

    For leaked_secret findings on files that exist: always read the exact flagged lines.

    line 285
  35. Distinctive:

    Do not fabricate code: Only quote lines you have actually read from the file.

    line 287

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Aikido Findings Triage Workflow

You are triaging an Aikido SAST/SCA/secret-scanning CSV export against a local codebase. Your job is to read every finding, investigate the flagged code, and verdict each one with evidence. At the end you produce a reviewed CSV and a self-contained HTML report.

Do not guess. Read the actual files before rendering a verdict.


Arguments

Parse from the user's invocation:

  • CSV_PATH — path to the Aikido CSV export
  • CODEBASE_PATH — absolute path to the local codebase to investigate

If either argument is missing, ask the user before proceeding.


Phase 1 — Parse the CSV

  1. Read CSV_PATH with the Read tool.
  2. Parse every row. Key columns to extract per finding:
    • aikido_issue_id — unique ID
    • type — sast | open_source | leaked_secret | eol
    • severity — critical / high / medium / low
    • affected_file — relative path to the flagged file
    • related_cve — CVE or advisory ID (may be empty)
    • rule — rule name that fired
    • start_line / end_line — flagged line range
    • installed_version / patched_version — for SCA findings
    • affected_package — for SCA/EOL findings
  3. Group findings by type so you can batch-investigate efficiently.

Phase 2 — Investigate Each Finding

Work through findings type by type. For each one, read the flagged file and apply the investigation playbook for that type.

2a — leaked_secret findings

Step 1 — Does the file exist?

Use the Read tool on CODEBASE_PATH/affected_file. If the file does not exist: → Verdict: CLOSE — File Removed → Note: "File does not exist at HEAD. Finding references removed code in git history." → Move on. Do not investigate further.

Step 2 — Read the flagged lines.

Read start_line to end_line (expand by ±3 lines for context).

Apply these patterns:

What you seeVerdict
ENV.fetch(...), ENV[...], ENV.fetch(..., nil)CLOSE — False Positive (env var read)
${{ secrets.* }} (GitHub Actions)CLOSE — False Positive (GH Actions secret)
${VARIABLE_NAME} in .npmrc/.env.exampleCLOSE — False Positive (env var placeholder)
--mount=type=secret in DockerfileCLOSE — False Positive (Docker build secret)
A long regex, UA string, or binary-looking dataCLOSE — False Positive (pattern mismatch)
An actual hardcoded token/key/password stringKEEP OPEN — check liveness if possible
A real URL with embedded credentials (user:pass@host)KEEP OPEN

For sidekiq-sensitive-url rule: check whether the flagged content is a Redis URL with credentials or just a gem declaration. Almost always a false positive in Gemfile/Gemfile.lock.

Step 3 — If hardcoded secret found:

  • Note the exact line and masked value
  • Check if secret_liveness column says active — if so, escalate to critical
  • Verdict: KEEP OPEN — Hardcoded Secret

2b — sast findings

Step 1 — Read the flagged file and lines.

Read CODEBASE_PATH/affected_file at start_line ± 10 lines of context.

Step 2 — Apply rule-specific investigation:

NoSQL injection (NoSQL injection attack possible)

  • Trace what the flagged call actually does. Follow the call chain:
    1. What does the flagged function call?
    2. Does it call a NoSQL driver (MongoDB, Redis query, Elasticsearch, Mongoose)?
    3. Or does it call an HTTP client (axios, fetch, HTTParty)?
  • Check CODEBASE_PATH/Gemfile and CODEBASE_PATH/package.json for NoSQL drivers.
  • If no NoSQL driver exists in the stack: CLOSE — False Positive

SQL injection (SQL injection, string-based query concatenation)

  • Read the flagged method. Check:
    1. Is there actual string interpolation into a raw SQL string? ("... #{variable}")
    2. What is the type of the interpolated variable? (Ruby Date, Integer, String?)
    3. Is it executed via select_all, execute, or connection.exec?
    4. Trace the variable back to its source — is it user-controlled?
  • If raw interpolation exists but type coercion removes the injection vector: KEEP OPEN — Medium (dangerous pattern, mitigated)
  • If raw interpolation with no type coercion on a user-controlled string: KEEP OPEN — High
  • If interpolation is of a hardcoded or server-side-only value: CLOSE — False Positive

Unpinned GitHub Actions (3rd party Github Actions should be pinned)

  • Read the workflow file at the flagged line.
  • Check if uses: has a SHA pin (@abc123def...) or only a tag (@v2, @main).
  • Tag-pinned or branch-pinned: KEEP OPEN — Real Finding
  • SHA-pinned: CLOSE — False Positive

NODE_AUTH_TOKEN (Use of NODE_AUTH_TOKEN)

  • Read the flagged line. If value is ${{ secrets.* }}: CLOSE — False Positive
  • If hardcoded token value: KEEP OPEN

Other SAST rules

  • Read the flagged lines. Apply judgment: is the finding actually present in the code, or is it a pattern-match on a non-vulnerable construct? Document what you found.

2c — open_source / SCA findings

For each SCA finding:

Step 1 — Identify the vulnerable function from the CVE/advisory.

Use your knowledge of the CVE to identify what specific function/class is vulnerable. If you need more detail, use /analyze-cve to do a full dataflow trace.

Step 2 — Check if the package is used in application source code.

Use Grep to search for imports of the package in the application source:

  • JS/TS: import .* from 'package-name' or require('package-name')
  • Ruby: require 'package' or check Gemfile for direct gem declaration vs transitive

Step 3 — Apply these verdicts:

ScenarioVerdict
Package not imported anywhere in app source (transitive/build-only)CLOSE — Not Exploitable
Package imported but vulnerable function never calledCLOSE — Not Exploitable
Package imported, vulnerable function called, no user input reaches itCLOSE — Not Exploitable
Package imported, vulnerable function called with user-controlled input, no sanitizationKEEP OPEN
devDependency only (webpack-dev-server, jest, babel plugins)CLOSE — Not Exploitable

Step 4 — For complex SCA findings with user-reachable code paths: Run /analyze-cve skill to do a full dataflow trace before rendering the verdict.


2d — eol findings

  • Read the version file (.ruby-version, check package.json for the framework version).
  • Confirm the actual installed version.
  • Look up the EOL date from your knowledge.
  • If EOL date has passed: KEEP OPEN — Real Finding
  • Document the EOL date and recommended upgrade path.

Phase 3 — Assign Final Verdicts

For every finding, assign:

FieldValues
recommended_actionKEEP OPEN or CLOSE
close_categoryFalse Positive / File Removed / Not Exploitable / Real Finding
analyst_notesOne sentence — what you found and why
evidenceSpecific file:line references and code fragments proving the verdict

Phase 4 — Output the Reviewed CSV

Write a new CSV to the same directory as the input CSV, named <original-name>-reviewed.csv.

Column set (lean — do not include empty cloud/VM/container columns from the original):

aikido_issue_id, type, severity, affected_file, related_cve, rule, start_line,
recommended_action, close_category, analyst_notes, evidence

Rules:

  • Wrap any field containing commas in double quotes
  • Use | (space-pipe-space) as separator within the evidence field — never commas
  • Keep analyst_notes to one sentence with no commas
  • Every row must have exactly 11 fields

Phase 5 — Generate the HTML Evidence Report

Write a self-contained HTML file to the same directory as the CSV, named <project-name>-security-review.html.

HTML structure (follow this exactly)

1. <header>  — project name, analyst, date, branch/source
2. Stats bar — total / close / keep open / false positive / file removed / not exploitable counts
3. Jump nav  — anchor links to each section
4. Full summary table — all findings, colour-coded by severity and action
5. KEEP OPEN section — one detailed card per finding with full code evidence
6. FALSE POSITIVES section — one card per finding with evidence showing why it's a FP
7. FILE REMOVED section — simple table (no code to show)
8. NOT EXPLOITABLE section — one card per finding with code evidence
9. <footer>

Card anatomy (for sections 5, 6, 8)

Each finding card must contain:

  • Finding ID, severity badge, type, file:line
  • recommended_action badge
  • Verdict paragraph — plain English explanation
  • Fix (for KEEP OPEN only) — exact command or code change required
  • Evidence code block — the actual lines from the file, syntax-highlighted, with line numbers and comments explaining what is or isn't vulnerable

Code block style

Use <pre> blocks with dark background. Add inline <span> highlights:

  • class="highlight" — red, for the vulnerable or suspicious line
  • class="ok" — green, for the safe/correct pattern
  • class="comment" — gray, for explanatory annotations added by the analyst

Severity badge colours

  • Critical → red background
  • High → orange background
  • Medium → yellow background
  • Low → green background

Action badge colours

  • KEEP OPEN → red
  • CLOSE → green

Close category badge colours

  • False Positive → blue
  • File Removed → purple
  • Not Exploitable → green
  • Real Finding → red

CSS

Embed all CSS in a <style> block in <head>. No external dependencies — the file must be fully self-contained and openable offline.

Use a clean, professional light theme. Monospace font for file paths and code. System font stack for prose.


Phase 6 — Summary to User

After writing both files, output a short summary:

## Triage complete

**CSV:** /path/to/reviewed.csv
**Report:** /path/to/report.html

| Action     | Count |
|------------|-------|
| KEEP OPEN  | N     |
| CLOSE      | N     |
| — False Positive | N |
| — File Removed   | N |
| — Not Exploitable| N |

**Keep open findings:**
- [ID] severity — short description
- ...

Rules

  • Read every flagged file before rendering a verdict. Never close a finding based on the rule name alone.
  • Batch independent reads in parallel — read multiple files in one response when they don't depend on each other.
  • Use /analyze-cve for complex SCA findings where user input may reach the vulnerable function. Do not skip this.
  • For leaked_secret findings on files that exist: always read the exact flagged lines. Do not assume it's a false positive without looking.
  • Preserve line numbers in all code snippets — use the actual line numbers from the source file.
  • Do not fabricate code. Only quote lines you have actually read from the file.
  • Write the HTML last — after all verdicts are finalized, so the report is complete.
  • Do not include empty columns in the output CSV — strip the cloud/VM/container/ARN columns from the original Aikido export.

Finding type quick reference

Aikido typePrimary checkMost common outcome
leaked_secretDoes file exist? Then read flagged lines.False Positive or File Removed
sast — NoSQLTrace call chain to actual DB driverAlmost always False Positive if MySQL/Postgres stack
sast — SQLiRead raw SQL method, check interpolation + type coercionMedium finding, often partially mitigated
sast — ActionsCheck for SHA pin vs tag pinReal finding if tag-pinned
open_sourceGrep app source for import, check if vulnerable function usedOften Not Exploitable (transitive/build-only)
eolRead version file, check EOL dateAlways a real finding if EOL date passed

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.