Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

git-history-secret-mining

Skill by Zyrexnn

Guides authorized security assessments that mine secrets from git history on self-hosted forges like Gitea, Gogs and GitLab. It covers finding deleted files, validating leaked keys read-only, and checking remediation.

  • Score 78
  • 1.1k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install git-history-secret-mining

Built from the published package, never by AI.

git clone --depth 1 https://github.com/Zyrexnn/Cybermes /tmp/Cybermes && mkdir -p ~/.claude/skills && cp -r /tmp/Cybermes/skills/security/git-history-secret-mining ~/.claude/skills/git-history-secret-mining

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install git-history-secret-mining in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill is a playbook for reviewing self-hosted git forges during authorized, scoped assessments. It describes how to find anonymous repo browsing, list public repos, and clone full history with mirror clones. It then shows how to search history for deleted files, such as .env files, SQL dumps and key files, and how to read blobs from parent commits using the ^ syntax in raw URLs.

The skill also covers live validation of leaked static keys using read-only requests that compare an unauthenticated 401 with an authenticated 200. It includes an impact mapping table and reminds the reviewer that removing a file from later commits does not fix a leak. The source says it is for security professionals working on engagements where a target runs its own git server or leaked credentials need impact proof.

Written from the project's SKILL.md and checked against it.

What it can do

  • Forge enumerationFingerprints Gitea and related forges and lists public repos, including personal namespaces.
  • Full history cloningClones visible repos with git clone --mirror so all refs and deleted branch objects are included.
  • Deleted secret recoveryFinds deletion commits and recovers blobs from the parent commit before each deletion.
  • Pickaxe history searchSearches all commits for strings such as x-api-key to locate secrets across history.
  • No-clone raw blob retrievalFetches historical file contents over HTTP using raw/commit/<sha>^/<path> URLs.
  • Read-only key validationCompares a 401 response without a key against a 200 response with the leaked key on a GET endpoint.
  • Impact mappingGives checks to run before reporting, such as port exposure, live deployment state and leak URL status.
  • Remediation guidanceSpecifies history rewrite or repo privatization plus rotation of every exposed credential.
  • Validator scriptIncludes scripts/validate_leaked_key.py, which fetches a raw blob, parses the secret and tests the pair.

What you need

  • git, or a way to install it
  • Python
  • A self-hosted forge with anonymous repo browsing in scope
  • Written authorization for the engagement

Try asking

  • Clone all visible repos from this Gitea host with mirror mode and list deletion commits
  • Show me how to recover the .env file from the commit before its deletion
  • Validate this leaked API key with a 401 versus 200 check on a GET endpoint

Good to know

  • Intended only for scoped, authorized engagements
  • Key validation is read-only and tests only GET endpoints
  • Recovered dumps should be treated as sensitive data

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/security/git-history-secret-mining/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md6 KB
  • scripts/validate_leaked_key.py3 KB

Alternatives to git-history-secret-mining

All alternatives →

Compare with function_health, windows-privilege-escalation or github-actions-advanced

git-history-secret-mining: common questions

Does this skill work on GitHub or GitLab.com?

The source targets self-hosted forges such as Gitea, Gogs and GitLab. It does not say it covers hosted GitHub or GitLab.com.

Does it change anything on the target system?

The source says live validation is read-only and that it should not mutate anything. Its PoC only issues GET requests.

Why does removing a secret from the latest commit not fix the leak?

The source says deleting a file only removes it from HEAD, while earlier commits still hold the blob. It also says clones may already exist, so credentials must be rotated.

How do I install git-history-secret-mining?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is git-history-secret-mining free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is git-history-secret-mining safe to use?

It scores 78 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to git-history-secret-mining?

Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.

git-history-secret-mining Install

Add to stack

Loading.