Skip to content

ci: block PRs that leak real PII / prod IDs in API samples - #73

Closed
simonb-lem wants to merge 1 commit into
mainfrom
simonb-lem/api-sample-lint
Closed

simonb-lem wants to merge 1 commit into
mainfrom
simonb-lem/api-sample-lint

Conversation

@simonb-lem

@simonb-lem simonb-lem commented Apr 24, 2026 •

Copy link
Copy Markdown
Contributor

No description provided.

Adds a GitHub Action (.github/workflows/check-api-samples.yml) that runs
on every PR targeting main and scans only the added lines of the diff.
A detection script (.github/scripts/check-api-samples.py) flags three
classes of leaks:

- Internal emails (@lemlist.co/com, @lemtest.com, @lempire.co)
- Production-looking entity IDs (prefix_<16-25 random mixed case>) that
  don't contain an obvious-fake marker (Example, Fake, A1B2C3, 123, etc.)
- Known employee first/last names (Velitchkine, Bastien, INGOUF, Chafik,
  Mael, etc.)

The check inspects only lines added in the PR so pre-existing leaks in
the repo don't block every PR — those are handled by a separate cleanup.
Failures surface as inline annotations on the PR diff.

Tested locally against commit 36305d0 (historic PR #60): correctly
flagged the four real IDs that leaked at the time (seq_JiYPY37b43uJg2hfA,
usr_b62rnsjxu236ttSH3, usm_bsdepN6jb8zftK9Ns, skd_isFGZkjSsvJZ7CfRx).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mintlify

mintlify Bot commented Apr 24, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
lemlist 🟢 Ready View Preview Apr 24, 2026, 12:58 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@simonb-lem

Copy link
Copy Markdown
Contributor Author

Switching approach: CLAUDE.md-only guidelines are a better fit for a public repo (no CI gate can un-publish once pushed). New PR incoming.

@simonb-lem simonb-lem closed this Apr 24, 2026
@simonb-lem
simonb-lem deleted the simonb-lem/api-sample-lint branch April 24, 2026 13:41

This branch was successfully deployed

1 active deployment
staging — 0474eb54 Deployed Apr 24, 2026 by mintlify[bot]
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