Back to skill

Security audit

Onchain Verify Transaction

Security checks for vulnerabilities and agentic risk

Overview

This skill is not malicious, but it should be reviewed because it is a financial transaction safety gate with an under-specified approval check that could miss dangerous permissions.

Review this skill before relying on it for real transactions. It is suitable as a disclosed Tenderly simulation helper, but users should require stronger approval and authorization-state checks before treating a transaction as safe, especially for token approvals, Permit/Permit2, NFT operator approvals, multicalls, and proxy-mediated calls.

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

Error
Location
SKILL.md:89
Finding
Transaction verification can miss dangerous token approvals<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 89-103 **Vulnerability Type**: Incomplete authorization-state verification **Risk Level**: High ### Vulnerable Code Snippet ```markdown ### Response fields | Field | Description | | --- | --- | | `result.assetChanges` | ERC-20 token transfers: token address, from, to, amount | | `result.balanceChanges` | Native token (ETH) balance changes per address | ### Verification logic After Tenderly simulation, check the following before approving execution: 1. **Token destination** — do output tokens land in the expected recipient address? Flag any tokens going to an unexpected address. 2. **Token identity** — is the output token what was requested? Flag substitutions. 3. **Output amount** — is the output within the expected range (accounting for slippage)? Flag if materially lower than quoted. 4. **Input drain** — does the simulation drain more input token than authorized? Flag any excess. 5. **Unexpected approvals** — does the calldata grant approvals beyond what was declared? Flag unlimited or unexpected approvals. ``` ### Technical Analysis The documented verification process relies on `result.assetChanges` and `result.balanceChanges`. These fields describe immediate ERC-20 transfers and native-token balance changes, but the skill does not specify any mechanism for examining authorization-state changes. Calls such as ERC-20 `approve`, ERC-721 or ERC-1155 operator approvals, Permit/Permit2 authorizations, and approvals embedded in nested contract calls can grant future asset-transfer authority without causing an immediate balance change. Consequently, a simulation may show no unexpected asset movement even though the transaction grants an attacker or malicious contract permission to transfer assets later. Although the fifth verification rule requires the skill to detect unexpected approvals, the documented implementation provides no corresponding calldata decoder, state-difference analys ...[truncated 1596 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Decode the transaction's top-level calldata before approving execution, including known authorization methods such as: - ERC-20 `approve` - ERC-721 `approve` and `setApprovalForAll` - ERC-1155 `setApprovalForAll` - EIP-2612 permits - Permit2 permit and transfer authorization methods 2. Inspect the full simulation call trace for nested approvals, multicall operations, proxy calls, and `delegatecall` behavior rather than checking only the top-level method. 3. Compare pre-simulation and post-simulation authorization state, including: - Token allowance - Authorized spender - Approval amount - Operator status - Permit expiration - Nonce and signature scope 4. Compare every authorization change against explicit user intent. Require the expected token, spender, amount, authorization type, and expiration to be supplied as verification inputs. 5. Treat unlimited approvals, undeclared spenders, unexpected operator grants, and approvals broader than the requested transaction as verification failures. 6. Fail closed when the transaction cannot be decoded or when Tenderly does not return sufficient state-difference or call-trace information. Do not report that all checks passed when approval effects cannot be conclusively analyzed. 7. Present authorization changes separately from immediate asset transfers so the user can explicitly review any future spending authority being granted. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
| Arbitrum One | `42161` | `https://arbitrum.gateway.tenderly.co` |
| Polygon | `137` | `https://polygon.gateway.tenderly.co` |

If the `chainId` is not in this list, skip verification, warn the user that the chain is unsupported, and require explicit confirmation before proceeding.

> Add new entries as additional chains become supported.
Confidence
85% confidence
Finding
Skipping verification on unsupported chains creates a fail-open path in a skill whose stated purpose is to act as a pre-execution safety gate. Even with a warning and confirmation requirement, callers or users may normalize bypassing the check, allowing malicious or malformed calldata on unsupported networks to avoid the intended simulation-based review.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
TENDERLY_URL="https://base.gateway.tenderly.co"

curl -sS -X POST "$TENDERLY_URL" \
  -H "Content-Type: application/json" \
  -H "X-Access-Key: $TENDERLY_NODE_ACCESS_KEY" \
  -d '{
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
| `TENDERLY_NODE_ACCESS_KEY` not set | Warn that verification is unavailable; require explicit user confirmation before proceeding |
| `chainId` not in supported list | Warn that chain is unsupported for verification; require explicit user confirmation |
| Tenderly returns an error | Surface the error message; treat as verification failure and require confirmation |
| Rate limit hit (HTTP 429) | Warn the user; do not retry automatically; require confirmation to proceed without verification |
| Verification passes all checks | Return control to the calling skill to proceed with execution |
| Verification fails a check | Halt; surface the specific discrepancy; do not execute |
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Static analysis

No suspicious patterns detected.