Back to skill

Security audit

Lean Proof To Solidity Smart Contract Generator

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent remote AgentPMT integration, but its schema allows sending a raw wallet private key to a remote service, which requires Review before use.

Review this skill before installing or using it. Do not provide real wallet private keys, mnemonics, signatures, account secrets, payment headers, or proprietary contract logic to the remote service unless you have approved that transfer and understand AgentPMT's handling of the data. Prefer fromAlias or test-only throwaway keys for simulation, and avoid the unpinned npx setup path unless you can verify the package and skill source you are installing.

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

T09 · Insecure Skill Coding Practices

Error
Location
schema.md:107
Finding

Remote API Schema Permits Transmission of Wallet Private Keys

Content
View full analysis

Vulnerability Details

File Location: schema.md:107-115
Vulnerability Type: Sensitive credential exposure through a remote API
Risk Level: High

Vulnerable Code Snippet

markdown
| `expectReturnU256` | `string` | no | Expected uint256 result encoded as a decimal string. |
| `expectRevert` | `boolean` | no | Whether the later EVM simulation should expect a revert for this call. |
| `fromAlias` | `string` | no | Optional sender alias for the simulator. |
| `fromPrivateKeyHex` | `string` | no | Optional explicit private key for the sender. |
| `label` | `string` | no | Optional label for the encoded call. |
| `valueWei` | `string` | no | Optional call value in wei. |

The generated schema also formally exposes this parameter at schema.md:181-185:

json
"fromPrivateKeyHex": {
  "description": "Optional explicit private key for the sender.",
  "required": false,
  "type": "string"
}

Technical Analysis

The encode_call action accepts an explicit wallet private key even though the tool is described as an AgentPMT-hosted remote service. Supplying this parameter therefore transfers a cryptographic secret across the local trust boundary to the service and potentially through HTTP clients, gateways, application logs, tracing systems, and monitoring infrastructure.

This capability is not necessary for the declared offline simulation functionality. The same schema provides fromAlias, which can represent a simulated sender without disclosing a signing secret. A sender address would also be sufficient for most EVM simulation use cases.

SKILL.md:256-259 warns users not to place wallet private keys in prompts or logs, but that warning does not neutralize the risk created by an API schema that explicitly invites agents to provide a private key. Automated agents may construct requests directly from the schema and populate the field without appreciating the remote trust boundary.

