r/github • u/Mission-Leave-6551 • 6h ago
Discussion Together AI's coding agent committed a key, how shall we prevent it
together ai says one of its coding agents pushed a credential into a public github repo and it opened a private hugging face repo with prompt samples from june and july. scanning caught it and the commit got reverted but someone had already downloaded the samples
cleanup is still revoking it at hugging face, then gitleaks or trufflehog for copies the agent left in other branches and logs, with provider usage logs and a runtime view such as hush security showing which still get used
the agent being the committer changes where the checks go tho.
a plain pre commit hook gets skipped with --no-verify. claude code PreToolUse hooks can stop the git commit before it runs and push protection is the last stop
6
u/funcyChaos 4h ago •
Stop using ai 🔥
5
u/Jmc_da_boss 5h ago
You prevent it by not being mind bogglingly stupid. It's really that easy
3
u/Mcby 2h ago
Sorry but you don’t actually mention rotating your keys, which should be the number one priority in a case like this. No matter what you’re doing to try and erase this error, you should assume these keys are now public info and invalidate them and generate new ones.
2
u/lenswipe 1h ago
Read your fucking diffs before committing. I don't know how many times this needs to be said.
3
u/dashingThroughSnow12 6h ago
Push protection?
Looking that up.
TIL public GitHub doesn't support pre-receive hooks and instead uses "Push protection".