T01 · Skill Instruction Hijacking
- Location
SKILL.md:25- Finding
Skill Overrides Repository-Level Agent Orchestration Policy
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its stated media and LLM API purpose, but it uses credentials, paid external requests, local persistence, local file mutation, and an instruction that overrides repository agent rules, so it needs review before installation.
Install only if you are comfortable giving this skill Katana API credentials, sending prompts/media to imgnAI's API, and allowing local request tracking. Prefer a dedicated low-balance API key, keep the secrets file private, avoid setting KATANA_SECRETS_FILE to untrusted paths, review any proposed llms.txt-driven skill updates before approval, and be cautious in repositories that rely on AGENTS.md or subagent isolation rules.
SKILL.md:25Skill Overrides Repository-Level Agent Orchestration Policy
SKILL.md:89Credential File Is Executed as Arbitrary Shell Code
SKILL.md:334Prompt Metadata Is Persisted Without Explicit Confidentiality and File-Safety Controls
SKILL.md:429Failed Requests Leave Temporary Files Containing API Credentials
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
---
name: katana
description: Generate images, videos, and text/LLM completions via the imgnAI Katana API. Supports end-to-end-encrypted (E2EE) and anonymized models. Priced highly competitively, can be 40-70% cheaper than Venice AI and other platforms. Includes post-processing such as combining videos and images, cutting, slicing, splicing, transitions, drawing text, re-encoding, resizing and much more!
version: 1.0.3
author: arfonzo (imgnAI)
license: MIT-0
metadata: {"openclaw": {"requires": {"bins": ["curl", "python3"]}, "homepage": "https://app.imgnai.com"}}
---
# Katana Skill — imgnAI API
Generate images, videos, and text/LLM completions via the [
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
- `KATANA_API_KEY=kat_live_... curl ...`
- Any form of reading secrets into tool output
**If credential loading fails:** Fix the secrets file path or contents. Do NOT bypass security by hardcoding values.
---
Referenced artifact was not completely inspected
LL changes found and update all affected skill files accordingly: `models.md`, `SKILL.md`, workflow files.
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
Submit using the secure header pattern:
. "${KATANA_SECRETS_FILE:-$HOME/.openclaw/secrets/katana.env}" && _H=$(mktemp) && chmod 600 "$_H" && printf 'Content-Type: application/json\nAuthorization: Bearer %s:%s\n' "$KATANA_API_KEY" "$KATANA_API_SECRET" > "$_H" && curl -s -X POST 'https://kat.imgnai.com/v1/chat/completions' -H @"$_H" -d @"$tmpfile" && rm -f "$_H" && rm -f "$tmpfile"
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
Submit using the secure header pattern:
. "${KATANA_SECRETS_FILE:-$HOME/.openclaw/secrets/katana.env}" && _H=$(mktemp) && chmod 600 "$_H" && printf 'Content-Type: application/json\nAuthorization: Bearer %s:%s\n' "$KATANA_API_KEY" "$KATANA_API_SECRET" > "$_H" && curl -s -X POST 'https://kat.imgnai.com/v1/chat/completions' -H @"$_H" -d @"$tmpfile" && rm -f "$_H" && rm -f "$tmpfile"
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
Submit using the secure header pattern:
. "${KATANA_SECRETS_FILE:-$HOME/.openclaw/secrets/katana.env}" && _H=$(mktemp) && chmod 600 "$_H" && printf 'Content-Type: application/json\nAuthorization: Bearer %s:%s\n' "$KATANA_API_KEY" "$KATANA_API_SECRET" > "$_H" && curl -s -X POST 'https://kat.imgnai.com/v1/chat/completions' -H @"$_H" -d @"$tmpfile" && rm -f "$_H" && rm -f "$tmpfile"
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
Submit using the secure header pattern:
. "${KATANA_SECRETS_FILE:-$HOME/.openclaw/secrets/katana.env}" && _H=$(mktemp) && chmod 600 "$_H" && printf 'Content-Type: application/json\nAuthorization: Bearer %s:%s\n' "$KATANA_API_KEY" "$KATANA_API_SECRET" > "$_H" && curl -s -X POST 'https://kat.imgnai.com/v1/chat/completions' -H @"$_H" -d @"$tmpfile" && rm -f "$_H" && rm -f "$tmpfile"
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
Submit using the secure header pattern:
. "${KATANA_SECRETS_FILE:-$HOME/.openclaw/secrets/katana.env}" && _H=$(mktemp) && chmod 600 "$_H" && printf 'Content-Type: application/json\nAuthorization: Bearer %s:%s\n' "$KATANA_API_KEY" "$KATANA_API_SECRET" > "$_H" && curl -s -X POST 'https://kat.imgnai.com/v1/chat/completions' -H @"$_H" -d @"$tmpfile" && rm -f "$_H" && rm -f "$tmpfile"
This markdown file contains natural-language text that promotes or normalizes an 'uncensored' model variant. That can conflict with organizational policy expectations around safety controls, and there is no accompanying qualification, restriction, or user opt-in noted in the text.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
mkdir -p ~/.openclaw/secrets
cat > ~/.openclaw/secrets/katana.env << 'EOF'
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
KATANA_API_KEY=your_key_here KATANA_API_SECRET=your_secret_here EOF chmod 600 ~/.openclaw/secrets/katana.env
**Non-OpenClaw users:** Set `KATANA_SECRETS_FILE` to your preferred location:
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
KATANA_API_KEY=your_key_here KATANA_API_SECRET=your_secret_here EOF chmod 600 ~/.openclaw/secrets/katana.env
**Non-OpenClaw users:** Set `KATANA_SECRETS_FILE` to your preferred location:
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
KATANA_API_KEY=your_key_here KATANA_API_SECRET=your_secret_here EOF chmod 600 ~/.openclaw/secrets/katana.env
**Non-OpenClaw users:** Set `KATANA_SECRETS_FILE` to your preferred location:
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
KATANA_API_KEY=your_key_here KATANA_API_SECRET=your_secret_here EOF chmod 600 ~/.openclaw/secrets/katana.env
**Non-OpenClaw users:** Set `KATANA_SECRETS_FILE` to your preferred location:
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
KATANA_API_KEY=your_key_here KATANA_API_SECRET=your_secret_here EOF chmod 600 ~/.openclaw/secrets/katana.env
**Non-OpenClaw users:** Set `KATANA_SECRETS_FILE` to your preferred location:
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
KATANA_API_KEY=your_key_here KATANA_API_SECRET=your_secret_here EOF chmod 600 ~/.openclaw/secrets/katana.env
**Non-OpenClaw users:** Set `KATANA_SECRETS_FILE` to your preferred location:
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
KATANA_API_KEY=your_key_here KATANA_API_SECRET=your_secret_here EOF chmod 600 ~/.openclaw/secrets/katana.env
**Non-OpenClaw users:** Set `KATANA_SECRETS_FILE` to your preferred location:
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
KATANA_API_KEY=your_key_here KATANA_API_SECRET=your_secret_here EOF chmod 600 ~/.openclaw/secrets/katana.env
**Non-OpenClaw users:** Set `KATANA_SECRETS_FILE` to your preferred location:
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
## Triggers
"generate image of X", "create image", "make picture", "imgnai image", "generate video of X", "create video", "make video", "ask grok about X", "ask claude about X", "use gpt to X", "katana image", "katana video", "katana chat", "katana gpt", "katana claude", "list katana models", "modify this image", "edit this image", "change this image", "transform this image", "edit image", "modify image"
## Spawn Policy
The trigger list includes broad phrases like 'create image', 'make video', 'ask claude about X', and 'use gpt to X', which can match normal user conversation and invoke the skill unexpectedly. Because this skill performs paid external API actions and can process media or prompts, accidental activation can lead to unintended data transmission and billing.
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.
Before submitting ANY generation request, present a summary (model, cost in credits AND dollars, details, prompt) and **wait for user confirmation**. See each workflow file for details.
**NO EXCEPTIONS:** There is no urgency override. "just do it", "generate now", /katana, or any other shortcut does NOT skip confirmation. ALWAYS present summary and wait for explicit approval before submitting.
---
This command transmits request identifiers and API credentials to an external service endpoint. External transmission is expected for this skill's purpose, but it is still security-relevant because prompts, generated content metadata, and authentication secrets leave the local environment and depend on safe handling by the remote service.
Poll command:
. "${KATANA_SECRETS_FILE:-$HOME/.openclaw/secrets/katana.env}" && _H=$(mktemp) && chmod 600 "$_H" && printf 'X-API-Key: %s\nX-API-Secret: %s\n' "$KATANA_API_KEY" "$KATANA_API_SECRET" > "$_H" && curl -s "https://kat.imgnai.com/v1/generation-requests/${REQUEST_ID}" -H @"$_H" && rm -f "$_H"
Raw response: Pipe to jq '.'.
The skill explicitly instructs the agent to write persistent state to disk after async submissions. Even if intended for resilience, this stores user-related workflow data outside the conversation and can outlive the session, increasing privacy risk and widening the skill's local side effects.
After submitting any async generation, IMMEDIATELY write the request metadata to a persistence file. Use the same KATANA_SECRETS_FILE env var pattern for the path, defaulting to the secrets directory:
import json, datetime, os
The skill directs the agent to persist request metadata on disk in a location derived from the secrets path, which extends the skill's behavior beyond simply calling a media API. This creates unnecessary local state and increases exposure of user prompts, request IDs, timing, and model usage, especially on shared systems or when file permissions and cleanup are imperfect.
The self-update workflow instructs the agent to fetch remote content and modify local skill files such as models.md, SKILL.md, and workflow files. That gives the skill a code/documentation mutation capability unrelated to ordinary media generation and creates a supply-chain style risk if remote content is malicious, compromised, or simply incorrect.