False positive: harmless `git -C <dir>` commands that mention `.env` are blocked
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
Research direction
Start with safe_file_operation in scripts/paths.py and compare its command parsing with the Git checks referenced in #19. Update the handling of -C <dir> so the four listed non-printing commands are allowed while git -C app show HEAD:.env remains blocked. Add coverage for all five cases in tests/test_redteam.py and run that test file to verify the behavior.
Written by the indexing model from the issue text.
Description
Plain-git versions of these are allowed because they never print the file's contents. With -C <dir> they are blocked:
git -C app rm --cached .envgit -C app commit -m "chore: stop tracking .env"git -C app check-ignore -v .envgit -C app log --oneline -- .env
(git -C app show HEAD:.env prints the file, so it should stay blocked.)
Cause: safe_file_operation in scripts/paths.py only recognises these when the subcommand comes straight after git.
Done when
safe_file_operationuses the same-Chandling as the Git checks (see #19), so the four commands above are allowed andgit -C app show HEAD:.envis still blocked.tests/test_redteam.pycovers all five.
Generated by Claude Code
- Dominant language
- Python
- Stars
- 1
- Forks
- 1
- Avg merge
- 2h 28m
- Merged PRs (30d)
- 6
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from JTHCode/secretguard
-
documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
JTHCode/secretguard#17 ·
Maintainers usually reply within 1 day
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
JTHCode/secretguard#15 ·
Maintainers usually reply within 1 day
-
help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
JTHCode/secretguard#16 ·
Maintainers usually reply within 1 day
-
Add plugin manifest and hook configuration consistency testsPossibly taken @nyx60002 claimed this today. Openenhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
JTHCode/secretguard#4 ·
Maintainers usually reply within 1 day
-
Improve installation and troubleshooting documentationPossibly taken @nyx60002 claimed this today. Opendocumentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
JTHCode/secretguard#3 ·
Maintainers usually reply within 1 day
All issues in JTHCode/secretguard
Similar issues
-
docs(contributing): the two things that silently block a PRPossibly taken A pull request linked to this issue is open or already merged. Openavailable documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
Nixitov/Riptide-Native#944 ·
Maintainers usually reply within 1 day
-
area: middleware documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
521xueweihan/HelloGitHub#4729 ·