Features
GitHub Action and CI
A composite action that runs a static DeployReady scan on your repository, summarizes it on the pull request, uploads SARIF, and fails the job at the severity you choose.
Minimal workflow#
name: DeployReady
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
security-events: write # SARIF upload
pull-requests: write # PR comment
jobs:
deployready:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: BelsoftSolutions/deployready@v0.7.1The action always runs analyze --json --no-dynamic --no-ai. It needs no secrets and never touches a live app. The dependency audit is on by default, so in a repository with a lockfile the job contacts the package registry with dependency names and versions, never source code. Pass args: --offline to skip it. See Dependencies & Engines.
Inputs#
| Input | Default | Meaning |
|---|---|---|
path | . | Project path to scan. |
fail-on | critical | critical, warning, info, or none. The job exits with code 2 when the gate fails. |
version | latest | npm version of deployready to run. Pin it for reproducible CI. |
comment | true | Create or update one PR comment (marker <!-- deployready -->). |
sarif | true | Upload SARIF to code scanning. |
args | empty | Extra CLI arguments, split on spaces, for example --baseline .deployready-baseline.json, --offline, or --fail-on-release-state review-required. |
Permissions#
contents: readto check out the code.security-events: writefor the SARIF upload. Setsarif: falseto skip it. Code scanning must be available for the repository: public repositories, or GitHub Advanced Security on private ones.pull-requests: writefor the PR comment. Setcomment: falseto skip it. Pull requests from forks get a read-only token, so the comment is skipped with a warning. The job summary still shows the result.
What you get#
- A job summary and a PR comment with the score, the release state and coverage, severity counts, and the top 10 findings with file and line. The comment is updated in place, not repeated.
- A deployready-report artifact containing deployready.json, deployready.sarif, and the summary.
- Code-scanning alerts in the repository’s Security tab. Findings without a source file, such as live endpoint findings, are not valid SARIF locations for GitHub. They are left out of the SARIF and appear in the JSON report. Evidence in SARIF messages is already redacted.
SARIF locally#
analyze --sarif <file> writes a SARIF 2.1.0 report without the action, so any SARIF-aware tool can read it.
npx deployready@latest analyze . --no-ai --no-dynamic --sarif deployready.sarifWithout the action#
Any CI system can run the CLI directly. Exit code 0 means clean, 2 means the gate failed, and 1 means a tool error. With --fail-on-release-state, exit code 3 means a required check did not run. To fail only on new findings, write a baseline once and gate against it.
npx deployready@latest analyze . --no-ai --no-dynamic --write-baseline .deployready-baseline.json
npx deployready@latest analyze . --no-ai --no-dynamic --baseline .deployready-baseline.json --fail-on warningPinning#
A passing gate means no findings at or above your fail-on level. It is not a statement that the code is secure. See CLI reference for all flags.