Skip to content
Skip to content
ASH v3.8.0

Automated Security Helper

Scan code, infrastructure, secrets, and dependencies.

ash --mode container
Open source · Apache 2.0

Scan example

Reports ready

Files 01

Scanners 02

BanditSemgrep
CheckovCFN-Nag
detect-secrets
npm auditSyft + Grype
Bandit

Findings 03

High Shell command
High Public ingress
High Embedded credential
Medium Package vulnerability
High Hardcoded password
Coverage recorded
Aggregated results

Example data · Scanner coverage depends on configuration.

Converters turn files scanners cannot read into files they can, so scanners audit the full tree. The archive converter extracts the scannable members of zip and tar archives. The jupyter converter turns each notebook into a Python script with jupyter-nbconvert.

AWS Labs Scan workflow ASH v3.8.0

Install and scan

01

Pick a workflow

A local scan, pre-commit, CI, or an MCP server.

02

Pick how you run ASH

uv tool, uvx, pipx, pip, a container, Nix, or Homebrew. Python 3.10+.

03

Review results

Open the HTML report or run ash inspect findings.

Full installation guide Integrations overview
Build a command

Local scan with uv tool

Installs ASH, then the scanner tools it can install for you, then runs a local-mode scan.

# Shell
uv tool install --python 3.12 'automated-security-helper[cdk] @ git+https://github.com/awslabs/automated-security-helper.git@v3.8.0'
ash dependencies install
ash scan --mode local

Local scan with uvx

The alias runs ASH through uvx without installing it. Every call uses the full specification.

# Shell
alias ash="uvx --python 3.12 --from 'automated-security-helper[cdk] @ git+https://github.com/awslabs/automated-security-helper.git@v3.8.0' ash"
ash dependencies install
ash scan --mode local

Local scan with pipx

Installs ASH in an isolated pipx environment, then the scanner tools, then runs a local-mode scan.

# Shell
pipx install --python python3.12 'automated-security-helper[cdk] @ git+https://github.com/awslabs/automated-security-helper.git@v3.8.0'
ash dependencies install
ash scan --mode local

Local scan with pip

Linux and macOS. Keep the virtual environment outside the projects you scan. The install guide has the Windows form.

# Shell
python3.12 -m venv ~/.venvs/ash
. ~/.venvs/ash/bin/activate
pip install 'automated-security-helper[cdk] @ git+https://github.com/awslabs/automated-security-helper.git@v3.8.0'
ash dependencies install
ash scan --mode local

Local scan in a container

Needs ASH installed by any method on the install page, and finch, docker, nerdctl, or podman. No ASH image is published: the first run builds one on your machine. Run it from a directory that is not the repository you scan.

# Shell
ash scan --mode container --source-dir src/my-app --output-dir ash-output/my-app

Local scan in Nix mode

Installs ASH, then scans inside a Nix shell whose scanner tools come from the release's flake. Needs Nix with flakes enabled.

# Shell
uv tool install --python 3.12 'automated-security-helper[cdk] @ git+https://github.com/awslabs/automated-security-helper.git@v3.8.0'
ash scan --mode nix

Local scan with Homebrew

The formula installs the latest release; it cannot install main.

# Shell
brew tap awslabs/automated-security-helper https://github.com/awslabs/automated-security-helper.git
brew install awslabs/automated-security-helper/ash
ash dependencies install
ash scan --mode local

pre-commit hook

pre-commit builds the hook's environment, so the way you installed ASH does not change this block. The hook runs a fixed set of five scanners.

# .pre-commit-config.yaml
repos:
  - repo: https://github.com/awslabs/automated-security-helper
    rev: v3.8.0
    hooks:
      - id: ash
# Shell
pre-commit install
pre-commit run ash --all-files

pre-commit full-scan hook

Builds ASH's container image on first use, which takes several minutes, and needs a container runtime. Run it before a push or by hand.

# .pre-commit-config.yaml
repos:
  - repo: https://github.com/awslabs/automated-security-helper
    rev: v3.8.0
    hooks:
      - id: ash-full-scan
        stages: [manual]
# Shell
pre-commit run --hook-stage manual ash-full-scan --all-files

pre-commit: not offered for Nix

There is no pre-commit snippet for this backend. The pre-commit guide has a Nix hook that runs an ASH you already installed.

GitHub Actions: reusable workflows

The workflow installs ASH itself, so the way you installed ASH does not change it. ash-version matches the uses ref, so the workflow runs the ASH it was written for.

# GitHub Actions workflow
name: ASH
on:
  pull_request:
  push:
    branches: [main]
permissions:
  contents: read