...[truncated 1239 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove fromPrivateKeyHex from the remotely callable action schema.
  2. Use fromAlias or a public sender address for offline EVM simulation.
  3. If transaction signing is ever required, perform signing locally through a wallet provider or hardware wallet and transmit only the signed transaction.
  4. Add server-side validation that rejects private keys, mnemonics, and other signing secrets even if submitted through unstructured fields.
  5. Apply secret detection and redaction before requests enter logs, traces, error reports, analytics systems, or persistent task records.
  6. Update the documentation to state explicitly that raw private keys must never be sent to AgentPMT or any remote tool.
  7. Review historical service logs and task records for key-like values and establish an incident-response process for any discovered exposure.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:203
Finding

Unpinned Third-Party Installation Commands Create a Mutable Supply-Chain Risk

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:203-217
Vulnerability Type: Unpinned remote dependency installation
Risk Level: Medium

Vulnerable Code Snippet

markdown
Core AgentPMT setup skills:
- What AgentPMT is: ../what-is-agentpmt
  - ClawHub page: https://clawhub.ai/agentpmt/what-is-agentpmt
  - OpenClaw install: `openclaw skills install what-is-agentpmt`
  - skills.sh install: `npx skills add AgentPMT/agent-skills --skill what-is-agentpmt`
- AgentPMT account MCP/REST setup: ../agentpmt-account-mcp-rest-api-setup
  - ClawHub page: https://clawhub.ai/agentpmt/agentpmt-account-mcp-rest-api-setup
  - OpenClaw install: `openclaw skills install agentpmt-account-mcp-rest-api-setup`
  - skills.sh install: `npx skills add AgentPMT/agent-skills --skill agentpmt-account-mcp-rest-api-setup`

skills.sh install script:

```bash
npx skills add AgentPMT/agent-skills --skill what-is-agentpmt
npx skills add AgentPMT/agent-skills --skill agentpmt-account-mcp-rest-api-setup
text

### Technical Analysis

The setup instructions invoke an unversioned `npx` package and install skills from a mutable external repository reference. The commands do not pin the npm CLI package version, repository commit, release tag, checksum, or cryptographic signature.

Consequently, the code and instructions executed at installation time can differ from what was reviewed during this audit. Compromise of the npm package, its maintainer account, the referenced repository, or the remote distribution channel could turn the documented setup process into a code-execution or instruction-injection path.

Installing additional setup skills also expands the trusted computing base beyond the two audited files. This exceeds what is necessary merely to describe the product API unless those dependencies are independently pinned and audited.

### Attack Path

1. A user follows the documented setup procedure.
2. `npx` resolves and do
...[truncated 1192 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the npx package to a reviewed, exact version rather than resolving the latest release.
  2. Pin installed skill sources to immutable repository commit hashes or signed release artifacts.
  3. Publish and verify cryptographic checksums or signatures before installation.
  4. Use a lockfile or equivalent dependency manifest where supported.
  5. Avoid automatic execution of newly downloaded installation code; provide a review or confirmation step before execution.
  6. Document the expected package publisher, repository URL, version, commit, and integrity value.
  7. Independently audit the additional setup skills and repeat that review whenever their pinned versions change.
  8. Run installation in a restricted environment with minimal filesystem access, no production secrets, and limited network permissions.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The description does not clearly warn that submitted Lean source, Solidity, ABI, and simulation data are transmitted to AgentPMT-hosted remote services. In a code-generation and smart-contract workflow, omission of this disclosure can lead users or agents to expose proprietary source code or sensitive contract logic without informed consent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The activation keywords include broad phrases like catalog, compile abi bytecode, and soliditytext, which may cause the skill to trigger in unrelated contexts. Over-broad invocation increases the chance that sensitive source code or contract material is sent to this remote service unintentionally, especially in automated agent routing.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

The skill instructs users to install supporting skills via npx skills without pinning an exact package version or immutable reference. That creates a supply-chain risk where future package changes, dependency compromise, or typosquatted resolution could cause users or agents to fetch unexpected code or behavior.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

This unpinned npx skills installation command relies on whatever package version resolves at execution time, which is unsafe for a security-sensitive agent workflow. If the upstream package or dependency chain changes maliciously or unexpectedly, agents may install altered setup logic that redirects credentials or tool traffic.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

The install example uses npx skills without a fixed version, exposing consumers to non-deterministic code retrieval from the package registry. In an agent ecosystem, that increases the chance of silent compromise through upstream package takeover or a malicious update affecting setup behavior.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

A second unpinned install command repeats the same supply-chain weakness and normalizes insecure installation practices. Because this skill is meant to bootstrap access to remote tooling and account setup, a compromised installer could alter endpoints, schemas, or credential-handling paths.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding

The reference section again points to an unversioned npx skills install, extending the same supply-chain exposure into the documentation footer. Repetition across the skill increases the likelihood that users follow the unsafe path and execute unreviewed remote package code.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding

This unpinned setup command can pull the latest package contents at runtime, making the resulting agent environment unpredictable and vulnerable to registry or dependency compromise. Since the command is for account/MCP setup, compromise could affect authentication or routing to remote services.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
- What AgentPMT is: ../what-is-agentpmt (ClawHub: `what-is-agentpmt`, page: https://clawhub.ai/agentpmt/what-is-agentpmt; skills.sh: `npx skills add AgentPMT/agent-skills --skill what-is-agentpmt`)
- AgentPMT account MCP/REST setup: ../agentpmt-account-mcp-rest-api-setup (ClawHub: `agentpmt-account-mcp-rest-api-setup`, page: https://clawhub.ai/agentpmt/agentpmt-account-mcp-rest-api-setup; skills.sh: `npx skills add AgentPMT/agent-skills --skill agentpmt-account-mcp-rest-api-setup`)
- Marketplace product: https://www.agentpmt.com/marketplace/lean-proof-to-solidity-smart-contract-generator
- AgentPMT main MCP server: https://api.agentpmt.com/mcp/
- AgentPMT REST invoke endpoint: https://api.agentpmt.com/products/purchase

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
- What AgentPMT is: ../what-is-agentpmt (ClawHub: `what-is-agentpmt`, page: https://clawhub.ai/agentpmt/what-is-agentpmt; skills.sh: `npx skills add AgentPMT/agent-skills --skill what-is-agentpmt`)
- AgentPMT account MCP/REST setup: ../agentpmt-account-mcp-rest-api-setup (ClawHub: `agentpmt-account-mcp-rest-api-setup`, page: https://clawhub.ai/agentpmt/agentpmt-account-mcp-rest-api-setup; skills.sh: `npx skills add AgentPMT/agent-skills --skill agentpmt-account-mcp-rest-api-setup`)
- Marketplace product: https://www.agentpmt.com/marketplace/lean-proof-to-solidity-smart-contract-generator
- AgentPMT main MCP server: https://api.agentpmt.com/mcp/
- AgentPMT REST invoke endpoint: https://api.agentpmt.com/products/purchase

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest description focuses on fetching Lean templates, validating Lean IR, generating Solidity, and compiling Solidity to ABI/bytecode. This schema additionally defines encode_call and evm_simulation actions for constructing calldata and executing offline EVM simulations, which are distinct blockchain interaction/testing capabilities not described in the manifest summary.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Documenting a fromPrivateKeyHex parameter without strong warnings or safer alternatives normalizes direct submission of raw private keys into a remote tool workflow. This increases the risk that agents or users will expose wallet secrets to logs, third-party services, prompt history, or unintended retention, which can lead to irreversible asset theft if real keys are used.

Content

No source excerpt is available for this finding.