detect-secrets-server
detect-secrets-server copied to clipboard
Add ability to scan multiple repositories at once
Context
If you want to manually scan more than one repository at once, you need to do them in separate invocations.
$ detect-secrets-server scan https://github.com/Yelp/detect-secrets
$ detect-secrets-server scan https://github.com/Yelp/detect-secrets-server
It would be convenient if you could specify more than one repository inline.
$ detect-secrets-server scan https://github.com/Yelp/detect-secrets https://github.com/Yelp/detect-secrets-server
This way, you could chain it with other CLI tools.
$ detect-secrets-server list | xargs detect-secrets-server scan
Proposed Fix
As described above.
I found myself trying to scan passing in the same config file I used to add. Seems like that should be sufficient?
@chetmancini : which version of detect-secrets-server
are you referring to? I think v0.1 supported config files in scan, but not v0.2 IIRC.
Interesting. I'm using the latest version. I'm brand new and am trying to setup this up first time to scan multiple repos. I'm still getting up to speed but will see if I can help enhance anything down the road.
How curious.
Could you provide your example invocation for posterity?
Sure. I was thinking I could pass the repos.yaml
file as the parameter to scanning, so you could have your configuration passed directly into the scan process.
# add them
$ detect-secrets-server add --config examples/repos.yaml
# scan them
$ detect-secrets-server scan --config examples/repos.yaml
@domanchi Any update on multiple repo scanning in 0.2? eagerly awaiting this enhancement
@chetmancini : Ah yes, that was the original intent. Since this is a server-side tool, configuration files allow source controlled declaration of repositories to scan. I agree that feature is a "nice-to-have", rather than a much needed improvement due to this.
@akshayatplivo : You're always welcome to help contribute to this repository! My bandwidth is quite limited to work on this, but I had previously flagged this as a good first issue, so maybe this is a good opportunity to get your feet wet. 😃