Skip to content

Conversation

aitchiss
Copy link
Contributor

@aitchiss aitchiss commented May 30, 2025

🎉 Thanks for submitting a pull request! 🎉

Summary

Fixes https://linear.app/netlify/issue/WRFL-2597/check-the-shannon-entropy-of-detected-secrets

After running the scan passively against a wide range of repos, we were finding a lot of false positives for example keys baked into dependency READMEs etc. To help eliminate these, after finding the potential secret with our regex, we'll also check that the string has a fairly high shannon entropy score. I've set this at a moderately high level of 4.5 for now which seems like it should be a good threshold to confidently say "we think this is a secret"


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code 🧑‍💻. This ensures
    we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or
    something that`s on fire 🔥 (e.g. incident related), you can skip this step.
  • Read the contribution guidelines 📖. This ensures
    your code follows our style guide and passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)

@aitchiss aitchiss requested a review from a team as a code owner May 30, 2025 10:03
Copy link
Contributor

This pull request adds or modifies JavaScript (.js, .cjs, .mjs) files.
Consider converting them to TypeScript.

Copy link
Contributor

This pull request adds or modifies JavaScript (.js, .cjs, .mjs) files.
Consider converting them to TypeScript.

@aitchiss aitchiss merged commit c48e090 into main May 30, 2025
33 checks passed
@aitchiss aitchiss deleted the suzanne/wrfl-2597-check-the-shannon-entropy-of-detected-secrets branch May 30, 2025 11:29
This was referenced Sep 2, 2025
This was referenced Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants