{"id":13572238,"url":"https://github.com/jandre/safe-commit-hook","last_synced_at":"2026-03-02T22:03:17.649Z","repository":{"id":140003838,"uuid":"43474566","full_name":"jandre/safe-commit-hook","owner":"jandre","description":"pre-commit hook for Git that checks for suspicious files.","archived":false,"fork":false,"pushed_at":"2016-07-13T22:10:55.000Z","size":13,"stargazers_count":328,"open_issues_count":1,"forks_count":17,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-09T16:19:10.221Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jandre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-01T02:31:48.000Z","updated_at":"2024-10-23T21:15:06.000Z","dependencies_parsed_at":"2023-06-03T13:45:48.701Z","dependency_job_id":null,"html_url":"https://github.com/jandre/safe-commit-hook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jandre%2Fsafe-commit-hook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jandre%2Fsafe-commit-hook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jandre%2Fsafe-commit-hook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jandre%2Fsafe-commit-hook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jandre","download_url":"https://codeload.github.com/jandre/safe-commit-hook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065281,"owners_count":21041872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T14:01:17.401Z","updated_at":"2026-03-02T22:03:12.573Z","avatar_url":"https://github.com/jandre.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Safe Commit Hook\n\nThis is a git [pre-commit hook](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) that is inspired by the [Gitrob project](https://github.com/michenriksen/gitrob).\n\nIt adds an automatic check to prevent developers from checking in suspicious files (as defined by Gitrob's [signatures.json](https://github.com/michenriksen/gitrob/blob/master/signatures.json))\n\n# Installation\n\n```bash\ngit clone https://github.com/jandre/safe-commit-hook.git \ncd safe-commit-hook\nmake install  \n```\n\nThis will do the following:\n\n * Create a `~/.safe-commit-hook` directory and copy the files from this repo there.\n * Create a git alias so you can do `git init-safe-commit` in a project directory, which will create `.git/hooks/pre-commit` (WARNING: will blow away\nany other pre-commit hooks).\n\nNow you will get an error if you try to do anything fishy!\n\n[![asciicast](https://asciinema.org/a/0uqf6dcaautz599xru1kefa6b.png)](https://asciinema.org/a/0uqf6dcaautz599xru1kefa6b)\n\n# Editing the rules\n\nThey are currently in JSON format at `~/.safe-commit-hook/git-deny-patterns.json`.\n\nJust remove the rules you wish to ignore. In the future, would nice to have a `.git-safe-commit-ignore` file for a repo. \n\n# TODO\n\n * [ ] Allow project specific exceptions for safe commit checks.\n * [ ] Don't blow away any other git pre-commit hooks in `git init-safe-commit`.\n * [ ] Extend the JSON spec to allow for searching for body of modified files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjandre%2Fsafe-commit-hook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjandre%2Fsafe-commit-hook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjandre%2Fsafe-commit-hook/lists"}