Back to skill

Security audit

Go Security Vulnerability

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly aligned with Go vulnerability scanning, but its installer uses an unsafe system-wide Go installation command that users should review before installing.

Review the installer before enabling this skill. Prefer installing Go through your OS package manager or a verified pinned archive, avoid running the install step with elevated privileges unless you intend a system-wide install, and review go.mod/go.sum diffs after any suggested dependency changes.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T08 · Insecure Dependencies

Error
Location
SKILL.md:14
Finding
Unverified Remote Go Archive Extracted into a Privileged System Directory## Vulnerability Details **File Location**: `SKILL.md`, line 14 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: High **Vulnerable Code**: ```bash "script": "curl -L https://golang.org/dl/go1.21.5.linux-amd64.tar.gz | tar -C /usr/local -xzf -", ``` ### Technical Analysis The installation command downloads a remote archive and streams it directly into `tar`, which extracts its contents under the system-wide `/usr/local` directory. The command does not verify a cryptographic checksum or signature before extraction. It also follows redirects through `curl -L` and does not use `--fail` to reject HTTP error responses explicitly. This design crosses a supply-chain trust boundary: the content returned by the remote server becomes locally installed executable content without independent integrity validation. Streaming the response directly into the extraction utility also prevents inspection of the complete artifact before it modifies the filesystem. The source URL belongs to the official Go distribution domain, so this finding does not establish malicious intent. The vulnerability is the absence of controls capable of detecting a compromised distribution endpoint, redirect target, network response, or substituted archive. ### Attack Path 1. An attacker compromises the download endpoint, an allowed redirect destination, or another part of the artifact distribution channel. 2. The attacker causes the URL to return a modified gzip-compressed tar archive. 3. The installation command follows redirects and streams the response directly to `tar`. 4. `tar` extracts the attacker-controlled archive under `/usr/local` without checksum or signature verification. 5. Modified Go binaries or other archive content become available system-wide. 6. Subsequent invocations of `go`, package builds, or security-scanning workflows execute or rely on the substituted content. ### Impact Assessment Successful exploitation cou ...[truncated 754 chars]
Remediation
## Remediation Suggestions - Prefer installing Go through a trusted operating-system package manager with repository signature verification. - If direct archive installation is required, download the archive to a newly created temporary directory rather than piping it directly into `tar`. - Use strict download options such as `curl --fail --show-error --location`. - Pin the expected SHA-256 digest and verify it with `sha256sum -c` before extraction. - Obtain the expected digest through an authenticated, independently trusted source rather than from the same unverified response path. - Reject the installation if integrity verification fails. - Inspect the archive file list before extraction and ensure paths cannot escape the intended destination. - Extract with the minimum permissions necessary and avoid writing to `/usr/local` unless system-wide installation is explicitly required and authorized. - Record the verified version and digest to make installation reproducible and auditable. A hardened workflow should follow this order: download to a temporary file, verify its pinned digest or trusted signature, inspect the archive, and only then extract it into an approved destination.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:30
Finding
Mutable Latest Version Used to Install the Vulnerability Scanner## Vulnerability Details **File Location**: `SKILL.md`, line 30 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium **Vulnerable Code**: ```bash go install golang.org/x/vuln/cmd/govulncheck@latest ``` ### Technical Analysis The command installs `govulncheck` from the mutable `@latest` version selector. Because this selector may resolve to a different release over time, the installation is not reproducible and the effective dependency has not been fixed to a previously reviewed version. Go module checksum infrastructure can help detect unexpected mutation of a specific published module version, but it does not make `@latest` immutable or guarantee that a newly published release is safe. A compromised upstream account, repository, release process, or newly introduced malicious release could therefore cause future executions to retrieve and compile code that was not present during this audit. Go packages may execute code when the resulting tool is invoked, and compilation can also trigger relevant toolchain operations. Consequently, installing a mutable dependency expands the supply-chain attack surface of a security-sensitive workflow. ### Attack Path 1. An attacker compromises the upstream project, maintainer credentials, publishing process, or another trusted release component. 2. The attacker publishes a malicious version that becomes the version selected by `@latest`. 3. A user follows the Skill and runs the installation command. 4. The Go toolchain resolves, downloads, and compiles the newly published dependency and its dependency graph. 5. The resulting `govulncheck` binary contains attacker-controlled behavior. 6. When the scanner is invoked against a project, the malicious behavior executes with the invoking user's permissions and may access files and source code available to that account. ### Impact Assessment Successful exploitation could result in arbitrary code execution with the ...[truncated 625 chars]
Remediation
## Remediation Suggestions - Replace `@latest` with a specific, reviewed release such as `@vX.Y.Z`. - Maintain the selected version through a controlled dependency-update process that includes release-note review and security validation. - Preserve and validate Go module checksums through the standard checksum database or an approved private equivalent. - Execute the installed scanner without elevated privileges. - Install the binary into a controlled user-level directory rather than a privileged shared path. - Consider verifying the resolved module version and provenance in CI before making it available to developers or automation. - Re-run build, test, and vulnerability checks after each deliberate scanner upgrade.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Missing User Warnings

Low
Confidence
95% confidence
Finding
The skill recommends commands like `go get -u`, `go mod edit -replace`, and `go mod tidy` that directly modify dependency versions and project files, but it does not clearly warn the user about those side effects before presenting them as standard remediation steps. In a security-fix workflow, this can lead to unintended dependency drift, breakage, or replacement directives being committed without adequate review, especially if an agent runs commands automatically.

Static analysis

No suspicious patterns detected.