Skip to content

fix: remediate 13 reachable security findings (cmdi, SSRF, LLM PII, DLP, secret, error-leak, CVE)#21

Draft
al1dazzi with Copilot wants to merge 3 commits into
mainfrom
copilot/rch-task-bd3b303e1f80585a-remediate-batch
Draft

fix: remediate 13 reachable security findings (cmdi, SSRF, LLM PII, DLP, secret, error-leak, CVE)#21
al1dazzi with Copilot wants to merge 3 commits into
mainfrom
copilot/rch-task-bd3b303e1f80585a-remediate-batch

Conversation

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown

Addresses a batch of 13 production-reachable security findings across the handler layer spanning command injection, SSRF, LLM prompt injection, PII leakage, a committed secret, internal error exposure, and a vulnerable dependency.

Changes

cwe.go — OS command injection

  • DiagnosticPing: replaced exec.Command("sh", "-c", "ping -c 1 "+host) with AllowedHostname validation + exec.Command("ping", "-c", "1", host) (fixed argv, no shell)
  • Errors logged server-side; generic message returned to client

ai.go — LLM prompt injection + error leak

  • AIAnswer / AIAgentPlan: user-controlled input moved to user role; system instructions stay in system role — eliminates direct concatenation of untrusted data into the system prompt
  • Removed internal prompts/tool specs from response body; err.Error() replaced with generic "invalid request"

dlp.go — PII in logs and HTTP POST

  • SupportExport: SSN/DOB redacted in log.Printf (***-**-XXXX / YYYY-**-**); raw PII fields removed from the outbound analytics POST payload

secrets.go — committed GitHub PAT

  • Removed hardcoded ghp_* constant; CloudTokens now reads REACH_TESTBED_GITHUB_TOKEN from the environment, returning HTTP 503 when unset

suspicious.go — SSRF + cleartext + error leak

  • FetchTool: rejects non-https schemes; validates hostname against AllowedHostname allowlist before making any outbound request; all err.Error() calls replaced with generic messages + server-side log.Printf

cve.go — error leak

  • ParseLanguage: returns "invalid language tag" instead of err.Error()

go.mod / go.sum — CVE dependency

  • Upgraded golang.org/x/text v0.3.7v0.3.8 to resolve grouped CVEs

Copilot AI changed the title [WIP] Remediate selected batch of 13 units fix: remediate 13 reachable security findings (cmdi, SSRF, LLM PII, DLP, secret, error-leak, CVE) Jun 22, 2026
Copilot AI requested a review from al1dazzi June 22, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants