Skip to content

feat(enrichment): detect Resend API keys and Mapbox secret tokens in secret-scan#3267

Merged
loopover-orb[bot] merged 2 commits into
JSONbored:mainfrom
bohdansolovie:feat/secret-scan-resend-mapbox
Jul 5, 2026
Merged

feat(enrichment): detect Resend API keys and Mapbox secret tokens in secret-scan#3267
loopover-orb[bot] merged 2 commits into
JSONbored:mainfrom
bohdansolovie:feat/secret-scan-resend-mapbox

Conversation

@bohdansolovie

Copy link
Copy Markdown
Contributor

Summary

Motivation

Resend and Mapbox credentials are commonly leaked in env files and deployment configs.

Test plan

  • Resend — positive match and truncated negative
  • Mapbox secret — production-shaped sk.eyJ fixture, not Stripe, truncated negative, pk. public token negative
  • Fragment-based fixtures (no contiguous fake secrets in source)
  • Full secret-scan.test.ts suite passes (60 tests)

Made with Cursor

bohdansolovie and others added 2 commits July 5, 2026 01:52
…secret-scan

Add high-confidence patterns for Resend `re_` keys and Mapbox `sk.eyJ` secret
tokens with fragment-based fixtures, truncation negatives, and Stripe parity.

Co-authored-by: Cursor <cursoragent@cursor.com>
…-scan

Use sk.eyJ + base64url body without a fabricated second dot segment per
Orb feedback on JSONbored#3266; add pk-token and truncation negatives.

Co-authored-by: Cursor <cursoragent@cursor.com>
@bohdansolovie
bohdansolovie requested a review from JSONbored as a code owner July 4, 2026 23:57
@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 4, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

🚨 Contributor flagged. Click here for more info: Superagent Dashboard

@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 5, 2026
@loopover-orb

loopover-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-05 00:00:02 UTC

2 files · 1 AI reviewer · no blockers · readiness 80/100 · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
This change adds two focused high-confidence secret-scan rules and covers the intended positive/negative cases for Resend keys and Mapbox secret tokens. The Mapbox rule is correctly distinct from Stripe-style `sk_live_` / `sk_test_` keys and the tests exercise the production-shaped `sk.eyJ` prefix without inventing a second JWT segment. I do not see a reachable correctness defect in the visible diff.

Nits — 4 non-blocking
  • nit: review-enrichment/src/analyzers/secret-scan.ts:192 should probably treat `_` as an identifier continuation for Resend too, otherwise `re_aaaaaaaaaaaaaaaaaaaaaaaa_suffix` is reported as a partial secret even though the matched literal is embedded in a larger identifier-like token.
  • nit: review-enrichment/test/secret-scan.test.ts:474 would be stronger if the Resend fixture asserted the underscore-continuation negative case as well, matching the boundary behavior already tested for other secret formats.
  • review-enrichment/src/analyzers/secret-scan.ts:192 consider changing the Resend boundary to `/(?![A-Za-z0-9_])/` unless Resend tokens can legally be followed by `_` in source without being part of the same token.
  • review-enrichment/test/secret-scan.test.ts:489 add a Resend negative for `re_` + 24 chars + `_suffix` if you keep this precision-first scanner convention.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #3266
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 182 registered-repo PR(s), 102 merged, 9 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bohdansolovie; Gittensor profile; 182 PR(s), 9 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: bohdansolovie
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: Python, C++, JavaScript
  • Official Gittensor activity: 182 PR(s), 9 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 9b8d05a into JSONbored:main Jul 5, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:flagged Contributor flagged for review by trust analysis. gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant