Back to skill

Security audit

ojimport

Security checks for vulnerabilities and agentic risk

Overview

The skill’s purpose is coherent, but it can automatically delete, rename, compile, run, and package local Desktop files using unsafe shell commands.

Review before installing. Use this only in a controlled workspace, avoid running it on a Desktop with unrelated work_* directories, and require path validation and confirmation before any rm, mv, zip, compile, or run step. Treat imported problem text, titles, and IDs as untrusted input.

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
steps/01-init.md:62
Finding

Shell Command Injection Through Unsanitized Problem Identifiers and Paths

Content
View full analysis
/dev/null cp -r question $BASE_DIR/work_{PID} # {WORK_DIR} = $BASE_DIR/work_{PID} ``` ```bash BASE_DIR=$(detect_desktop) rm -rf $BASE_DIR/work 2>/dev/null cp -r question $BASE_DIR/work # {WORK_DIR} = $BASE_DIR/work ``` `steps/02-get-info.md:45-48`: ```bash BASE_DIR=$(detect_desktop) mv $BASE_DIR/work $BASE_DIR/work_{PID} # {WORK_DIR} = $BASE_DIR/work_{PID} ``` `steps/04-problem.md:85-100`: ```bash mv {WORK_DIR} {WORK_DIR}_{title_short} # {WORK_DIR} = {WORK_DIR}_{title_short} ``` ```bash BASE_DIR=$(detect_desktop) mv $BASE_DIR/work $BASE_DIR/work_{title_short} # {WORK_DIR} = $BASE_DIR/work_{title_short} ``` `steps/07-testdata.md:167-170, 202-212`: ```bash cd {WORK_DIR} g++ std.cpp -o std -std=c++17 g++ mkdata.cpp -o mkdata -std=c++17 ./mkdata ``` ```bash rm -f {WORK_DIR}/std {WORK_DIR}/mkdata {WORK_DIR}/*.exe zip -r {pid}_{title}.zip {WORK_DIR} ``` ```bash cd {WORK_DIR}/testdata zip testdata.zip *.in *.out config.yaml ``` `steps/contest/03-move.md:35-49, 81-106, 127-149`: ```bash BASE_DIR=$(detect_desktop) rm -rf $BASE_DIR/work_{PID} cp -r question $BASE_DIR/work_{PID} # {WORK_DIR} = $BASE_DIR/work_{PID} ``` ```bash mv {WORK_DIR} {WORK_DIR}_{title_short} # {WORK_DIR} = work_{PID}_{title_short} ``` ```bash cd {WORK_DIR} g++ std.cpp -o std -std=c++17 ``` ```bash cd {WORK_DIR} g++ -o mkdata mkdata.cpp -std=c++17 ./mkdata ``` ```bash rm -f {WORK_DIR}/std {WORK_DIR}/mkdata {WORK_DIR}/*.exe {WORK_DIR}/*.zip ``` ```bash BASE_DIR=$(detect_desktop) cd $BASE_DIR rm -f work_*/*.zip zip -r {contest_id}.zip work_*/ ``` ### ...[truncated 2802 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
steps/contest/03-move.md:144
Finding

Overbroad Desktop Cleanup and Packaging Through Global Work-Directory Globs

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (40)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

The code invokes system("rm -rf testdata/*.in testdata/*.out testdata/*.zip"), which performs destructive shell-based deletion. Even though the string is constant here, using rm -rf through a shell is hazardous because it expands scope beyond normal file API usage and can become dangerous if the working directory, path assumptions, or surrounding workflow are manipulated.

Content

Scanner excerpt · question/mkdata.cpp (reported line 6)May include surrounding context.

