Repository navigation
test: defang high-entropy fixtures in tenant-registry redaction tests - #1359
Merged
Merged
Conversation
GitGuardian's "Generic High Entropy Secret" detector flags the fake-credential strings used to exercise the redactor (the strings the redactor is supposed to redact in production). Replace them with obviously-fake low-entropy fixtures that still satisfy the redactor's regex patterns: - `Bearer sk_live_secret_value_abc123` → `Bearer placeholder_token_for_redactor_test` - `token=abc123def456ghi789jkl` → `token=placeholder_value_for_redactor_test` Both fixtures are still ≥4 chars (Pattern 4 / labeled credentials) and ≥8 chars (Pattern 1 / Bearer headers), so the redactor's behavior is unchanged. Test assertions updated in lockstep. Test-only change; no library behavior change → no changeset. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
GitGuardian's Generic High Entropy Secret detector flags the fake-credential strings in
test/server-decisioning-tenant-registry-redaction.test.js(PR #1336). They're test fixtures — exactly the strings the redactor is supposed to redact in production — but the entropy detector can't tell them apart from real leaked credentials, and they trip every PR that mergesmain(e.g. caught #1352).Changes
Bearer sk_live_secret_value_abc123→Bearer placeholder_token_for_redactor_test(looked Stripe-prefix-shaped; replaced)token=abc123def456ghi789jkl→token=placeholder_value_for_redactor_test(the one GitGuardian actually flagged)Both replacements are ≥8 chars (Pattern 1 / Bearer header regex) and ≥4 chars (Pattern 4 / labeled-credential regex), so the redactor still matches and replaces. All 4 tests in the file still pass.
Test plan
npm run build:libcleannpm run format:checkcleannode --test test/server-decisioning-tenant-registry-redaction.test.js— all 4 tests pass🤖 Generated with Claude Code