Skip to content

ci: run the confidential-material guard in CI, not just pre-commit - #413

Merged
Levaj2000 merged 2 commits into
mainfrom
chore/ci-no-confidential-guard
Jul 27, 2026
Merged

ci: run the confidential-material guard in CI, not just pre-commit#413
Levaj2000 merged 2 commits into
mainfrom
chore/ci-no-confidential-guard

Conversation

@Levaj2000

Copy link
Copy Markdown
Owner

Runs scripts/check-no-confidential.sh in CI, not just as a pre-commit hook.

Why

The hook is the first line of defence against confidential material reaching this public repo, but it lives in one clone and dies with --no-verify. CI is the backstop that is neither per-clone nor skippable.

This branch was pushed but never had a PR opened, so the guard has been sitting unmerged — meaning main currently has no CI-side protection at all. Found while auditing branch state.

What it does

One no-confidential job on every PR and every push to main, sharing the exact same script as the hook so the patterns can't drift:

  • On a pull request — scans the merge-base range (fetch-depth: 0 so the base is actually available).
  • On a direct push to main — admins aren't covered by branch protection, so those commits get scanned too. Handles the two awkward github.event.before cases: all-zeros on a branch's first push, and a force-pushed-away commit, falling back to the parent when the SHA isn't resolvable.

The script gains a --range <base> <head> mode for this (CI has nothing staged), alongside the existing index-inspecting mode.

Merge order

Worth landing before #412 — that PR adds 12 new files to the public repo and would benefit from the CI scan rather than relying on the hook alone.

Levaj2000 and others added 2 commits July 27, 2026 11:21
The pre-commit hook is per-clone and dies with --no-verify. Replacing the
local checkout today left .git/hooks holding nothing but samples, so the
guard had been inert. Add a --range mode to the same script and run it over
the PR diff (and over direct pushes to main, which branch protection does
not cover for admins), so one set of patterns is enforced in both places.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ased]

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-identity-landing Ready Ready Preview, Comment Jul 27, 2026 6:35pm
dashboard Ready Ready Preview, Comment Jul 27, 2026 6:35pm

@Levaj2000
Levaj2000 merged commit 3e7dd76 into main Jul 27, 2026
6 checks passed
@Levaj2000
Levaj2000 deleted the chore/ci-no-confidential-guard branch July 27, 2026 18:40
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