Back to skill

Security audit

structsd-install

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent installer guide, but it asks users or agents to run risky system-level install commands without enough verification or guardrails.

Review this skill before installing. Prefer user-local installs where possible, verify release artifacts and Go downloads with publisher-provided checksums or signatures, avoid the optional curl-to-bash Ignite command unless you inspect it first, and do not let an agent run the sudo rm -rf /usr/local/go steps without explicit approval and a backup or rollback plan.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:158
Finding
Unpinned Remote Script Piped Directly into Bash<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:158` **Vulnerability Type**: `T03: Remote Payload Retrieval and Execution` **Risk Level**: Critical ### Vulnerable Code ```bash curl https://get.ignite.com/cli! | bash ``` ### Technical Analysis The installation instruction retrieves mutable content from an external URL and immediately passes it to Bash. The response is not pinned to a specific version, saved for inspection, or authenticated using a cryptographic signature or expected checksum. The effective code executed by this command can therefore change after the Skill has been reviewed. Compromise of the endpoint, hosting infrastructure, DNS resolution, or release pipeline could cause arbitrary attacker-controlled shell commands to run locally. Installing Ignite is relevant only to the optional local-devnet functionality. Immediate execution of an unauthenticated network response exceeds the minimum privileges and trust required to provide that optional capability. ### Attack Path 1. An attacker compromises the remote installation endpoint or its software-delivery infrastructure. 2. The attacker changes the response to include malicious shell commands. 3. A user or agent follows the Skill and runs the documented command. 4. `curl` downloads the modified response. 5. Bash executes the response immediately, without an opportunity for inspection or integrity verification. 6. The payload operates with all privileges available to the invoking account and may retrieve additional payloads, modify user files, or establish persistence. ### Impact Assessment Successful exploitation provides arbitrary command execution under the invoking user's identity. The payload could read or alter accessible files, steal credentials available to that account, modify shell configuration, install additional programs, or attempt further privilege escalation. If the instruction is run from an already privileged shell, the impact extends to system-wide compromi ...[truncated 7 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the `curl | bash` pipeline. 2. Select and pin a specific official Ignite release. 3. Download the release artifact to a local file without executing it. 4. Verify a publisher-provided cryptographic signature or a hard-coded SHA-256 checksum obtained through an independently authenticated channel. 5. Inspect or extract the verified artifact before installation. 6. Install it into a user-local directory unless system-wide installation is explicitly required. 7. Document the exact downloaded version, expected digest, verification command, and resulting installation path. 8. Keep Ignite installation clearly optional because the primary `structsd` installation and client functionality do not require it. ]]>

T08 · Insecure Dependencies

Error
Location
SKILL.md:31
Finding
Release Binary Installed Without Cryptographic Integrity Verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:31-42` **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: High ### Vulnerable Code ```bash # Pick one (replace VERSION with e.g. v0.19.1): VERSION=v0.19.1 # Linux amd64 curl -L -o structsd.tar.gz \ "https://github.com/playstructs/structsd/releases/download/${VERSION}/structsd_$(echo ${VERSION#v})_linux_amd64.tar.gz" # macOS Apple Silicon curl -L -o structsd.tar.gz \ "https://github.com/playstructs/structsd/releases/download/${VERSION}/structsd_$(echo ${VERSION#v})_darwin_arm64.tar.gz" tar -xzf structsd.tar.gz sudo install -m 0755 structsd /usr/local/bin/structsd rm structsd.tar.gz structsd ``` ### Technical Analysis The instructions download a precompiled executable archive, extract it, and install the resulting binary on the system-wide executable path. Although the document states that release binaries are signed, it does not include any command that verifies a signature or checksum before extraction and installation. A version tag makes the URL more stable but does not authenticate the downloaded bytes. HTTPS protects the connection in transit but does not mitigate compromise of the repository, publisher account, release workflow, or hosted release asset. The use of `sudo install` increases the consequence by placing the unverified executable in `/usr/local/bin`, where it may subsequently be invoked by multiple users or automated processes. ### Attack Path 1. An attacker compromises the upstream repository, maintainer account, release pipeline, or release asset. 2. The legitimate-looking archive is replaced or published with a malicious `structsd` executable. 3. A user or agent downloads the archive using the documented URL. 4. No checksum or signature verification detects that the executable is unauthorized. 5. The archive is extracted and the binary is installed into `/usr/local/bin` using `sudo`. 6. The malicious code executes when the user, another user, or an ...[truncated 505 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Publish checksums and cryptographic signatures for every release artifact. 2. Pin an explicit release version and expected digest rather than relying only on a version-derived URL. 3. Download the archive without extracting or executing it. 4. Verify the artifact using a hard-coded expected SHA-256 digest or a trusted publisher signature before extraction. 5. Abort installation on any verification failure. 6. Extract into a newly created, user-owned temporary directory and confirm the expected archive contents before installation. 7. Prefer installation into a user-local binary directory, such as `~/.local/bin`, unless a system-wide installation is necessary. 8. If system-wide installation is required, request `sudo` only for the final copy of the already verified executable. 9. Update the statement that releases are signed with concrete signature-download and verification commands. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (20)

