T09 · Insecure Skill Coding Practices
- 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: HighVulnerable 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_callaction 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-259warns 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
- Remove
fromPrivateKeyHexfrom the remotely callable action schema. - Use
fromAliasor a public sender address for offline EVM simulation. - If transaction signing is ever required, perform signing locally through a wallet provider or hardware wallet and transmit only the signed transaction.
- Add server-side validation that rejects private keys, mnemonics, and other signing secrets even if submitted through unstructured fields.
- Apply secret detection and redaction before requests enter logs, traces, error reports, analytics systems, or persistent task records.
- Update the documentation to state explicitly that raw private keys must never be sent to AgentPMT or any remote tool.
- Review historical service logs and task records for key-like values and establish an incident-response process for any discovered exposure.
- Remove
