You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From Piccirello's review on PR #13 — if someone changes where origin points with git remote set-url origin <evil-url>, then a normal git push origin silently sends code to the attacker.
What to catch
git remote set-url origin <url>
git remote add origin <url> (or any remote name)
.git/config modifications that change remote URLs
Considerations
Changing a remote URL is sometimes legitimate (switching from HTTPS to SSH, updating a fork URL).
Severity should probably be high + warn since there are legit use cases, but it's a real exfil vector.
Related to the existing exfiltration_git_push_non_origin rule — could be a new pattern in that rule or a standalone.
Activity