Back to skill

Security audit

Pinme Share

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed PinMe/IPFS sharing skill, but it automatically installs an unpinned npm CLI and persists an AppKey in ways users should review before use.

Review before installing. Use this only for files you are comfortable making public and effectively permanent. Prefer preinstalling an audited pinme CLI yourself, avoid putting the AppKey directly on the command line, use a limited PinMe account/key, and require explicit confirmation before uploads or unpin operations.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (3)

T08 · Insecure Dependencies

Warning
Location
scripts/upload_to_pinme.py:157
Finding

Automatic Installation of an Unpinned npm Package

Content
View full analysis
Remediation
View remediation
``` 2. Verify package integrity against a trusted, pre-recorded hash before execution. 3. Prefer a committed lockfile and a project-local installation over global installation. 4. Remove the unrestricted global fallback installation. 5. Require explicit user confirmation before downloading or installing executable dependencies. 6. Where compatible, disable npm lifecycle scripts during installation: ```bash npm install --ignore-scripts ... ``` 7. Run the dependency in a restricted environment with minimal filesystem, credential, and network access. 8. Treat dependency upgrades as security-sensitive changes requiring renewed review. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/upload_to_pinme.py:238
Finding

PinMe AppKey Exposed Through Process Arguments and Shell History

Content
View full analysis
``` ### Technical Analysis The AppKey is supplied as an argument to the Python script and then passed again as an argument to the child `pinme` process. Command-line credentials can be exposed through two channels: 1. The user's shell may save the complete setup command in its command history. 2. While either process is running, the argument may be visible through operating-system process inspection facilities, monitoring agents, diagnostic collectors, or audit logs. Using a subprocess argument array prevents shell command injection, but it does not protect the confidentiality of the argument itself. The actual visibility of another user's process arguments depends on operating-system and process-isolation configuration. ### Attack Path 1. A user follows the documentation and runs the setup command with the AppKey directly on the command line. 2. The shell records the complete command in history, unless history is disabled or specially configured. 3. The wrapper starts `pinme set-appkey `, placing the AppKey in the child process argument vector. 4. A local user, monitoring service, support bundle, audit facility, or later shell-history reader captures the argu ...[truncated 721 chars]
Remediation
View remediation
` interface with an interactive hidden prompt using `getpass.getpass()`. 2. Support reading the key from protected standard input so it does not appear in shell history: ```bash printf '%s' "$PINME_APPKEY" | python3 scripts/upload_to_pinme.py --set-appkey-stdin ``` 3. If supported by the PinMe CLI, pass the credential through standard input or a dedicated inherited file descriptor rather than its argument vector. 4. If an environment variable is required for automation, ensure it is removed from child environments that do not need it and document that environment variables may also be visible to privileged local observers. 5. Update `README.md` and `SKILL.md` so the recommended setup procedure never places the AppKey directly in a shell command. 6. Advise users who previously followed the documented command to remove affected shell-history entries and rotate the AppKey if local disclosure is plausible. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
scripts/upload_to_pinme.py:214
Finding

Non-Atomic Credential Write Applies Restrictive Permissions Too Late

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (30)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 49)May include surrounding context.

md
python3 scripts/upload_to_pinme.py --set-appkey <YOUR_KEY>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 66)May include surrounding context.

md
python3 scripts/upload_to_pinme.py --set-appkey <YOUR_KEY>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 75)May include surrounding context.

md
python3 scripts/upload_to_pinme.py --set-appkey <YOUR_KEY>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 76)May include surrounding context.

md
python3 scripts/upload_to_pinme.py --set-appkey <YOUR_KEY>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 79)May include surrounding context.

md
python3 scripts/upload_to_pinme.py --set-appkey <YOUR_KEY>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 82)May include surrounding context.

md
python3 scripts/upload_to_pinme.py --set-appkey <YOUR_KEY>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 85)May include surrounding context.

md
python3 scripts/upload_to_pinme.py --set-appkey <YOUR_KEY>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 88)May include surrounding context.

md
python3 scripts/upload_to_pinme.py --set-appkey <YOUR_KEY>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 102)May include surrounding context.

md
python3 scripts/upload_to_pinme.py --set-appkey <YOUR_KEY>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 103)May include surrounding context.

md
python3 scripts/upload_to_pinme.py --set-appkey <YOUR_KEY>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 104)May include surrounding context.

md
python3 scripts/upload_to_pinme.py --set-appkey <YOUR_KEY>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 120)May include surrounding context.

md
python3 scripts/upload_to_pinme.py --set-appkey <YOUR_KEY>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 130)May include surrounding context.

md
python3 scripts/upload_to_pinme.py --set-appkey <YOUR_KEY>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 140)May include surrounding context.

md
python3 scripts/upload_to_pinme.py --set-appkey <YOUR_KEY>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 157)May include surrounding context.

md
python3 scripts/upload_to_pinme.py --set-appkey <YOUR_KEY>

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/upload_to_pinme.py (reported line 112)May include surrounding context.

python
# ──────────────────────────────────────────────────────────────────
def env_with_npm_bin() -> dict:
    """Subprocess env with ~/.npm-global/bin prepended to PATH."""
    env = os.environ.copy()
    cur_path = env.get("PATH", "")
    if NPM_GLOBAL_BIN not in cur_path.split(os.pathsep):
        env["PATH"] = f"{NPM_GLOBAL_BIN}{os.pathsep}{cur_path}"

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill declares capabilities that include shell execution, file read/write, and environment access, but it does not define any explicit tool scope or permission boundary in the skill manifest. In an agent setting, this increases the chance the skill can be invoked with broader-than-necessary authority, enabling unintended file access, credential exposure, package installation, or command execution beyond the user’s intent.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · README.md (reported line 58)May include surrounding context.

md
## ⚠️ Public-data warning — read before first use

- **PinMe runs on public IPFS**: anything you upload is world-readable; anyone with the URL can open it.
- **CIDs are effectively undeletable**: IPFS nodes cache content; `--rm` only removes the pin from your
  account — third-party copies may still exist.
- **🚫 Never upload**: internal company docs / client data / credentials / private info / unreleased material.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · SKILL.md (reported line 28)May include surrounding context.

md
## ⚠️ Public-data warning — read before first use

- **PinMe runs on public IPFS**: anything you upload is world-readable; anyone with the URL can open it.
- **CIDs are effectively undeletable**: IPFS nodes cache content; `--rm` only removes the pin from your
  account — third-party copies may still exist.
- **🚫 Never upload**: internal company docs / client data / credentials / private info / unreleased material.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · scripts/upload_to_pinme.py (reported line 408)May include surrounding context.

python
## ⚠️ Public-data warning — read before first use

- **PinMe runs on public IPFS**: anything you upload is world-readable; anyone with the URL can open it.
- **CIDs are effectively undeletable**: IPFS nodes cache content; `--rm` only removes the pin from your
  account — third-party copies may still exist.
- **🚫 Never upload**: internal company docs / client data / credentials / private info / unreleased material.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill includes deletion, logout, wallet, and credential-management operations beyond simple upload-and-share behavior. Extra capabilities broaden the attack surface and increase the chance that an agent invocation could modify account state, expose billing information, or remove data contrary to user expectations.

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 · scripts/upload_to_pinme.py (reported line 121)May include surrounding context.

python
def check_node_version():
    try:
        result = subprocess.run(
            ["node", "--version"],
            capture_output=True, text=True, timeout=10,
            env=env_with_npm_bin(),

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 · scripts/upload_to_pinme.py (reported line 142)May include surrounding context.

python
def find_pinme():
    env = env_with_npm_bin()
    try:
        r = subprocess.run(["which", "pinme"], capture_output=True, text=True, env=env, timeout=10)
        if r.returncode == 0 and r.stdout.strip():
            return r.stdout.strip()
    except Exception:

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code silently auto-installs the PinMe CLI via npm, which is a host-modifying side effect not clearly represented in the skill description. In an agent context this is dangerous because users may think they are only uploading a file, while the skill also downloads and executes third-party code.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
88% confidence
Finding

The script automatically installs and executes a package from npm at runtime, which materially expands trust to the package registry and the network. In an agent setting, this creates a supply-chain and unexpected side-effect risk: a compromised package, typosquatted name, or hostile install script could execute arbitrary code on the host.

Content

Scanner excerpt · scripts/upload_to_pinme.py (reported line 163)May include surrounding context.

python
stderr("ℹ️  pinme CLI not found, installing via npm...")
    npm_global = os.path.expanduser("~/.npm-global")
    try:
        r = subprocess.run(
            ["npm", "install", "-g", "pinme", "--prefix", npm_global],
            capture_output=True, text=True, timeout=180,
        )