agentleFS
AWSKnown publisherawslabs/automated-security-helper/ash-agent-plugins/agentic-coding/plugins/goose/AGENTS.md

automated-security-helper / goose

AGENTS.md696 starsChanged 58 days agoApache-2.0View on GitHub

Run ASH (Automated Security Helper) security scans via MCP — Bandit, Semgrep, detect-secrets, Checkov, Grype, Syft, and more across Python, JS, IaC, and dependencies. ASH (Automated Security Helper) wraps nine security scanners behind a single MCP interface. The server exposes scans as async tools — start a scan, poll for progress, fetch filtered results. This skill assumes the ASH MCP server is configured (the plugin/power that ships this skill provides it). Every scan follows this exact pattern. Skipping the poll…

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

18 rules. About 1 is common, 14 are distinctive, and 3 are very specific to this project.

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈14

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Common:

    Run ASH (Automated Security Helper) security scans via MCP — Bandit, Semgrep, detect-secrets, Checkov, Grype, Syft, and more across Python, …

    line 3
  2. Distinctive:

    Every scan follows this exact pattern.

    line 13
  3. Very specific:

    Call run_ash_scan with the absolute path to the project.

    line 17
  4. Very specific:

    Stop polling when status is one of completed | failed | cancelled.

    line 44
  5. Distinctive:

    All scans the server tracks (active + recently completed).

    line 238
  6. Distinctive:

    No parameters. Returns a list of scan summaries.

    line 240
  7. Distinctive:

    Stop a running scan and free resources.

    line 244
  8. Distinctive:

    Verify ASH is installed and the MCP server can spawn it.

    line 254
  9. Distinctive:

    No parameters. Returns version string and feature flags.

    line 256
  10. Distinctive:

    Delete this session's delivered source tree and workspace.

    line 260
  11. Distinctive:

    No parameters. Deletes this session's delivered source tree and workspace.

    line 262
  12. Distinctive:

    No parameters. Returns the config profiles the operator registered at server startup.

    line 295
  13. Distinctive:

    No parameters. Returns one entry per registered scanner with its config name, detected version, and whether it is enabled.

    line 301
  14. Distinctive:

    Verify an uploaded zip and extract it as this session's scan target.

    line 368
  15. Distinctive:

    Read these via the standard MCP resource read mechanism for context-free help.

    line 403
  16. Distinctive:

    Cause: Not polling on the 5-second cadence the ASH server's docstring requests.

    line 418
  17. Very specific:

    Fix: If you arrived here from MCP, check filesystem permissions on the project directory.

    line 459
  18. Distinctive:

    Fix: Keep polling. If it's still empty after 60 seconds, cancel and check the ASH server logs.

    line 467

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md 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
AGENTS.md

ASH Security Scanner

Run ASH (Automated Security Helper) security scans via MCP — Bandit, Semgrep, detect-secrets, Checkov, Grype, Syft, and more across Python, JS, IaC, and dependencies.

ASH MCP — Security Scanning Workflow

ASH (Automated Security Helper) wraps nine security scanners behind a single MCP interface. The server exposes scans as async tools — start a scan, poll for progress, fetch filtered results.

This skill assumes the ASH MCP server is configured (the plugin/power that ships this skill provides it).

The mandatory three-step workflow

Every scan follows this exact pattern. Skipping the poll step means stale progress visibility — the scan keeps running server-side, but you lose real-time updates.

Step 1 — Start the scan

Call run_ash_scan with the absolute path to the project. The call returns immediately with a scan_id.

run_ash_scan(
    source_dir="/absolute/path/to/project",
    severity_threshold="MEDIUM",   # CRITICAL | HIGH | MEDIUM | LOW | INFO
    config_path=None,              # Optional path to .ash.yaml
    clean_output=True
)

Returns a dict with scan_id, status: "running", directory_path (the resolved absolute scan root), and an important.next_steps block. Always store the scan_id — every subsequent call needs it.

For the output directory, prefer reading output_directory from any subsequent get_scan_progress response (it pre-computes the path). If you need the output dir before the first poll, derive it from this response's directory_path as <directory_path>/.ash/ash_output/.

The server's important.next_steps block recommends polling progress['is_complete']. Ignore that — is_complete stays False for cancelled scans. Always check status independently, as described in Step 2.

The MCP server always runs scans in local mode (Python-only, no Docker). For container or precommit modes, use the ASH CLI directly. Scanner selection lives in .ash/.ash.yaml, not in tool parameters.

