Automated Security Helper
Scan code, infrastructure, secrets, and dependencies.
ash --mode container
Scan example
Reports readyFiles 01
Scanners 02
Findings 03
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.
Built-in scanners
Install and scan
Pick a workflow
A local scan, pre-commit, CI, or an MCP server.
Pick how you run ASH
uv tool, uvx, pipx, pip, a container, Nix, or Homebrew. Python 3.10+.
Review results
Open the HTML report or run ash inspect findings.
Local scan with uv tool
Installs ASH, then the scanner tools it can install for you, then runs a local-mode scan.
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 localLocal scan with uvx
The alias runs ASH through uvx without installing it. Every call uses the full specification.
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 localLocal scan with pipx
Installs ASH in an isolated pipx environment, then the scanner tools, then runs a local-mode scan.
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 localLocal scan with pip
Linux and macOS. Keep the virtual environment outside the projects you scan. The install guide has the Windows form.
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 localLocal 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.
ash scan --mode container --source-dir src/my-app --output-dir ash-output/my-appLocal 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.
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 nixLocal scan with Homebrew
The formula installs the latest release; it cannot install main.
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 localpre-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.
repos:
- repo: https://github.com/awslabs/automated-security-helper
rev: v3.8.0
hooks:
- id: ashpre-commit install
pre-commit run ash --all-filespre-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.
repos:
- repo: https://github.com/awslabs/automated-security-helper
rev: v3.8.0
hooks:
- id: ash-full-scan
stages: [manual]pre-commit run --hook-stage manual ash-full-scan --all-filespre-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.
Run ASH with pre-commit Run the hook in Nix mode Integrations overview
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.
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: writeGitHub 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.
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: writeGitHub 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.
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.
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.
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.
Run ASH in GitLab CI Nix mode in GitLab CI Integrations overview
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.
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-dbOther 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.
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-dbOther 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.
Local mode or container mode Nix mode in CI Integrations overview
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.
{
"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.
{
"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.
Run the server in a container Deploy ASH on AWS Integrations overview
.ash/ash_output/Scanners
Bandit
Python security checks
PythonSemgrep
Pattern-based code checks
Multiple languagesOpengrep
Pattern-based code checks
Multiple languagesCheckov
Infrastructure policy checks
Terraform, Kubernetes, CloudFormationCDK-Nag
NagPack policy checks
CloudFormationCFN-Nag
Template security checks
CloudFormationdetect-secrets
Secret detection
Text filesGrype
Vulnerability matching
Packages and container imagesnpm audit
Dependency vulnerability checks
Node.jsSyft
Software inventory
SBOM generationShowing all 10 scanners.
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.