Skip to content
Skip to content
Documentation

ASH across the SDLC and AI-DLC

A security scan is cheap or expensive depending on when it runs. The same finding costs seconds while the code is in the editor, a push and a context switch once it is on a pull request, and an incident once it is in production. ASH is one scanner harness you can place at every one of those moments, so each moment runs the check it can afford and the complete scan still happens where it belongs.

The lifecycle, moment by moment

flowchart LR
    code[Write code] --> commit[Commit]
    commit --> push[Push]
    push --> pr[Pull request]
    pr --> merge[Merge]
    merge --> release[Release]
    release --> operate[Operate]
Moment What runs Guide
Write code A terminal scan scoped to fast scanners, ash inspect findings to work through results, or a scan the editor's agent runs over MCP Scan on your machine, Connect an AI agent
Commit The ash pre-commit hook: precommit mode's five fast scanners, seconds per commit after the first run Run ASH with pre-commit
Push The same hook on stages: [pre-push], or ash-full-scan for the container image's full scanner set When the hook runs, The ash-full-scan hook
Pull request The complete scan on a clean runner, gating on the exit code; the summary as a comment, findings as code scanning annotations, --changed-files-only so the gate counts the change's own findings Add ASH to CI, Gate on the files a change touches
Merge A scan of the default branch after each merge, which keeps the analysis that code scanning compares later pull requests against, and whose saved ash_aggregated_results.json can serve as the --baseline of later local and precommit scans Add ASH to CI, Gate only on new findings
Release A scan from a pinned ASH release or an image you built, with the SBOM (ash.cdx.json) among the reports Roll out across repositories, CycloneDX and SPDX
Operate Rescans on a schedule: grype and trivy read vulnerability databases that age, so an unchanged tree can gain findings, and ASH fails a scan whose database is stale rather than reporting from it Plan content database refresh, Content databases

Three properties hold across the row boundaries. The scan is the same ash everywhere, so a finding reproduces locally with one command. The verdict is the exit code everywhere, so every gate reads the same signal. And an accepted risk is a suppression with a reason and an expiration, recorded once in configuration and honored at every moment.

The same moments, AI-assisted

When an agent writes the code, the lifecycle keeps its shape and loses its pauses: the agent commits many times an hour, does not get tired of a slow hook (but will route around one if its instructions allow), and can read scan results itself. The checkpoints map over directly:

Human loop Agent loop What ASH does there
Write code in an editor The agent generates code for a task The agent scans over MCP and fixes actionable findings before presenting the work
Commit and push hooks The agent's task or Unit ends A precommit-mode scan at the task boundary rather than at each of dozens of commits; the hooks still back it up
Review the pull request A human approval gate The scan summary, the diff's suppressions with reasons and expirations, and ash diff or diff_scan_results between before and after
Triage a backlog MCP-driven triage explain_finding for context, suggest_suppression for a drafted, expiring exception a human approves (MCP tools)

Two practices from the persona pages matter more here. Give the agent ASH's own instructions (ash get-genai-guide, or an agent plugin that packages the server and the guidance), so scanning is part of its definition of done rather than a step it can skip. And treat generated or fetched code as untrusted input to the scanners: the scanner sandbox exists for exactly this.

AI-DLC, and running ASH at its checkpoints

AI-DLC (AI-Driven Development Life Cycle, the awslabs/aidlc-workflows project on GitHub) is an AWS Labs methodology that, in its own words, "turns AI coding assistants into structured, verifiable software-delivery workflows". One engine runs the same workflows in Claude Code, Kiro, Codex CLI, Cursor, opencode, and GitHub Copilot: five phases from initialization through operation, stages with human approval gates, an audit trail, and workflow profiles for common kinds of work. Where the table above names moments in a repository's life, AI-DLC names stages in a delivery workflow, and two of its construction stages are exactly where ASH belongs:

  • Code Generation runs once per Unit of work, led by a developer agent. A fast ASH scan there gives the agent findings while it still holds the context to fix them, before the Unit's completion handoff.
  • Build and Test runs once per intent, after all Units. A full ASH scan there is the security half of the build gate, and its scanner table belongs in the stage summary the human reads at the approval gate.

AI-DLC has a plugin mechanism for exactly this kind of addition: a plugin composes new steps into core stages without editing them, and ships house rules the engine keeps in front of the agent. ASH's repository carries a worked example in that format, examples/aidlc-workflows/ash-scan, which adds the two scans above and a rules file with ASH habits (read the exit code; suppress with a reason and an expiry instead of loosening the gate). Use ASH with AI-DLC workflows walks through validating, building, and installing it with AI-DLC's own plugin tools.

The division of labor is deliberate. AI-DLC decides when the agent must stop and show its work; ASH decides whether the code passes and keeps the record. Suppressions written during a workflow surface in stage summaries at approval gates, so the human approves the exceptions, and the pipeline scans from the lifecycle table still run unchanged: an AI-DLC workflow ends in a pull request, and the pull request's gate neither knows nor cares who wrote the code.