Skip to content

Gate Scorecard and trufflehog reports, bootstrap cosign - #118

Merged
BacchusJackson merged 2 commits into
mainfrom
scorecard-trufflehog-cosign
Nov 4, 2026
Merged

BacchusJackson merged 2 commits into
mainfrom
scorecard-trufflehog-cosign

Conversation

@BacchusJackson

Copy link
Copy Markdown
Member

This covers the "later" ideas in #105.

  • OpenSSF Scorecard: scorecard --format json is detected by content (scorecard.version plus a checks array). It works with list, validate, and bundles. The scorecard config section has enabled, minScore for the aggregate, and a checks list of {name, minScore}. Inconclusive (-1) or missing checks are skipped with a warning.
  • trufflehog: newline-delimited --json output is detected from its first line (one line is enough), and empty output falls back to the filename. The trufflehog section has limitEnabled and verifiedOnly. The decoder never reads Raw, RawV2, Redacted, or SecretParts, so list and the logs can't leak a secret. The fixture is real trufflehog 3.99.8 output on a made-up key, with those fields scrubbed anyway.
  • cosign: bootstrap --tools cosign installs the raw binary (checked against cosign_checksums.txt), and gatecheck cosign passes cosign's exit status through, so gatecheck cosign verify / verify-blob is the gate. docs/bootstrap.md has examples. I did not add signature checks for gatecheck's own scanner downloads. Those still rely on the release checksums.
  • bootstrap --tools scorecard,trufflehog installs pinned 5.6.0 and 3.99.8 (goreleaser tar.gz on every OS) with passthrough commands. All three are opt-in.

Checked by hand: the real binary installed all three, gatecheck trufflehog filesystem output was listed and gated, and the Scorecard fixture was listed and gated. I couldn't run Scorecard live, because it needs a GitHub token in this environment. Its fixture follows the documented v5 JSON shape.

This is stacked on #117.

Fixes #105

🤖 Generated with Claude Code

Build a fresh command tree per call and read every setting flag, then
environment variable, then default. Remove configkit and Viper.

- Exit 2 for usage, IO, and decode errors and 3 for EPSS or KEV data
  errors. --audit only ignores threshold failures.
- --log-level and --log-format on every command. --silent keeps warnings.
- --format table|markdown|json on list, list-all, and validate.
- validate gains --input-type (with stdin), --epss-url, and --kev-url.
  list-all gains --epss-filename and --epss-url.
- One config encoder and decoder. config init indents, and unknown keys
  are reported as warnings. validate warns when there is no config.
- Coverage thresholds over 1 are read as percents.
- Fix the env var panics, the KEV file reading GATECHECK_EPSS_FILENAME,
  bundle create not truncating, bundle remove of a missing label exiting
  0, and the case-sensitive Grype KEV compare.

Fixes #73
OpenSSF Scorecard JSON and newline-delimited trufflehog JSON are report
types for list, validate, and bundles. The scorecard section sets a
minimum aggregate score and per-check minimums. The trufflehog section
fails on any finding, or only on verified secrets. Secret values are
never decoded.

bootstrap --tools scorecard,trufflehog,cosign installs pinned scorecard
5.6.0, trufflehog 3.99.8, and cosign 3.1.4 with passthrough commands.

Fixes #105
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying gatecheck-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 87590d7
Status: ✅  Deploy successful!
Preview URL: https://fa870bbd.gatecheck-website.pages.dev
Branch Preview URL: https://scorecard-trufflehog-cosign.gatecheck-website.pages.dev

View logs

@BacchusJackson
BacchusJackson merged commit 87590d7 into main Nov 4, 2026
20 of 22 checks passed
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.

Later: Scorecard gate, cosign verification, trufflehog

1 participant