npx directly — always running the latest CLI with nothing to update — or the Marketplace Action (scanaislop/aislop@v1) that wraps Node setup and the CLI in a single step.
Fastest path: aislop init
Run the interactive setup command and accept the GitHub Actions workflow prompt. It writes both the policy file and the workflow file for you, then you commit and push.
.aislop/config.yml (your thresholds and engine config) and .github/workflows/aislop.yml (the workflow). Your quality gate is live after the first push.
Approach 1: Self-contained workflow (npx)
Thenpx --yes aislop@latest ci form always fetches the latest published CLI at runtime. There is no version pin to keep up to date.
Approach 2: Marketplace Action (scanaislop/aislop@v1)
The Marketplace Action wraps actions/setup-node and the CLI run into a single uses: step. @v1 tracks the latest action release; set version: latest to keep the CLI current too, or pin both for fully reproducible builds.
Action inputs
| Input | Required | Default | Description |
|---|---|---|---|
directory | No | "." | Directory to scan. |
node-version | No | "24" | Node.js version to install before running aislop. |
format | No | "json" | Output format — "json" (CI-friendly) or "human". |
version | No | "latest" | npm aislop CLI version to run, e.g. "0.10.2". Independent of the action ref in uses:. |
PR-scoped gating
By default,aislop ci scores the entire codebase. To gate a PR on only the files it changes — a stricter signal with less noise — pass --changes --base origin/main. The score gate and exit code apply to just those files.
SARIF upload for GitHub code scanning
Emit a SARIF 2.1.0 report and upload it to the Security tab so findings appear alongside CodeQL results.SARIF upload requires the repository to have GitHub Advanced Security enabled, or for the repository to be public.
Setting a minimum score threshold
Configure your quality gate threshold in.aislop/config.yml. aislop exits with code 1 whenever the score drops below failBelow or any error-severity diagnostic is present.