Skip to content

Correct the secret scan comments merged in #36 - #42

Open
feinburger244 wants to merge 1 commit into
mainfrom
fix-secret-scan-comments
Open

feinburger244 wants to merge 1 commit into
mainfrom
fix-secret-scan-comments

Conversation

@feinburger244

Copy link
Copy Markdown
Contributor

#36 merged comments that are wrong about the allowlisted Healthchecks keys and about gitleaks-action.

  • .gitleaksignore said both keys had been removed.
    • bd9c129's key was the only one removed, by rotation on 2025-10-30.
    • 03293f2's key is the current read-only key. It's still in internal/status on release/v1.4, in tags v1.0 to v1.4.1 and in the deployed v1.4.1 binary. WATonomous/watcloud-website and WATonomous/status publish it too.
    • The comment now says this. Its rule now allows that entry instead of contradicting it.
  • secret-scan.yml said gitleaks-action needs a paid license and that the scan covers the whole history.
    • gitleaks-action needs a free license key, obtained by signing up.
    • Changes made in merge commits aren't scanned.
    • The scan covers every branch and tag, so a secret pushed to any branch fails every run until that branch is rewritten or deleted. The comment now says so.

Refs #6. #36 closed it, but #6's first point, rotating the key, hasn't been done.

To make the check required, add gitleaks as the required status check for main. #36 gave the name as Secret scan / gitleaks, which is the workflow and job name together, not the check's name.

🤖 Generated with Claude Code

.gitleaksignore said both allowlisted Healthchecks keys had been removed,
and secret-scan.yml said gitleaks-action needs a paid license and that the
scan covers the whole history. All three were wrong.

The keys were compared by sha256 against each source; no value was printed.
- bd9c129's key was rotated on 2025-10-30. infra-config 3e4996f3be replaced
  it in secrets/secrets.yml after Prometheus started getting 403s, and
  WATonomous/status#83 removed it there.
- 03293f2's key is infra-config's current healthchecksio_readonly_api_key
  (hcr_ prefix, read-only). It is still in internal/status/status.go on
  release/v1.4 and in tags v1.0 to v1.4.1, so the deployed v1.4.1 binary
  embeds it. WATonomous/watcloud-website (scripts/generate-website-config.py,
  sent from the browser by components/machine-card.tsx) and
  WATonomous/status (src/constants.ts) publish it.

The key is not rotated here. Rotating it would break the website, the
status page, Prometheus and `watcloud status` in v1.4.x, and the website
would go on publishing the new key. #36 closed #6, whose first point asks
for rotation, so whether to rotate is still open.

The gitleaks-action README says organizations need a free license key,
obtained by signing up.

gitleaks v8.28.0 runs `git log -p -U0 --full-history --all
--diff-filter=tuxdb` (sources/git.go), and actions/checkout with
fetch-depth: 0 fetches every branch and tag. So every run scans all of
them, and without -m it skips changes made in merge commits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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