Bug: password in end of file with first line in pattern file won't work
- Dominant language
- Shell
- Stars
- 13.4k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
### Environment
Win10 with git bash
### Case
target secret file: test.txt (should be the end of file without newline)
> password=12345
pattern file: pattern.txt (should be the first line of file)
> password\s*=\s*.+
Apply pattern:
`git secrets --add-provider -- cat ./pattern.txt`
Run scan:
`git secrets --scan`
An then it'll ignore the password.
Contributor guide
Research direction
Reproduce the report in Win10 Git Bash with test.txt ending without a newline, pattern.txt containing the first-line pattern, and the two commands shown. Start at the git secrets --add-provider and git secrets --scan entry points, then verify that the pattern matches the password at end of file and add a regression check for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- cli, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100