Tool Parameter Abuse

High
Category
Tool Misuse
Content
```bash
GO_VER=1.23.6
wget https://go.dev/dl/go${GO_VER}.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go${GO_VER}.linux-amd64.tar.gz
rm go${GO_VER}.linux-amd64.tar.gz
```
Confidence
94% confidence
Finding
The command sudo rm -rf /usr/local/go is a destructive recursive deletion against a system directory and can break existing Go-dependent workflows or remove the wrong content if copied or adapted incorrectly. In an agent skill, such commands are more dangerous because they may be executed with reduced human scrutiny.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
```bash
GO_VER=1.23.6
wget https://go.dev/dl/go${GO_VER}.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go${GO_VER}.linux-amd64.tar.gz
rm go${GO_VER}.linux-amd64.tar.gz
```
Confidence
94% confidence
Finding
The command sudo rm -rf /usr/local/go is a destructive recursive deletion against a system directory and can break existing Go-dependent workflows or remove the wrong content if copied or adapted incorrectly. In an agent skill, such commands are more dangerous because they may be executed with reduced human scrutiny.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
```bash
GO_VER=1.23.6
curl -OL https://go.dev/dl/go${GO_VER}.darwin-arm64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go${GO_VER}.darwin-arm64.tar.gz
rm go${GO_VER}.darwin-arm64.tar.gz
```
Confidence
94% confidence
Finding
This is the same destructive recursive deletion pattern on macOS Apple Silicon. Although scoped to /usr/local/go, it still enables potentially harmful system modification and service disruption if executed automatically or without careful review.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
```bash
GO_VER=1.23.6
curl -OL https://go.dev/dl/go${GO_VER}.darwin-arm64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go${GO_VER}.darwin-arm64.tar.gz
rm go${GO_VER}.darwin-arm64.tar.gz
```
Confidence
94% confidence
Finding
This is the same destructive recursive deletion pattern on macOS Apple Silicon. Although scoped to /usr/local/go, it still enables potentially harmful system modification and service disruption if executed automatically or without careful review.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
```bash
GO_VER=1.23.6
curl -OL https://go.dev/dl/go${GO_VER}.darwin-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go${GO_VER}.darwin-amd64.tar.gz
rm go${GO_VER}.darwin-amd64.tar.gz
```
Confidence
94% confidence
Finding
This Intel macOS variant also deletes /usr/local/go recursively before replacement. The skill context makes it somewhat less suspicious than overtly malicious payloads, but still dangerous because it normalizes destructive root-level changes in installation automation.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
```bash
GO_VER=1.23.6
curl -OL https://go.dev/dl/go${GO_VER}.darwin-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go${GO_VER}.darwin-amd64.tar.gz
rm go${GO_VER}.darwin-amd64.tar.gz
```
Confidence
94% confidence
Finding
This Intel macOS variant also deletes /usr/local/go recursively before replacement. The skill context makes it somewhat less suspicious than overtly malicious payloads, but still dangerous because it normalizes destructive root-level changes in installation automation.

Missing User Warnings

High
Confidence
98% confidence
Finding
The skill presents a curl-piped-to-bash installer for Ignite without any integrity verification, pinning, or warning that it executes remote code directly in the shell. This is especially dangerous in an agent skill because it normalizes immediate execution of network-fetched content with full user privileges.

Chaining Abuse

