Skip to main content
skill CX Codex

infisical-secret-scanning — Claude Code skill: leak scanning setup

Sets an agent up with Infisical Secret Scanning: repo data sources, the infisical scan CLI, pre-commit hooks and tuning to cut noise.

MIT 254 installs ★ 41 updated 2026-10-19

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Infisical/ai-skills --skill infisical-secret-scanning -a claude-code
Open on GitHub

What infisical-secret-scanning does

This skill briefs an agent on Infisical Secret Scanning, which comes as its own product with a secret-scanning project type. The work splits in two. Cloud data sources for GitHub, GitLab and Bitbucket watch connected repos and fire a scan on push, so a finding there means the secret is already exposed. The infisical scan CLI covers the other side: local directories, Git history, staged changes and CI runs, so a leak can be caught before it leaves the machine.

The pre-commit hook comes from infisical scan install --pre-commit-hook. Anyone can skip it with --no-verify, so the guide says to back it with a CI scan that has no bypass. Noise gets handled with infisical-scan:ignore comments, a .infisicalignore file, entropy thresholds and custom rules; switching a rule off entirely costs you the coverage along with the noise.

On GitHub, scanning needs a github-radar App Connection rather than github — they are different GitHub Apps with different permissions, and the plain connection simply fails. The skill also covers AWS honey tokens: decoy credentials that raise an alert when someone tries them. When a real finding lands, rotate through infisical-secret-rotation before rewriting history, since a pushed secret is compromised already.

What it helps with

  • scan Git history for credentials committed earlier
  • install a pre-commit hook that stops a secret before the push
  • connect GitHub, GitLab or Bitbucket repos and scan them on every push
  • cut false positives with .infisicalignore and entropy thresholds
  • plant AWS honey tokens that alert when stolen keys get used

Example prompts for the agent

  • Set up the pre-commit hook with infisical scan install --pre-commit-hook and tell me what it checks.
  • Scan this repo's Git history for leaked credentials and sort the findings by severity.
  • The scan is too noisy — show me how to add exceptions to .infisicalignore.

How to install infisical-secret-scanning

1Skills CLI (Vercel)

npx skills add Infisical/ai-skills --skill infisical-secret-scanning -a claude-code

2Manually: put the files in place

~/.claude/skills/infisical-secret-scanning/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/infisical-secret-scanning/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about infisical-secret-scanning

How do I install infisical-secret-scanning in Claude Code?

Run npx skills add Infisical/ai-skills --skill infisical-secret-scanning -a claude-code. The skill file lands at ~/.claude/skills/infisical-secret-scanning/SKILL.md.

What does infisical-secret-scanning do?

It guides an agent through Infisical Secret Scanning: connecting repo data sources, running infisical scan, wiring the pre-commit hook and tuning out false positives.

Why does GitHub scanning fail to connect?

GitHub scanning needs the github-radar App Connection, not github. The two install different GitHub Apps with different permissions, so a plain github connection does not work here.

Source text

SKILL.md · MIT
---
name: infisical-secret-scanning
description: "Guide for Infisical Secret Scanning — detecting leaked credentials in source code and developer systems. Covers the 3 cloud data sources (GitHub via a GitHub Radar connection, GitLab, Bitbucket), full scans vs automatic diff scans on push, finding lifecycle and severity, the `infisical scan` CLI for Git history, working directories, staged changes and CI pipelines, pre-commit hook installation with `infisical scan install --pre-commit-hook`, noise reduction via infisical-scan:ignore, .infisicalignore, entropy thresholds and custom rules, and AWS honey tokens as decoy credentials that alert on use. Use this skill when someone asks about: Infisical secret scanning, finding leaked secrets in a repo, scanning git history for credentials, pre-commit secret scanning, false positives in scanning, or honey tokens. Not for storing secrets so they stop leaking (infisical-setup) or rotating one that leaked (infisical-secret-rotation). GitHub scanning needs a github-radar App Connection, not a github one."
---
# Infisical Secret Scanning Guide

You are a setup assistant helping users detect leaked credentials in source code and respond when
they find them.

Secret Scanning is a **separate Infisical product** with its own project type (`secret-scanning`).

## Two halves that solve different problems

Keep these distinct when advising:

| Half | What it does | When it catches a leak |
|------|-------------|------------------------|
| **Cloud data sources** | Monitor connected GitHub/GitLab/Bitbucket repos | **After** the secret is pushed |
| **CLI (`infisical scan`)** | Scan local directories, Git history, staged changes, CI | **Before** the push, if wired into a hook or pipeline |

A user who only sets up data sources is detecting leaks after they exist. A user who only uses the
CLI has no coverage of what is already in the repo. **Recommend both**: the CLI as a pre-commit hook
to stop new leaks, and a data source to find existing ones and catch anything that bypasses the hook.

## Not this skill

| If the user wants... | Use |
|----------------------|-----|
| To **store** secrets so they stop ending up in code | `infisical-setup` — the actual fix for leaks |
| To **rotate** a credential that leaked | `infisical-secret-rotation` |
| To **revoke** a leaked dynamic credential | `infisical-dynamic-secrets` |
| To create the `github-radar` App Connection | `infisical-app-connections` |
| Audit logs of Infisical activity | `infisical-access-control` |

Worth raising unprompted: scanning is detection, not remediation. When a real finding turns up, the
response is **rotate the credential first**, then clean the history. A secret in Git history is
compromised even after the commit is removed, because it was already cloned. Point users at
`infisical-secret-rotation` as part of the incident response, not as a separate conversation.

## Data sources

`SecretScanningDataSource` values, and the App Connection each requires:

| Data source | Value | App Connection |
|-------------|-------|----------------|
| GitHub | `github` | **`github-radar`** |
| GitLab | `gitlab` | `gitlab` |
| Bitbucket | `bitbucket` | `bitbucket` |

**GitHub scanning needs a `github-radar` connection, not a `github` connection.** They install
different GitHub Apps with different permissions — Radar needs to read repository contents and
receive push webhooks. Using a `github` connection here fails. This is the most common setup error
for this product. See `infisical-app-connections`.

All three trigger automatic scans on **push**.

## How to use this skill

1. **Wire the CLI into pre-commit** so new leaks are stopped at the source
2. **Connect the data sources** for repositories that matter
3. **Run a full scan** to establish a baseline of what already exists
4. **Triage findings** — resolve, mark false positive, or ignore
5. **Tune to reduce noise** so the signal stays credible
6. **Enable automatic diff scans** for ongoing coverage
7. **Consider honey tokens** for detecting misuse rather than exposure

## Reference files

| File | When to read |
|------|-------------|
| `references/scanning-and-findings.md` | Data source setup, scan types and statuses, finding lifecycle and severity, noise reduction |
| `references/cli-and-honey-tokens.md` | `infisical scan` usage, pre-commit hooks, CI integration, AWS honey tokens |

## Guiding principles

- **`github-radar`, not `github`.** Repeat it; it is the error users hit first.
- **Rotate before cleaning history.** A leaked credential is compromised the moment it is pushed. Rewriting history does not un-leak it.
- **False positives destroy the control.** A noisy scanner gets ignored, and then a real finding gets ignored too. Invest in ignore rules and entropy tuning early.
- **Prefer `.infisicalignore` and `infisical-scan:ignore` over disabling rules.** Targeted suppressions keep coverage; disabled rules remove it silently.
- **Pre-commit hooks are advisory, not enforcement.** They can be skipped with `--no-verify`. Back them with CI scanning that cannot be bypassed.
- **Honey tokens detect a different thing.** Scanning finds secrets that leaked; honey tokens tell you someone is *using* stolen credentials. They complement each other.
- **Never echo a discovered secret value** back to the user in full.

© Infisical · MIT · Infisical/ai-skills

Similar skills

All skills for Security →

From the same set17

The whole set →
infisical-terraform Walks your agent through the Infisical Terraform provider: provider auth, ephemeral secrets that stay out of state, and OIDC for Terraform Cloud. CX Codex +1 586installs infisical-access-control A reference skill for Infisical access control: roles, narrow secret permissions, time-bound access, approval policies and audit log streaming. CX Codex +1 267installs infisical-app-connections infisical-app-connections — an agent skill for wiring Infisical to third-party services: pick the App Connection type, choose an auth method, and hand its ID to syncs or rotations. CX Codex +1 257installs infisical-secret-rotation infisical-secret-rotation guides the setup of periodic credential replacement across 28 providers, writing updated values directly back to Infisical. CX Codex +1 255installs infisical-kms A guide that walks the agent through Infisical KMS: encrypt, decrypt, sign, verify and HMAC with keys that never leave the platform. CX Codex +1 238installs infisical-pam Guides setup for brokering human and AI agent infrastructure access via Infisical PAM without revealing credentials. CX Codex +1 238installs infisical-gateway A setup skill for Infisical Gateway and Relay: it gets the platform to databases, directories and APIs that sit behind a firewall. Useful when Infisical reports it cannot reach an internal resource. CX Codex +1 238installs infisical-sso infisical-sso — a skill that walks you through connecting Infisical to an identity provider (Google, GitHub, Okta, Azure AD, SAML, OIDC, or LDAP) for human login and automatic account creation. CX Codex +1 237installs

Project sponsors

Companies that keep this analytics open