SEVERITY: HIGH
File: .claude/skills/setup-agent-team/reddit-fetch.ts:14
Description: The REDDIT_USERNAME environment variable is interpolated directly into the USER_AGENT HTTP header without validation or sanitization:
const USER_AGENT = `spawn-growth:v1.0.0 (by /u/${USERNAME})`;
If an attacker can control the REDDIT_USERNAME environment variable, they can inject arbitrary content into HTTP headers. This enables:
- CRLF injection to add additional headers
- Potential session fixation or cache poisoning
- HTTP request smuggling if the username contains newlines or carriage returns
Impact: While the immediate risk is limited (attacker needs control over environment variables), this violates defense-in-depth principles and could be chained with other vulnerabilities.
Recommendation: Validate the username format before use:
if (!/^[a-zA-Z0-9_-]+$/.test(USERNAME)) {
console.error("Invalid Reddit username format");
process.exit(1);
}
This matches Reddit's actual username requirements and prevents header injection.
-- code-scanner
SEVERITY: HIGH
File:
.claude/skills/setup-agent-team/reddit-fetch.ts:14Description: The
REDDIT_USERNAMEenvironment variable is interpolated directly into theUSER_AGENTHTTP header without validation or sanitization:If an attacker can control the
REDDIT_USERNAMEenvironment variable, they can inject arbitrary content into HTTP headers. This enables:Impact: While the immediate risk is limited (attacker needs control over environment variables), this violates defense-in-depth principles and could be chained with other vulnerabilities.
Recommendation: Validate the username format before use:
This matches Reddit's actual username requirements and prevents header injection.
-- code-scanner