Back to skill

Security audit

Secrets Scanner

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a read-only AWS secrets review guide, but one documented Lambda command can expose environment variable values while claiming to collect names only.

Review this skill before installing. If used, do not paste raw Lambda get-function-configuration output; collect only environment variable names, redact locally first, and rotate any secret values already shared through this workflow.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:27
Finding
Lambda CLI Example Exposes Environment Variable Values Instead of Keys## Vulnerability Details **File Location**: `SKILL.md`, lines 27-32 **Vulnerability Type**: Sensitive data exposure through unsafe documentation **Risk Level**: High ### Complete Code Snippet ```markdown 2. **Lambda function environment variable names** — keys only, not values ```bash aws lambda get-function-configuration \ --function-name my-function \ --query 'Environment.Variables' \ --output json ``` ``` ### Technical Analysis The documented AWS CLI command queries `Environment.Variables`, which returns the complete Lambda environment-variable mapping, including both names and values. It does not return names only as the surrounding instruction claims. Lambda environment-variable values frequently contain database passwords, API tokens, signing secrets, connection strings, and other credentials. A user following this example could therefore export and submit plaintext secrets to the agent. This also conflicts with the skill's rules that users must not provide credentials and that raw data should contain no credentials. Although the project contains no executable code and does not directly access AWS, this unsafe command creates a credible disclosure path across the user's AWS CLI, terminal history or logs, chat interface, and downstream processing systems. ### Attack Path 1. A user follows the documented procedure to collect Lambda environment-variable names. 2. The user runs the command with AWS credentials authorized for `lambda:GetFunctionConfiguration`. 3. AWS returns the entire `Environment.Variables` object, including plaintext values. 4. The user assumes the output contains keys only and pastes it into the agent conversation. 5. Any secrets in the Lambda configuration are disclosed to unintended processing, logging, or retention boundaries. 6. Anyone who later obtains those exposed values may use them against their corresponding services until they expire or are rotated. ...[truncated 671 chars]
Remediation
## Remediation Suggestions Replace the unsafe query with one that returns only environment-variable names: ```bash aws lambda get-function-configuration \ --function-name my-function \ --query 'keys(Environment.Variables)' \ --output json ``` Apply the following additional hardening measures: 1. Explicitly instruct users not to paste raw `get-function-configuration` output. 2. Require users to inspect and redact exported data locally before submission. 3. Add a warning that environment-variable values may contain active credentials. 4. Prefer examples that transform sensitive responses into key-only output at the source. 5. If raw output has already been submitted, treat all included credentials as compromised, remove the exposed data where possible, rotate each affected secret immediately, and review relevant access logs for misuse. 6. Migrate sensitive Lambda configuration values to AWS Secrets Manager or encrypted Systems Manager Parameter Store, and grant the function only the minimum permissions needed to retrieve specific secrets.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep

Static analysis

No suspicious patterns detected.