High
Category
Tool Misuse
Content
```bash
# One-time
curl https://get.ignite.com/cli! | bash
ignite version

# In the structsd repo:
Confidence
99% confidence
Finding
The command curl https://get.ignite.com/cli! | bash chains network retrieval directly into shell execution, creating a classic remote-code-execution supply-chain risk. In a skill designed for agents, this is particularly dangerous because it encourages immediate execution of unreviewed remote content with whatever privileges the session has.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
"https://github.com/playstructs/structsd/releases/download/${VERSION}/structsd_$(echo ${VERSION#v})_darwin_arm64.tar.gz"

tar -xzf structsd.tar.gz
sudo install -m 0755 structsd /usr/local/bin/structsd
rm structsd.tar.gz structsd
```
Confidence
84% confidence
Finding
The instruction uses sudo to install a downloaded binary into /usr/local/bin, which requires elevated privileges and modifies a system-wide executable path. While common for manual installation, this is risky in an agent skill because the binary comes from the network and the step lacks checksum or signature verification guidance.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```bash
GO_VER=1.23.6
wget https://go.dev/dl/go${GO_VER}.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go${GO_VER}.linux-amd64.tar.gz
rm go${GO_VER}.linux-amd64.tar.gz
```
Confidence
91% confidence
Finding
This line uses sudo rm -rf on /usr/local/go, granting root privileges to a destructive filesystem operation. Even though the target is specific, privileged recursive deletion in a skill is hazardous because path mistakes or automation bugs can cause service disruption or broader system damage.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill instructs users to remove and replace a system-wide Go installation under /usr/local using privileged commands, but it does not clearly warn that these steps are destructive and may overwrite an existing working toolchain. In an agent-executed context, omission of an explicit confirmation or backup step increases the chance of unintended system modification and disruption.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
GO_VER=1.23.6
wget https://go.dev/dl/go${GO_VER}.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go${GO_VER}.linux-amd64.tar.gz
rm go${GO_VER}.linux-amd64.tar.gz
```
Confidence
81% confidence
Finding
The skill instructs sudo tar extraction into /usr/local, a privileged system location, which modifies the host environment with root permissions. In isolation this is standard admin behavior, but in a skill context it increases the blast radius of any compromised or incorrect archive.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
rm go${GO_VER}.linux-amd64.tar.gz
```

If an older Go was installed via apt, remove it first: `sudo apt remove -y golang-go`

#### macOS (Apple Silicon)
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```bash
GO_VER=1.23.6
curl -OL https://go.dev/dl/go${GO_VER}.darwin-arm64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go${GO_VER}.darwin-arm64.tar.gz
rm go${GO_VER}.darwin-arm64.tar.gz
```
Confidence
91% confidence
Finding
This line again uses sudo rm -rf on /usr/local/go, here for macOS Apple Silicon, with the same privileged destructive behavior. In an agent skill, repeated use of root-level recursive deletion without guardrails materially increases operational risk.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
GO_VER=1.23.6
curl -OL https://go.dev/dl/go${GO_VER}.darwin-arm64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go${GO_VER}.darwin-arm64.tar.gz
rm go${GO_VER}.darwin-arm64.tar.gz
```
Confidence
81% confidence
Finding
The command extracts a downloaded archive into /usr/local using sudo, making a network-sourced package installation a privileged system change. If the archive is tampered with or the URL is wrong, the result is root-level compromise or system instability.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```bash
GO_VER=1.23.6
curl -OL https://go.dev/dl/go${GO_VER}.darwin-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go${GO_VER}.darwin-amd64.tar.gz
rm go${GO_VER}.darwin-amd64.tar.gz
```
Confidence
91% confidence
Finding
This is the Intel macOS variant of the same privileged recursive deletion of /usr/local/go. The operation is potentially disruptive and dangerous in an automated or semi-automated agent environment because it removes an existing system component with root access.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
GO_VER=1.23.6
curl -OL https://go.dev/dl/go${GO_VER}.darwin-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go${GO_VER}.darwin-amd64.tar.gz
rm go${GO_VER}.darwin-amd64.tar.gz
```
Confidence
81% confidence
Finding
This root-level tar extraction into /usr/local performs a system-wide install of a downloaded archive. The context is ordinary software setup, but absent integrity verification and approval gates it remains a meaningful security risk.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
- **`ERROR: Go version 1.23+ is required`** from `make install` — Your Go is too old. Re-install per step 1 above; the Makefile's `check_version` target enforces this hard.
- **Build fails on `go mod tidy`** — Network access is required for the first build. Retry once you have connectivity, or set `GOPROXY=direct` if you are behind a restrictive proxy.
- **Permission denied on `/usr/local`** — Use `sudo` for the tar extraction or for `install -m 0755`. On shared systems, ask your administrator. Path B does not require root because it installs to `~/go/bin`.
- **`gcc not installed for ledger support`** — Either install `gcc` (`sudo apt install build-essential` / `xcode-select --install`) or build with `LEDGER_ENABLED=false make install`.

## See Also
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

External Script Fetching

Low
Category
Supply Chain
Content
VERSION=v0.19.1

# Linux amd64
curl -L -o structsd.tar.gz \
  "https://github.com/playstructs/structsd/releases/download/${VERSION}/structsd_$(echo ${VERSION#v})_linux_amd64.tar.gz"

# macOS Apple Silicon
Confidence
15% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

Low
Category
Supply Chain
Content
```bash
GO_VER=1.23.6
wget https://go.dev/dl/go${GO_VER}.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go${GO_VER}.linux-amd64.tar.gz
rm go${GO_VER}.linux-amd64.tar.gz
Confidence
15% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Static analysis

Detected: suspicious.destructive_delete_command

Documentation contains a destructive delete command without an explicit confirmation gate.

Warn
Code
suspicious.destructive_delete_command
Location
SKILL.md:67