text
void mk_in() {
    // 创建testdata目录
    if (system("rm -rf testdata/*.in testdata/*.out testdata/*.zip") != 0) {
        cerr << "清理旧数据失败" << endl;
    }

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
96% confidence
Finding

rm -rf $BASE_DIR/work_{PID} uses an unquoted, recursively destructive command with a variable-derived path. If path resolution is wrong, unexpectedly empty, contains spaces/globs, or is influenced by environment/runtime substitution, the command may delete unintended files on the user's desktop or elsewhere, making this more dangerous in an agent skill that may execute shell commands automatically.

Content

Scanner excerpt · steps/01-init.md (reported line 64)May include surrounding context.

bash
BASE_DIR=$(detect_desktop)
rm -rf $BASE_DIR/work_{PID} 2>/dev/null
cp -r question $BASE_DIR/work_{PID}
# {WORK_DIR} = $BASE_DIR/work_{PID}

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
96% confidence
Finding

rm -rf $BASE_DIR/work has the same unsafe characteristics: recursive deletion, no quoting, and no safeguards or confirmation. Because the skill targets a common desktop location, exploitation or accidental misuse can directly destroy user files in a familiar area, and the broad local-file capability is not necessary for the core import function.

Content

Scanner excerpt · steps/01-init.md (reported line 73)May include surrounding context.

bash
BASE_DIR=$(detect_desktop)
rm -rf $BASE_DIR/work 2>/dev/null
cp -r question $BASE_DIR/work
# {WORK_DIR} = $BASE_DIR/work(后得信息后更名)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

rm -f {WORK_DIR}/std {WORK_DIR}/mkdata {WORK_DIR}/*.exe combines destructive shell behavior with an untrusted/interpolated parameter. If {WORK_DIR} contains spaces, shell metacharacters, glob-affecting content, or resolves unexpectedly, the command can target files outside the intended workspace; if empty, parts like /*.exe or relative-path expansions may become especially dangerous depending on invocation context.

Content

Scanner excerpt · steps/07-testdata.md (reported line 204)May include surrounding context.

bash
# 打包整个工作目录(含题面、标程、配置、测试数据)
rm -f {WORK_DIR}/std {WORK_DIR}/mkdata {WORK_DIR}/*.exe
zip -r {pid}_{title}.zip {WORK_DIR}

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
96% confidence
Finding

The command rm -f {WORK_DIR}/std {WORK_DIR}/mkdata {WORK_DIR}/*.exe performs file deletion using an interpolated variable without quoting or validation, which is a classic tool-parameter abuse risk. If {WORK_DIR} is attacker-influenced, malformed, or unexpectedly broad, the shell may delete unintended files, and the wildcard expansion further increases the blast radius.

Content

Scanner excerpt · steps/09-package.md (reported line 18)May include surrounding context.

打包前查

bash
rm -f {WORK_DIR}/std {WORK_DIR}/mkdata {WORK_DIR}/*.exe

打包命令

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

rm -rf $BASE_DIR/work_{PID} is a destructive command built from variable input and an external helper result, with no quoting or validation. In an agent context, if BASE_DIR or {PID} is empty, malformed, contains traversal characters, or resolves unexpectedly, the command can delete arbitrary directories recursively.

Content

Scanner excerpt · steps/contest/03-move.md (reported line 37)May include surrounding context.

bash
BASE_DIR=$(detect_desktop)
rm -rf $BASE_DIR/work_{PID}
cp -r question $BASE_DIR/work_{PID}
# {WORK_DIR} = $BASE_DIR/work_{PID}

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
86% confidence
Finding

rm -f {WORK_DIR}/std {WORK_DIR}/mkdata {WORK_DIR}/*.exe {WORK_DIR}/*.zip performs broad deletion using a computed path and globs. If {WORK_DIR} is incorrect or attacker-influenced, the cleanup can remove unintended binaries or archives beyond the task output.

Content

Scanner excerpt · steps/contest/03-move.md (reported line 129)May include surrounding context.

bash
# 仅清理可执行文件,不打包
rm -f {WORK_DIR}/std {WORK_DIR}/mkdata {WORK_DIR}/*.exe {WORK_DIR}/*.zip

成后

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

rm -f work_*/*.zip deletes all zip files under any matching work_* directory from the current base directory. This is dangerous because the wildcard may match unrelated project folders, and the skill later packages outputs, making accidental loss of prior archives plausible and hard to detect.

Content

Scanner excerpt · steps/contest/03-move.md (reported line 148)May include surrounding context.

回到桌面基目录,将所有 work_* 汇总到同一 zip

BASE_DIR=$(detect_desktop) cd $BASE_DIR rm -f work_/.zip # 确保无嵌套 zip zip -r {contest_id}.zip work_*/

例:$BASE_DIR/abc453.zip 内含 work_abc453a_题A/ work_abc453b_题B/ ...

text

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger list includes broad terms such as “AtCoder”, “Codeforces”, and generic phrases like “搬一下”, which can cause the skill to activate on ordinary conversation that merely mentions those topics. Because the skill has BrowserUse, Read, Write, and Edit permissions and creates files on the desktop, accidental invocation could lead to unintended browsing and filesystem modifications.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest trigger field repeats ambiguous keywords without scope restrictions, increasing the chance that the agent routes unrelated requests into this skill. In this skill's context, misrouting is more dangerous because the workflow explicitly reads local files, browses external sites, copies directories, and writes packaged outputs, so an unintended activation has side effects beyond simple text generation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Repeating the same broad keywords in the Keywords section reinforces loose matching behavior and makes accidental activation more likely across multiple metadata surfaces. Given the skill's ability to create working directories and package files, this context makes broad activation materially riskier than it would be for a read-only informational skill.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The helper compiles and executes local code via shell commands (g++ std.cpp -o std and then ./std < ... > ...). In the context of an import/generation skill that may process untrusted problem packages or generated source files, this creates an arbitrary code execution path on the host, which is significantly riskier than simple file generation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This file contains user-facing operational instructions exclusively in Chinese, such as the title, goals, and workflow requirements. Under the policy rule, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The initialization step unconditionally runs rm -rf against a desktop work directory before recreating it, which gives the skill destructive local-file behavior beyond simple problem import/generation. Even though the target path is intended to be a specific work folder, the lack of confirmation, path hardening, and safety checks can cause loss of existing user data if the directory already contains valuable files or if variables resolve unexpectedly.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The markdown instructs destructive deletion commands without any warning, prompt, or recovery mechanism. In an agent/tooling context, this increases the chance that file deletion is carried out automatically and silently, turning a routine setup step into an avoidable data-loss risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The step explicitly instructs the agent to immediately rename a local workspace directory using mv, which modifies the user's filesystem without any warning, confirmation, or safety checks. In an agent skill, automatic file operations are risky because the PID is derived from external or user-supplied content, and an incorrect path, unexpected environment, or shell-expansion issue could rename the wrong directory or disrupt other local work.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instruction 生中文题面 requires producing the problem statement in Chinese, and the file consistently enforces Chinese formatting and content. There is no indication that the user opted into Chinese output or that the locale restriction is justified as a region-specific requirement.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The step explicitly instructs the agent to run mv {WORK_DIR} {WORK_DIR}_{标题简写} and similar shell commands that modify the local filesystem, but it provides no safety guardrails, confirmation requirement, path validation, or warning to the user. In an agent setting, this can cause unintended directory renames, break downstream references, or rename attacker-influenced paths if variables are malformed or derived from untrusted content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file presents all instructions exclusively in Chinese, including mandatory guidance such as '禁' and '必', with no indication that users may choose another language. Under the language/locale policy rule, forcing a specific language without opt-in is a natural-language policy concern unless the regional constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs execution of a destructive cleanup command (rm -f) without any guardrails, path validation, or user confirmation. Because {WORK_DIR} is a variable and this skill is meant to drive filesystem operations, an empty, malformed, or attacker-influenced value could broaden deletion scope and remove unintended files in the current directory or another resolved path.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The entire instruction set is written as a mandatory Chinese-only workflow, with no indication that the user may choose another language or locale. Under the policy, language constraints should either be optional/opt-in or clearly justified as region-specific; this file does neither.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The step includes a destructive deletion command that removes files from a parameterized working directory without any runtime safety checks or explicit user-facing warning about exactly what will be deleted. Because {WORK_DIR} is interpolated into shell commands and may resolve unexpectedly, a path mistake, empty value, or malformed expansion could cause unintended data loss beyond the intended package artifacts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The title and step 3 explicitly direct generation of problem_zh.md and translation into Chinese, which imposes a specific language on the output. The file does not indicate user opt-in, alternative language support, or a documented justification for this locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The entire instruction file is written in a fixed Chinese locale/style and references problem_zh.md specifically, implying output and workflow are tied to Chinese without any opt-in or alternative. SQP-3 applies because this is a natural-language locale constraint with no documented user choice or region-specific justification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Line L005 states that in the 'testdata-only' mode the skill should generate only test data and explicitly says '不要打包'. However, L138-L159 later require zipping the generated files into testdata.zip and delivering that archive to the user. This is an active contradiction between the documentation's stated intent and the later instructions.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.