Back to skill

Security audit

1inch

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate 1inch DEX helper, but it needs review because it prepares financial transaction data while mishandling chain selection and token approval checks.

Review this before installing or using it with real funds. Treat it as a transaction-data helper only: do not sign returned swap or approval transactions unless your wallet or separate code verifies the chain, router contract, token addresses, amount, spender, slippage, and calldata. Be aware that your 1inch API key, wallet address, token selections, and trade amounts are sent to 1inch.

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

T09 · Insecure Skill Coding Practices

Error
Location
oneinch_client.py:117
Finding

Chain Identifier Is Discarded When Generating Quotes and Swap Transactions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
oneinch_swap.py:114
Finding

Approval Check Always Recommends Token Approval Without Inspecting Existing Allowance

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (10)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill explicitly advertises token swap functionality, which can lead to irreversible on-chain transactions and financial loss, but it does not warn users about these consequences. In a crypto-trading context, omission of transactional risk messaging can mislead users into treating swap operations as low-risk data queries rather than actions that may spend assets, incur gas fees, and be impossible to reverse.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The swap usage example shows passing a wallet address and receiving transaction data without warning that this data may be used to execute an asset transfer on-chain. This is dangerous because users or downstream agents may copy the example into automated workflows and unintentionally generate or submit transactions that expose addresses, spend funds, and incur irreversible losses if parameters are wrong or maliciously altered.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains its module description entirely in Chinese and continues that choice throughout docstrings and printed user-facing output. Per the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not present here.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 14)May include surrounding context.

md
class OneInchClient:
    """1inch API 客户端"""
    
    BASE_URL = "https://api.1inch.dev/swap/v5.2"
    
    def __init__(self, api_key: str):
        """

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · oneinch_client.py (reported line 39)May include surrounding context.

python
class OneInchClient:
    """1inch API 客户端"""
    
    BASE_URL = "https://api.1inch.dev/swap/v5.2"
    
    def __init__(self, api_key: str):
        """

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The module and method documentation are presented in Chinese throughout, which imposes a specific language on users without any visible opt-in or explanation that the skill is intended only for a Chinese-language environment. This matches the policy category for language or locale constraints expressed in natural language.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code performs a network request to the 1inch swap endpoint using parameters that include the user's wallet address, token selections, and amount. Although the docstring describes functionality, it does not clearly warn that invoking this method sends user trading data off-host to an external service.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The method is named and documented as checking whether token approval is needed, but it always returns needs_approval=True without verifying current allowance on-chain. This can cause unnecessary approval transactions and may train downstream consumers to approve blindly, increasing the chance of excessive token allowances being granted to a spender.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

All user-facing natural-language documentation in this file is in Chinese, and the skill does not indicate that the language is optional, user-selectable, or required for a region-specific purpose. Per the policy, forcing a specific language without user opt-in can constitute a locale/language policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The docstring for swap() documents a return structure containing a top-level 'tx' object, but the actual code builds swap_data with the key 'transaction' instead. This is an active contradiction in the API contract documentation, not merely an omission, and could mislead callers about how to use the returned transaction payload.

Content

No source excerpt is available for this finding.