Skip to content

feat(enrichment): detect Browserbase and Modal tokens in secret-scan - #3284

Closed
bohdansolovie wants to merge 1 commit into
JSONbored:mainfrom
bohdansolovie:feat/secret-scan-browserbase-modal
Closed

feat(enrichment): detect Browserbase and Modal tokens in secret-scan#3284
bohdansolovie wants to merge 1 commit into
JSONbored:mainfrom
bohdansolovie:feat/secret-scan-browserbase-modal

Conversation

@bohdansolovie

Copy link
Copy Markdown
Contributor

Summary

  • Add browserbase_api_key rule for Browserbase keys (bb_ prefix).
  • Add modal_token rule for Modal token ID (ak-) and secret (as-).
  • Include positive, truncation, and hyphen/underscore continuation negative tests.

Test plan

  • npm run build && node --test test/secret-scan.test.ts in review-enrichment/ (74 passing)

Made with Cursor

Add high-confidence rules for bb_ (Browserbase) and ak-/as- (Modal token
ID/secret) with truncation and continuation regression tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@bohdansolovie
bohdansolovie requested a review from JSONbored as a code owner July 5, 2026 00:50
@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 5, 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

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 Gittensory review result - reject/close recommended

Review updated: 2026-07-05 00:58:41 UTC

2 files · 1 AI reviewer · 1 blocker · readiness 73/100 · CI green · clean

🛑 Suggested Action - Reject/Close

  • AI reviewers agree on a likely critical defect: review-enrichment/src/analyzers/secret-scan.ts:252: the Browserbase regex uses `(?![A-Za-z0-9_])`, so `bb_aaaaaaaaaaaaaaaaaaaa-suffix` is reported as a complete high-confidence `browserbase_api_key` even though the existing secret rules and this PR's own stated continuation contract require hyphenated continuations to be rejected
  • change it to `re: /\bbb_[A-Za-z0-9]{20,}(?![A-Za-z0-9_-])/` and add the matching negative test. — Resolve the flagged defect, or override if the AI reviewers are mistaken, then re-run the gate.

Review summary
The change adds two straightforward high-confidence secret-scan rules plus positive and truncation/continuation coverage. The Modal rule follows the existing continuation guard pattern, but the Browserbase rule does not reject hyphen continuation, so it can emit a high-confidence finding for a non-token prefix embedded in a longer hyphenated string. That is a reachable false positive in the analyzer output, not just a test gap.

Blockers

  • review-enrichment/src/analyzers/secret-scan.ts:252: the Browserbase regex uses `(?![A-Za-z0-9_])`, so `bb_aaaaaaaaaaaaaaaaaaaa-suffix` is reported as a complete high-confidence `browserbase_api_key` even though the existing secret rules and this PR's own stated continuation contract require hyphenated continuations to be rejected; change it to `re: /\bbb_[A-Za-z0-9]{20,}(?![A-Za-z0-9_-])/` and add the matching negative test.
Nits — 2 non-blocking
  • review-enrichment/test/secret-scan.test.ts:653: add `scanPatch("src/config.ts", hunk([`const browserbase = "bb_${"a".repeat(20)}-suffix";`]))` and assert there is no `browserbase_api_key` finding, matching the Modal hyphen continuation coverage already present.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.

Why this is blocked

  • review-enrichment/src/analyzers/secret-scan.ts:252: the Browserbase regex uses `(?![A-Za-z0-9_])`, so `bb_aaaaaaaaaaaaaaaaaaaa-suffix` is reported as a complete high-confidence `browserbase_api_key` even though the existing secret rules and this PR's own stated continuation contract require hyphenated continuations to be rejected; change it to `re: /\bbb_[A-Za-z0-9]{20,}(?![A-Za-z0-9_-])/` and add the matching negative test.
Signal Result Evidence
Code review ❌ 1 blocker 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
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 (no linked issue context).
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: 216 registered-repo PR(s), 130 merged, 9 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bohdansolovie; Gittensor profile; 216 PR(s), 9 issue(s).
Gate result ❌ Blocking Repo-configured hard 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: 216 PR(s), 9 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Explain no-issue PR.
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
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 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Gittensory is closing this pull request on the maintainer's behalf (AI reviewers agree on a likely critical defect: review-enrichment/src/analyzers/secret-scan.ts:252: the Browserbase regex uses `(?![A-Za-z0-9_])`, so `bb_aaaaaaaaaaaaaaaaaaaa-suffix` is reported as a complete high-confidence `browserbase_api_key` even though the existing secret rules and this PR's own stated continuation contract require hyphenated continuations to be rejected; change it to `re: /\bbb_[A-Za-z0-9]{20,}(?![A-Za-z0-9_-])/` and add the matching negative test.). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

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