# skill-credential-access-v1

> skill-credential-access-v1: 17 Keryn rules for generic (7 error, 10 warning).

Source: https://keryn.dev/rules/skill-credential-access-v1/

17 rules · Keryn Software Licence · rules 0.8.0 · [all packs](https://keryn.dev/rules/)

**How to read a rule**

- **Severity**: How bad the finding is if it is real: `error` fails a default gate, `warning` and `info` do not.

- **Confidence**: **P0** exploitable as written; **P1** dangerous in context; **P2** a heuristic or a posture check: confirm by reading the code.

- **False-positive risk**: **low**: an exact API or flag, so hits are almost always real; **medium**: the pattern is legitimate in many programs, so check each hit; **high**: it finds a lead to confirm, so expect benign hits.

- **Edge**: The relationship the finding sits on. **reaches**: content or traffic gets to a thing; **calls**: one thing invokes another; **reads**: one thing reads from another; **writes**: one thing writes to another; **sends**: data leaves for another party; **grants**: authority is given or left unchecked; **depends_on**: something relies on a component it does not verify; **trusts**: one party believes another without evidence. The boundary it crosses, when there is one: **user->prompt** (untrusted input reaching a prompt); **model->code** (model output reaching code, a shell, a query or a page); **secret->outside** (a secret leaving the trusted side); **supply-chain** (code, models or prompts pulled in from outside).

- **Taxonomy chips**: References for readers who work in OWASP LLM 2025, OWASP Agentic, CWE or NIST AI RMF. They say where a rule belongs, not that a framework is satisfied.

## keryn.skillcred.ssh-key-material-read

`error` generic agent-skills, claude-code, prompt-injection

A skill, command or hook script reads, copies or uploads SSH key material (a private key under \~/.ssh, authorized\_keys, known\_hosts, or an ssh-add -L dump). A skill that gathers these hands the developer's remote access to whoever receives the output. Remove the step; if a tool needs SSH, let ssh-agent or the user's own client use the key.

Confidence **P0**: exploitable as written. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-522](https://keryn.dev/taxonomies/cwe/#cwe-522-insufficiently-protected-credentials) [CWE-200](https://keryn.dev/taxonomies/cwe/#cwe-200-exposure-of-sensitive-information-to-an-unauthorized-actor) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI03](https://keryn.dev/taxonomies/owasp-agentic/#asi03-identity-and-privilege-abuse)

**Fix:** Delete the instruction. Keys never need to be read by a skill: use ssh-agent forwarding, a deploy key scoped to one repository, or ask the user to run the command themselves.

**References:** [https://code.claude.com/docs/en/skills](https://code.claude.com/docs/en/skills) · [https://man.openbsd.org/ssh-add](https://man.openbsd.org/ssh-add)

## keryn.skillcred.cloud-credential-file-read

`warning` generic agent-skills, claude-code, prompt-injection

A skill, command or hook script reads or copies a cloud or cluster credential file (\~/.aws/credentials, gcloud ADC or credential database, \~/.azure token cache, \~/.kube/config, \~/.docker/config.json, or the file named by GOOGLE\_APPLICATION\_CREDENTIALS). These files hold long-lived keys that grant account access. Do not read them from a skill; use the cloud CLI's own session.

Confidence **P2**: a heuristic or a posture check: confirm by reading the code. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-522](https://keryn.dev/taxonomies/cwe/#cwe-522-insufficiently-protected-credentials) [CWE-200](https://keryn.dev/taxonomies/cwe/#cwe-200-exposure-of-sensitive-information-to-an-unauthorized-actor) [CWE-312](https://keryn.dev/taxonomies/cwe/#cwe-312-cleartext-storage-of-sensitive-information) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI03](https://keryn.dev/taxonomies/owasp-agentic/#asi03-identity-and-privilege-abuse)

**Fix:** Remove the read. If a step needs cloud access, call the CLI (aws, gcloud, az, kubectl) so the credential never enters the transcript, and scope the identity to the task.

**References:** [https://code.claude.com/docs/en/skills](https://code.claude.com/docs/en/skills) · [https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html) · [https://raw.githubusercontent.com/googleapis/google-auth-library-python/main/google/auth/_cloud_sdk.py](https://raw.githubusercontent.com/googleapis/google-auth-library-python/main/google/auth/_cloud_sdk.py) · [https://raw.githubusercontent.com/Azure/azure-cli/dev/src/azure-cli-core/azure/cli/core/auth/identity.py](https://raw.githubusercontent.com/Azure/azure-cli/dev/src/azure-cli-core/azure/cli/core/auth/identity.py)

## keryn.skillcred.cloud-secret-env-or-token-print

`warning` generic agent-skills, claude-code, prompt-injection

A skill, command or hook script prints a cloud secret variable (AWS\_SECRET\_ACCESS\_KEY, AWS\_SESSION\_TOKEN, AZURE\_CLIENT\_SECRET) or pipes a freshly minted access token (gcloud auth print-access-token, az account get-access-token, aws configure export-credentials) to a file or network tool. The value lands in the transcript or leaves the machine. Use the token inside the same command that needs it and never echo it.

Confidence **P1**: dangerous in context. False-positive risk **medium**: the pattern is legitimate in many programs, so check each hit.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-522](https://keryn.dev/taxonomies/cwe/#cwe-522-insufficiently-protected-credentials) [CWE-200](https://keryn.dev/taxonomies/cwe/#cwe-200-exposure-of-sensitive-information-to-an-unauthorized-actor) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI03](https://keryn.dev/taxonomies/owasp-agentic/#asi03-identity-and-privilege-abuse)

**Fix:** Do not display or store cloud tokens. Pass them to the consuming command through the environment or a subshell inside the same line, and prefer short-lived credentials with narrow scope.

**References:** [https://docs.cloud.google.com/sdk/gcloud/reference/auth/print-access-token](https://docs.cloud.google.com/sdk/gcloud/reference/auth/print-access-token) · [https://learn.microsoft.com/en-us/cli/azure/account#az-account-get-access-token](https://learn.microsoft.com/en-us/cli/azure/account#az-account-get-access-token) · [https://docs.aws.amazon.com/cli/latest/reference/configure/export-credentials.html](https://docs.aws.amazon.com/cli/latest/reference/configure/export-credentials.html)

## keryn.skillcred.vcs-package-token-read

`warning` generic agent-skills, claude-code, prompt-injection

A skill, command or hook script reads a package-manager or VCS credential (\~/.npmrc, \~/.pypirc, \~/.netrc, \~/.git-credentials, \~/.config/gh/hosts.yml, git credential fill, or a gh auth token piped out). These hold publish and repository tokens that enable supply-chain attacks. Do not read them; let git, npm or gh authenticate by themselves.

Confidence **P1**: dangerous in context. False-positive risk **medium**: the pattern is legitimate in many programs, so check each hit.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-522](https://keryn.dev/taxonomies/cwe/#cwe-522-insufficiently-protected-credentials) [CWE-200](https://keryn.dev/taxonomies/cwe/#cwe-200-exposure-of-sensitive-information-to-an-unauthorized-actor) [CWE-312](https://keryn.dev/taxonomies/cwe/#cwe-312-cleartext-storage-of-sensitive-information) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI03](https://keryn.dev/taxonomies/owasp-agentic/#asi03-identity-and-privilege-abuse)

**Fix:** Delete the step. Authenticate git, npm, pip and gh through their credential helpers, and use fine-grained or OIDC tokens in CI rather than files a skill can read.

**References:** [https://code.claude.com/docs/en/skills](https://code.claude.com/docs/en/skills) · [https://git-scm.com/docs/git-credential](https://git-scm.com/docs/git-credential) · [https://cli.github.com/manual/gh_auth_token](https://cli.github.com/manual/gh_auth_token) · [https://raw.githubusercontent.com/cli/cli/trunk/internal/config/config.go](https://raw.githubusercontent.com/cli/cli/trunk/internal/config/config.go)

## keryn.skillcred.cloud-metadata-endpoint-access

`error` generic agent-skills, claude-code, prompt-injection

A skill, command or hook script calls a cloud instance-metadata endpoint (169.254.169.254, metadata.google.internal, 100.100.100.200, fd00:ec2::254). On a cloud VM or CI runner this returns the instance role's temporary credentials. A skill has no reason to request them; remove the call and enforce IMDSv2 with a hop limit of 1.

Confidence **P0**: exploitable as written. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-918](https://keryn.dev/taxonomies/cwe/#cwe-918-server-side-request-forgery) [CWE-522](https://keryn.dev/taxonomies/cwe/#cwe-522-insufficiently-protected-credentials) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI03](https://keryn.dev/taxonomies/owasp-agentic/#asi03-identity-and-privilege-abuse)

**Fix:** Remove the metadata request. If the workload needs cloud identity, use the SDK's default credential chain, require IMDSv2 and a hop limit of 1, and block link-local metadata addresses from agent sandboxes.

**References:** [https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html) · [https://docs.cloud.google.com/compute/docs/metadata/overview](https://docs.cloud.google.com/compute/docs/metadata/overview)

## keryn.skillcred.macos-keychain-secret-read

`error` generic agent-skills, claude-code, prompt-injection

A skill, command or hook script reads secrets from the macOS login keychain or another OS secret store (security find-generic-password, find-internet-password, dump-keychain, security export, secret-tool lookup, vaultcmd). The keychain holds saved passwords and tokens for every app. Remove the call; ask the user to supply the one value needed.

Confidence **P0**: exploitable as written. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-522](https://keryn.dev/taxonomies/cwe/#cwe-522-insufficiently-protected-credentials) [CWE-200](https://keryn.dev/taxonomies/cwe/#cwe-200-exposure-of-sensitive-information-to-an-unauthorized-actor) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI03](https://keryn.dev/taxonomies/owasp-agentic/#asi03-identity-and-privilege-abuse)

**Fix:** Do not enumerate or read keychain items from a skill. If an integration needs a secret, have the user store it in the tool's own config or pass it through an environment variable they control.

**References:** [https://ss64.com/mac/security.html](https://ss64.com/mac/security.html) · [https://support.apple.com/guide/security/keychain-data-protection-secb0694df1a/web](https://support.apple.com/guide/security/keychain-data-protection-secb0694df1a/web)

## keryn.skillcred.browser-credential-store-read

`error` generic agent-skills, claude-code, prompt-injection

A skill, command or hook script reads a browser credential store (Chrome or Chromium Login Data, Cookies, Local State; Firefox logins.json, key4.db, cookies.sqlite; Safari Cookies.binarycookies). Those files contain saved passwords and live session cookies, so reading them is account takeover. Remove the step.

Confidence **P0**: exploitable as written. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-522](https://keryn.dev/taxonomies/cwe/#cwe-522-insufficiently-protected-credentials) [CWE-200](https://keryn.dev/taxonomies/cwe/#cwe-200-exposure-of-sensitive-information-to-an-unauthorized-actor) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI03](https://keryn.dev/taxonomies/owasp-agentic/#asi03-identity-and-privilege-abuse)

**Fix:** Never read browser profiles. If a task needs an authenticated session, use the browser automation tool with a dedicated profile the user logs into, not the user's real profile files.

**References:** [https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data](https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data) · [https://chromium.googlesource.com/chromium/src/+/main/docs/user_data_dir.md](https://chromium.googlesource.com/chromium/src/+/main/docs/user_data_dir.md)

## keryn.skillcred.crypto-wallet-file-access

`warning` generic agent-skills, claude-code, prompt-injection

A skill, command or hook script reads or copies crypto-wallet material (wallet.dat, Solana id.json, Ethereum keystore files, Electrum or Exodus wallet files, the MetaMask extension storage). Possession of these files can drain funds. Remove the step; no development task needs wallet files.

Confidence **P2**: a heuristic or a posture check: confirm by reading the code. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-522](https://keryn.dev/taxonomies/cwe/#cwe-522-insufficiently-protected-credentials) [CWE-200](https://keryn.dev/taxonomies/cwe/#cwe-200-exposure-of-sensitive-information-to-an-unauthorized-actor) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI03](https://keryn.dev/taxonomies/owasp-agentic/#asi03-identity-and-privilege-abuse)

**Fix:** Delete the instruction. Keep wallet keys on hardware devices and out of the development machine's readable paths; a skill must never be given them.

**References:** [https://developer.bitcoin.org/reference/rpc/](https://developer.bitcoin.org/reference/rpc/) · [https://docs.anza.xyz/cli/wallets/file-system](https://docs.anza.xyz/cli/wallets/file-system)

## keryn.skillcred.environment-dump-out

`warning` generic agent-skills, claude-code, prompt-injection

A skill, command or hook script dumps the whole process environment (env, printenv, export -p, Get-ChildItem Env:, json.dumps(os.environ)) into a file, a pipe to a network or encoding tool, or a command substitution. The environment usually holds API keys and tokens. Name the single variable you need instead.

Confidence **P1**: dangerous in context. False-positive risk **medium**: the pattern is legitimate in many programs, so check each hit.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-200](https://keryn.dev/taxonomies/cwe/#cwe-200-exposure-of-sensitive-information-to-an-unauthorized-actor) [CWE-526](https://keryn.dev/rules/?cwe=CWE-526) [CWE-532](https://keryn.dev/taxonomies/cwe/#cwe-532-insertion-of-sensitive-information-into-log-file) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI03](https://keryn.dev/taxonomies/owasp-agentic/#asi03-identity-and-privilege-abuse)

**Fix:** Read only the specific variable required, inside the command that uses it. Never serialise the whole environment to disk, a log or a network call.

**References:** [https://code.claude.com/docs/en/skills](https://code.claude.com/docs/en/skills) · [https://pubs.opengroup.org/onlinepubs/9699919799/utilities/env.html](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/env.html)

## keryn.skillcred.dotenv-file-read-or-upload

`warning` generic agent-skills, claude-code, prompt-injection

A skill, command or hook script prints, packs or uploads a .env file (cat .env, curl -F file=@.env, scp or tar of .env, pipe to a network tool). .env files hold the project's live secrets, and printing one puts them in the model transcript. Reference variable names instead, or ask the user for the one value.

Confidence **P1**: dangerous in context. False-positive risk **medium**: the pattern is legitimate in many programs, so check each hit.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-522](https://keryn.dev/taxonomies/cwe/#cwe-522-insufficiently-protected-credentials) [CWE-200](https://keryn.dev/taxonomies/cwe/#cwe-200-exposure-of-sensitive-information-to-an-unauthorized-actor) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI03](https://keryn.dev/taxonomies/owasp-agentic/#asi03-identity-and-privilege-abuse)

**Fix:** Do not open .env files from a skill. Keep the file out of the agent's readable paths where possible, document variable names in .env.example, and have the user export the one value needed.

**References:** [https://code.claude.com/docs/en/settings](https://code.claude.com/docs/en/settings) · [https://12factor.net/config](https://12factor.net/config)

## keryn.skillcred.os-credential-database-access

`error` generic agent-skills, claude-code, prompt-injection

A skill, command or hook script reads an operating-system credential database (/etc/shadow, /etc/gshadow, the Windows SAM/SYSTEM hives, ntds.dit) or runs a credential dumper against LSASS. This yields password hashes for every local account. Remove the step.

Confidence **P0**: exploitable as written. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-522](https://keryn.dev/taxonomies/cwe/#cwe-522-insufficiently-protected-credentials) [CWE-200](https://keryn.dev/taxonomies/cwe/#cwe-200-exposure-of-sensitive-information-to-an-unauthorized-actor) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI03](https://keryn.dev/taxonomies/owasp-agentic/#asi03-identity-and-privilege-abuse)

**Fix:** Remove the step. Account databases are never needed for development tasks; if a skill needs to check a user, call the platform's user-management API with a scoped identity.

**References:** [https://man7.org/linux/man-pages/man5/shadow.5.html](https://man7.org/linux/man-pages/man5/shadow.5.html) · [https://learn.microsoft.com/en-us/windows-server/security/windows-authentication/credentials-processes-in-windows-authentication](https://learn.microsoft.com/en-us/windows-server/security/windows-authentication/credentials-processes-in-windows-authentication)

## keryn.skillcred.container-escape-from-skill

`error` generic agent-skills, claude-code, prompt-injection

A skill, command or hook script uses a container-escape or host-takeover primitive: the Docker socket mounted or called, docker run --privileged or a host root mount, nsenter into PID 1, chroot /host, or a host block device mounted. That gives the skill root on the host outside any sandbox. Remove it.

Confidence **P0**: exploitable as written. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-250](https://keryn.dev/taxonomies/cwe/#cwe-250-execution-with-unnecessary-privileges) [CWE-269](https://keryn.dev/rules/?cwe=CWE-269) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI05](https://keryn.dev/taxonomies/owasp-agentic/#asi05-unexpected-code-execution) [ASI03](https://keryn.dev/taxonomies/owasp-agentic/#asi03-identity-and-privilege-abuse)

**Fix:** Remove it and run skills in a sandbox without the Docker socket, host mounts, extra capabilities or host PID namespace. Use rootless containers for builds that need Docker.

**References:** [https://docs.docker.com/engine/security/](https://docs.docker.com/engine/security/) · [https://man7.org/linux/man-pages/man1/nsenter.1.html](https://man7.org/linux/man-pages/man1/nsenter.1.html)

## keryn.skillcred.other-agent-credential-read

`warning` generic agent-skills, claude-code, prompt-injection

A skill, command or hook script reads another agent's credential or token store (\~/.claude/.credentials.json, \~/.codex/auth.json, \~/.gemini/oauth\_creds.json, Copilot hosts.json, \~/.cursor/mcp.json or state database, the Claude Code keychain item). Those files hold the user's model-provider sessions. Remove the read; each agent must keep its own login.

Confidence **P2**: a heuristic or a posture check: confirm by reading the code. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-522](https://keryn.dev/taxonomies/cwe/#cwe-522-insufficiently-protected-credentials) [CWE-200](https://keryn.dev/taxonomies/cwe/#cwe-200-exposure-of-sensitive-information-to-an-unauthorized-actor) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI03](https://keryn.dev/taxonomies/owasp-agentic/#asi03-identity-and-privilege-abuse) [ASI07](https://keryn.dev/taxonomies/owasp-agentic/#asi07-insecure-inter-agent-communication)

**Fix:** Delete the instruction. Agent logins are per-tool secrets; a skill that needs model access should call the host agent's own API, not lift its tokens.

**References:** [https://code.claude.com/docs/en/iam](https://code.claude.com/docs/en/iam) · [https://code.claude.com/docs/en/skills](https://code.claude.com/docs/en/skills)

## keryn.skillcred.filesystem-secret-sweep

`warning` generic agent-skills, claude-code, prompt-injection

A skill, command or hook script sweeps the home directory or whole filesystem for secrets (find for id\_rsa, \*.pem, .env or \*token\* files, grep -r for private-key headers or well-known key prefixes, or a prose instruction to search the machine for passwords and keys). A sweep is how stolen credential bundles are built. Remove it.

Confidence **P1**: dangerous in context. False-positive risk **medium**: the pattern is legitimate in many programs, so check each hit.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-200](https://keryn.dev/taxonomies/cwe/#cwe-200-exposure-of-sensitive-information-to-an-unauthorized-actor) [CWE-522](https://keryn.dev/taxonomies/cwe/#cwe-522-insufficiently-protected-credentials) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI03](https://keryn.dev/taxonomies/owasp-agentic/#asi03-identity-and-privilege-abuse)

**Fix:** Remove the sweep. If a task needs to find a config file, name the exact path inside the project; if the goal is secret hygiene, run a dedicated scanner on the repository in CI, never from a skill on the developer's home.

**References:** [https://code.claude.com/docs/en/skills](https://code.claude.com/docs/en/skills) · [https://man7.org/linux/man-pages/man1/find.1.html](https://man7.org/linux/man-pages/man1/find.1.html)

## keryn.skillcred.shell-history-read

`warning` generic agent-skills, claude-code, prompt-injection

A skill, command or hook script reads a shell or REPL history file (\~/.bash\_history, \~/.zsh\_history, fish\_history, \~/.python\_history, \~/.psql\_history, \~/.mysql\_history, PowerShell ConsoleHost\_history). History routinely contains pasted tokens and passwords. Remove the read.

Confidence **P1**: dangerous in context. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-200](https://keryn.dev/taxonomies/cwe/#cwe-200-exposure-of-sensitive-information-to-an-unauthorized-actor) [CWE-532](https://keryn.dev/taxonomies/cwe/#cwe-532-insertion-of-sensitive-information-into-log-file) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI03](https://keryn.dev/taxonomies/owasp-agentic/#asi03-identity-and-privilege-abuse)

**Fix:** Do not read history files. If previous commands matter, ask the user to paste the specific lines, after removing secrets.

**References:** [https://www.gnu.org/software/bash/manual/html_node/Bash-History-Facilities.html](https://www.gnu.org/software/bash/manual/html_node/Bash-History-Facilities.html) · [https://code.claude.com/docs/en/skills](https://code.claude.com/docs/en/skills)

## keryn.skillcred.secret-manager-or-keyring-export

`error` generic agent-skills, claude-code, prompt-injection

A skill, command or hook script exports or reveals secrets from a password manager or key store (gpg --export-secret-keys, bw export or get password, op item get --reveal, pass show, keepassxc-cli, lpass export, a .kdbx database, \~/.password-store, \~/.gnupg private keys). These are the user's highest-value secrets. Remove the step.

Confidence **P0**: exploitable as written. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-522](https://keryn.dev/taxonomies/cwe/#cwe-522-insufficiently-protected-credentials) [CWE-200](https://keryn.dev/taxonomies/cwe/#cwe-200-exposure-of-sensitive-information-to-an-unauthorized-actor) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI03](https://keryn.dev/taxonomies/owasp-agentic/#asi03-identity-and-privilege-abuse)

**Fix:** Remove the command. Secret managers should release a secret only to the process that needs it, interactively approved by the user; a skill must not enumerate or export vault contents.

**References:** [https://www.gnupg.org/documentation/manuals/gnupg/GPG-Esoteric-Options.html](https://www.gnupg.org/documentation/manuals/gnupg/GPG-Esoteric-Options.html) · [https://bitwarden.com/help/cli/](https://bitwarden.com/help/cli/) · [https://www.1password.dev/cli/reference/management-commands/item](https://www.1password.dev/cli/reference/management-commands/item) · [https://www.1password.dev/cli/reference/management-commands/item/](https://www.1password.dev/cli/reference/management-commands/item/)

## keryn.skillcred.service-credential-config-read

`warning` generic agent-skills, claude-code, prompt-injection

A skill, command or hook script reads or copies a service credential file (.pgpass, .my.cnf, .vault-token, .s3cfg, rclone.conf, Terraform credentials.tfrc.json, \~/.oci/config, .databrickscfg, .ngrok2 config, doctl or Heroku config). These hold database passwords and API tokens. Remove the read and use the tool's own authenticated CLI.

Confidence **P1**: dangerous in context. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-522](https://keryn.dev/taxonomies/cwe/#cwe-522-insufficiently-protected-credentials) [CWE-200](https://keryn.dev/taxonomies/cwe/#cwe-200-exposure-of-sensitive-information-to-an-unauthorized-actor) [CWE-312](https://keryn.dev/taxonomies/cwe/#cwe-312-cleartext-storage-of-sensitive-information) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI03](https://keryn.dev/taxonomies/owasp-agentic/#asi03-identity-and-privilege-abuse)

**Fix:** Delete the read. Authenticate through the service CLI or an identity-based connection, and keep these files out of any path the agent can read.

**References:** [https://www.postgresql.org/docs/current/libpq-pgpass.html](https://www.postgresql.org/docs/current/libpq-pgpass.html) · [https://developer.hashicorp.com/terraform/cli/config/config-file](https://developer.hashicorp.com/terraform/cli/config/config-file)
