Back to skill

Security audit

Stegstr

Security checks for vulnerabilities and agentic risk

Overview

The skill's steganography features are coherent, but its installer fetches and builds mutable remote code during installation and its examples understate private-key handling risk.

Review the installer before running it. Prefer a pinned, verified Stegstr release or a fixed commit instead of the provided live git clone/git pull build path, and do not pass real Nostr private keys directly in agent-visible commands. Treat generated output PNGs as files containing hidden data.

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 (1)

T08 · Insecure Dependencies

Warning
Location
install.sh:5
Finding

Unpinned Remote Source Is Retrieved, Compiled, and Installed

Content
View full analysis

Vulnerability Details

File Location: install.sh:5-20
Vulnerability Type: Unverified and mutable software supply chain
Risk Level: Medium

bash
REPO_URL="${STEGSTR_REPO_URL:-https://github.com/brunkstr/Stegstr.git}"
INSTALL_DIR="${STEGSTR_INSTALL_DIR:-$HOME/.local/stegstr}"
BIN_DIR="${STEGSTR_BIN_DIR:-$HOME/.local/bin}"

echo "Cloning Stegstr..."
mkdir -p "$(dirname "$INSTALL_DIR")"
if [ -d "$INSTALL_DIR" ]; then
  (cd "$INSTALL_DIR" && git pull)
else
  git clone "$REPO_URL" "$INSTALL_DIR"
fi

echo "Building stegstr-cli..."
(cd "$INSTALL_DIR/src-tauri" && cargo build --release --bin stegstr-cli)

mkdir -p "$BIN_DIR"
ln -sf "$INSTALL_DIR/src-tauri/target/release/stegstr-cli" "$BIN_DIR/stegstr-cli"

The same unpinned build process is also recommended in SKILL.md:39-43 and README.md:10-13.

Technical Analysis

The installer retrieves the current state of a remote Git repository without checking out a fixed, reviewed commit or verifying a cryptographic checksum or signature. For an existing installation, git pull incorporates new upstream changes automatically. The resulting source is immediately passed to Cargo and the compiled executable is linked into the user's local binary directory.

Cargo compilation can execute package build scripts in addition to producing the requested binary. Consequently, compromise of the upstream repository or one of its build-time dependencies could result in code execution during installation, before the final CLI is invoked.

The configurable STEGSTR_REPO_URL also permits the installer to retrieve and compile an alternative repository. This option is not intrinsically malicious, but if an attacker can influence the installation environment, it provides a direct way to substitute attacker-controlled source.

Attack Path

  1. An attacker compromises or modifies the mutable upstream branch, a resolved Cargo dependency, or an envir ...[truncated 1477 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin installation to a specific, reviewed commit hash or cryptographically signed release tag rather than the repository's current default branch.
  2. Replace git pull with a deterministic detached checkout of the approved revision. Prefer a clean checkout so local or upstream branch state cannot silently alter the build.
  3. Verify the upstream commit signature or verify a published release artifact against an independently distributed SHA-256 checksum or signature before execution.
  4. Commit and review Cargo.lock, then build with cargo build --release --locked --bin stegstr-cli to prevent unreviewed dependency resolution changes.
  5. Audit Cargo dependencies and build scripts, and use dependency-vulnerability and supply-chain review tooling as part of release preparation.
  6. Do not allow arbitrary repository substitution by default. If STEGSTR_REPO_URL must remain configurable, require an explicit opt-in and validate the selected source and revision against an approved allowlist.
  7. Update SKILL.md and README.md so their installation commands use the same pinned revision and integrity-verification procedure.
  8. Build in an isolated, least-privileged environment with restricted access to credentials and sensitive files.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The CLI example shows passing a private key directly on the command line without warning that command-line arguments may be exposed through shell history, process listings, logs, or agent transcripts. In an AI-agent and automation setting, this is especially risky because secrets may be echoed, persisted, or captured by orchestration tooling, enabling account compromise.

Content

No source excerpt is available for this finding.

Scope Creep

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The installer performs network access by cloning or pulling code from a remote GitHub repository at install time, which introduces a supply-chain risk and makes installation non-reproducible. It also permits the source URL to be overridden via an environment variable, increasing the chance of fetching untrusted code if the environment is manipulated.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script executes external tools (git, cargo) to update source code and compile a binary during installation, causing unreviewed code from the fetched repository to run within the user's environment. Because this skill only declares filesystem permission, invoking build tooling expands the effective attack surface and could execute malicious build scripts or dependencies.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill documents how to embed hidden payloads into PNGs but does not clearly warn that this operation creates a modified output image containing concealed content. In a filesystem-capable agent context, that omission can cause users or downstream systems to unknowingly distribute steganographic artifacts, creating data leakage, provenance, and compliance risks even if the command writes to a new output path.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.