Skip to content

chore: remove accidentally committed warmtiktoken binary, guard against repeats - #1199

Merged
Dumbris merged 2 commits into
mainfrom
claude/cleanup-warmtiktoken-commit-6fc4fc
Sep 2, 2026
Merged

Dumbris merged 2 commits into
mainfrom
claude/cleanup-warmtiktoken-commit-6fc4fc

Conversation

@Dumbris

@Dumbris Dumbris commented Sep 2, 2026

Copy link
Copy Markdown
Member

What

warmtiktoken (43 MB arm64 Mach-O — the output of go build ./bench/cmd/warmtiktoken run from the repo root) was committed at the repo root in #1153. This PR:

  • untracks /warmtiktoken and ignores it (plus /mcpproxy-server) alongside the other root binaries in .gitignore
  • adds check-added-large-files (8 MB cap; largest legitimate screenshot/report is ~6.5 MB) to pre-commit
  • adds a local no-native-binaries pre-commit hook (scripts/check-no-native-binaries.sh) that rejects Mach-O/ELF/PE files outright

Both new hooks ran on this commit; the script self-test rejects warmtiktoken and passes text files.

Repo audit

  • warmtiktoken was the only compiled executable tracked, and the only tracked file > 8 MB.
  • No .env, key, cert, DB, log or config-with-credentials files are tracked.
  • Secret patterns (mcp_agt_, sk-*, ghp_/github_pat_, AKIA, xox*, private-key headers, AIza, X-API-Key/apikey= with real-looking values) grep clean across the tree: every hit is a documented example, a detector fixture, or a test-only key such as e2e-test-api-key-12345.
  • A full-history gitleaks git scan result is noted in a follow-up comment.

Not done here

The 43 MB blob remains in history. Removing it needs git filter-repo + a force-push of main and every open branch, so that is a separate decision.

🤖 Generated with Claude Code

…st repeats

`warmtiktoken` (43 MB arm64 Mach-O, the build output of
`go build ./bench/cmd/warmtiktoken` run from the repo root) landed at the
repo root in #1153. Untrack it, ignore it alongside the other root
binaries, and add two pre-commit guards so it cannot happen again:

- `check-added-large-files` (8 MB cap, above the largest legitimate
  screenshot/report)
- a local `no-native-binaries` hook that rejects Mach-O/ELF/PE files

The blob stays in history; purging it needs a history rewrite, which is
left as a separate decision.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: e8b1d1c
Status: ✅  Deploy successful!
Preview URL: https://4eb69233.mcpproxy-docs.pages.dev
Branch Preview URL: https://claude-cleanup-warmtiktoken.mcpproxy-docs.pages.dev

View logs

`test/e2e-config.json` carried an auto-generated 64-hex api_key since
#477. It only ever guarded a localhost test instance and
scripts/test-api-e2e.sh extracts whatever key the core logs, so the
value is irrelevant — but it trips every secret scanner (gitleaks:
generic-api-key). Use an obviously synthetic value, matching the
sandbox-integration workflow's "qa-sandbox-ci-test".

Also ignore `.osgrep/`: `.osgrep/server.json` (local authToken) was
committed on the unmerged pull/165 ref.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Dumbris

Dumbris commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

Full-history secret scan (gitleaks 8.x, all refs)

520 raw findings, all triaged:

Bucket Count Verdict
internal/security/patterns/*, detector/masking tests, docs, spec quickstarts, e2e stubs ~505 Intentional fixtures and documented examples (AKIAIOSFODNN7EXAMPLE, mcp_agt_a1b2c3d4…, PEM headers, *-12345 keys).
test/e2e-config.json api_key 3 values over time Auto-generated 64-hex key for a localhost test instance, committed since #477. Not Algis's live key. Replaced with e2e-test-api-key-fixture in e8b1d1c (the e2e script extracts the key from the core's log, so the value never mattered).
.osgrep/server.json authToken 1 Local osgrep server token, committed only on the unmerged pull/165 ref (never on main). .osgrep/ is now ignored.
CI/scripts X-API-Key headers ~10 qa-sandbox-ci-test, wrong-api-key, test-api-key — synthetic.

No credential for an external service (GitHub, Anthropic, cloud, Slack, Stripe, Cloudflare) appears anywhere in history.

@Dumbris
Dumbris enabled auto-merge (squash) September 2, 2026 15:55
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

📦 Build Artifacts

Workflow Run: View Run
Branch: claude/cleanup-warmtiktoken-commit-6fc4fc

Available Artifacts

  • archive-darwin-amd64 (29 MB)
  • archive-darwin-arm64 (26 MB)
  • archive-linux-amd64 (17 MB)
  • archive-linux-arm64 (15 MB)
  • archive-windows-amd64 (29 MB)
  • archive-windows-arm64 (26 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (23 MB)
  • installer-dmg-darwin-arm64 (21 MB)

How to Download

Option 1: GitHub Web UI (easiest)

  1. Go to the workflow run page linked above
  2. Scroll to the bottom "Artifacts" section
  3. Click on the artifact you want to download

Option 2: GitHub CLI

gh run download 33651238614 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Dumbris
Dumbris merged commit 806ffb0 into main Sep 2, 2026
36 checks passed
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