T09 · Insecure Skill Coding Practices
- Location
scripts/test-agent.py:16- Finding
API Credentials Can Be Exposed Through Command-Line Arguments and Plaintext HTTP
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill appears intended to help build Warden LangGraph agents, but some testing and production deployment examples could expose API keys or unauthenticated agent endpoints if copied directly.
Review this before installing if you plan to copy its deployment examples. Use HTTPS for any authenticated endpoint, do not pass real API keys as command-line arguments, add authentication before public /invoke or /stream routes, restrict CORS, avoid public Redis/Postgres defaults, replace example passwords, and pin dependencies/images for production use.
scripts/test-agent.py:16API Credentials Can Be Exposed Through Command-Line Arguments and Plaintext HTTP
references/deployment-guide.md:426Production Deployment Example Exposes Unauthenticated Agent Execution Endpoints
scripts/init-agent.py:29Generated Projects Use Unpinned and Non-Reproducible Dependency Ranges
assets/example-configs.md:240Infrastructure Examples Expose Redis and Use a Predictable Database Password
The declared description focuses on building new Warden/LangGraph agents, preparing them for publishing, and deployment-related workflows. The actual code does not build agents, generate LangGraph logic, prepare publishing artifacts, integrate with Warden Studio, or handle deployments. Instead, it tests an existing agent service over HTTP. That is a materially different primary purpose, so this is a clear description-versus-behavior mismatch.
The skill instructs users to place API keys in a .env file and configures langgraph.json to load that file, but it provides no safeguards around secret handling, exclusion from version control, or least-privilege usage. In a code-generation or agent-runner setting, this can lead to accidental exposure of LangSmith, OpenAI, or other API credentials through repository commits, logs, packaging, or unintended file access.
"graphs": { "agent": "./src/graph.ts" // or .py }, "env": ".env" }
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"graphs": {
"agent": "./src/graph.ts"
},
"env": ".env"
}""",
".env.example": """# OpenAI Configuration
OPENAI_API_KEY=your_openai_key_here
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"graphs": {
"agent": "./src/graph.ts"
},
"env": ".env"
}""",
".env.example": """# OpenAI Configuration
OPENAI_API_KEY=your_openai_key_here
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"graphs": {
"agent": "./src/graph.ts"
},
"env": ".env"
}""",
".env.example": """# OpenAI Configuration
OPENAI_API_KEY=your_openai_key_here
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"graphs": {
"agent": "./src/graph.ts"
},
"env": ".env"
}""",
".env.example": """# OpenAI Configuration
OPENAI_API_KEY=your_openai_key_here
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# WEATHER_API_KEY=""",
".gitignore": """node_modules/
dist/
.env
*.log
.DS_Store""",
"src/graph.ts": """import { StateGraph, END } from "@langchain/langgraph";
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# WEATHER_API_KEY=""",
".gitignore": """node_modules/
dist/
.env
*.log
.DS_Store""",
"src/graph.ts": """import { StateGraph, END } from "@langchain/langgraph";
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# WEATHER_API_KEY=""",
".gitignore": """node_modules/
dist/
.env
*.log
.DS_Store""",
"src/graph.ts": """import { StateGraph, END } from "@langchain/langgraph";
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# WEATHER_API_KEY=""",
".gitignore": """node_modules/
dist/
.env
*.log
.DS_Store""",
"src/graph.ts": """import { StateGraph, END } from "@langchain/langgraph";
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# WEATHER_API_KEY=""",
".gitignore": """node_modules/
dist/
.env
*.log
.DS_Store""",
"src/graph.ts": """import { StateGraph, END } from "@langchain/langgraph";
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# WEATHER_API_KEY=""",
".gitignore": """node_modules/
dist/
.env
*.log
.DS_Store""",
"src/graph.ts": """import { StateGraph, END } from "@langchain/langgraph";
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# WEATHER_API_KEY=""",
".gitignore": """node_modules/
dist/
.env
*.log
.DS_Store""",
"src/graph.ts": """import { StateGraph, END } from "@langchain/langgraph";
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# WEATHER_API_KEY=""",
".gitignore": """node_modules/
dist/
.env
*.log
.DS_Store""",
"src/graph.ts": """import { StateGraph, END } from "@langchain/langgraph";
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# WEATHER_API_KEY=""",
".gitignore": """node_modules/
dist/
.env
*.log
.DS_Store""",
"src/graph.ts": """import { StateGraph, END } from "@langchain/langgraph";
The trigger phrase "LangGraph agent" is overly generic for a skill that is supposed to activate for Warden-specific requests. In a skill-routing system, this can cause the agent to invoke this skill for unrelated LangGraph tasks, unnecessarily exposing downstream instructions, scripts, and deployment guidance outside the intended context and potentially leading to confused-deputy behavior.
The statement that the skill triggers when users mention "Warden or LangGraph agents" creates an ambiguous activation boundary and broadens scope beyond the declared purpose of the skill. In agent ecosystems, such broad routing can misfire on unrelated requests, causing unintended use of specialized crypto/Web3 build instructions and weakening separation between skills.
The skill includes actionable shell, network, environment-variable, and file-write operations but declares no explicit tool scope or permissions boundary. In an agent-skill context, this increases the chance that a caller or downstream runtime will grant broader capabilities than intended, enabling command execution, outbound requests, and local file modification without clear restriction.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
Test your agent's API:
curl -X POST http://localhost:8000/invoke \
-H "Content-Type: application/json" \
-d '{"input": "test query"}'
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
apis: {
coingecko: {
key: process.env.COINGECKO_API_KEY,
baseUrl: 'https://api.coingecko.com/api/v3'
},
alchemy: {
key: process.env.ALCHEMY_API_KEY!,
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
},
weather: {
key: process.env.WEATHER_API_KEY!,
baseUrl: 'https://api.weatherapi.com/v1'
}
},
server: {
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
All API calls require the x-api-key header with your LangSmith API key:
curl YOUR_AGENT_URL/runs/wait \
--request POST \
--header 'Content-Type: application/json' \
--header 'x-api-key: [YOUR-LANGSMITH-API-KEY]' \
The guide recommends request logging for all requests without discussing redaction, minimization, or excluding sensitive routes. In an agent deployment context, request paths and associated logging patterns often expand to include bodies, prompts, API inputs, or user-supplied data later, which can expose secrets, personal data, or confidential prompts in logs.
The manifest context for this skill says it should be used for creating new Warden agents and explicitly notes 'not community examples.' However, the embedded description in this guide says the skill is for building agents using Warden's community templates, which is the opposite of the stated scope. This is a direct documentation-level contradiction about intended behavior.
No suspicious patterns detected.