Back to skill

Security audit

golang-troubleshooting

Security checks for vulnerabilities and agentic risk

Overview

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.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Warning
Location
references/methodology.md:90
Finding

Credential Values May Be Exposed Through Environment Enumeration

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/production-debug.md:117
Finding

Full HTTP Requests and Responses Are Written to Production Logs Without Redaction

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:15
Finding

Executable Go Tool Dependencies Are Installed From Mutable Latest Versions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/pprof.md:78
Finding

Production Profiling Guidance Can Transmit Basic Authentication Credentials Over Plain HTTP

Content
View full analysis
cpu.prof # Heap snapshot curl http://localhost:6060/debug/pprof/heap > heap.prof # Goroutine dump (human-readable) curl http://localhost:6060/debug/pprof/goroutine?debug=2 > goroutines.txt # Goroutine profile (for pprof analysis) curl http://localhost:6060/debug/pprof/goroutine > goroutine.prof # Go 1.26 experimental goroutine leak profile, only with GOEXPERIMENT=goroutineleakprofile curl http://localhost:6060/debug/pprof/goroutineleak?debug=2 go tool pprof http://localhost:6060/debug/pprof/goroutineleak # Mutex contention curl http://localhost:6060/debug/pprof/mutex > mutex.prof # Block profile curl http://localhost:6060/debug/pprof/block > block.prof ``` ```text For production servers, replace `localhost:6060` with your server address and use basic auth credentials. ``` ### Technical Analysis The local examples use plain HTTP. The production instruction tells users to replace `localhost:6060` with a production server address and use Basic Authentication, but it does not require HTTPS, an authenticated tunnel, or network isolation. HTTP Basic Authentication encodes credentials but does not encrypt them. If the same `http://` pattern is used for a remote server, credentials and profile data can be observed or modified by an attacker with network visibility. Pprof data is intrinsically sensitive. Goroutine dumps reveal internal function names, execution paths, identifiers, and potentially argument values. Heap and other profiles can reveal application behavior and memory-derived information. Profile endpoi ...[truncated 1194 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (8)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · evals/evals.json (reported line 501)May include surrounding context.

json
"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"}

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/common-go-bugs.md (reported line 709)May include surrounding context.

md
"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"}

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/common-go-bugs.md (reported line 711)May include surrounding context.

md
"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"}

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · references/testing-debug.md (reported line 76)May include surrounding context.

md
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)

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/methodology.md (reported line 69)May include surrounding context.

bash
# Reproduce an API call outside your app
curl -v -X POST https://api.example.com/endpoint \
  -H "Content-Type: application/json" \
  -d '{"key": "value"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/methodology.md (reported line 69)May include surrounding context.

bash
# Reproduce an API call outside your app
curl -v -X POST https://api.example.com/endpoint \
  -H "Content-Type: application/json" \
  -d '{"key": "value"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/methodology.md (reported line 83)May include surrounding context.

bash
# Reproduce an API call outside your app
curl -v -X POST https://api.example.com/endpoint \
  -H "Content-Type: application/json" \
  -d '{"key": "value"}'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.