Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

block-dangerous.sh: several force-push and rm -rf spellings get through

Open Beginner friendly
#1,195 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
79/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
bash, python
Domain
security, tooling

Research direction

Start with .cursor/hooks/block-dangerous.sh and inspect its two grep -E patterns against the listed commands. Update the checks so the eight dangerous spellings are blocked while the listed safe commands remain allowed, then run uvx paveo test cursor to verify the Cursor hooks.

Written by the indexing model from the issue text.

Description

.cursor/hooks/block-dangerous.sh catches git push --force, git push -f, rm -rf and rm -fr. Checked against its two grep -E patterns, these pass:

  • force push: git push origin main -f, git push origin +main, git -C . push --force, git push -uf origin main
  • delete: rm -Rf build, rm -r -f build, rm --recursive --force build, find build -delete

These two patterns stop all eight, and still allow git push origin main, git push --follow-tags, git push -u origin feature-fix, rm -f file.txt and find . -name x:

grep -qE '\bgit\b.*\bpush\b.*(\s--force|\s-[a-zA-Z]*f\b|\s\+[^ ])'
grep -qE '\brm\b.*\s(-[a-zA-Z]*[rR]|--recursive)|\bfind\b.*\s-delete\b'

The second also stops a plain rm -r, which seems in the spirit of the hook. failClosed: true is already set, so a missing jq blocks rather than lets things through.

I build Paveo, an open-source test for agent guards: uvx paveo test cursor runs these and 60 more spellings against a repo's Cursor hooks.

Dominant language
Python
Stars
35
Forks
66
Avg merge
1d 17h
Merged PRs (30d)
19

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from project-codeflare/codeflare-sdk

All issues in project-codeflare/codeflare-sdk

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.