Back to skill

Security audit

Skywork Design

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says, but its API-key setup and externally hosted image output need review before installation.

Review this skill before installing if you may use it with sensitive prompts, private reference images, or paid Skywork credentials. Use a secret manager or tightly permissioned config for SKYWORK_API_KEY, do not print the key or credential-bearing config, rotate the key if exposed, and assume generated images or input references may be processed by Skywork and returned through an externally hosted URL.

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

Warning
Location
references/apikey-fetch.md:47
Finding

API Key Exposure Through Plaintext Storage and Unsafe Verification Guidance

Content
View full analysis

Vulnerability Details

File Location: references/apikey-fetch.md:47-76
Vulnerability Type: Plaintext credential handling and secret disclosure
Risk Level: Medium

Vulnerable Code Snippet:

markdown
**Option A — shell environment**

Export the API key before running the skill:

```bash
export SKYWORK_API_KEY="your_actual_skywork_api_key_here"

To persist it across sessions, add the same line to ~/.zshrc or ~/.bashrc, then reload the shell.

Option B — Claude Code settings

Add the variable to ~/.claude/settings.json:

json
{
  "env": {
    "SKYWORK_API_KEY": "your_actual_skywork_api_key_here"
  }
}

Use the method that best matches how you run Claude Code.

4. Verify Configuration

bash
# Check that the environment variable is available
echo "$SKYWORK_API_KEY"
text

### Technical Analysis

The setup guide recommends storing the Skywork API key in plaintext shell initialization files or a user configuration file without providing file-permission hardening guidance. It then instructs the user to print the complete credential with `echo "$SKYWORK_API_KEY"`.

Printing the secret is unnecessary for determining whether the variable is configured and violates least-disclosure principles. The complete key may be captured by terminal transcripts, shell-session recording, CI/CD logs, agent execution logs, screen sharing, screenshots, or copied diagnostic output. Plaintext persistence also makes the key accessible to any process or user able to read the relevant configuration file.

This finding is limited to insecure credential-handling documentation. The application code itself sends the key only as an HTTPS bearer token to the fixed Skywork API endpoint, which is necessary for the declared image-generation functionality.

### Attack Path

1. A user follows the documented setup procedure and places a valid API key in a shell startup file or `~/.claude/
...[truncated 1140 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the command that displays the full credential. Verify only whether the variable exists:

    bash
    if test -n "${SKYWORK_API_KEY:-}"; then
      echo "SKYWORK_API_KEY is configured"
    else
      echo "SKYWORK_API_KEY is not configured"
    fi
    
  2. If partial identification is operationally necessary, display only a short masked suffix and never log the complete value.

  3. Prefer runtime secret injection through the platform's credential store or a dedicated operating-system secret manager instead of persistent plaintext storage.

  4. If file-based storage is unavoidable, document restrictive permissions:

    bash
    chmod 600 ~/.claude/settings.json
    chmod 600 ~/.openclaw/openclaw.json
    
  5. Warn users not to commit credential-bearing files, paste them into support requests, expose them in screenshots, or run secret-display commands in recorded or shared terminals.

  6. Recommend immediate key revocation and rotation whenever accidental disclosure is suspected.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (13)

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · SKILL.md (reported line 90)May include surrounding context.

md
Examples:
- "A serene Japanese garden" → `2026-03-10-14-23-05-japanese-garden.png`
- "sunset over mountains" → `2026-03-10-15-30-12-sunset-mountains.png`
- Unclear context → `2026-03-10-17-12-48-x9k2.png`

## Preflight

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · references/apikey-fetch.md (reported line 60)May include surrounding context.

Option B — Claude Code settings

Add the variable to ~/.claude/settings.json:

json
{

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · references/apikey-fetch.md (reported line 94)May include surrounding context.

Option B — Claude Code settings

Add the variable to ~/.claude/settings.json:

json
{

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · references/apikey-fetch.md (reported line 99)May include surrounding context.

Option B — Claude Code settings

Add the variable to ~/.claude/settings.json:

json
{

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill invokes a Python script that uses an API key, reads local image files, and communicates with a backend service, but it does not declare any explicit tool scope or allowed-tools restrictions. This weakens least-privilege controls and makes it harder for the host to constrain or review the skill's actual capabilities, increasing the risk of unintended file access, secret use, or network exfiltration.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly instructs the agent to return an externally hosted OSS URL for generated images, but provides no privacy notice or consent check. Generated or edited images may contain sensitive user content, and publishing or sharing a third-party hosted URL can expose that content beyond the local environment and create unintended retention or access risks.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

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.

Content

Scanner excerpt · references/apikey-fetch.md (reported line 15)May include surrounding context.

md
- Log in with your Skywork account
- Open account / Settings / API Key (**https://skywork.ai/?openApiKeySetting=1**)
- Create or copy your **API key**

If your organization uses a separate console or test environment, use the URL and credentials your team provides.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The guide tells users to place a live API key into shell startup files and JSON config files, and to print it with echo, but does not warn about exposure through shell history, shoulder-surfing, logs, screenshots, backups, or permissive file permissions. This is a real credential-handling weakness because it normalizes insecure secret storage and display practices, increasing the chance of accidental leakage.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list includes several generic commerce-related terms such as "amazon," "e-commerce," and "shopify" that are likely to appear in ordinary user requests. This can cause the skill to activate when the user did not explicitly intend to invoke product-image generation guidance, leading to unintended tool behavior, prompt hijacking opportunities through ambient context, or interference with more appropriate skills.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list includes generic terms such as "chart," "diagram," and "statistics," which are common in normal user conversations and can cause the skill to activate when the user did not specifically intend to invoke infographic generation. Over-broad activation can route unrelated requests into this skill, leading to unintended tool use, confusing outputs, or mishandling of user intent across agent workflows.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger list uses short generic phrases like "logo" and "icon design" without constraints or examples of when the skill should or should not activate. In a markdown skill description, this can cause unintended invocation for ordinary conversation or broader design tasks that are not clearly scoped to this skill.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list contains broad terms like "promotional," "marketing," and "advertising" that can match many general-purpose branding or business requests, causing this skill to activate outside narrowly intended poster-design scenarios. Overbroad invocation increases the chance of inappropriate routing, prompt confusion, or accidental use of image-generation behaviors when another skill would be more appropriate.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger list includes many broad, high-frequency terms such as "post," "story," "banner," and platform names, which can cause the skill to activate for generic social-media discussions rather than explicit image-generation requests. In an agent setting, this increases the chance of unintended invocation, misrouting user intent, and unnecessary exposure of downstream image-editing capabilities or external API use.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.