Back to skill

Security audit

Ipfs Pin Stage

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent local IPFS pin-management skill, with cleanup behavior that users should understand before relying on pinned content long term.

Install this only if you want OpenClaw to manage local IPFS pins and automatically let tracked content expire. Important CIDs should have backups or redundant pins elsewhere, because rm or decay followed by repo gc can remove local availability of unpinned content.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (7)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill is explicitly user-invocable and documents shell execution of a local Python wrapper plus interactions with local files, environment, and the ipfs CLI, but it declares no permissions or allowed-tools scope. That creates an avoidable trust gap: an agent may invoke shell/file-capable behavior without clear least-privilege constraints, increasing the chance of unintended command execution or filesystem modification if the skill is abused or misinterpreted.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill describes rm, decay, unpinning, and ipfs repo gc, all of which can make locally relied-upon content unavailable once blocks are garbage-collected, but it does not present a prominent warning about irreversible local data loss or retrieval failure. In this context, users may reasonably treat pin-management as routine housekeeping and trigger destructive operations without understanding that only tracked references are protected by the ledger.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · ipfs_pin.py (reported line 92)May include surrounding context.

python
ipfs_bin = shutil.which("ipfs") or os.path.expanduser("~/bin/ipfs")
    if not (ipfs_bin and os.path.isfile(ipfs_bin) and os.access(ipfs_bin, os.X_OK)):
        _fail("`ipfs` binary not found in PATH or ~/bin/ipfs (required by this skill)")
    return subprocess.run([ipfs_bin] + args, capture_output=True, text=True,
                          check=False)

Tainted flow: 'LOCK_PATH' from os.environ.get (line 30, credential/environment) → open (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · ipfs_pin.py (reported line 219)May include surrounding context.

python
def cmd_decay(args):
    _state_dir()
    lock = open(LOCK_PATH, "w")
    try:
        fcntl.flock(lock, fcntl.LOCK_EX | fcntl.LOCK_NB)
    except OSError:

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes a persistence lifecycle skill: adding files to IPFS, pinning them, tracking TTLs in a ledger, and decaying unused content. The get command goes beyond that by retrieving arbitrary content by CID and optionally writing it to a user-specified path, which is a separate read/export capability not described in the manifest.

Content

No source excerpt is available for this finding.

Tainted flow: 'tmp' from os.environ.get (line 344, credential/environment) → open (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · ipfs_pin.py (reported line 345)May include surrounding context.

python
cfg = load_config()
        cfg["default_ttl_hours"] = args.default_ttl_hours
        tmp = CONFIG_PATH + ".tmp"
        with open(tmp, "w") as f:
            json.dump(cfg, f, indent=2, sort_keys=True)
            f.write("\n")
        os.replace(tmp, CONFIG_PATH)

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest frames the skill around tracking and decaying content it manages via a per-file TTL ledger. cmd_status additionally inspects the entire node pinset with ipfs pin ls --quiet and reports untracked pins, expanding behavior from managing this skill’s own entries to auditing broader node state.

Content

No source excerpt is available for this finding.