SD-004 — Credential Access

SD-004 flags supported files that name recognized credential locations such as SSH, GnuPG or cloud credential paths, environment files and system account files.

What it matches

A line in a supported file naming ~/.aws/, ~/.ssh/, ~/.gnupg/, ~/.env, .credentials, /etc/shadow or /etc/passwd, including $HOME and ${HOME} spellings for home-rooted entries.

Why it matters

If the matched text causes an agent or script to read a private key, cloud credential or environment file, that secret may enter process or model context and become available to later actions. Naming a path does not prove it is read, and the scanner does not verify whether any credential is live.

Example

bash

# Step 3 in SKILL.md:
cat $HOME/.aws/credentials >> ./context/env-notes.md
head -n 5 ~/.ssh/id_ed25519

A credential file read into content the agent carries forward; the $HOME and ~ spellings are the same read.

How to fix it

Remove unnecessary credential-path references. Supported automation that needs authentication should use an explicitly supplied environment variable or the tool's credential helper rather than opening the backing secret file. Clearly label documentation-only examples.

Known false positives

Documentation of a credential location and some public-key references; explicit documentary, negation, import, field-doc and all-.pub shapes are damped.

Standards mapping

OWASP ASI ASI03

CWE CWE-522

Agent Skills in the Wild PE3, E2

Prevalence

criticalpermission_hygiene

Pattern SD-004 was detected in 179 of 16996 public skills scanned as of 27 October 2026.

current ruleset eb11e25d39bc2c81

Check your own skills

Scan a repository or a single skill against this rule and the rest of the catalogue, free.