fix(lint/noSecrets): calculate entropy with entropyThreshold option#6642
Merged
unvalley merged 5 commits intobiomejs:mainfrom Jul 2, 2025
Merged
fix(lint/noSecrets): calculate entropy with entropyThreshold option#6642unvalley merged 5 commits intobiomejs:mainfrom
entropyThreshold option#6642unvalley merged 5 commits intobiomejs:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 3c277ca The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
CodSpeed Performance ReportMerging #6642 will not alter performanceComparing Summary
|
unvalley
commented
Jun 30, 2025
Comment on lines
-28
to
-29
| // Postgres json path query | ||
| const isNumeric = '@.scoreDisplayMode == "numeric" || @.scoreDisplayMode == "metricSavings"' |
Member
Author
There was a problem hiding this comment.
I believe this is detected as high entropy, so it appears to be a regression but it's working correctly. The entropyThreshold option exists for these kinds of cases, so I don't think it's a big problem.
dyc3
approved these changes
Jul 2, 2025
Merged
marko-hologram
pushed a commit
to marko-hologram/biome
that referenced
this pull request
Jul 2, 2025
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
Our noSecrets lint rule has the
entropyThresholdoption, but this option is not used correctly in the rule implementation as described in #4494 .This PR fixes the calculation and simplify scaling.
I have:
ENTROPY_PRECISION_MULTIPLIER(honestlyDEFAULT_HIGH_ENTROPY_THRESHOLDshould be 4.1 instead of 41, but this change can break user config)Closes #4494
Test Plan
Added snapshot for option