feat: Ignored file extensions can now be configured in the PII scanner #559
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
secureli-558
I'm on a Go project, and need the ability to add additional file extensions, as the default set doesn't include them. Within the project, go.mod and go.sum were including entries that appeared to be phone numbers. There was no way to configure PII Scanner to ignore these files, as any practical contents of these files would not be PII.
Rather than simply add them to the growing set of excluded extensions, I thought I would make the set configurable.
As the set contains language-agnostic files, I also elected NOT to include the go-specific files in that set.
A good follow-up work would be to also lay out, and selectively activate, additional extensions to ignore based on the languages configured in the repo.
Changes
pii_scanner
is added to the .secureli-config.yaml file structureignored_extensions
is a list of extensions that can be added to the default setTesting
I tested with a repo containing only some go-based package files (specifically go.mod and go.sum), which were appearing to the PII scanner to contain phone numbers.
Clean Code Checklist