lirantal / detect-secrets

A developer-friendly secrets detection tool for CI and pre-commit hooks based on Yelp's detect-secrets
Apache License 2.0
49 stars 4 forks source link

Bug: All strategies get invoked instead of just first one found #2

Closed lirantal closed 5 years ago

lirantal commented 5 years ago

Expected Behavior

Even if I have multiple strategies supported, such as having both the detect-secrets tool as well as docker installed, and both can be used I expect that only one is used (the first one detected) and then stop without continuing to running the next one, which results in 2 reports for the same file being scanned.

Current Behavior

All available strategies getting invoked.

Possible Solution

Detect when strategies get invoked and don't continue to the next strategies if so.

Steps to Reproduce (for bugs)

  1. Have Yelp's detect-secrets available in the path
  2. Have Docker available in the path
  3. Run detect-secrets-launcher for a file and both will be invoked
lirantal commented 5 years ago

Fixed in https://github.com/lirantal/detect-secrets/commit/932ba73b54b5f5f1686457578c52380e91be0acf