baoyu-format-markdown
Fail
Audited by Gen Agent Trust Hub on Aug 14, 2026
Risk Level: HIGHCOMMAND_EXECUTIONREMOTE_CODE_EXECUTIONPROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: In
scripts/autocorrect.ts, theapplyAutocorrectfunction usesexecSyncto run a shell command where thefilePathvariable is interpolated directly. This allows an attacker to execute arbitrary shell commands by providing a filename containing shell metacharacters (e.g.,;,&, or backticks). - Evidence:
execSync(npx autocorrect-node --fix "${filePath}", { stdio: "inherit" });inscripts/autocorrect.ts. - [COMMAND_EXECUTION]: The workflow instructions in
SKILL.md(Step 6 and Step 7) direct the agent to run bash commands for file backups and script execution that interpolate{filename}and{output-file-path}variables. A maliciously named file could trigger arbitrary command execution when the agent follows these steps. - Evidence:
mv "{filename}-formatted.md" "{filename}-formatted.backup-$(date +%Y%m%d-%H%M%S).md"andnpx -y bun ${SKILL_DIR}/scripts/main.ts {output-file-path} [options]inSKILL.md. - [REMOTE_CODE_EXECUTION]: The skill relies on
npxto download and executeautocorrect-nodeandbunat runtime. Running remote code without fixed versioning or integrity checks exposes the system to supply chain attacks and potential execution of malicious third-party code. - Evidence:
npx autocorrect-nodeinscripts/autocorrect.tsandnpx -y buninSKILL.md. - [REMOTE_CODE_EXECUTION]: The
scripts/package.jsonfile lists several dependencies, includingremark-cjk-friendly, which is notably absent from thescripts/bun.locklockfile. This discrepancy means the version of the package installed at runtime is not cryptographically pinned, increasing the risk of inconsistent or malicious dependency resolution. - [PROMPT_INJECTION]: The skill processes untrusted user-provided files to generate summaries and titles, creating a surface for indirect prompt injection.
- Ingestion points: User-specified markdown or plain text files processed in Step 1.
- Boundary markers: No delimiters or warnings are used to prevent the agent from following instructions embedded in the source file.
- Capability inventory: Subprocess execution via
execSync, file system operations (readFileSync,writeFileSync,mv), and execution of network-capable tools (npx). - Sanitization: No input validation or path sanitization is performed on filenames or file content before they are used in sensitive operations.
Recommendations
- AI detected serious security threats
Audit Metadata