Back to skill

Security audit

Baoyu Infographic

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent infographic generator, but one fallback path can execute an arbitrary local wrapper or an unpinned package at runtime.

Install only if you are comfortable reviewing or avoiding the codex-imagegen fallback. Prefer a trusted native image backend or preinstalled Bun, do not set BAOYU_CODEX_IMAGEGEN_BIN to untrusted files, and avoid giving sensitive source documents or reference images unless you trust the selected image backend and local output storage.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T08 · Insecure Dependencies

Warning
Location
references/codex-imagegen.md:41
Finding

Unpinned Package Download and Execution Through npx

Content
View full analysis
/main.ts ...` works as a fallback. ``` ### Technical Analysis The fallback instructs the Agent to use `npx -y` to retrieve and execute the registry-resolved `bun` package. No package version, integrity hash, trusted registry, or lockfile is specified. The `-y` option also suppresses the normal installation confirmation. This creates a supply-chain execution boundary: the code executed during an audited Skill run is not fully represented by the reviewed project and can change after the audit. A compromised package release, registry account, dependency, DNS/proxy path, or registry configuration could cause arbitrary third-party code to execute. The issue applies only when the Codex wrapper fallback is selected and Bun is not already installed. ### Attack Path 1. An attacker compromises or replaces the registry-resolved `bun` package, one of its installation components, or the configured npm registry. 2. A user requests infographic generation in a runtime without a native image-generation tool. 3. The Skill selects the `codex-imagegen` wrapper path. 4. The preferred `baoyu-image-gen` path is unavailable, so the direct wrapper fallback is used. 5. The runtime does not have a trusted Bun executable installed. 6. Following the documented fallback, the Agent runs `npx -y bun /main.ts ...`. 7. `npx` downloads and executes registry-supplied code without interactive approval. 8. The supplied code runs with the privileges, environment, filesystem access, and network access of the Agent process. ### Impact Assessment Successful exploitation permits arbitrary code execution under the Agent user's account. Depending on the surrounding runtime permissions, the malicious dependency could: - Read or modify files accessible to the ...[truncated 464 chars]
Remediation
View remediation

T07 · Tool Hijacking and Spoofing

Warning
Location
references/codex-imagegen.md:24
Finding

Environment-Controlled Executable Path Can Hijack Image Generation

Content
View full analysis
`) or `.sh`/binary (spawn directly). 2. **Search the plugin root**: walk up from this skill's directory looking for `packages/baoyu-codex-imagegen/src/main.ts`. If found, that is the wrapper. Spawn it with `bun`. 3. **Last resort**: tell the user that `codex-imagegen` is not available in this runtime and ask whether to install the `baoyu-skills` plugin (or set `BAOYU_CODEX_IMAGEGEN_BIN`) or pick another backend. Once located, the invocation shape is: ``` The resulting invocation is: ```bash bun /main.ts \ --image \ --prompt-file \ --aspect \ [--ref ]... \ [--timeout ] \ [--cache-dir ~/.cache/baoyu-codex-imagegen] \ [--log-file ] ``` ### Technical Analysis The Skill treats `BAOYU_CODEX_IMAGEGEN_BIN` as an authoritative executable-path override. The only stated validation is that the supplied path points to a real file. It does not require: - A trusted or allowlisted directory. - Canonical-path validation. - Trusted ownership or safe permissions. - A known executable or script type. - A cryptographic hash or signature. - Explicit confirmation of the resolved executable. - Rejection of symlinks or files writable by untrusted users. A `.sh` file or binary is spawned directly, while a `.ts` file is executed through Bun. Therefore, any party capable of influencing the Agent's environment can redirect a legitimate image-generation operation to attacker-controlled local code. This is a conditional hijacking risk rather than evidence of malicious intent in the project itself. Exploitation require ...[truncated 1681 chars]
Remediation
View remediation
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (20)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
- Treat explicit skill invocation, a file path, a matched keyword shortcut, `EXTEND.md` defaults, and the documented default combination as **recommendation inputs only**. None of them authorizes skipping confirmation.
- Do **not** start Step 5 or Step 6 until the user confirms the combination/aspect/language/backend choices.
- Skip confirmation only when the current request explicitly says to do so, for example: `--no-confirm`, "直接生成", "不用确认", "跳过确认", "按默认出图", or equivalent wording.
- If confirmation is skipped explicitly, state the assumed combination/aspect/language/backend in the next user-facing update before generating.

## Options

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
- Treat explicit skill invocation, a file path, a matched keyword shortcut, `EXTEND.md` defaults, and the documented default combination as **recommendation inputs only**. None of them authorizes skipping confirmation.
- Do **not** start Step 5 or Step 6 until the user confirms the combination/aspect/language/backend choices.
- Skip confirmation only when the current request explicitly says to do so, for example: `--no-confirm`, "直接生成", "不用确认", "跳过确认", "按默认出图", or equivalent wording.
- If confirmation is skipped explicitly, state the assumed combination/aspect/language/backend in the next user-facing update before generating.

## Options

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
- Treat explicit skill invocation, a file path, a matched keyword shortcut, `EXTEND.md` defaults, and the documented default combination as **recommendation inputs only**. None of them authorizes skipping confirmation.
- Do **not** start Step 5 or Step 6 until the user confirms the combination/aspect/language/backend choices.
- Skip confirmation only when the current request explicitly says to do so, for example: `--no-confirm`, "直接生成", "不用确认", "跳过确认", "按默认出图", or equivalent wording.
- If confirmation is skipped explicitly, state the assumed combination/aspect/language/backend in the next user-facing update before generating.

