Back to skill

Security audit

Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its stated smart-contract purpose, but it needs review because its deployment examples can affect real wallets/mainnets and its lookups send data to Pentagonal without an explicit confirmation step.

Review before installing. Use a project-scoped install unless you intentionally want this available in all sessions. Expect Pentagonal MCP/API calls to send token identifiers and possibly contract prompts or code to Pentagonal. Do not paste private keys into commands or prompts, avoid --private-key command-line deployment for funded wallets, and use testnets/devnets plus safer signer workflows before any mainnet deployment or token minting.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
references/deployment.md:10
Finding

Wallet Private Key Exposed Through Command-Line Arguments

Content
View full analysis
\ --private-key $PRIVATE_KEY \ --create \ # Or use forge create forge create --rpc-url \ --private-key $PRIVATE_KEY \ src/Contract.sol:ContractName \ --constructor-args ``` ### Technical Analysis The deployment guide instructs users to supply a wallet private key through the `--private-key` command-line option. The shell expands `$PRIVATE_KEY` before launching `cast` or `forge`, placing the actual secret in the child process's argument vector. Depending on operating-system controls and the execution environment, expanded process arguments may be observable through process-monitoring interfaces, diagnostic utilities, endpoint monitoring, command tracing, CI/CD logs, crash reports, or wrapper scripts. Shell tracing such as `set -x` can also print the expanded key. Although the shell history would ordinarily store the variable reference rather than its value in this exact example, copied commands containing literal keys and automated logging can further increase exposure. This handling exceeds the minimum privilege necessary for deployment because Foundry supports safer signer mechanisms that do not require exposing raw private-key material in process arguments. It also weakens the statement in the guide that Pentagonal never handles private keys: the service may not receive them, but the prescribed local workflow uses an unnecessarily observable secret channel. ### Attack Path 1. A user stores a funded deployment wallet key in `PRIVATE_KEY`. 2. The user follows the documented `cast send` or `forge create` command. 3. The shell expands `$PRIVATE_KEY` and passes the resulting secret as a command-line argument. 4. A l ...[truncated 1262 chars]
Remediation
View remediation
\ --account deployer \ --create \ ``` 3. Prefer hardware wallets, isolated signing services, or supported remote signers for production deployments. 4. Require interactive secret entry where a keystore cannot be used, ensuring that input is not echoed or placed in process arguments. 5. Add an explicit warning that users must not paste private keys into commands, source files, environment files committed to version control, CI variables exposed to untrusted jobs, or chat prompts. 6. Configure CI/CD deployments around protected secret stores and isolated signers. Prevent command tracing and redact sensitive output. 7. Use a dedicated deployment account with only the funds and roles required for the deployment. Transfer long-term administrative authority to a multisignature wallet or governance mechanism afterward. 8. Rotate any private key previously used through observable command-line arguments and migrate its funds and administrative roles to a new secure account. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

Token lookup — public, no auth required (rate limited: 1 request/minute):

bash
curl -s -X POST https://www.pentagonal.ai/api/fetch-contract \
  -H "Content-Type: application/json" \
  -d '{"address":"<CONTRACT_ADDRESS>","chainId":"<CHAIN>"}'

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

Mode B (bash):

bash
curl -s -X POST https://www.pentagonal.ai/api/fetch-contract \
  -H "Content-Type: application/json" \
  -d '{"address":"0x...","chainId":"ethereum"}' | python3 -m json.tool

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill description is triggered by very broad phrases like create, generate, build, audit, fix, compile, or look up smart contracts and tokens. This increases the chance the skill is invoked for common development requests where users did not explicitly ask to use an external smart-contract platform, potentially causing unintended tool use or data disclosure.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

The skill explicitly directs use of curl to transmit user-provided contract data to https://www.pentagonal.ai/api/fetch-contract. External transmission is security-relevant because it shares user inputs and potentially links activity to the operator's API key or environment, without built-in minimization or consent gates.

Content

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

Token lookup — public, no auth required (rate limited: 1 request/minute):

bash
curl -s -X POST https://www.pentagonal.ai/api/fetch-contract \
  -H "Content-Type: application/json" \
  -d '{"address":"<CONTRACT_ADDRESS>","chainId":"<CHAIN>"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

This workflow repeats the direct external POST pattern and encourages piping results into local tooling, reinforcing automatic off-platform transmission during normal use. In context, the skill is meant for blockchain research, but the lack of consent language and direct shell networking still creates a meaningful privacy and control risk.

Content

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

Mode B (bash):

bash
curl -s -X POST https://www.pentagonal.ai/api/fetch-contract \
  -H "Content-Type: application/json" \
  -d '{"address":"0x...","chainId":"ethereum"}' | python3 -m json.tool

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

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

Claude Code / OpenClaw (CLI):

bash
# Global install (available in all sessions)
mkdir -p ~/.claude/skills/pentagonal-clawd
cp SKILL.md ~/.claude/skills/pentagonal-clawd/
cp -r references ~/.claude/skills/pentagonal-clawd/

Session Persistence

Medium
Category
Rogue Agent
Confidence
81% confidence
Finding

The documented global install path under ~/.claude/skills makes the skill persist across future sessions. Persistence increases blast radius if the skill is later updated maliciously, invoked unexpectedly, or exposes broad triggers that cause recurring automatic use.

Content

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

Claude Code / OpenClaw (CLI):

bash
# Global install (available in all sessions)
mkdir -p ~/.claude/skills/pentagonal-clawd
cp SKILL.md ~/.claude/skills/pentagonal-clawd/
cp -r references ~/.claude/skills/pentagonal-clawd/

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

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

cp -r references ~/.claude/skills/pentagonal-clawd/

Project-level

mkdir -p .claude/skills/pentagonal-clawd cp SKILL.md .claude/skills/pentagonal-clawd/

text
Invoke with `/pentagonal-clawd` in your terminal session.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The deployment section includes live mainnet RPC endpoints and SPL token minting commands without an explicit warning that these actions are irreversible and can create real financial consequences. In the context of an AI smart-contract deployment skill, users may copy-paste these commands directly, increasing the risk of accidental mainnet deployment or unintended token minting.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill instructs the agent to send user-supplied contract addresses and chain selections to an external API without explicitly warning the user that their input will be transmitted off-platform. Even if the payload is usually public blockchain data, users may not expect automatic third-party disclosure or API-key-backed requests.

Content

No source excerpt is available for this finding.