Handling ini files#13
Merged
Merged
Conversation
KevinHock
approved these changes
Apr 5, 2018
|
|
||
| def analyze(self, file, filename): | ||
| # Heuristically determine whether file is an ini-formatted file. | ||
| for ext in INI_FILE_EXTENSIONS: |
Collaborator
There was a problem hiding this comment.
We could maybe run file on them and see if it comes back ASCII text, might get expensive.
Contributor
Author
There was a problem hiding this comment.
ini styled formats is definitely a subset of ASCII text, so that solution may lead to false positives.
Eg.
$ file test_data/config.ini
test_data/config.ini: ASCII text
$ file test_data/baseline.file
test_data/baseline.file: ASCII text
Collaborator
There was a problem hiding this comment.
I'm kind of ambivalent, right now it's easier to exclude files than include them in the tuple, which makes me lean towards including more by default/making the false-p/false-n rate customizable. Nothing is really set in stone though, we can always change it in the future.
Contributor
Author
There was a problem hiding this comment.
Good point. Let me jiggle it up a bit.
KevinHock
approved these changes
Apr 6, 2018
jimmyhlee94
pushed a commit
to jimmyhlee94/detect-secrets
that referenced
this pull request
Aug 19, 2021
Login to GH and GHE to fix deploy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
First part of fix for #12.
I currently just assume that config files in this format end with
.ini. Technically, they can end with anything, but maybe we can just keep adding toINI_FILE_EXTENSIONS?