# Sh kb secrets

> Sh kb secrets is an open-source agent skill for security. Guides an agent through hunting hardcoded secrets and leaked sensitive data in code. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/dmdhrumilmistry/indra/tree/main/plugins/indra/skills/sh-kb-secrets
- **Repository:** https://github.com/dmdhrumilmistry/indra
- **GitHub stars:** 44
- **License:** MIT
- **Skill name:** sh-kb-secrets
- **Collection:** https://github.com/dmdhrumilmistry/indra
- **Categories:** [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-12-03

## About

This skill is a hunter's knowledge base for locating credentials and sensitive data that have been exposed in a codebase. It covers secrets embedded in source files, configuration, CI pipelines, infrastructure-as-code, client-side bundles and git history, as well as secrets written to logs, error messages or URLs. It is written as a reference for security reviewers rather than a single fixed procedure.

The material is organized around what to look for and how to confirm it. It lists grep-style detection patterns for common assignment forms, provider key prefixes and connection strings, then gives a short recipe: search, separate real literals from placeholders and environment lookups, check what ships to the browser or app, trace log and error sinks, and check git history for values removed from HEAD. It also describes how to size the impact of a leaked value and how to avoid false positives such as publishable keys and encrypted values.

The skill references a graft grep command and Git commands, so it expects an agent with shell and repository access. It also includes severity guidance, CWE and OWASP mappings, defender-side detection signals and mitigation advice. Real credentials are to be masked in any written output.

## When your agent uses it

> Knowledge base for finding hardcoded secrets and sensitive-data exposure - API keys, passwords, tokens, private keys, and connection strings embedded in source/config/CI/IaC/client bundles/git history, or secrets leaked to logs/errors/URLs. Use when hunting secret exposure. CWE-798/259/312/532, OWASP A05/A02:2021.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/dmdhrumilmistry/indra/tree/HEAD/plugins/indra/skills/sh-kb-secrets)
- [License: MIT](https://github.com/dmdhrumilmistry/indra/tree/HEAD/plugins/indra/skills/sh-kb-secrets)

## Features

- **Hardcoded credential patterns:** Grep targets and provider key prefixes for API keys, tokens, passwords and private keys.
- **Config and CI file coverage:** Checks committed env files, Dockerfiles, CI workflows, Terraform state and Kubernetes secrets.
- **Client bundle exposure:** Looks for server secrets shipped to browsers through public env prefixes or source maps.
- **Log and error leak tracing:** Traces tokens, headers and PII reaching logs, error responses and URLs.
- **Git history review:** Steps for finding values removed from HEAD but still present in past commits and branches.
- **False-positive filters:** Guidance on placeholders, publishable keys and encrypted values to avoid over-reporting.

## Good for

- Scan a repository for hardcoded API keys and passwords
- Check CI workflow files for tokens stored in plain text
- Find secrets leaked into frontend bundles or source maps
- Review git history for credentials that were removed but never rotated
- Trace whether tokens or PII end up in application logs

## Install

### Claude Code

This skill ships in the `indra` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add dmdhrumilmistry/indra
/plugin install indra@indra
```

Or copy only this skill to `~/.claude/skills/sh-kb-secrets`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/sh-kb-secrets &&
cp -R "$tmp/plugins/indra/skills/sh-kb-secrets" ~/.claude/skills/sh-kb-secrets &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/sh-kb-secrets` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/sh-kb-secrets` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/sh-kb-secrets &&
cp -R "$tmp/plugins/indra/skills/sh-kb-secrets" ~/.agents/skills/sh-kb-secrets &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/sh-kb-secrets` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/sh-kb-secrets` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/sh-kb-secrets &&
cp -R "$tmp/plugins/indra/skills/sh-kb-secrets" ~/.cursor/skills/sh-kb-secrets &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/sh-kb-secrets` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/dmdhrumilmistry/indra.git --path plugins/indra/skills/sh-kb-secrets
```

Or copy the folder to `~/.gemini/skills/sh-kb-secrets` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/sh-kb-secrets`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/sh-kb-secrets &&
cp -R "$tmp/plugins/indra/skills/sh-kb-secrets" ~/.copilot/skills/sh-kb-secrets &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/sh-kb-secrets` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git
```

Then copy `indra/plugins/indra/skills/sh-kb-secrets` into your agent's skills folder as `sh-kb-secrets`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Sh kb secrets need to run?

It references a graft grep command and standard git commands, so the agent needs shell and repository access.

### Does Sh kb secrets change any files?

The skill itself only provides guidance and does not include scripts; it describes searching and reporting.

### Which kinds of secrets does Sh kb secrets cover?

API keys, passwords, tokens, private keys, database and broker connection strings, and cloud or service-account credentials.

### How does Sh kb secrets handle values that look like secrets but are safe?

It lists filters for placeholders, environment lookups, publishable client keys and encrypted values, and advises noting but not rating those as secrets.

### How do I install Sh kb secrets in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/sh-kb-secrets to use it in all your projects, or to .claude/skills/sh-kb-secrets in one project. Or install the indra plugin, which includes it: /plugin marketplace add dmdhrumilmistry/indra, then /plugin install indra@indra.

### Does Sh kb secrets run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Sh kb secrets?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Sh kb secrets?

The closest alternatives to Sh kb secrets are Secrets in git history, Sh kb ci cd, Source code scanning, Osint and Sh kb injection.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Secrets in git history](https://ai-powered.com/skills/secrets-in-git-history): Secrets in git history is an open-source agent skill for security.
- [Sh kb ci cd](https://ai-powered.com/skills/sh-kb-ci-cd): Sh kb ci cd is an open-source agent skill for developer tools.
- [Source code scanning](https://ai-powered.com/skills/source-code-scanning): Source code scanning is an open-source agent skill for security.
- [Osint](https://ai-powered.com/skills/osint-transilienceai): Osint is an open-source agent skill for security.
- [Sh kb injection](https://ai-powered.com/skills/sh-kb-injection): Sh kb injection is an open-source agent skill for security.
- [Sh kb misconfig](https://ai-powered.com/skills/sh-kb-misconfig): Sh kb misconfig is an open-source agent skill for cloud and infrastructure.
- [Sh kb crypto](https://ai-powered.com/skills/sh-kb-crypto): Sh kb crypto is an open-source agent skill for finance and payments.
- [Sh kb auth](https://ai-powered.com/skills/sh-kb-auth): Sh kb auth is an open-source agent skill for security.

---
Source: https://ai-powered.com/skills/sh-kb-secrets
