Duplicate false positives #195211
Replies: 2 comments
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
Hi @mitja-kleider, That is definitely a frustrating bug. It looks like GitHub's secret scanning regex is being overly aggressive and is triggering on the string literal f"Bearer {..." combined with the word TOKEN in your environment variable key, completely ignoring the fact that it's wrapped in an os.environ call. The fact that it forgets your "false positive" triage state on unchanged code is definitely an issue on GitHub's end regarding how they track triaged alerts for specific lines. As a temporary workaround until the GitHub team fixes this tracking bug, you could try slightly refactoring the code to break the specific string pattern the scanner is actively looking for. For example, separating the variable assignment from the dictionary creation usually bypasses the regex: Python |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Bug
💬 Feature/Topic Area
Secret scanning
Discussion Details
There is a format string reading from env:
We received the same secret scanning alert multiple times for this snippet without the code changing. Triaging as false positive should only be required once.
Beta Was this translation helpful? Give feedback.
All reactions