jobs:
  ash:
    uses: awslabs/automated-security-helper/.github/workflows/run-ash-security-scan.yml@v3.8.0
    permissions:
      contents: read
      checks: write
      pull-requests: write
    with:
      ash-version: v3.8.0
      ash-args: --fail-on-incomplete-scanners --no-allow-stale-content-db
      collect-sarif-report: false
  sarif:
    needs: ash
    if: ${{ !cancelled() && needs.ash.outputs.artifact-id != '' }}
    uses: awslabs/automated-security-helper/.github/workflows/upload-ash-sarif.yml@v3.8.0
    permissions:
      contents: read
      security-events: write

GitHub Actions: container mode

ash-mode: container builds ASH's image on the runner and scans inside it. changed-files-only is not supported in container mode.

# GitHub Actions workflow
name: ASH
on:
  pull_request:
  push:
    branches: [main]
permissions:
  contents: read
jobs:
  ash:
    uses: awslabs/automated-security-helper/.github/workflows/run-ash-security-scan.yml@v3.8.0
    permissions:
      contents: read
      checks: write
      pull-requests: write
    with:
      ash-mode: container
      ash-version: v3.8.0
      ash-args: --fail-on-incomplete-scanners --no-allow-stale-content-db
      collect-sarif-report: false
  sarif:
    needs: ash
    if: ${{ !cancelled() && needs.ash.outputs.artifact-id != '' }}
    uses: awslabs/automated-security-helper/.github/workflows/upload-ash-sarif.yml@v3.8.0
    permissions:
      contents: read
      security-events: write

GitHub Actions: not offered for Nix

The reusable workflow takes local or container for ash-mode and installs ASH on the runner. The GitHub Actions guide has a Nix recipe.

GitLab CI: pip virtual environment

The CI guide documents the pip virtual environment form, so it stands in for uv tool and pipx. Needs a Docker-executor runner, or a Debian or Ubuntu job image that runs as root. Two jobs, because GitLab ingests a security report only from a job that succeeds.

# .gitlab-ci.yml
ash-scan:
  stage: test
  image: python:3.12
  variables:
    INSTALL_SPEC: "automated-security-helper[cdk] @ git+https://github.com/awslabs/automated-security-helper.git@v3.8.0"
  before_script:
    - apt-get update -o Acquire::Retries=3 && apt-get install -y -o Acquire::Retries=3 --no-install-recommends nodejs npm ruby ruby-dev libyaml-dev
    - python -m venv /opt/ash
    - /opt/ash/bin/pip install --quiet "$INSTALL_SPEC"
    - export PATH="/opt/ash/bin:$PATH"
    - >-
      (cd "$(mktemp -d)" && ash dependencies install
      --tool actionlint --tool cfn-guard --tool cfn-nag --tool gitleaks --tool grype --tool opengrep --tool syft --tool trivy)
  script:
    - ash_exit=0
    - >-
      ash scan --mode local --no-progress
      --fail-on-findings --fail-on-incomplete-scanners --no-allow-stale-content-db
      || ash_exit=$?
    - echo "$ash_exit" > ash-exit-code.txt
  artifacts:
    when: always
    paths:
      - .ash/ash_output/reports/
      - .ash/ash_output/ash_aggregated_results.json
      - ash-exit-code.txt
    reports:
      sast: .ash/ash_output/reports/ash.gl-sast-report.json
      junit: .ash/ash_output/reports/ash.junit.xml

ash-gate:
  stage: test
  image: python:3.12
  needs: [ash-scan]
  script:
    - exit "$(cat ash-exit-code.txt)"

GitLab CI: uvx

Only the before_script differs from the pip form: a shell function runs ASH through uvx.

# .gitlab-ci.yml
ash-scan:
  stage: test
  image: python:3.12
  variables:
    INSTALL_SPEC: "automated-security-helper[cdk] @ git+https://github.com/awslabs/automated-security-helper.git@v3.8.0"
  before_script:
    - apt-get update -o Acquire::Retries=3 && apt-get install -y -o Acquire::Retries=3 --no-install-recommends nodejs npm ruby ruby-dev libyaml-dev
    - pip install --quiet uv
    - ash() { uvx --python 3.12 --from "$INSTALL_SPEC" ash "$@"; }
    - >-
      (cd "$(mktemp -d)" && ash dependencies install
      --tool actionlint --tool cfn-guard --tool cfn-nag --tool gitleaks --tool grype --tool opengrep --tool syft --tool trivy)
  script:
    - ash_exit=0
    - >-
      ash scan --mode local --no-progress
      --fail-on-findings --fail-on-incomplete-scanners --no-allow-stale-content-db
      || ash_exit=$?
    - echo "$ash_exit" > ash-exit-code.txt
  artifacts:
    when: always
    paths:
      - .ash/ash_output/reports/
      - .ash/ash_output/ash_aggregated_results.json
      - ash-exit-code.txt
    reports:
      sast: .ash/ash_output/reports/ash.gl-sast-report.json
      junit: .ash/ash_output/reports/ash.junit.xml