## Options

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| Not found | Ask the user with `AskUserQuestion` (see `references/config/first-time-setup.md`) |

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill advertises very broad trigger phrases such as "infographic", "visual summary", and "可视化" without tighter exclusion criteria. That can cause the skill to activate on ordinary requests where users did not intend image generation, increasing the chance of unintended file creation, prompt construction, and backend/tool invocation.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% 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.

Content

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

md
- Treat explicit skill invocation, a file path, a matched keyword shortcut, `EXTEND.md` defaults, and the documented default combination as **recommendation inputs only**. None of them authorizes skipping confirmation.
- Do **not** start Step 5 or Step 6 until the user confirms the combination/aspect/language/backend choices.
- Skip confirmation only when the current request explicitly says to do so, for example: `--no-confirm`, "直接生成", "不用确认", "跳过确认", "按默认出图", or equivalent wording.
- If confirmation is skipped explicitly, state the assumed combination/aspect/language/backend in the next user-facing update before generating.

## Options

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
65% 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.

Content

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

md
- Treat explicit skill invocation, a file path, a matched keyword shortcut, `EXTEND.md` defaults, and the documented default combination as **recommendation inputs only**. None of them authorizes skipping confirmation.
- Do **not** start Step 5 or Step 6 until the user confirms the combination/aspect/language/backend choices.
- Skip confirmation only when the current request explicitly says to do so, for example: `--no-confirm`, "直接生成", "不用确认", "跳过确认", "按默认出图", or equivalent wording.
- If confirmation is skipped explicitly, state the assumed combination/aspect/language/backend in the next user-facing update before generating.

## Options

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
65% 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.

Content

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

md
- Treat explicit skill invocation, a file path, a matched keyword shortcut, `EXTEND.md` defaults, and the documented default combination as **recommendation inputs only**. None of them authorizes skipping confirmation.
- Do **not** start Step 5 or Step 6 until the user confirms the combination/aspect/language/backend choices.
- Skip confirmation only when the current request explicitly says to do so, for example: `--no-confirm`, "直接生成", "不用确认", "跳过确认", "按默认出图", or equivalent wording.
- If confirmation is skipped explicitly, state the assumed combination/aspect/language/backend in the next user-facing update before generating.

## Options

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
65% 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.

Content

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

md
- Treat explicit skill invocation, a file path, a matched keyword shortcut, `EXTEND.md` defaults, and the documented default combination as **recommendation inputs only**. None of them authorizes skipping confirmation.
- Do **not** start Step 5 or Step 6 until the user confirms the combination/aspect/language/backend choices.
- Skip confirmation only when the current request explicitly says to do so, for example: `--no-confirm`, "直接生成", "不用确认", "跳过确认", "按默认出图", or equivalent wording.
- If confirmation is skipped explicitly, state the assumed combination/aspect/language/backend in the next user-facing update before generating.

## Options

Autonomous Decision Making

Medium
Category
Excessive Agency
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.

Content

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

md
| `--style` | 22 options (see Style Gallery), default: craft-handmade |
| `--aspect` | Named: landscape (16:9), portrait (9:16), square (1:1). Custom: any W:H ratio (e.g., 3:4, 4:3, 2.35:1) |
| `--lang` | en, zh, ja, etc. |
| `--no-confirm` | Skip Step 4 only when the user explicitly requests direct generation without confirmation |
| `--ref <files...>` | Reference images (file paths) for style / palette / composition / subject guidance |

## Layout Gallery (21)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
78% confidence
Finding

The confirmation flow only asks about language when the source and user language differ, so in many cases the skill silently defaults to the inferred or confirmed language. This can lead to outputs in an unintended language, which is mainly a correctness and user-consent issue rather than a direct security compromise.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

Using npx -y bun fetches and executes a package at runtime without pinning a specific version or integrity, which creates a supply-chain risk. If the resolved package version is malicious or compromised, an agent following this guidance could execute attacker-controlled code on the host.

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/config/first-time-setup.md (reported line 32)May include surrounding context.

md
│
        ▼
┌─────────────────────┐
│ Create EXTEND.md    │
└─────────────────────┘
        │
        ▼

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The example subtitle is specified as Chinese text ("X大维度全面解析...") with no indication that language choice is optional. This can violate language/locale policy because it implicitly constrains outputs to a specific language without user opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The prompt includes a required language parameter and later mandates that all text use that specified language. This is a natural-language locale constraint, and the file does not state that the user chooses or opts into the language, nor does it document a region-specific justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This line requires all text content to use a predefined language, which can violate language/locale policy when not presented as a user-controlled preference. No nearby text explains that the language setting is user-driven or that alternative locales are supported.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file includes a concrete example setting language: zh, which can normalize a fixed-language configuration without any nearby note that language choice should be user-selected or justified by region-specific scope. Under the natural-language policy rule, forcing or presuming a specific language without opt-in is a potential locale-policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The full example again sets language: zh and does not mention that the language should reflect user preference or explicit regional requirements. Repeating a fixed locale in examples can be interpreted as a default language policy rather than an optional user-controlled setting.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file states that decorative English text is acceptable for stylistic labels such as "WARNING," "INFO," and "BEST." This is a natural-language locale preference that can force English into outputs without indicating user choice or opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

This markdown file includes the Chinese phrase "干货" in the descriptive guidance, while the rest of the file is written in English and only partially documents language behavior elsewhere. Because SQP-3 applies to natural-language policy concerns, this could create ambiguity about expected language/locale without an explicit opt-in or justification.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.