IBM / detect-secrets

An enterprise friendly way of detecting and preventing secrets in code.
Apache License 2.0
73 stars 45 forks source link

[BUG] Multiple exclude-files do not work as expected #119

Closed esmiralha closed 4 months ago

esmiralha commented 1 year ago

Using multiple exclude-files options do not work as expected. Only the last one is used. This is inconsistent with the original tool's current behavior.

Steps to reproduce the behavior:

  1. Create a git repo with 3 folders: folder1, folder2 and folder3. Init these folders with some files.
  2. run `detect-secrets --verbose scan --update .secrets.baseline --exclude-files 'folder1' --exclude-files 'folder2'
  3. See that files in folder1 are scanned.

Expected behavior Both exclude-files options should be combined with AND-like operator.

Impact

Can't properly exclude files without using a complex regex.

Running version 0.13.1+ibm.56.dss