8000 chore(secret-leak): bump betterleaks to v1.9.0 by dkastl · Pull Request #156 · geolonia/.github · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/reusable-secret-leak-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ on:
description: "betterleaks container image, pinned by digest. Override only for testing newer versions."
type: string
required: false
default: "ghcr.io/betterleaks/betterleaks@sha256:8b9d12db5e11ca798029da44923503de5d8cfff6992cffaaa6722fbeb9fc7797" # v1.8.1 (multi-arch INDEX digest -- the one `docker manifest inspect ghcr.io/betterleaks/betterleaks:v1.8.1` reports, not the per-platform child a `docker pull` on an arm64 Mac resolves to; sha256:12175773... was the arm64 child and failed on every amd64 runner with "exec format error"). Adds a generic-password detector; no config-schema change. Verified against the org base and the audit [extend] overlay before pinning: identical findings on four repos, and identical rule IDs on a planted-credential fixture (a zero-finding comparison alone proves nothing). One repo gained four generic-password hits, all in git HISTORY and all false positives (test fixture env vars and a planning doc, dummy values of one and six characters). The per-PR gate scans only the PR diff, so history is out of its range; the weekly full-history audit will surface them.
default: "ghcr.io/betterleaks/betterleaks@sha256:e3b95b0db6c2735db17165c009b0ad6d9cef34fb4578659232b98f69d7346cac" # v1.9.0 (multi-arch INDEX digest, as `docker manifest inspect ghcr.io/betterleaks/betterleaks:v1.9.0` reports it; never the per-platform child an arm64 `docker pull` resolves to, which fails on amd64 runners with "exec format error"). Adds 46 rules; no config-schema change. A clean scan now writes `[]` instead of `null`; the parse step accepts both. Verified against the org base config: identical rule IDs and report fields on a planted-credential fixture.
fail-on-findings:
description: "Fail the job (block the PR check) when secrets are found. Set false for warn-only mode while a repo cleans up legacy false positives."
type: boolean
Expand Down Expand Up @@ -219,8 +219,9 @@ jobs:
env:
SCAN_OUTCOME: ${{ steps.scan.outcome }}
run: |
# betterleaks emits `null` (clean) or a top-level array
# (findings). Anything else is a schema failure.
# betterleaks emits a top-level array (empty when clean; up to
# v1.8.x a clean scan wrote `null`, still accepted). Anything else
# is a schema failure.
if [ "${SCAN_OUTCOME}" != "success" ] && [ ! -s findings.json ]; then
echo "::error::betterleaks scan failed (outcome=${SCAN_OUTCOME}) and produced no readable JSON file"
echo "scan_failed=true" >> "$GITHUB_OUTPUT"
Expand Down
2 changes: 1 addition & 1 deletion betterleaks/.pre-commit-config.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
- repo: https://github.com/betterleaks/betterleaks
# Pin to the same version as the per-PR Secret Leak Check workflow.
# Bump both together so local and CI use identical rule shapes.
rev: v1.6.1
rev: v1.9.0
hooks:
# Docker variant. Works without a local Go/Rust toolchain. The image
# is pulled on first use and cached. Mac/Linux developers typically
Expand Down
Loading
0