Skip to content

feat(enrichment): detect Cohere API keys and Intercom access tokens in secret-scan#3272

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
bohdansolovie:feat/secret-scan-cohere-intercom
Jul 5, 2026
Merged

feat(enrichment): detect Cohere API keys and Intercom access tokens in secret-scan#3272
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
bohdansolovie:feat/secret-scan-cohere-intercom

Conversation

@bohdansolovie

Copy link
Copy Markdown
Contributor

Summary

Motivation

Cohere and Intercom credentials are commonly leaked in env files and backend configs. The secret-scan analyzer already covers many AI/SaaS tokens but missed these documented formats.

Test plan

  • Cohere — positive match, truncated negative, _suffix identifier-continuation negative
  • Intercom — positive match and truncated negative
  • Fragment-based fixtures (no contiguous fake secrets in source)
  • Full secret-scan.test.ts suite passes (62 tests)

Made with Cursor

…n secret-scan

Add high-confidence co_ and dG9rOm token patterns with identifier-continuation
tail guards, fragment-based fixtures, and truncation negatives.

Co-authored-by: Cursor <cursoragent@cursor.com>
@bohdansolovie
bohdansolovie requested a review from JSONbored as a code owner July 5, 2026 00:12
@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

Warning

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

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-05 00:11:37 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
The change adds two focused high-confidence secret-scan rules and covers the positive and truncated Cohere/Intercom paths in the visible tests. The Cohere matcher follows the existing precision-first pattern with a continuation guard, and CI confirms the suite passes. I do not see a reachable correctness break in the diff, but the Intercom rule/test should be tightened because the claimed continuation behavior is not actually exercised and the documented prefix comment is ambiguous for base64-encoded `tok:` values.

Nits — 5 non-blocking
  • nit: review-enrichment/test/secret-scan.test.ts:526 claims the Intercom continuation guard in the PR test plan, but the test only covers truncation and never verifies a trailing base64 continuation such as `dG9rOm${"a".repeat(30)}A` remains unreported.
  • nit: review-enrichment/src/analyzers/secret-scan.ts:209 describes `dG9rOm` as the base64 `tok:` prefix, but `tok:` alone encodes as `dG9rOg==`; please either cite why Intercom tokens specifically use fixed `dG9rOm` or adjust the comment/pattern to the real token prefix contract.
  • Add an Intercom tail-guard assertion beside the Cohere `_suffix` case in review-enrichment/test/secret-scan.test.ts:526, for example assert that a token followed by another `[A-Za-z0-9+/=]` character produces no `intercom_access_token` finding.
  • Clarify review-enrichment/src/analyzers/secret-scan.ts:209 so the regex documents the actual Intercom token format rather than the generic base64 encoding of `tok:`.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
Signal Result Evidence
Code review ✅ No blockers 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: 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: not available
  • Official Gittensor activity: 182 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 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 f77b0f2 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