Skip to content

ci: eliminate, then harden, every secret-bearing job RE001 reports - #974

Merged
hyperpolymath merged 5 commits into
mainfrom
claude/re001-eliminate-harden
Oct 27, 2026
Merged

hyperpolymath merged 5 commits into
mainfrom
claude/re001-eliminate-harden

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Step 3 of the governance-gate stack, after #966, #967, #968 and #973.

Under RE001 as #964 (standards ADR-009) now ships it, every job that reads a real secret is in scope. On main that is 9 :warn findings. Once #973 makes hypatia's gate run main's rules, they hold it red at the info threshold. This PR clears them by the safety-triangle order: eliminate the credential where we can, then control what remains.

job secret action
security-policy / secret-gitleaks GITLEAKS_LICENSE Eliminated. gitleaks-action needs a licence only for an organization owner. Run 40442141312 logs [hyperpolymath] is an individual user. No license key is required. and shows the secret empty, so it was never set.
inbox-steward-intake / analyze-patterns FARM_PAT Its read-only checkout no longer takes the PAT and keeps no credential (persist-credentials: false). The gh api read still uses the PAT, so the job is hardened with GitHub + API.
inbox-steward-intake / dispatch-to-farm FARM_PAT Dropped a checkout nothing read. Hardened, API only.
inbox-steward-intake / record-report, update-ruleset FARM_PAT Hardened, GitHub + API (push, gh pr create).
ci-health-sweep / sweep HYPATIA_DISPATCH_PAT Hardened, GitHub + API. Every call in scripts/ci-health/*.sh is gh.
hypatia-remediation-sweep / sweep HYPATIA_DISPATCH_PAT Hardened, API plus the artifact service and its blob storage.
roadmap-sync / sync App private key Hardened, API only. It already used an App token (substitution done before this PR).
push-email-notify / notify SMTP_* Hardened: the action's release download, plus ${{ secrets.SMTP_HOST }}:${{ secrets.SMTP_PORT || '465' }}. The mail host is itself a secret, so it stays masked.

All hardening is step-security/harden-runner@v2.22.2 with egress-policy: block, the same pin #968 introduced. actions.lock holds the tool's bytes from run 40443523409 (sha256 74ebf8be…, GATE_RC=0); it was not hand-written.

How has this been verified?

Not done here (needs the owner or another repo)


Generated by Claude Code

Applies the safety triangle to the nine jobs that RE001 (standards ADR-009)
reports on main: first remove a credential, and harden what remains.

Eliminate:
- security-policy secret-gitleaks: drop GITLEAKS_LICENSE. gitleaks-action
  needs one only for an organization owner, and logs "[hyperpolymath] is an
  individual user. No license key is required." The secret was never set
  (empty in the step env of run 40442141312).
- inbox-steward analyze-patterns: the checkout is read-only, so it no longer
  takes FARM_PAT and persists no credential.
- inbox-steward dispatch-to-farm: drop a checkout the job never read.

Control: each remaining job installs step-security/harden-runner with
egress-policy block and an allow-list of the hosts it talks to:
- GitHub and its API for the inbox-steward jobs, both sweeps and
  roadmap-sync;
- plus the artifact service for hypatia-remediation-sweep's upload;
- for push-email-notify, the action's release download plus the SMTP host
  taken from the existing secret, so the host stays masked.

actions.lock is regenerated by the tool in a following commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDfStHgMdZGTeqaBgM1
These are the exact bytes that `gh actions-lock` v0.2.0 and the standards
333b06a repair chain produced in run 40443523409. That run also passed
check-lock-sync.sh and the governance gate's check-actions-lock-gate.sh
(GATE_RC=0). sha256 74ebf8bebae57cbdf370f7014b1d58bfcafdabe09a4f1147d032434c09dbc995.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDfStHgMdZGTeqaBgM1
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 14 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: a5e768a0-d7c3-4e99-861d-eef9abfb9e04
Commits

Reviewing files that changed from the base of the PR and between 52c8ff3 and 52b32f9.

Files ignored due to path filters: 1
  • .github/workflows/actions.lock is excluded by !**/*.lock
Files selected for processing: 6
  • .github/workflows/ci-health-sweep.yml
  • .github/workflows/hypatia-remediation-sweep.yml
  • .github/workflows/inbox-steward-intake.yml
  • .github/workflows/push-email-notify.yml
  • .github/workflows/roadmap-sync.yml
  • .github/workflows/security-policy.yml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Owner Author

The two red checks, Sweep fleet for vulnerable repos (run 40443859596) and Detect + remediate estate CI health (run 40443861997), are the dry_run=true dispatches I ran on this branch to test the new egress allow-lists. They didn't run because of anything in this PR.

  • Why they failed: both stop at the first API call with HTTP 401: Bad credentials (https://api.github.com/graphql). HYPATIA_DISPATCH_PAT is invalid. Every scheduled run of both workflows on main has failed the same way since at least 2026-10-23 (for example 40265013226 and 40266651942).
  • What they did show: harden-runner block engaged, the checkout reached github.com, and api.github.com was reachable. The 401 is the API's reply, not a blocked connection.
  • What they couldn't show: whether the rest of each allow-list is complete. The jobs stop before reaching anything else.
  • Fix: none is possible from this PR. The PAT has to be rotated, or replaced with a GitHub App token, and either is an owner action. After that I'll run both dry runs again. Re-running now would fail the same way.

Generated by Claude Code

@hyperpolymath
hyperpolymath marked this pull request as ready for review October 27, 2026 03:25
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T04:10:59.326510Z 52b32f9 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@hyperpolymath
hyperpolymath merged commit adb2f41 into main Oct 27, 2026
67 checks passed
@hyperpolymath
hyperpolymath deleted the claude/re001-eliminate-harden branch October 27, 2026 04:46
@coderabbitai

coderabbitai Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Add Carrot credits or activate Agent usage billing to use Autofix

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.

2 participants