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#

.github/workflows/deployready.yml
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.1

The 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#

InputDefaultMeaning
path.Project path to scan.
fail-oncriticalcritical, warning, info, or none. The job exits with code 2 when the gate fails.
versionlatestnpm version of deployready to run. Pin it for reproducible CI.
commenttrueCreate or update one PR comment (marker <!-- deployready -->).
sariftrueUpload SARIF to code scanning.
argsemptyExtra CLI arguments, split on spaces, for example --baseline .deployready-baseline.json, --offline, or --fail-on-release-state review-required.

Permissions#

  • contents: read to check out the code.
  • security-events: write for the SARIF upload. Set sarif: false to skip it. Code scanning must be available for the repository: public repositories, or GitHub Advanced Security on private ones.
  • pull-requests: write for the PR comment. Set comment: false to 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.

terminal
npx deployready@latest analyze . --no-ai --no-dynamic --sarif deployready.sarif

Without 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.

terminal
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 warning

Pinning#

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.