{"id":17983500,"url":"https://github.com/techjacker/diffence","last_synced_at":"2025-09-02T15:35:11.747Z","repository":{"id":57501174,"uuid":"79801821","full_name":"techjacker/diffence","owner":"techjacker","description":"Checks a git diff for offensive content","archived":false,"fork":false,"pushed_at":"2021-12-29T17:55:56.000Z","size":4741,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-02T13:52:14.950Z","etag":null,"topics":["diff","git-diff","passwords","secrets","security"],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/techjacker/diffence","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/techjacker.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":"2017-01-23T12:21:17.000Z","updated_at":"2025-01-07T05:47:34.000Z","dependencies_parsed_at":"2022-09-04T04:21:20.535Z","dependency_job_id":null,"html_url":"https://github.com/techjacker/diffence","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/techjacker/diffence","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Fdiffence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Fdiffence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Fdiffence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Fdiffence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techjacker","download_url":"https://codeload.github.com/techjacker/diffence/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Fdiffence/sbom","scorecard":{"id":871982,"data":{"date":"2025-08-11","repo":{"name":"github.com/techjacker/diffence","commit":"6e61f73f8175f7eaad53c0ed82f78147013d8f81"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/19 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 0.2.0 not signed: https://api.github.com/repos/techjacker/diffence/releases/6444715","Warn: release artifact 0.2.0 does not have provenance: https://api.github.com/repos/techjacker/diffence/releases/6444715"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T04:33:11.745Z","repository_id":57501174,"created_at":"2025-08-24T04:33:11.745Z","updated_at":"2025-08-24T04:33:11.745Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273306364,"owners_count":25082109,"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","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["diff","git-diff","passwords","secrets","security"],"created_at":"2024-10-29T18:17:24.815Z","updated_at":"2025-09-02T15:35:11.716Z","avatar_url":"https://github.com/techjacker.png","language":"Go","readme":"[![Build Status](https://travis-ci.org/techjacker/diffence.svg?branch=master)](https://travis-ci.org/techjacker/diffence)\n[![Go Report Card](https://goreportcard.com/badge/github.com/techjacker/diffence)](https://goreportcard.com/report/github.com/techjacker/diffence)\n\n# diffence\n- Checks a git diff for passwords/secret keys accidentally committed\n- Golang 1.7+\n\n-----------------------------------------------------------\n### Check the entire history of current branch for passwords/keys committed\n```$ git log -p | diffence```\n\n#### Example\n```\n$ git log -p --full-diff | diffence\n\n------------------\nViolation 1\nCommit: 4cc087a1b4731d1017844cc86323df43068b0409\nFile: web/src/db/seed.sql\nReason: \"SQL dump file\"\n\n------------------\nViolation 2\nCommit: 142e6019248c0d53a5240242ed1a75c0cc110a0b\nFile: config/passwords.ini\nReason: \"Contains word: password\"\n```\n\n\n-----------------------------------------------------------\n### Add false positives to `.secignore`\n\n```\n$ cat .secignore\nfile/that/is/not/really/a/secret/but/looks/like/one/to/diffence\nthese/pems/are/ok/*.pem\n```\n\n[See example in this repo](./.secignore).\n\n-----------------------------------------------------------\n## Install\n\n### Binary\n[Download](../../releases) the latest stable release.\n\n### CLI\n```\n$ go get -u github.com/techjacker/diffence/cmd/diffence\n```\n\n### Library\n```\n$ go get -u github.com/techjacker/diffence\n```\n\n-----------------------------------------------------------\n## CLI tool\n\n### Example Usage\n```\n$ touch key.pem\n\n$ git add -N key.pem\n\n$ git diff --stat HEAD\ngds HEAD\n key.pem | 0\n 1 file changed, 0 insertions(+), 0 deletions(-)\n\n$ git diff HEAD |diffence\nFile key.pem violates 1 rules:\n\nCaption: Potential cryptographic private key\nDescription: \u003cnil\u003e\nPart: extension\nPattern: pem\nType: match\n\n\n```\n\n-----------------------------------------------------------\n## Rules\n- [x] Analyse fPaths with [gitrob rules](https://github.com/michenriksen/gitrob#signature-keys)\n- [ ] Analyse added lines - need to find/create ruleset that can analyse file contents\n- [ ] Add option to use your own rules again file path/contents\n\n\n-----------------------------------------------------------\n## Tests\n```\n$ go test ./...\n```\n\n-----------------------------------------------------------\n## Local Development\n\n#### Build \u0026 Run Locally\n```shell\n$ go install -race ./cmd/diffence\n```\nOR\n```shell\n$ go build -race ./cmd/diffence\n```\n\n#### Check for race conditions\n```shell\n$ go run -race ./cmd/diffence/main.go\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechjacker%2Fdiffence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechjacker%2Fdiffence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechjacker%2Fdiffence/lists"}