feat: add a generic credential checker for native keys #159
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.
This checker is intended to identify native keys that contain potentially sensitive information but are neither protected from access by other adapters (have no entry in protectedNative) nor stored in encrypted form (encryptedNative).
The pattern list is based on the example of gitleaks for generic credentials (see also https://github.com/gitleaks/gitleaks/blob/6c52f878cc48a513849900a9aa6f9d68e1c2dbdd/cmd/generate/config/rules/generic.go#L12) and is not particularly restrictive in order to generate as few false positives as possible. Feel free to even prune this list a little further :)
In my opinion this is a good heuristic and non invasive way to point to possible security smells.