Step 2 — Poll progress every 5 seconds

Loop on get_scan_progress until the scan is complete. The 5-second cadence is what the ASH MCP server's own docstring requests for reliable progress streaming over long scans.

get_scan_progress(scan_id="<uuid>")

Stop polling when status is one of completed | failed | cancelled. Do not rely on is_complete alone — it stays False for cancelled scans, so polling on is_complete will loop forever after a cancel. Typical scans take 30-120 seconds.

For progress display, use completed_scanners / total_scanners — but check total_scanners > 0 first (it's zero during pre-flight before any scanner registers; show "initializing" in that case). The response also includes severity_counts and per-scanner breakdown to surface in user-facing updates.

The scan itself runs server-side regardless of polling cadence — polling is for progress visibility, not for keeping the scan alive.

Step 3 — Fetch results with the right filter

Once the scan is complete, call get_scan_results. Match the filter to the user's intent.

User goalFilter combination
"How bad is it?"filter_level="summary" + actionable_only=True
"Show me the critical issues"filter_level="full" + severities="critical,high"
"Audit Bandit only"scanners="bandit" + filter_level="full"
"Generate exec summary"Use get_scan_result_paths, then read ash.summary.md
get_scan_results(
    output_dir="/absolute/path/to/project/.ash/ash_output",
    filter_level="summary",
    severities="critical,high",
    actionable_only=True
)

For HTML/SARIF/CSV reports, prefer get_scan_result_paths and read the files directly with native file tools — it avoids piping large payloads through MCP.

Tool inventory

For full parameter details, see tool-reference.md.

  • run_ash_scan — Start a scan asynchronously
  • get_scan_progress — Poll progress (call every 5s)
  • get_scan_results — Fetch filtered results
  • get_scan_summary — Counts only, no findings
  • get_scan_result_paths — File paths to all reports
  • list_active_scans — All current/recent scans
  • cancel_scan — Stop a running scan
  • check_installation — Verify ASH is installed

Choosing scanners

ASH runs all nine scanners by default. To run only a subset, edit .ash/.ash.yaml at the project root before scanning — run_ash_scan does not accept a scanners argument. To filter results post-scan, use the scanners parameter on get_scan_results.

For result-time filtering by scanner:

  • Python issues → scanners="bandit,semgrep"
  • Secrets only → scanners="detect-secrets"
  • IaC review → scanners="checkov,cfn_nag,cdk-nag"
  • Dependencies → scanners="grype,npm-audit"
  • SBOM generation → scanners="syft"

When something goes wrong

See troubleshooting.md for the common failures: connection timeouts, empty results, stuck scans, container/Docker issues, suppression rules not applying.

The fast checks: scan never starts → run check_installation first. Scan returns no findings → drop actionable_only and widen severities. Stale progress visibility → you weren't polling every 5 seconds.

Reference

ASH MCP Tool Reference

<!-- Generated by scripts/generate_mcp_tool_reference.py from the MCP server's registered tools and resources. Do not edit this file directly; edit the generator (prose and caveats live in its TOOL_NOTES table) and re-run it, then `agentic-plugins build` to propagate to every plugin backend. -->

The ASH MCP server exposes twenty-two tools and five resources.

run_ash_scan

Starts a scan asynchronously. Returns a scan_id immediately — the scan continues in the background regardless of MCP connection state.

ParamTypeDefaultNotes
source_dirstring | nullcurrent dirAbsolute path to scan
severity_thresholdstring"MEDIUM"Findings below this are filtered out at scan time
config_pathstring | null<source>/.ash/.ash.yamlCustom config path
clean_outputbooleantrueWipe stale reports before starting

Output reports are written to <source_dir>/.ash/ash_output/ — there is no parameter to override this. Scanner selection, mode, and other tuning live in .ash/.ash.yaml, not in tool arguments.

Returns:

{
  "success": true,
  "status": "running",
  "scan_id": "<uuid>",
  "progress": 0.0,
  "message": "Scan started, initializing scanners. Use get_scan_progress to track progress.",
  "directory_path": "<absolute path scanned>",
  "important": {
    "connection_management": "<server's polling guidance>",
    "next_steps": ["..."]
  }
}

The directory_path field tells you the resolved absolute path the server is scanning — derive output_dir for get_scan_results from this value (<directory_path>/.ash/ash_output) rather than constructing it independently.

Heads-up: the server's own docstring and the important.next_steps array suggest polling progress['is_complete']. This is incomplete advice — is_complete stays False for cancelled scans. Always check status independently. (See get_scan_progress below.)

get_scan_progress

Poll progress every 5 seconds until complete. Keeps the MCP connection alive while the scan runs.

ParamTypeNotes
scan_idstringFrom run_ash_scan

Returns:

{
  "scan_id": "...",
  "directory_path": "/path/to/scanned/project",
  "output_directory": "/path/to/.ash/ash_output",
  "start_time": "<iso8601>",
  "end_time": "<iso8601 | null>",
  "status": "pending | running | completed | incomplete | failed | cancelled",
  "severity_threshold": "MEDIUM",
  "config_path": "<path | null>",
  "warnings": [...],
  "error_message": "<str | null>",
  "is_complete": bool,
  "coverage_complete": "bool | null",
  "incomplete_scanners": [
    { "scanner": "grype", "status": "MISSING", "reason": "missing_dependencies", "detail": "MISSING" }
  ],
  "no_scanner_ran": bool,
  "incomplete_converters": [{ "converter": "...", "reason": "..." }],
  "unevaluated_rules": ["..."],
  "stale_content_databases": [{ "name": "grype-db", "scanner": "grype", "built": "<iso8601 | null>", "age": "...", "max_age": "...", "refresh": "..." }],
  "completed_scanners": int,
  "total_scanners": int,
  "total_findings": int,
  "severity_counts": { "critical": int, "high": int, "medium": int, "low": int, "info": int, "suppressed": int },
  "scanners": {
    "<scanner_name>": {
      "<target_type>": { ... per-scanner-target progress ... }
    }
  }
}

There is no overall percentage field. To compute progress, use completed_scanners / total_scanners — but guard against total_scanners == 0 during the pre-flight phase (before any scanner has registered). Show "initializing" or 0% when total_scanners is zero.

There is no top-level duration field — derive elapsed time from start_time and end_time (or from current time while running).

is_complete does not flip to True for cancelled scans — it returns True for completed and incomplete, and for failed once a results file exists. Always check status independently: stop polling when status is completed, incomplete, failed, or cancelled. Polling on is_complete alone will loop forever on a cancelled scan.

incomplete is terminal, with partial coverage. The run finished and its results are readable, but a selected scanner was MISSING or ERROR (or lost targets), no scanner reached a verdict, a converter did not run, a rule could not be evaluated, or a content database was past its declared age bound. incomplete_scanners names each scanner and why, and stale_content_databases each stale database. The findings are real but partial, so read them, and do not report the target as clean. failed means the run crashed or left no readable results. coverage_complete is null while running and for failed or cancelled; with fail_on_incomplete_scanners: false a scan is completed with coverage_complete: false when scanners did not run.

Status enum: the documented values are pending | running | completed | incomplete | failed | cancelled. The registry uses pending briefly while a scan is queued, transitions to running once execution begins, and may also expose the legacy in_progress string from older ScanProgress instances. Treat pending, running, and in_progress as equivalent "not done yet" states.

get_scan_results

Fetch finalized results with filtering. Run only after get_scan_progress reports complete.

ParamTypeDefaultNotes
output_dirstring".ash/ash_output"Absolute path strongly recommended; the server resolves relative paths against its own cwd, which usually isn't your project root
filter_levelstring"full"full, summary, minimal
scannersstringallComma-separated subset
severitiesstringallcritical,high,medium,low,info
actionable_onlybooleanfalseDrop suppressed findings

Returns full or filtered findings depending on filter_level.

status is completed or incomplete, decided by the same rule as the scan's exit code, with coverage_complete and incomplete_scanners as in get_scan_progress. An incomplete scan's findings are returned in full.

get_scan_summary

Metadata and counts only — no individual findings. Cheap for quick health checks.

ParamTypeDefaultNotes
output_dirstring".ash/ash_output"Absolute path

Returns total count, severity breakdown, scanner statuses.

get_scan_result_paths

Returns file paths to all generated reports. Useful when you want to read HTML, SARIF, CSV, or markdown directly with file tools instead of pulling JSON over MCP.

ParamTypeDefaultNotes
output_dirstring".ash/ash_output"Absolute path

Returns a dict mapping format names to absolute paths.

list_active_scans

All scans the server tracks (active + recently completed).

No parameters. Returns a list of scan summaries.

cancel_scan

Stop a running scan and free resources.

ParamTypeNotes
scan_idstringThe scan to stop

Returns confirmation.

check_installation

Verify ASH is installed and the MCP server can spawn it. Run before the first scan in a session if you're unsure of the install state.

No parameters. Returns version string and feature flags.

clear_source

Delete this session's delivered source tree and workspace.

No parameters. Deletes this session's delivered source tree and workspace.

diff_scan_results

Compare two ash_aggregated_results.json files and return a structured diff.

ParamTypeNotes
before_pathstringPath to the baseline ash_aggregated_results.json file.
after_pathstringPath to the comparison ash_aggregated_results.json file.

explain_finding

Return structured details for a single finding by ID.

ParamTypeDefaultNotes
finding_idstringrequiredThe FlatVulnerability ID to look up (e.g. "bandit-B601-deadbeef").
results_pathstring | nullnullOptional path to the output directory containing ash_aggregated_results.json. Defaults to <cwd>/.ash/ash_output.

get_config

Get the resolved ASH config (defaults + user overrides merged).

ParamTypeDefaultNotes
config_pathstring | nullnullOptional explicit path to config file. If None, auto-discovers.
rawbooleanfalseIf True, returns the user file contents without merging defaults.

list_profiles

List the config profiles the operator registered at server startup.

No parameters. Returns the config profiles the operator registered at server startup.

list_scanners

List all registered ASH scanners with their metadata.

No parameters. Returns one entry per registered scanner with its config name, detected version, and whether it is enabled.

resolve_ash_workspace

Resolve a VS Code workspace file into a scan plan without scanning anything.

ParamTypeDefaultNotes
workspace_filestringrequiredAbsolute path to the .code-workspace file.
workspace_configstring | nullnullOptional path to a workspace policy file. Must exist if given; ASH will not fall back to searching for one.
allow_missing_projectsbooleanfalseMark project directories that are absent or unreadable as skipped instead of refusing the workspace.
config_overridesarray | nullnullOptional list of key=value config overrides, applied to each project's config so the reported threshold is the enforced one.
profilestring | nullnullName of a registered config profile to resolve under for this one call, instead of whatever select_profile bound to this session. Call list_profiles to see what the operator registered.

run_ash_workspace_scan

Scan every project in a VS Code workspace and return the per-project verdict.

ParamTypeDefaultNotes
workspace_filestringrequiredAbsolute path to the .code-workspace file.
workspace_configstring | nullnullOptional path to a workspace policy file.
allow_missing_projectsbooleanfalseSkip absent or unreadable project directories rather than refusing the workspace.
config_overridesarray | nullnullOptional list of key=value config overrides.
output_dirstring | nullnullWhere to write the workspace output tree. Defaults to <workspace root>/.ash/ash_output.
scannersarray | nullnullRestrict every project to these scanner names.
excluded_scannersarray | nullnullExclude these scanners from every project. Takes precedence over scanners.
offlinebooleanfalseRun without network access.
clean_outputbooleantrueRemove each project's previous aggregated-results file first.
profilestring | nullnullName of a registered config profile to scan under for this one call, instead of whatever select_profile bound to this session. An unknown name refuses the whole scan; running N repository scans under the default config because a profile name was misspelled, and reporting success, is exactly what the confinement refusal above exists to prevent.

select_profile

Bind one of the operator's registered config profiles to this session.

ParamTypeDefaultNotes
profile_namestringrequiredName the operator registered the profile under.
patch_opsarray | nullnullJSON-Patch operations to apply to the profile's config.
override_yamlstring | nullnullComplete ASH config YAML replacing the profile's.

set_source_git

Clone a repository into this session's workspace and make it the scan target.

ParamTypeDefaultNotes
urlstringrequiredRepository URL
refstring | nulldefault branchBranch, tag, or commit
ssh_key_idstring | nullnoneOperator-registered key id for private repos
depthinteger1Clone depth; 0 for a full clone

set_source_zip_chunk

Upload one base64 chunk of a zipped source tree.

ParamTypeNotes
upload_idstringCaller-chosen id tying the chunks of one upload together
sequenceintegerZero-based chunk index; chunks must arrive in order
data_b64stringBase64 of this chunk's bytes
lastbooleantrue on the final chunk

Pair with set_source_zip_finalize, which verifies the reassembled archive against expected_sha256 before extracting it. A chunked upload that is never finalized is not a scan target.

set_source_zip_finalize

Verify an uploaded zip and extract it as this session's scan target.

ParamTypeNotes
upload_idstringThe identifier used for the preceding chunk calls.
expected_sha256stringHex sha256 of the complete zip.

suggest_suppression

Build a paste-ready AshSuppression entry for a specific finding.

ParamTypeDefaultNotes
finding_idstringrequiredStable hash ID of the finding (from get_scan_results or explain_finding).
results_pathstring | nullnullPath to ash_aggregated_results.json. Defaults to .ash/ash_output/ash_aggregated_results.json in cwd.
expirationstring | nullnullExpiration date in YYYY-MM-DD format. Defaults to 90 days from today.
justificationstring | nullnullHuman-readable reason for the suppression.

validate_config

Validate an ASH configuration file or content string.

ParamTypeDefaultNotes
config_contentstring | nullnullYAML/JSON string to validate.
config_pathstring | nullnullPath to the config file to validate.

Resources

  • ash://exit-codes — Return the meaning of each ASH exit code as JSON
  • ash://help — Get help information about ASH usage
  • ash://schema/config — Return the AshConfig JSON schema
  • ash://schema/suppression — Return the AshSuppression JSON schema
  • ash://status — Get the current status of ASH installation

Read these via the standard MCP resource read mechanism for context-free help.

Severity levels

CRITICAL > HIGH > MEDIUM > LOW > INFO > SUPPRESSED

actionable_only=True drops SUPPRESSED findings (false positives, accepted risks).

ASH Troubleshooting

Stale progress visibility during scan

Symptom: get_scan_progress shows the same state for a long time, or the client appears to lose contact with the server.

Cause: Not polling on the 5-second cadence the ASH server's docstring requests. The scan itself runs server-side regardless of polling — only the progress channel suffers.

Fix: Poll get_scan_progress(scan_id=...) every 5 seconds while a scan is active. Even on small scans, this gives reliable per-scanner status. If the connection truly drops, reconnect and re-issue get_scan_progress with the stored scan_id — the server retains scan state.

Scan returns immediately with no findings

Symptom: get_scan_results returns an empty findings list, but the project clearly has issues.

Causes & fixes:

  1. actionable_only=True is dropping suppressed findings — set it to false to see everything.
  2. severities filter is too tight — try severities=None first.
  3. severity_threshold at scan time was too high — re-scan with severity_threshold="LOW".
  4. Scanners didn't run — check get_scan_summary output for scanner-level failures.

"ASH not installed"

Symptom: check_installation returns failure or run_ash_scan errors with "command not found."

Fix: The MCP server needs ASH on its PATH. The standard install via uvx:

uvx --from=git+https://github.com/awslabs/automated-security-helper@v3.7.0 ash mcp

This always uses the pinned ASH version regardless of system installs.

Scan never completes

Symptom: get_scan_progress shows status: running indefinitely.

Causes:

  1. Project too large — default scan timeout is 2400s (40 min). For larger codebases, set scan_timeout_seconds higher in .ash/.ash.yaml or scan a subdirectory.
  2. Stuck scanner — call cancel_scan(scan_id) and retry. To isolate which scanner is hanging, narrow the scanner set in .ash/.ash.yaml and re-scan.
  3. Server-side dependency stalled — restart the MCP server. The previous scan's state is lost, but the next scan will start clean.

Note: container-mode hangs are not possible via the MCP server — it always runs in local mode. If you suspect a Docker issue, you're not using the MCP integration; check your CLI invocation.

"Permission denied" reading output

Symptom: get_scan_result_paths returns paths but the files can't be read.

Cause: This typically only happens with CLI container-mode scans, which leave files owned by root. The MCP server runs in local mode, so this should not occur via MCP.

Fix: If you arrived here from MCP, check filesystem permissions on the project directory. If you're mixing CLI container scans with MCP reads, chown the output directory.

Empty scanners map in progress

Symptom: get_scan_progress shows scanners: {} and completed_scanners: 0, total_scanners: 0 for a long time.

Cause: The scan is still in the pre-flight phase (cloning, dependency analysis). This is normal for the first 5-15 seconds of a scan, longer for large projects.

Fix: Keep polling. If it's still empty after 60 seconds, cancel and check the ASH server logs.

SUPPRESSED findings keep appearing

Symptom: Findings flagged as suppressed/false-positive show up in actionable_only=True results.

Cause: Suppression rules are stored in .ash/.ash.yaml under global_settings.ignore_paths and per-scanner config blocks. If those aren't being read, suppressions don't apply.

Fix: Confirm .ash/.ash.yaml exists at the project root and has the right syntax. Run with actionable_only=False to see ALL findings (including suppressed) and verify the suppression rules match.

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.