SA Git Hook is a post commit hook that sends commit stats to lambda that is used to populate a commit stats leaderboard.
This hook will send traffic to a url upon each local commit. Security analysis may find that this git metadata could be used to identify repos, partners, file types, and languages. When consulting, do not use this hook on client computers nor client repos without having a conversation and receiving explicit permission.
- Username
- Team name
- Number of insertions from a commit
- Number of deletions from a commit
- Number of files changed
- Language of the files changed
Example payload
{
"username": "test username",
"team_name": "team name",
"insertions": 13,
"deletions": 28,
"files_changed": 3,
"extension": [
".rs",
".yaml"
]
}
- Grab the binaries for your platform under Releases zip file
- Go into the platform directory (Windows or macOS) by
cd
ordir
into those directories. - Run the install binary (.exe for Windows)
- Installed Rust
- (Windows only) Install Git Bash
- cargo must be in your path
Windows users: Do the following in a Git Bash terminal
-
Clone this repo
-
In the Hookstaller directory, run the install.sh script
cd SA-Git-Hook/Hookstaller ./install.sh
-
Follow the steps given in the prompt
Copy the post-commit executable (/Hookstaller/target/release/post-commit
) to the .git/hooks
directory of a given repo.
cp ./Hookstaller/target/release/post-commit $(YOUR_REPO_NAME)/.git/hooks)
Run git config --global --unset core.hooksPath
Remove the post-commit
executable in the .git/hooks/
directory in the repository you would like to remove the hook
from.