ReleaseShield docs

ReleaseShield scans the exact artifact you're about to publish (npm tarball, Python wheel/sdist or Docker image) and blocks the release if it contains source maps, .env files, keys, tokens or internal files.

1. Get your license token

After checkout you land on a page that shows your token (rs_…). Add it to your CI secrets as RELEASESHIELD_TOKEN. Standard ($19/mo) covers up to 5 packages or repos; Pro / Team ($49/mo) is unlimited. Without a token everything still runs, in free report-only mode.

2. GitHub Actions

name: release
on: { release: { types: [published] } }
jobs:
  publish:
    runs-on: ubuntu-latest
    permissions: { contents: read, security-events: write }
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 22, registry-url: https://registry.npmjs.org }
      - run: npm ci
      - id: shield
        uses: my2ctyw8h6-hash/release-shield@v1
        with:
          token: ${{ secrets.RELEASESHIELD_TOKEN }}
          fail-on: critical
          sarif-output: releaseshield.sarif
          slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
      - uses: github/codeql-action/upload-sarif@v3
        if: always()
        with: { sarif_file: releaseshield.sarif }
      - run: npm publish
        env: { NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} }

With no artifact input the action runs npm pack in the package, or scans dist/*.whl / dist/*.tar.gz for Python. For Docker use artifact: docker:my-app:latest after your build step. Outputs: grade, score, findings, critical, failed, plan, report-path, sarif-path.

3. CLI (any CI or your laptop)

curl -fsSLo releaseshield.mjs https://release-shield-app.vercel.app/releaseshield.mjs   # single file, no dependencies, Node 20+

node releaseshield.mjs scan                      # npm pack the current package and scan it
node releaseshield.mjs scan dist/*.whl           # Python wheels / sdists
node releaseshield.mjs scan docker:my-app:1.4.0  # Docker image (via docker save)
node releaseshield.mjs scan npm:some-pkg@2.0.0   # an already-published npm version
node releaseshield.mjs license                   # check your plan

# GitLab CI / CircleCI / Jenkins
curl -fsSLo releaseshield.mjs https://release-shield-app.vercel.app/releaseshield.mjs
RELEASESHIELD_TOKEN=$TOKEN node releaseshield.mjs scan --fail-on high --format sarif -o gl-sast.sarif
OptionWhat it doesPlan
--fail-on <level>Exit 1 on findings at/above critical | high | medium | low | none (default critical)Standard
--format <fmt>text | json | sarif | markdownStandard
-o, --output <file>Write the report to a fileFree
--slack-webhook <url>Alert Slack on critical/high findings (or RELEASESHIELD_SLACK_WEBHOOK)Standard
--config <file>Policy file (default .releaseshield.json)Pro / Team
--ignore <glob>Skip matching files (repeatable)Pro / Team
--ignore-rule <id>Suppress a rule such as source-map (repeatable)Pro / Team
--baseline <spec>Diff vs a previous release: auto | npm:<pkg>@<ver> | filePro / Team
--registry <url>Private npm registry (auth via NPM_TOKEN)Pro / Team

Exit codes: 0 pass · 1 release blocked · 2 scan error.

4. Policies (Pro / Team)

// .releaseshield.json
{
  "failOn": "high",
  "ignore": ["docs/public/**", "*.test.js"],
  "ignoreRules": ["internal-host"],
  "baseline": "auto"
}

baseline: "auto" compares against the latest published version on npm and lists every file that's new in this release.

Licensing & privacy

Scans run entirely on your runner, so your code never leaves it. The CLI checks your token's signature offline and asks our server whether the subscription is still active. If our server can't be reached, it keeps working on your signed plan, so our outage never blocks your release.