Commit Graph

1 Commits

Author SHA1 Message Date
Timmy
761ad313c7 fix(#1430): Prevent shell injection from commit messages
Some checks failed
CI / test (pull_request) Failing after 47s
CI / validate (pull_request) Failing after 40s
Review Approval Gate / verify-review (pull_request) Failing after 5s
Backticks in git commit -m messages can trigger shell expansion
during hook processing. This adds:

  - .githooks/pre-commit: warns when commit message contains
    backticks (reads COMMIT_EDITMSG, warns but does not block)
  - scripts/safe-commit.sh: safe commit wrapper using -F <file>
    instead of -m (prevents all shell expansion)
  - docs/SAFE_COMMIT_PATTERNS.md: documents safe patterns and
    what NOT to do

The repo hooks (pre-commit, stale-pr-closer) are already clean.
This is preventive hardening + documentation.

Fixes #1430
2026-04-17 01:28:44 -04:00