deepfence / SecretScanner

:unlock: :unlock: Find secrets and passwords in container images and file systems :unlock: :unlock:
https://deepfence.io
MIT License
3.1k stars 315 forks source link

Remove baseDir from IsSkippableDir #39

Closed j0nnyr0berts closed 2 years ago

j0nnyr0berts commented 2 years ago

Love the software and am keen to use it in CI pipelines but need to be able to effectively ignore directories to control false positives 🙂

ramanan-ravi commented 2 years ago

@j0nnyr0berts Thanks for your contribution.

But following use case should also be handled:

Current code handles this.

Can you make this new behaviour optional based on a configuration parameter here?

j0nnyr0berts commented 2 years ago

@ramanan-ravi good point! How about using if strings.HasPrefix(path, skippablePathIndicator) instead?

ramanan-ravi commented 2 years ago

@ramanan-ravi good point! How about using if strings.HasPrefix(path, skippablePathIndicator) instead?

That works

j0nnyr0berts commented 2 years ago

@ramanan-ravi good point! How about using if strings.HasPrefix(path, skippablePathIndicator) instead?

That works

Updated! 🙂