Back to skill

Security audit

golang-observability

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Go observability guide, but some production-ready examples can lead agents to add unsafe telemetry and privacy endpoints unless reviewed carefully.

Review generated code before merging. Require authenticated, authorized, audited workflows for user data export/deletion; enforce consent and data minimization for analytics; avoid raw URLs or user-controlled identifiers in metrics and traces; require HTTPS and sanitized logging for profiling endpoints; and approve any multi-agent audit before running it on private repositories.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (5)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/rum.md:180
Finding

Privacy handlers allow user-data deletion and export without demonstrated authorization

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/rum.md:54
Finding

Primary analytics examples transmit identifiable user and transaction data without a consent gate

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/rum.md:90
Finding

Client-controlled identity headers are exported as trusted trace attributes

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/profiling.md:19
Finding

Pyroscope credentials may be transmitted over plaintext HTTP and exposed in logs

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/metrics.md:39
Finding

HTTP metrics example uses unbounded raw request paths as Prometheus labels

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
93% confidence
Finding

The example exposes destructive and sensitive privacy endpoints using a user-controlled path parameter (/api/users/:id/data) but shows no authentication, authorization, or ownership checks before deleting or exporting data. If implemented as shown, an attacker could request deletion or access for another user's ID, causing account-wide data loss or unauthorized disclosure across the database, analytics platform, and CDP.

Content

Scanner excerpt · references/rum.md (reported line 180)May include surrounding context.

GDPR and CCPA require you to let users access, export, and delete their data. Implement API endpoints that propagate these requests to all systems that hold user data — your database, your analytics platform, your CDP.

go
// DELETE /api/users/:id/data — GDPR Article 17 "Right to Erasure"
func (h *PrivacyHandler) HandleDataDeletion(w http.ResponseWriter, r *http.Request) {
    ctx := r.Context()
    userID := chi.URLParam(r, "id")

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The evaluation content explicitly recommends using up to 5 parallel sub-agents for large codebase audits. In an agent skill, prescriptive delegation without user opt-in or a fallback can trigger unnecessary autonomous actions, increase data exposure across additional agent contexts, and raise cost or control risks if followed literally by an agentic system.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

Recording raw request paths as metric labels without an adjacent warning is dangerous because path values are often high-cardinality and may contain personal data, tokens, or resource identifiers. In an observability skill aimed at production use, this pattern is especially risky since it encourages copy-paste deployment into monitoring pipelines where the resulting data exposure and operational instability can persist continuously.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The example instruments r.URL.Path directly as a Prometheus label value, which can create unbounded metric cardinality because each distinct path becomes a separate time series. In production this can exhaust Prometheus memory, degrade query performance, and may also expose sensitive path data if identifiers or secrets appear in URLs; the surrounding observability context makes this more dangerous because readers are likely to copy the snippet into always-on production instrumentation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The tracing guidance explicitly encourages attaching request-scoped metadata such as user_id and order_id to errors and spans, but does not warn about privacy classification, minimization, redaction, or avoiding PII in telemetry. In an observability skill, this omission is materially risky because developers may copy these examples directly into production tracing pipelines, causing sensitive customer or tenant data to be exported, retained, and indexed across third-party telemetry systems.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The naming conventions section states metrics must use base units and gives explicit examples of preferred units, yet the later histogram example defines myapp_orders_amount_dollars, which is not a base SI-style unit and conflicts with the stated rule. This is a documentation-to-example contradiction rather than an implementation necessity.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.