Repository navigation
Conversation
The secret scanner's tru-2 rule uses `[0-9a-zA-Z.-_]{26}`, whose `.-_` range includes `/` and `:`, and it is switched on by any post containing "tru" ("true", "structure"). Any 26-character URL run, like https://dev.to/iacobandrei, was then reported as a secret. Ignore that rule's findings and redact only the findings that remain.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
Note This message is generated by gpt-6.1-sol on behalf of xHeaven. It may contain errors—verify important details. Closing because the secret scanner and all related warnings have been removed in #999, so this scanner-specific fix is no longer needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Posting
https://dev.to/iacobandrei/how-i-documented-a-broken-codebase-without-losing-my-mind-74min a commit that also said something like "true" or "restructuring" showed the detected-secret warning onhttps://dev.to/iacobandrei.The cause is the
tru-2rule in@sanity-labs/secret-scan1.1.0 (the latest release):\b([0-9a-zA-Z.-_]{26})\btreats.-_as a range from.to_, which includes/,:and@. Any 26-character run of URL characters matches;https://dev.to/iacobandreiis exactly 26.tru, matched as a substring, so "true", "trust" or "structure" anywhere in the post turns it on.sensitive-text.tsnow ignorestru-2findings.removeSecretsandstashableBodyuse the same filtered list, so the redact button and the draft stash leave the URL alone too. Every other rule still applies, andtru-2is the only rule with this pattern bug.Test plan
tests/Unit/SensitiveText.test.ts: the reported post is no longer flagged, and a real GitHub token in a post containing "true" is still found and redacted. Both fail before the fix.bun run test:unit(102 passing),bun run test:types,bun run test:lint🤖 Generated with Claude Code