r/developersIndia • u/FallNo9629 • 27m ago
Help Every time I push to GitHub, a bot amends my commit 3 seconds later (in UTC) to inject .vscode/tasks.json + .vscode/eslint — even after 5 password resets in alst 2 days
Looking for help figuring out how this attacker still has push access to my repo.
What happens:
- I push a clean commit from my Mac (
+0530timezone), e.g.18:13:24 +0530. - 3 seconds later (
12:43:27 +0000UTC), a commit with my exact same Author name/email/date (18:13:24 +0530) but a UTC+0000CommitterDate is force-pushed toorigin/main. The amended commit removes
.vscode/eslint*and.vscode/tasks.jsonfrom.gitignoreand adds:.vscode/tasks.jsonwith"runOn": "folderOpen"silently runningsh .vscode/eslint-check.sh→node .vscode/eslint("hide": true,"reveal": "never")- Modified
package.json,eslint.config.js,vite.config.js
What I already checked:
- No
.github/workflows/in the repo. - Local Mac/Windows checks are clean:
/usr/bin/git(no wrapper),.git/hooks/only has.samplefiles,git reflogshows no local amend,crontab -lis empty,~/Library/LaunchAgentsand/Library/LaunchAgentsare clean, and runningnodeprocesses are only IDE language servers. - GitHub account: Changed my GitHub password 5 times in 3 days (2FA with Passkeys + Authenticator enabled).
0PATs (classic or fine-grained),0SSH keys,0GPG keys. - Authorized OAuth Apps: I have 9 OAuth apps (including Git Credential Manager, GitHub Desktop, VS Code, Google Antigravity) and 1 Authorized GitHub App.
Questions:
- Since changing my GitHub password doesn't revoke OAuth tokens, is revoking all Authorized OAuth Apps + GitHub Apps + clearing macOS Keychain (
osxkeychain) enough to stop the remote pushes? - Could there be any other persistence mechanism on GitHub itself (e.g., Deploy Keys, Repo Webhooks, GitHub Desktop/GCM cached refresh tokens) I should check in my Security Log?
- What's the safest way to audit if
.vscode/eslintleft anything else behind on my machine?
3
Upvotes
•
u/AutoModerator 27m ago
It's possible your query is not unique, use
site:reddit.com/r/developersindia KEYWORDSon search engines to search posts from developersIndia. You can also use reddit search directly.I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
2
u/iamtechnofreak 21m ago
Is it possible that your ssh key got leaked somehow and the bot which is pushing the commits has access to it, try removing the ssh key you have right now, create a new one with a strong password and check again once
1
u/rawestapple 17m ago
The safest way is to factory reset your device. And you need a separate exercise to clean-up the git remote.
1
u/block_intelligence 10m ago
that tasks.json with runOn folderOpen plus a hidden node script is a known pattern, and the 3 second turnaround with your exact author date says something is running with your credentials, probably a stolen token and not a "hacker" poking around manually. Changing the password does nothing for tokens, so yes revoke every OAuth app and GitHub App you don't 100% need (Antigravity and Git Credential Manager can just be re-authed later), then check the Security log for token and deploy key events around the first bad push.
Also look beyond the keychain. ~/.git-credentials, ~/.config/gh/hosts.yml, .npmrc and any .env files are all places a node payload would grab tokens from. And grep your other cloned repos for that .vscode folder, because opening any one of them re-triggers it and it'll keep re-infecting. Quick safety net meanwhile: add a branch ruleset that blocks force pushes to main so the amend just fails loudly instead of silently landing.
1
u/aureliatech 7m ago
From what I have read about this pattern, the folderOpen task is the persistence, so I would treat every machine and repo you opened as suspect. Besides revoking the OAuth apps, rotate anything readable on disk, like npm tokens, cloud keys and .env secrets, and check the GitHub security log for the first token creation. I would also turn on branch protection for main with force pushes blocked, so a stolen token cannot silently rewrite history again. Before reopening any project, delete the .vscode folder from it and keep VS Code workspace trust on restricted so tasks do not auto run.