fix(review): detect secrets split across adjacent added lines (#2454) - #2824
fix(review): detect secrets split across adjacent added lines (#2454)#2824RealDiligent wants to merge 7 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2824 +/- ##
=======================================
Coverage ? 96.04%
=======================================
Files ? 258
Lines ? 28248
Branches ? 10252
=======================================
Hits ? 27132
Misses ? 489
Partials ? 627
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-04 00:18:28 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 7 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 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.
|
…2824) Only skip real unified-diff file headers before the first hunk; added lines whose content begins with ++ (rendered +++…) must still trip the gate. Co-authored-by: Cursor <cursoragent@cursor.com>
e3544c7 to
fed04a3
Compare
…2824) Only skip real unified-diff file headers before the first hunk; added lines whose content begins with ++ (rendered +++…) must still trip the gate. Co-authored-by: Cursor <cursoragent@cursor.com>
The unescaped slash in /dev/null terminated the regex literal and broke typecheck/validate-code on PR JSONbored#2824. Co-authored-by: Cursor <cursoragent@cursor.com>
fed04a3 to
762f763
Compare
…red#2454) Port review-enrichment cross-line literal join into the unconditional secret_leak gate so credentials split across consecutive + lines cannot evade per-line regex matching. Preserves hunk/context boundaries and patch-less synthetic diffs from JSONbored#2821. Co-authored-by: Cursor <cursoragent@cursor.com>
…2824) Only skip real unified-diff file headers before the first hunk; added lines whose content begins with ++ (rendered +++…) must still trip the gate. Co-authored-by: Cursor <cursoragent@cursor.com>
The unescaped slash in /dev/null terminated the regex literal and broke typecheck/validate-code on PR JSONbored#2824. Co-authored-by: Cursor <cursoragent@cursor.com>
…Nbored#2824) Reset generic_secret_assignment runs at the same diff boundaries as the cross-line literal join instead of scanning the whole diff blob. Add regression tests for context, removed, hunk, and file-section splits. Co-authored-by: Cursor <cursoragent@cursor.com>
762f763 to
a264ba5
Compare
…2824) Main dropped the export opener in packages/gittensory-engine/src/index.ts (JSONbored#2787), breaking tsc for every backend PR including this one. Co-authored-by: Cursor <cursoragent@cursor.com>
…red#2824) Main opportunity-freshness returned age 0 for null/invalid timestamps, which scored as fully fresh and broke four validate-code tests. Align with upstream fix/opportunity-freshness-clock-drift by using a 9999-day sentinel so unparseable timestamps clamp to the 0.05 stale floor. Co-authored-by: Cursor <cursoragent@cursor.com>
JSONbored
left a comment
There was a problem hiding this comment.
merge conflicts, fix + resubmit:
This branch has conflicts that must be resolved
Use the [web editor](https://github.com/JSONbored/gittensory/pull/2824/conflicts) or the command line to resolve conflicts before continuing.
packages/gittensory-engine/src/opportunity-freshness.ts
Summary
secret_leakgate (scanPrDiffForSecretKinds).+lines (e.g. two string literals joined at runtime) can no longer evade per-line regex matching.Test plan
test/unit/secrets-scan.test.tscross-line fix(enrichment): join adjacent added lines before secret-scan matching to catch cross-line-split secrets #2454 casestest/unit/safety-wiring.test.tssecretLeakFindingregression