Only load json from stdin if it exists#69
Merged
Conversation
KevinHock
approved these changes
Aug 9, 2018
Collaborator
KevinHock
left a comment
There was a problem hiding this comment.
LGTM 🚢 ✨🍰✨
Thanks for making this!
Collaborator
|
Feel free to checkout |
Contributor
Author
|
Thanks! I will check it out. Currently for Python security linting I run Bandit :) |
Collaborator
|
https://github.com/facebook/pyre-check Looks eventually promising as well, definitely great for type checking currently. Bandit is very production ready but at the cost of lots of false positives, since it doesn't do dataflow like the other 2 do. |
Contributor
Author
|
Nice! I like to keep an eye on https://github.com/mre/awesome-static-analysis and check recent commits occasionally to see if any new tools have showed up. |
jfagoagas
pushed a commit
to jfagoagas/detect-secrets
that referenced
this pull request
Mar 14, 2026
CI / CD docs for reporting
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.
I was trying to warp
detect-secretsin an automated code review tool I'm working on that shells out to various static analysis tools. However, when it runsdetect-secrets,detect-secretsappears to expect JSON on stdin when run in non-interactive mode. This PR adds a small workaround to only load the JSON if stdin input actually exists.An alternative approach might be a try/except block around the JSON load.