Skip to content

feat(security): public-repo PII gate (block customer names + secrets in PRs) - #60

Merged
saadqbal merged 1 commit into
mainfrom
feat/public-pii-gate
Jun 18, 2026
Merged

feat(security): public-repo PII gate (block customer names + secrets in PRs)#60
saadqbal merged 1 commit into
mainfrom
feat/public-pii-gate

Conversation

@LukasWodka

@LukasWodkaLukasWodka commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

A reusable workflow that blocks customer/partner names and known secrets from appearing in public-repo PRs. Follow-up to today's PII scrub (customer names — [redacted], [redacted], [redacted], [redacted], [redacted], plus a dead credential — were found leaked across 19 PR bodies in client/data-ingestors/model-zoo/cli).

How it works

On every PR in a public repo, scans the title + body + commit messages against a denylist. Fails the PR if any term matches.

The denylist never appears in source. It lives only in the org Actions secret PII_DENYLIST — so this public workflow file can't itself leak the names it protects. Matches are reported generically (the matched term is never printed; the secret is masked in logs regardless).

  • Inactive until activated — warns (doesn't block) until an admin sets the secret, so rolling out callers can't break PRs prematurely.
  • Override a false positive with the pii-gate-override label (audit-visible).

Activation (one-time, org admin — @LukasWodka)

gh secret set PII_DENYLIST --org tracebloc --visibility all \
--body "[redacted],[redacted],[redacted],[redacted],[redacted],[redacted],[redacted],[redacted],[redacted],[redacted],[redacted],[redacted],[redacted]"

(Comma-separated, case-insensitive substring match. Excludes netmedgpt — that's an intentional public model name in model-zoo.)

Rollout

Caller workflows (public-pii-gate-caller.yml) are being added to each public repo via separate PRs. They reference this reusable @main, so this PR should promote to main first.

Test plan

  • Merge + promote to main
  • Set the PII_DENYLIST org secret (command above)
  • Open a throwaway PR in a public repo with "[redacted]" in the body → gate should fail
  • Add pii-gate-override label → gate should pass

🤖 Generated with Claude Code

… in PR text
Reusable workflow called from public repos. Fails a PR if its title/body/commit
messages contain any term from the private org-secret denylist (customer +
partner names, known leaked credentials).
Design notes:
- Denylist lives ONLY in org Actions secret PII_DENYLIST, never in this public
file. The gate reports matches generically and never prints the matched term,
so the protection mechanism can't itself leak what it guards.
- Inactive (warn-only) until an admin sets the secret — won't block PRs before
rollout is complete.
- Override a false positive with the 'pii-gate-override' label (audit-visible).
Follow-up to the public-repo PII scrub (customer names found leaked in
client/data-ingestors/model-zoo/cli PR bodies).
@LukasWodka

Copy link
Copy Markdown
ContributorAuthor

👋 Heads-up — Code review queue is at 31 / 30

Above the WIP limit. The team convention is to review existing PRs before opening new work.

Open PRs currently in Code review (oldest first):

Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.)

This was referenced Jun 17, 2026
@saadqbal

Copy link
Copy Markdown
Collaborator

Retargeting this PR from `develop` → `main` and merging, to fix a live break: the per-repo callers (tracebloc/cli, tracebloc/data-ingestors) already reference `public-pii-gate.yml@main`, but this file isn't on `main` yet, so every PR's "Public PII gate" check ends as a 0-job startup failure and PII scanning is non-operational. `develop` is currently behind `main` (ahead 0 / behind 10), so merging to develop wouldn't resolve the callers. Tracking: #62.

@saadqbal
saadqbal changed the base branch from develop to mainJune 18, 2026 08:44

@saadqbalsaadqbal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the reusable workflow: least-privilege read perms, denylist read only from the org secret, matched term never printed (no leak), exits 0 when PII_DENYLIST is unset (INACTIVE warn), audited override label. Publishing to main to restore the callers (cli, data-ingestors) that already reference @main. Tracking #62.

@saadqbal
saadqbal merged commit d04e050 into mainJun 18, 2026
3 checks passed
@saadqbal
saadqbal deleted the feat/public-pii-gate branch June 18, 2026 08:45
Sign up for freeto 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

@LukasWodka@saadqbal