{"id":13639780,"url":"https://github.com/ezekg/git-hound","last_synced_at":"2025-04-10T03:51:39.475Z","repository":{"id":62422832,"uuid":"45624104","full_name":"ezekg/git-hound","owner":"ezekg","description":"Git plugin that prevents sensitive data from being committed.","archived":false,"fork":false,"pushed_at":"2020-10-08T22:34:28.000Z","size":3443,"stargazers_count":312,"open_issues_count":2,"forks_count":26,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-10T03:51:23.801Z","etag":null,"topics":["cli","git","git-plugin","golang","regular-expression","security"],"latest_commit_sha":null,"homepage":"","language":"Go","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/ezekg.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}},"created_at":"2015-11-05T16:30:20.000Z","updated_at":"2025-03-02T12:20:24.000Z","dependencies_parsed_at":"2022-11-01T17:33:58.374Z","dependency_job_id":null,"html_url":"https://github.com/ezekg/git-hound","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezekg%2Fgit-hound","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezekg%2Fgit-hound/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezekg%2Fgit-hound/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezekg%2Fgit-hound/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ezekg","download_url":"https://codeload.github.com/ezekg/git-hound/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154998,"owners_count":21056542,"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":["cli","git","git-plugin","golang","regular-expression","security"],"created_at":"2024-08-02T01:01:04.760Z","updated_at":"2025-04-10T03:51:39.457Z","avatar_url":"https://github.com/ezekg.png","language":"Go","readme":"# Git Hound\n[![Travis](https://img.shields.io/travis/ezekg/git-hound.svg?style=flat-square)](https://travis-ci.org/ezekg/git-hound)\n[![Code Climate](https://img.shields.io/codeclimate/github/ezekg/git-hound.svg?style=flat-square)](https://codeclimate.com/github/ezekg/git-hound)\n[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://godoc.org/github.com/ezekg/git-hound)\n\nHound is a Git plugin that helps prevent sensitive data from being committed into a repository by sniffing potential commits against PCRE regular expressions.\n\n## How does it work?\nUpon commit, it runs the output of `git diff -U0 --staged` through the Hound, which matches every _added_ or _modified_ line against your provided list of regular expressions from a local `.githound.yml` file.\n\n## Installation\nTo install Hound, please use `go get`. If you don't have Go installed, [get it here](https://golang.org/dl/). If you would like to grab a precompiled binary, head over to the [releases](https://github.com/ezekg/git-hound/releases) page. The precompiled Hound binaries have no external dependencies.\n\n```\ngo get github.com/ezekg/git-hound\n```\n\nIf you're on macOS, you can also install using Homebrew:\n\n```\nbrew install git-hound\n```\n\n## Compiling\nTo compile for your operating system, simply run the following from the root of the project directory:\n```bash\ngo install\n```\n\nTo compile for all platforms using [`gox`](https://github.com/mitchellh/gox), run the following:\n```bash\ngox\n```\n\n## Usage\n```\ngit-hound [\u003copts\u003e] commit [...]\ngit-hound [\u003copts\u003e] sniff [\u003ccommit\u003e]\n```\n\n### Commit\nSniff changes before committing.\n\n```bash\n# Sniff changes since last commit and pass to git-commit when clean\ngit hound commit …\n```\n\n### Sniff\nYou can optionally pass a commit hash or manually pipe a diff for the Hound to sniff.\n\n```bash\n# Sniff changes since last commit\ngit hound sniff HEAD\n\n# Sniff entire codebase\ngit hound sniff\n\n# Sniff entire repo history\ngit log -p | git hound sniff\n```\n\n## Option flags\n\n| Flag           | Type   | Default         | Usage                                      |\n|:---------------|:-------|:----------------|:-------------------------------------------|\n| `-no-color`    | bool   | `false`         | Disable color output                       |\n| `-config=file` | string | `.githound.yml` | Hound config file                          |\n| `-bin=file`    | string | `git`           | Executable binary to use for `git` command |\n\n## Example `.githound.yml`\n\n```yaml\n# Output warning on match but continue\nwarn:\n  - '(?i)user(name)?\\W*[:=,]\\W*.+$'\n  - '\\/Users\\/\\w+\\/'\n# Fail immediately upon match\nfail:\n  - '[''\"](?!.*[\\s])(?=.*[A-Za-z])(?=.*[0-9])(?=.*[!@#$\u0026*])?.{16,}[''\"]'\n  - '(?i)db_(user(name)?|pass(word)?|name)\\W*[:=,]\\W*.+$'\n  - '(?i)pass(word)?\\W*[:=,]\\W*.+$'\n# Skip on matched filename\nskip:\n  - '\\.example$'\n  - '\\.sample$'\n```\n","funding_links":[],"categories":["Go (531)","Go","Shell Aliases"],"sub_categories":["Chess :chess_pawn:"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezekg%2Fgit-hound","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fezekg%2Fgit-hound","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezekg%2Fgit-hound/lists"}