Back to skill

Security audit

K3 Blockhain Agent Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for K3 blockchain automation, but it gives agents authority to deploy and manually run workflows that can trade, transfer tokens, or write contracts without a mandatory user approval checkpoint.

Review this skill carefully before installing. It is not deceptive or locally executable, but it can guide an agent to create persistent K3 automations that send data to third parties and perform blockchain actions. Require an explicit final review before deployment, use testnet or limited-fund wallets for any trading or contract-writing workflow, verify recipients and webhook/API destinations, protect API keys and bot tokens, and make sure scheduled workflows can be paused or revoked.

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:151
Finding
Transaction-capable workflows can be deployed and executed without a mandatory final approval gate<![CDATA[ ## Vulnerability Details **File Locations**: - `SKILL.md:151-176` - `references/workflow-patterns.md:130-143` **Vulnerability Type**: Missing authorization boundary for financial and state-changing operations **Risk Level**: High ### Vulnerable Instructions `SKILL.md:151-176`: ```text Now give the K3 orchestrator everything it needs. Use `generateWorkflow()` with a detailed prompt that includes: - **Trigger type and schedule** (e.g., "runs daily" or "triggers on wallet activity") - **Data source and how to query it** (e.g., "use Read Graph to query pool X" or "use Read Smart Contract to get the pair's reserves") - **What the AI should analyze** (e.g., "highlight TVL changes over 5%") - **Any actions to take** (e.g., "execute a swap on Uniswap if condition is met") - **How to deliver results** (e.g., "send Telegram alert" or "email the report") - **Any MCP integration IDs** the orchestrator needs (from team integrations) Set `deployWorkflow: false` on the first call so you can review before deploying. The orchestrator will likely ask follow-up questions — answer them using `editGeneratedWorkflow()` with the same `generatedWorkflowId`. This back-and-forth is normal; expect 2-4 rounds. Once the configuration looks correct, call `editGeneratedWorkflow()` one final time with `deployWorkflow: true`. For the full list of available functions, triggers, AI models, and output options, read `references/node-types.md`. ## Step 4: Deploy and Verify After deploying: 1. **Run it manually** with `executeWorkflow()` to trigger an immediate test ``` `references/workflow-patterns.md:130-143`: ```text ## Pattern 7: Automated Trading / Action Analyzes data and then takes an on-chain action based on the analysis. [Scheduled / Event] → [Read data] → [AI Conditional] → [Uniswap / Token Transfer / Write Smart Contract] **When to use**: "Swap when price hits X", "Rebalance my portfolio weekly", "Auto-transfer tokens when conditions are met" **Example**: Sched ...[truncated 4007 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Require explicit approval before deployment** - Present the final generated workflow to the user. - Require an affirmative confirmation after displaying all state-changing nodes. - Treat edits after confirmation as invalidating the approval. 2. **Require a separate approval before first financial execution** - Do not automatically call `executeWorkflow()` on workflows containing swaps, transfers, approvals, exchange trades, or contract writes. - Require a second confirmation immediately before the first state-changing run. - Clearly state that the test can spend funds or alter on-chain state. 3. **Provide a complete transaction preview** - Display chain ID, wallet, recipient, contract, function, calldata summary, asset, maximum amount, allowance, slippage, fees, schedule, and trigger conditions. - Distinguish read-only nodes from state-changing nodes. 4. **Default to simulation** - Run read-only nodes and transaction simulations first. - Verify expected balance changes, contract calls, revert behavior, and estimated fees. - Do not interpret successful workflow deployment as proof that a transaction is safe. 5. **Enforce hard policy controls** - Apply maximum per-transaction and cumulative spending limits. - Use destination and contract allowlists. - Set bounded token allowances rather than unlimited approvals. - Enforce maximum slippage and fee limits. - Limit execution frequency and add cooldown periods. 6. **Avoid AI-only authorization** - Do not permit an AI Conditional node by itself to authorize a financial operation. - Use deterministic, validated conditions for execution. - Treat external API, scraped web content, MCP responses, and AI output as untrusted data. 7. **Add operational safeguards** - Start transaction-capable workflows in a paused state. - Provide an emergency pause mechanism. - Notify the user before and after every state-changing e ...[truncated 352 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Vague Triggers

High
Confidence
97% confidence
Finding
The trigger text is extremely broad and explicitly says to invoke the skill for a wide range of generic blockchain, crypto, DeFi, monitoring, and automation phrases, including vague requests like 'monitor this wallet' or 'track this token.' That creates a real risk of over-invocation, causing the agent to enter a workflow-building/deployment path in conversations where the user did not clearly consent to using K3 or to performing potentially external actions.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The skill guides the agent to generate, deploy, execute, and verify workflows that can send notifications and even perform on-chain actions such as swaps or contract writes, but it does not require a prominent user-facing warning or explicit confirmation before side effects occur. In this context, silent progression from planning to deployment/execution can lead to unintended external messages, scheduled automations, or blockchain transactions with financial consequences.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
This reference documents trading, token transfer, and smart-contract write capabilities without explicit warnings that these actions can move assets, incur irreversible on-chain transactions, and cause direct financial loss if configured incorrectly or triggered by untrusted inputs. In a workflow-building skill aimed at automation, normalizing these capabilities without strong guardrails increases the chance that users or downstream agents will compose unsafe automations that execute real asset-moving actions.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The web scraping workflow pattern encourages automated extraction from websites without any guidance on respecting site terms of service, robots directives, rate limits, privacy constraints, or downstream handling of scraped content. In a blockchain/DeFi monitoring skill, users may target governance forums, protocol sites, or other third-party services at scale, creating legal, privacy, and operational abuse risks that the pattern currently normalizes.

Missing User Warnings

Low
Confidence
87% confidence
Finding
The file describes external API writes, storage, email/Telegram/Slack delivery, and MCP integrations that transmit data and use credentials, but it does not warn about data leakage, secret handling, or the trust boundary created by third-party services. Because this skill is specifically designed to orchestrate cross-service blockchain workflows, users may send wallet data, prompts, reports, or credentials to external systems without understanding the privacy and security implications.

Missing User Warnings

Low
Confidence
83% confidence
Finding
This markdown file advises users to add API keys in headers and later to verify a Telegram bot token, but it does not include any warning about protecting secrets, avoiding accidental exposure, or using secure storage. Because markdown files should warn about behaviors that could affect privacy or system integrity, the omission is a minor safety disclosure gap.

Missing User Warnings

Low
Confidence
80% confidence
Finding
The section explains how to restore outbound notifications through email, Telegram, and webhooks, which can transmit workflow data to third-party services. The document does not warn users to verify recipients, review payload contents, or consider privacy implications before sending notifications.

Static analysis

No suspicious patterns detected.