-
Notifications
You must be signed in to change notification settings - Fork 0
Using regex to scan for specific credentials #209
Comments
This integration could also add some differentiation as compared to similar competing Apps |
Note; detect-secrets overlaps with language specific linters somewhat. It's KeywordDetector plugin will detect variables named password or secrets, same as Bandit. And many of the other plugins it has could be integrated into language specific linters, since they would be better at detecting using an AST rather than regex. However, non-language files (*.py, *.go, *.js, *.ts) would be best detected by detect-secrets. And there are examples of people putting secret keys in json files, yaml files, etc. |
So should detect-secrets only be used on files not scanned by other linters? |
I like the idea of
There's a few approaches we could take here:
|
There are a few particularities in detect-secrets:
We should discuss what to do with those. |
I think that we can try and see how an option 2
implemented with the logic from subpoint c
|
Here is the list of the pull requests/features we should add to fully integrate detect-secrets into Precaution:
|
Currently, That's why to achieve scanning multiple parameters we have to call it like that: The problem is that currently, we are using two folders for our temporary files which will be processed What happens because of that is that when we start If we start Because of all those problems, I believe that first, we should create a Docker image which will allow us to use Go modules in Gosec (as described here: #227) and then we would continue with the |
I made a research for other tools besides Tools using the Shannon entropy for minimizing the false-positives: There are a lot of tools focused on finding secrets which are working on Git repositories. |
How about scanning one at a time? |
As I mentioned in this comment #209 (comment) we have a problem with that which will be resolved if we have Dockerfile. |
We reevaluated the benefits of using It's meaningless to use |
It's important when implementing the regex scan how we would store the files for scan in the memory because Heroku provides us with limited RAM https://devcenter.heroku.com/articles/limits#dyno-memory.
PS: Closed the issue by mistake |
Is your feature request related to a problem? Please describe.
See https://github.com/Yelp/detect-secrets for reference, but it would be useful for Precaution to also warn on secrets, Confidential code headers, etc. So level of detection is done through GitHub token scanning, but not all.
Note that also detect-secrets operates on all files (json, txt, etc), and not just languages files. There are definitely cases where API keys are stuffed into shell scripts, json files, yaml, etc.
Describe the solution you'd like
A new, slightly different type of scanner. Not really a linter. And it would scan all types of file extensions, not just language code, so the download of files would need to include everything.
Describe alternatives you've considered
Token scanning provided by GitHub does some things by not all. I don't think it would find a Confidential header whereas detect-secrets could be configured to do so. But it would be good to research and do a comparison analysis.
There are also probably many other CLI tools to do similar scans. This was one recommended from a blog article.
Additional context
The text was updated successfully, but these errors were encountered: