audit/bench, from your terminal
Same review engine as the web app — run it from a terminal, a pre-commit hook, or a pipeline step, and fail the build when a scan comes back do_not_ship.
npm install -g auditbench-cli auditbench login
Install
Two ways to get it running, depending on your setup.
npm (global install)
Needs Node.js 20+. Puts auditbench on your PATH.
npm install -g auditbench-cli
Docker
No Node.js toolchain needed — good for pipelines that only have Docker available. Build it from source (see Docker below).
git clone https://github.com/noumanas/-audit-bench-cli.git cd -audit-bench-cli && docker build -t auditbench-cli .
Commands
Five commands cover the whole workflow.
auditbench loginauditbench logoutauditbench statusauditbench audit <file>auditbench scan <path>Flags (audit / scan)
--provider <name>--fail-on <level>Environment variables
AUDITBENCH_API_KEYAUDITBENCH_API_URLAuthentication
Two modes, depending on where the CLI runs.
Interactive login
For your own machine. Stores an access token in ~/.auditbench/config.json (mode 0600).
auditbench login
API key
For CI — no password ever touches the pipeline. Generate one from the dashboard: Repository scan → Integrations → CLI / CI-CD API key.
export AUDITBENCH_API_KEY="abk_..." auditbench status
CI/CD — fail the build on bad findings
Both audit and scan exit non-zero once the verdict meets --fail-on — a failing review fails the build, the same threshold that blocks a PR merge.
GitHub Actions
name: audit-bench
on: [pull_request]
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install -g auditbench-cli
- run: auditbench scan . --fail-on do_not_ship
env:
AUDITBENCH_API_KEY: ${{ secrets.AUDITBENCH_API_KEY }}GitLab CI
audit-bench:
image: node:20
script:
- npm install -g auditbench-cli
- auditbench scan . --fail-on do_not_ship
variables:
AUDITBENCH_API_KEY: $AUDITBENCH_API_KEYDocker
No Node.js required on the runner. Build the image from source, then bind-mount the repo to scan at /workspace— the image's default working directory. Pass the API key as an env var: container state doesn't persist between runs, so auditbench login isn't an option here.
git clone https://github.com/noumanas/-audit-bench-cli.git cd -audit-bench-cli docker build -t auditbench-cli .
docker run --rm \ -v "$(pwd)":/workspace \ -e AUDITBENCH_API_KEY="$AUDITBENCH_API_KEY" \ auditbench-cli scan . --fail-on do_not_ship
Wire it into your pipeline
Free plan includes the CLI — sign up, generate an API key, and drop the workflow above into your repo.