ash-gate:
  stage: test
  image: python:3.12
  needs: [ash-scan]
  script:
    - exit "$(cat ash-exit-code.txt)"

GitLab CI: your own ASH image

Build ASH's image once with the ci target and push it to your registry. registry.example.com is a placeholder for your registry.

# .gitlab-ci.yml
ash-scan:
  stage: test
  image: registry.example.com/security/automated-security-helper:ci
  script:
    - ash_exit=0
    - >-
      ash scan --mode local --no-progress
      --fail-on-findings --fail-on-incomplete-scanners --no-allow-stale-content-db
      || ash_exit=$?
    - echo "$ash_exit" > ash-exit-code.txt
  artifacts:
    when: always
    paths:
      - .ash/ash_output/reports/
      - .ash/ash_output/ash_aggregated_results.json
      - ash-exit-code.txt
    reports:
      sast: .ash/ash_output/reports/ash.gl-sast-report.json
      junit: .ash/ash_output/reports/ash.junit.xml

ash-gate:
  stage: test
  image: registry.example.com/security/automated-security-helper:ci
  needs: [ash-scan]
  script:
    - exit "$(cat ash-exit-code.txt)"

GitLab CI: not offered for Nix or Homebrew

The GitLab guide documents the pip, uvx, and own-image forms here, and has its own Nix mode section.

Other CI systems: shell recipe, pip

Run it from the root of the checkout, with the virtual environment outside it. The guide wraps this recipe for Jenkins, AWS CodeBuild, Azure Pipelines, and CircleCI. It documents the pip virtual environment form, so it stands in for uv tool and pipx.

# Shell
python3 -m venv "$HOME/ash-venv"
"$HOME/ash-venv/bin/pip" install --quiet \
  "automated-security-helper[cdk] @ git+https://github.com/awslabs/automated-security-helper.git@v3.8.0"
export PATH="$HOME/ash-venv/bin:$PATH"
(cd "$(mktemp -d)" && ash dependencies install \
  --tool actionlint --tool cfn-guard --tool cfn-nag --tool gitleaks --tool grype --tool opengrep --tool syft --tool trivy)
ash scan --mode local --no-progress \
  --fail-on-findings --fail-on-incomplete-scanners --no-allow-stale-content-db

Other CI systems: shell recipe, uvx

Needs uv on the build host's PATH. uvx builds the environment on the first call and reuses it. Use it where the commands share one shell (Jenkins, CodeBuild, a generic shell step); Azure Pipelines and CircleCI start a new shell for each step, so the guide covers their form.

# Shell
ash() {
  uvx --python 3.12 --from \
    'automated-security-helper[cdk] @ git+https://github.com/awslabs/automated-security-helper.git@v3.8.0' \
    ash "$@"
}
(cd "$(mktemp -d)" && ash dependencies install \
  --tool actionlint --tool cfn-guard --tool cfn-nag --tool gitleaks --tool grype --tool opengrep --tool syft --tool trivy)
ash scan --mode local --no-progress \
  --fail-on-findings --fail-on-incomplete-scanners --no-allow-stale-content-db

Other CI systems: not offered here

The shell recipe covers pip and uvx. Container mode in CI builds an image on every fresh host, and the guide explains the alternatives. Nix mode has its own section.

MCP server: installed ash

Your MCP client starts the server with this command over stdio. ash must be on the PATH of the process that starts it, and the scanner tools installed for that user with ash dependencies install.

# MCP client configuration (JSON)
{
  "mcpServers": {
    "ash": {
      "command": "ash",
      "args": ["mcp"]
    }
  }
}

MCP server: uvx

uvx installs ASH from GitHub the first time the client starts the server, so ASH does not need to be installed. The entry installs ASH without the cdk extra, so the cdk-nag scanner is reported MISSING; the guide shows how to add it.

# MCP client configuration (JSON)
{
  "mcpServers": {
    "ash": {
      "command": "uvx",
      "args": [
        "--from=git+https://github.com/awslabs/automated-security-helper@v3.8.0",
        "ash",
        "mcp"
      ]
    }
  }
}

MCP server: not offered for a container or Nix

The docs run the server over stdio from an installed ash or uvx. A containerized server is covered for the AWS deployments, over streamable HTTP.

Example output
✓Discovering project filescomplete
✓Running security scannerscomplete
✓Aggregating findingscomplete
Reports ready in .ash/ash_output/
Do I need an AWS account?

No. Core ASH scanning runs locally or in a container. An AWS account is needed only for optional integrations with services such as Security Hub or S3.

Which scan mode should I use?

Use container for a consistent environment with all scanner dependencies, local for your development machine, and precommit for a faster subset before commits. Compare execution modes.

Can I customize the rules and reports?

Set scanners, thresholds, ignore paths, and suppressions in .ash.yaml. Configuration reference.

Does ASH replace a security review?

No. Coverage depends on enabled scanners, language, file type, and configuration.