mirror of
https://github.com/f/git-rewrite-commits.git
synced 2026-04-27 06:35:49 +03:00
[PR #6] Fix RCE, data exfiltration, and supply chain vulnerabilities #19
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/git-rewrite-commits#19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/f/git-rewrite-commits/pull/6
State: closed
Merged: No
Critical security issues: shell injection in hooks via
eval, unconditional transmission of diffs/files to remote APIs without consent, automatic history rewrites without backups, and unversioned package execution.Changes
Shell injection (hooks/prepare-commit-msg)
eval "$CMD"with secure argument arrays:set -- npx git-rewrite-commits --provider "$PROVIDER"Data exfiltration (src/index.ts)
checkRemoteAPIConsent()- explicit prompt before remote API calls (skipped for local Ollama)redactSensitivePatterns()- strips API keys, passwords, private keys, AWS credentials from diffs--skip-remote-consentflag for non-interactive contextsUnsafe rewrites (hooks/)*
git config hooks.prepareCommitMsg true)--skip-backupfrom post-commit and pre-push hooksSupply chain (SECURITY.md)
npx git-rewrite-commits@0.4.0Breaking Change
Hooks disabled by default. Users must explicitly enable:
Example
Before (vulnerable):
After (secure):
CodeQL scan: 0 alerts.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
[PR #6] [CLOSED] Fix RCE, data exfiltration, and supply chain vulnerabilitiesto [PR #6] Fix RCE, data exfiltration, and supply chain vulnerabilities