T09 · Insecure Skill Coding Practices
- Location
references/methodology.md:90- Finding
Credential Values May Be Exposed Through Environment Enumeration
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Go troubleshooting skill is coherent overall, but some production debugging guidance could expose secrets or sensitive traffic if followed as written.
Install only if you are comfortable with a debugging skill that can edit code, run Go/git/dlv commands, and guide production diagnostics. Before using it on production systems, require explicit approval for pprof captures, full HTTP dumps, database queries, and environment inspection; redact secrets, use HTTPS or tunnels, restrict log/profile access, and pin installed tool versions.
references/methodology.md:90Credential Values May Be Exposed Through Environment Enumeration
references/production-debug.md:117Full HTTP Requests and Responses Are Written to Production Logs Without Redaction
SKILL.md:15Executable Go Tool Dependencies Are Installed From Mutable Latest Versions
references/pprof.md:78Production Profiling Guidance Can Transmit Basic Authentication Credentials Over Plain HTTP
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"trap": "Model says filepath.Join handles path cleaning and the code is safe",
"assertions": [
{"id": "36.1", "text": "Identifies that filepath.Join does NOT prevent path traversal"},
{"id": "36.2", "text": "Shows that input like '../../etc/passwd' resolves to '/etc/passwd' after Join"},
{"id": "36.3", "text": "Recommends os.Root for Go 1.24+ user-controlled filesystem access"},
{"id": "36.4", "text": "For older Go targets, shows a fallback using filepath.IsLocal plus filepath.Rel with separator-aware checks"},
{"id": "36.5", "text": "Does NOT present filepath.Clean plus strings.HasPrefix as a complete traversal defense"}
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"trap": "Model says filepath.Join handles path cleaning and the code is safe",
"assertions": [
{"id": "36.1", "text": "Identifies that filepath.Join does NOT prevent path traversal"},
{"id": "36.2", "text": "Shows that input like '../../etc/passwd' resolves to '/etc/passwd' after Join"},
{"id": "36.3", "text": "Recommends os.Root for Go 1.24+ user-controlled filesystem access"},
{"id": "36.4", "text": "For older Go targets, shows a fallback using filepath.IsLocal plus filepath.Rel with separator-aware checks"},
{"id": "36.5", "text": "Does NOT present filepath.Clean plus strings.HasPrefix as a complete traversal defense"}
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"trap": "Model says filepath.Join handles path cleaning and the code is safe",
"assertions": [
{"id": "36.1", "text": "Identifies that filepath.Join does NOT prevent path traversal"},
{"id": "36.2", "text": "Shows that input like '../../etc/passwd' resolves to '/etc/passwd' after Join"},
{"id": "36.3", "text": "Recommends os.Root for Go 1.24+ user-controlled filesystem access"},
{"id": "36.4", "text": "For older Go targets, shows a fallback using filepath.IsLocal plus filepath.Rel with separator-aware checks"},
{"id": "36.5", "text": "Does NOT present filepath.Clean plus strings.HasPrefix as a complete traversal defense"}
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
Flaky tests (pass sometimes, fail sometimes) are usually caused by one of:
1. **Shared mutable state between tests** — global variables, package-level maps, singletons
- Fix: reset state in `TestMain` or use `t.Cleanup`
2. **Test order dependence** — one test sets up state another test relies on
- Diagnose: `go test -run TestSuspect -count=1` (run in isolation)
- Diagnose: `go test -shuffle=on` (randomize order)
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Reproduce an API call outside your app
curl -v -X POST https://api.example.com/endpoint \
-H "Content-Type: application/json" \
-d '{"key": "value"}'
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Reproduce an API call outside your app
curl -v -X POST https://api.example.com/endpoint \
-H "Content-Type: application/json" \
-d '{"key": "value"}'
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Reproduce an API call outside your app
curl -v -X POST https://api.example.com/endpoint \
-H "Content-Type: application/json" \
-d '{"key": "value"}'
The guidance recommends dumping full HTTP requests and responses, including bodies, with no warning or redaction guidance. In production debugging, this can expose Authorization headers, cookies, API keys, session tokens, and sensitive request/response data into logs, which are often broadly accessible and retained for long periods.
No suspicious patterns detected.