-
Notifications
You must be signed in to change notification settings - Fork 0
Add report functionality for detect-secrets + tests #235
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this PR covers only partial functionality. So what other PRs are you planning to submit? It would be good to get in the practice of documenting your planned PRs in the Issue. And but more discussion on the design there as well. You PR message added design questions, but the PR is not really a good place for that.
const path = filePath | ||
const startLine = issue.line_number | ||
const endLine = startLine | ||
const annotationLevel = getAnnotationLevel('HIGH', 'LOW') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the severity always be high and confidence always low for these results?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's something we should discuss in our issue tracker
#209
I just put the severity and confidence Bandit uses when reporting hardcoded credentials.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to look at https://github.com/lyft/bandit-high-entropy-string. This is a bandit plugin to do detect-secrets like testing. As part of the plugin, it defines severity and confidence.
I am doing that already: #160 I was just not sure where to put my planned pull requests.
Yes, you are right. I just thought about those design questions just before I submitted the pr and I didn't realize that they are better to be placed in the issue tracker. |
I moved the design discussion in our issue tracker: #209 (comment) |
This is the reporting functionality for detect_secrets which will process the results from the detect_secrets detect_secrets scan and it will create valid GitHub annotation objects for the issues. All upcoming pull requests to integrate detect_secrets into Precaution can be found here: #209 (comment) Related to: #209 Signed-off-by: Martin Vrachev <[email protected]>∂
Added a few standart tests for the report functionality of detect_secrets. Signed-off-by: Martin Vrachev <[email protected]>
As I explained here #209 (comment) we decided that we won't use |
This is the reporting functionality for detect_secrets which will
process the results from the detect_secrets detect_secrets scan
and it will create valid GitHub annotation objects for the issues.
All upcoming pull requests to integrate detect_secrets
into Precaution can be found here:
#209 (comment)
Related to: #209
Signed-off-by: Martin Vrachev [email protected]