unitoneai/securityskills/secrets-management

Claude Code and agent skill by unitoneai/securityskills

Trust tier 3
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"},{"type":"config","description":"Configuration overrides"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Performs a structured secrets management review against OWASP Secrets Management Cheat Sheet and NIST SP 800-57 Part 1 Rev 5 (Recommendation for Key Management). Auto-invoked when reviewing secret handling patterns, vault configurations, .env files, or credential rotation policies. Produces a secrets management assessment covering detection patterns, rotation automation, vault integration, and agent-specific credential handling.

Install

npx vskill@latest install unitoneai/securityskills/secrets-management

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as unitoneai/securityskills/secrets-management.

Secrets Management Review

A structured, repeatable process for evaluating secrets management practices against the OWASP Secrets Management Cheat Sheet and NIST SP 800-57 Part 1 Rev 5 (Recommendation for Key Management). This skill covers secret detection patterns, rotation automation, vault and cloud secrets manager integration, agent-specific credential handling, .env file exposure, and git history secret leaks. All findings reference framework controls with severity ratings and actionable remediation.

Important: This skill analyzes detection patterns and configuration practices. It never extracts, logs, or displays actual secret values. All regex patterns shown are for detection tooling configuration, not for secret extraction.


When to Use

If a target is provided via arguments, focus the review on: $ARGUMENTS

  • Security review of application repositories for hardcoded credentials.
  • Evaluation of secrets management architecture (Vault, AWS Secrets Manager, GCP Secret Manager, Azure Key Vault).
  • CI/CD pipeline credential hygiene assessment.
  • Incident response after a secret exposure event.
  • Compliance audits requiring NIST SP 800-57 key management alignment.
  • Architecture review of agentic systems that require credential access.

Context

OWASP identifies hardcoded secrets as a persistent, high-impact vulnerability. The OWASP Secrets Management Cheat Sheet defines secrets as "digital authentication credentials that grant access to systems or data," including API keys, passwords, certificates, and encryption keys. NIST SP 800-57 Part 1 Rev 5 Section 5.3 establishes cryptoperiods -- the time span during which a specific key is authorized for use. Secrets that exceed their cryptoperiod without rotation represent both a compliance gap and an operational risk. In agentic and automated environments, the challenge intensifies: autonomous agents require credential access but should never hold long-lived secrets.


Process

Step 1: Discovery -- Locate Secret-Adjacent Files

Use Glob and Grep to locate files that commonly contain or reference secrets.

Patterns to search:

# Environment files
**/.env
**/.env.*
**/.env.local
**/.env.production
**/env.example
**/.envrc
# Configuration files with potential secrets
**/config/*.yml
**/config/*.yaml
**/config/*.json
**/config/*.toml
**/*config*
**/settings*
**/credentials*
**/secrets*
# Key and certificate files
**/*.pem
**/*.key
**/*.p12
**/*.pfx
**/*.jks
**/*.keystore
# Vault and secrets manager configurations
**/vault*
**/*-secret*
**/external-secrets*
**/sealed-secrets*
# CI/CD configuration (may reference secrets)
**/.github/workflows/*.yml
**/.gitlab-ci.yml
**/Jenkinsfile*
# Docker and container configurations
**/Dockerfile*
**/docker-compose*
**/docker-compose*.yml
# Git configuration
**/.gitignore

Step 2: Secret Detection Pattern Analysis

Evaluate whether secret detection tooling is deployed and properly configured. The following regex patterns represent what detection tools (Gitleaks, TruffleHog, detect-secrets) should be configured to catch.

2.1 Detection Patterns by Secret Type (for tooling configuration only)

API Keys and Tokens:

