Skip to content

Add free secret-scan CI workflow template - #2293

Merged
remigiusz-antczak merged 3 commits into
mainfrom
lane/secret-scan-template
Nov 11, 2026
Merged

remigiusz-antczak merged 3 commits into
mainfrom
lane/secret-scan-template

Conversation

@remigiusz-antczak

Copy link
Copy Markdown
Collaborator

Adds an opt-in, free secret-scan workflow template: templates/secret-scan.yml.

  • gitleaks binary pinned by version and sha256; no license, no paid action, no secrets.
  • checkout pinned by 40-hex SHA with persist-credentials false.
  • PR scans base..head only; push, weekly schedule and dispatch scan full history.
  • False positives go in .gitleaksignore fingerprints, never path allowlists.
  • Routed from references/review-config.md; scripts/test-secret-scan-template.sh (registered in ci-tests.d) pins the properties. Tests: 7/7.

Never installed by install.sh.

🤖 Generated with Claude Code

remigiusz-antczak and others added 3 commits November 11, 2026 20:21
Opt-in templates/secret-scan.yml: gitleaks pinned by version and sha256, checkout pinned by SHA with persist-credentials false, PR scan of base..head, full-history scan on push, weekly schedule and dispatch, false positives via .gitleaksignore fingerprints (no path allowlists). No license or cost. Routed from references/review-config.md; a static test pins the properties.

Tests: 7/7

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR scans now reset .gitleaks.toml and .gitleaksignore to the base commit's copy so a PR cannot silence its own findings. The test pins the exact digest and version, least-privilege permissions, no expressions in run blocks, triggers, flags, install order, the base..head and full-history branches and the config reset, and proves each check fails on a seeded mutation. Logs the checkout v7.0.1 and gitleaks v8.30.1 releases in docs/standards-index.md.

Tests: 19/19

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…set-order and dash-run checks

The reset comment now says it only blocks edits to the root .gitleaks.toml and .gitleaksignore; a PR editing the workflow itself can still bypass it, so protect .github/workflows/ with CODEOWNERS and required review and make the check required. The test now anchors the digest line (ends sha256sum -c -, no ||), asserts the reset precedes the PR-path scan, and matches '- run:' step form in the no-expression check, each proven by a seeded mutation.

Tests: 22/22

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@remigiusz-antczak
remigiusz-antczak merged commit b63a5c5 into main Nov 11, 2026
11 checks passed
@remigiusz-antczak
remigiusz-antczak deleted the lane/secret-scan-template branch November 11, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant