Skip to content
Back to skills

Cicd Secrets

ASecurity

Secrets exposed in CI/CD — hardcoded credentials in pipeline config, build logs, artifacts, environment variables, and git history. Hunt with trufflehog and gitleaks, then validate and assess blast radius. Tier 1 (detection/validation). Use when CI config, repos, build logs, or artifacts are accessible.

  • 16 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 17, 2026
securityrustdockerawsgcpazuregitapidatabasebackendci/cd

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

Scanned November 17, 2026

npx -y skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill cicd-secrets --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cicd Secrets?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cicd Secrets
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anandjogawade-cicd-secrets/badge)](https://www.skillsdirectory.com/skills/anandjogawade-cicd-secrets)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cicd-secrets
description: Secrets exposed in CI/CD — hardcoded credentials in pipeline config, build logs, artifacts, environment variables, and git history. Hunt with trufflehog and gitleaks, then validate and assess blast radius. Tier 1 (detection/validation). Use when CI config, repos, build logs, or artifacts are accessible.
---

# CI/CD Secret Exposure (trufflehog / gitleaks)

Pipelines are secret-dense: tokens in YAML, printed in logs, baked into artifacts, or committed to history. Find them, validate the live ones, and scope the damage.

## Trigger phrases
`cicd secrets, trufflehog, gitleaks, hardcoded credentials, build log secrets, env secrets, leaked token, api key, git history secrets`

## Method
1. **Scan source + full git history:**
   ```
   trufflehog git file://./repo --only-verified
   gitleaks detect --source ./repo --report-format json
   ```
   `--only-verified` (trufflehog) live-checks creds against the provider to cut false positives. History matters — secrets deleted in HEAD persist in old commits.
2. **Pipeline config:** grep `.github/workflows`, `.gitlab-ci.yml`, `Jenkinsfile`, Azure/Circle YAML for inline tokens, `echo $SECRET`, base64 blobs, `env:` with literals, and secrets referenced in a way that prints them.
3. **Build logs & artifacts:** download job logs and build artifacts (`gh run download`, GitLab job artifacts, Jenkins console) — grep for keys; log-masking is name-based and misses echoed/encoded/transformed secrets. Scan container images (`trivy image`, history layers) and published packages for embedded creds.
4. **Env & context leaks:** `printenv`/`env` steps, debug mode dumping context, `${{ toJSON(secrets) }}` anti-patterns, `.env` committed, Docker `ARG`/`ENV` secrets in image history.
5. **Validate & scope:** verify each live secret's type and privileges (cloud key → `aws sts get-caller-identity` within RoE; VCS PAT → scopes; registry token → push rights). Map blast radius without using the access beyond confirmation.

## Modern / rare techniques
- **Masking bypass evidence:** show a secret split/encoded across log lines to demonstrate masking is insufficient (don't exfil the real value).
- **Artifact & cache secrets:** test caches/artifacts shared with less-trusted jobs (fork PRs) — chain `cicd-pipeline`.
- **OIDC vs long-lived keys:** flag static cloud keys where OIDC should be used; a leaked OIDC-less key is immediate cloud access.
- **High-entropy + provider-specific regex:** AWS `AKIA`/`ASIA`, GitHub `ghp_`/`gho_`/`ghs_`, Slack `xox`, GCP service-account JSON, private keys (`-----BEGIN`), JWTs.

## Bypass / evasion
N/A (detection). Validate creds minimally and within RoE; never persist/exfiltrate live secrets.

## Escalation / chaining
Live cloud key → `cloud-pentest`; VCS PAT → repo write/`supply-chain`/`cicd-pipeline`; DB creds → `database-enumeration`; APP_KEY/JWT secret → `jwt`.

## Backend & tooling
Preferred Kali path (native / WSL+Kali / Kali-SSH / Kali-MCP). trufflehog, gitleaks, `gh`/`glab` CLI, trivy, noseyparker. See `zazy-orchestrator`.

## Verification (background, before reporting)
Confirm a secret is live (verified scan or a single minimal auth check) before reporting as active; distinguish active vs stale/rotated. Reproduce the finding. Report true positives only.

## Evidence
Secret type + location (file:line / log / artifact / commit hash), validation result (active/revoked, privileges), blast radius. Remediation: rotate immediately, move to a secrets manager/OIDC, scrub git history (BFG/filter-repo), add pre-commit + CI secret scanning gates, least-priv tokens, never echo secrets.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.