regex
# AWS Access Key ID (starts with AKIA)
(?:AKIA)[0-9A-Z]{16}
# AWS Secret Access Key (40 chars, base64-like)
(?:aws_secret_access_key|AWS_SECRET_ACCESS_KEY)\s*[=:]\s*[A-Za-z0-9/+=]{40}
# GitHub Personal Access Token
(?:ghp|gho|ghu|ghs|ghr)_[A-Za-z0-9_]{36,}
# GitLab Personal Access Token
glpat-[A-Za-z0-9\-_]{20,}
# Slack Bot/User OAuth Token
xox[bpors]-[0-9]{10,13}-[A-Za-z0-9-]{20,}
# Generic Bearer Token
[Bb]earer\s+[A-Za-z0-9\-._~+/]+=*
# Generic API Key pattern
(?i)(?:api[_-]?key|apikey)\s*[=:]\s*['"][A-Za-z0-9]{20,}['"]

Private Keys:

regex
# RSA/DSA/EC/OpenSSH Private Key Headers
-----BEGIN\s(?:RSA|DSA|EC|OPENSSH)\sPRIVATE\sKEY-----
# PGP Private Key
-----BEGIN\sPGP\sPRIVATE\sKEY\sBLOCK-----

Connection Strings and Passwords:

regex
# Database connection strings with embedded passwords
(?i)(?:mysql|postgres|postgresql|mongodb|redis|amqp)://[^:]+:[^@]+@
# Generic password assignment
(?i)(?:password|passwd|pwd)\s*[=:]\s*['"][^'"]{8,}['"]
# JWT tokens (three base64url segments separated by dots)
eyJ[A-Za-z0-9_-]*\.eyJ[A-Za-z0-9_-]*\.[A-Za-z0-9_-]*
2.2 False Positive Filtering — Distinguishing Real Secrets from Noise

Before flagging a detected string as a hardcoded secret, apply these verification checks:

  1. Verify the value is a real secret, not a placeholder or example. Strings like your-api-key-here, CHANGEME, TODO, xxx, example, test, dummy, fake, <INSERT_KEY>, or replace-me are placeholder values, not leaked secrets. Do NOT flag these.
  2. Check entropy. Real secrets (API keys, tokens, passwords) have high entropy — they appear random. Low-entropy strings like password, admin, root, mysecret, or dictionary words in config comments are not actual secrets. Only flag password assignments where the value appears to be a real credential (high-entropy, non-dictionary string of 8+ characters).
  3. Recognize known secret prefixes. When a string matches a known secret format (e.g., AKIA* for AWS, sk-* for Stripe/OpenAI, ghp_*/gho_*/ghu_* for GitHub, xox[bpors]-* for Slack, glpat-* for GitLab, eyJ* for JWTs), it is likely a real secret and should be flagged.
  4. Distinguish secrets findings from architectural observations. This skill should focus on finding actual secrets in code and configuration. The following are NOT secrets findings and should be excluded from the findings count:
  • Absence of secret detection tooling (note in the Detection Tooling Status table, not as a finding)
  • Absence of a centralized secrets manager (note in recommendations, not as a finding)
  • Missing rotation automation (note in recommendations, not as a finding)
  • Infrastructure misconfigurations unrelated to secrets (e.g., public S3 buckets, debug mode, public database endpoints) — these belong to other skills
  1. Scope to the skill's domain. Only report findings where a secret (credential, key, token, certificate) is actually present in the file. General security misconfigurations, missing best practices, and architectural gaps should be noted in the Prioritized Remediation Plan section, not as numbered findings.
2.3 Detection Tool Configuration Review

Verify that at least one secret detection tool is configured and integrated:

ToolConfiguration FileCI Integration
Gitleaks.gitleaks.tomlGitHub Actions, GitLab CI
TruffleHogCommand-line or .trufflehog.ymlPre-commit hook, CI
detect-secrets.secrets.baselinePre-commit hook, CI
git-secrets.git/hooks/pre-commitGit hook

What to verify:

  • Tool is configured in CI pipeline (runs on every PR/push).
  • Tool is configured as a pre-commit hook (prevents secrets from entering history).
  • Baseline file is maintained (for detect-secrets).
  • Custom rules cover organization-specific secret formats.
  • Allowlist entries are documented with justification (false positive suppression must not create blind spots).

Finding classification: No secret detection tooling deployed is Critical. Detection in CI only (no pre-commit) is Medium. Excessive allowlist entries without justification is Medium.


Step 3: .env File and Git History Exposure (OWASP Secrets Management Cheat Sheet)
3.1 .env File Exposure
  • Check .gitignore: Verify .env and all variants (.env.local, .env.production) are in .gitignore.
  • Check for committed .env files: Use Grep to search for .env entries in the git tree.
  • Docker exposure: Verify docker-compose.yml does not use env_file: with secrets in the image context. Verify .dockerignore excludes .env.
  • Web server exposure: Verify .env is not accessible via web server (.htaccess deny rule or equivalent).

Patterns to check:

yaml
# docker-compose -- BAD: env_file baked into image if in build context
services:
app:
build: .
env_file: .env # If .dockerignore doesn't exclude .env, secrets are in image layer
# docker-compose -- GOOD: secrets via Docker secrets or external mount
services:
app:
secrets:
- db_password
secrets:
db_password:
external: true

Finding classification: Committed .env file with actual secrets in git history is Critical. .env not in .gitignore is High. .env in Docker build context without .dockerignore exclusion is High.


3.2 Git History Secret Scanning

Secrets removed from current files may still exist in git history. Verify:

  • Git history scanning is part of the detection tool configuration (Gitleaks --log-opts=all, TruffleHog --since-commit or full scan).
  • If a secret was committed historically and rotated, the rotation is confirmed (not just file deletion).
  • BFG Repo Cleaner or git filter-repo has been used to purge high-sensitivity secrets from history when warranted.

Finding classification: Known unrotated secrets in git history is Critical. No git history scanning capability is High.


Step 4: Vault and Cloud Secrets Manager Integration (NIST SP 800-57, Section 5)

Evaluate the secrets management architecture against NIST SP 800-57 key management lifecycle requirements.

4.1 Centralized Secrets Manager Deployment

Verify that a centralized secrets manager is deployed:

PlatformWhat to Verify
HashiCorp VaultSeal/unseal configuration, auth methods, policy definitions, audit logging enabled
AWS Secrets ManagerAutomatic rotation Lambda configured, resource policies, KMS key for encryption
GCP Secret ManagerIAM bindings (least privilege), rotation schedules, version management
Azure Key VaultAccess policies or RBAC, soft-delete enabled, purge protection, diagnostics logging

Patterns to check in IaC:

hcl
# Terraform -- AWS Secrets Manager with rotation
resource "aws_secretsmanager_secret_rotation" "example" {
secret_id = aws_secretsmanager_secret.example.id
rotation_lambda_arn = aws_lambda_function.rotation.arn
rotation_rules {
automatically_after_days = 30 # NIST SP 800-57 cryptoperiod compliance
}
}
# Terraform -- Vault audit backend (must be enabled)
resource "vault_audit" "syslog" {
type = "syslog"
}

Finding classification: No centralized secrets manager (secrets in config files or environment variables only) is High. Secrets manager deployed but audit logging disabled is High.


4.2 Rotation Automation (NIST SP 800-57, Section 5.3 -- Cryptoperiods)

NIST SP 800-57 Part 1 Rev 5 Table 1 defines recommended cryptoperiods by key type. For authentication secrets:

Secret TypeRecommended Max CryptoperiodRotation Method
Database credentials90 daysVault dynamic secrets, Secrets Manager rotation Lambda
API keys90 daysProvider API key rotation, dual-key rollover
TLS certificates398 days (CA/B Forum max), 90 days preferredACME (Let's Encrypt), cert-manager
SSH keys1 yearSSH CA with short-lived certificates preferred
Service account keys90 daysWorkload identity federation preferred (no keys)

What to verify:

  • Rotation schedules are defined and automated (not manual).
  • Rotation does not cause downtime (dual-key or graceful rollover pattern).
  • Rotation events are logged and monitored.
  • Failed rotations trigger alerts.

Finding classification: No rotation for secrets older than 180 days is High. Manual rotation process only is Medium. Rotation configured but not monitored is Medium.


Step 5: Agent-Specific Secrets Management

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
76
Repository forks
133
7-day trend score
22

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks
  • configConfiguration overrides

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/unitoneai/securityskills/secrets-management/badge)](https://verified-skill.com/skills/unitoneai/securityskills/secrets-management)

Something wrong with this skill or its page? Tell us.