Skip to content
Development
Skill

/markdown-injection-scanner

Scans Markdown (.md) files for malicious code injection including XSS, prompt injection, script injection, obfuscated payloads, and supply chain attack vectors. Use when auditing .md files for security threats or when the user mentions scanning markdown for malicious content.

From plugin
software-development-department
74116 skills28 agents1 MCP

Claude Code

$ npx -y skills add tranhieutt/software_development_department --skill markdown-injection-scanner --agent claude-code

SKILL.md

markdown-injection-scanner.SKILL.md
name: markdown-injection-scanner
type: workflow
description: "Scans Markdown (.md) files for malicious code injection including XSS, prompt injection, script injection, obfuscated payloads, and supply chain attack vectors. Use when auditing .md files for security threats or when the user mentions scanning markdown for malicious content."
context: fork
agent: security-engineer
when_to_use: "When scanning .md files for injection attacks, prompt injection, embedded malware, or when auditing documentation files for security threats"
allowed-tools: Read, Glob, Grep, Bash
argument-hint: "[target directory path]"
user-invocable: true
effort: 3

Markdown Injection Scanner

Scans all `.md` files in a target directory for 18 categories of malicious code injection. Uses regex pattern matching across the entire file corpus with parallel subagent execution for speed.

Usage

/markdown-injection-scanner [target-directory]

If no directory is specified, ask the user to provide one.

---

Phase 1: Discovery — Map the File Corpus

1. **Count all .md files** in target directory (recursive).

2. **Sample 2-3 files** to understand the file structure and content type (design docs, documentation, config, etc.).

3. **Report file count and content type** before proceeding.

---

Phase 2: Parallel Injection Scanning

Execute scans in **3 parallel batches** using subagents for speed. Each subagent uses `search_files` with the target directory path and `*.md` file pattern.

Batch 1 — Script and Code Injection (5 patterns)

| # | Category | Regex Pattern | Threat | |---|----------|---------------|--------| | 1 | Script tags | `<script[^>]*>` | Embedded JavaScript execution | | 2 | HTML Event Handlers | `(onclick\|onerror\|onload\|onmouseover\|onfocus\|onblur\|onresize\|onsubmit\|onchange\|oninput\|onkeydown\|onkeyup\|onkeypress\|ontouchstart\|onmouseenter\|onmouseleave)\s*=` | Inline JS via HTML attributes | | 3 | JS/VBScript Protocol | `(javascript:\|vbscript:)` | Malicious link protocols | | 4 | Dynamic Code Execution | `(eval\s*\(\|Function\s*\(\|setTimeout\s*\(\|setInterval\s*\()` | Code execution via eval/setTimeout | | 5 | DOM Manipulation | `(document\.(cookie\|domain\|write)\|window\.(location\|open)\|XMLHttpRequest\|fetch\s*\()` | DOM-based attacks |

Batch 2 — Obfuscation and Encoding (6 patterns)

| # | Category | Regex Pattern | Threat | |---|----------|---------------|--------| | 6 | Base64 Payloads | `(base64\|atob\|btoa\|b64decode\|b64encode)[\s(]` | Encoded malicious content | | 7 | Data URI Injection | `data:\s*(text/html\|application/javascript\|text/javascript)` | Inline HTML/JS via data URIs | | 8 | SVG Injection | `<svg[^>]*>` | SVG-based XSS vectors | | 9 | Hex/Unicode Encoding | `(\\x[0-9a-fA-F]{2}\|\\u[0-9a-fA-F]{4}\|&#x[0-9a-fA-F]+;)` | Obfuscated character encoding | | 10 | Hidden Text — display:none | `<(span\|div\|p)[^>]*style\s*=\s*['"][^'"]*display\s*:\s*none` | Hidden content tricks | | 11 | Hidden Text — font-size:0 | `font-size\s*:\s*0` | Invisible text |

Batch 3 — Injection Vectors (7 patterns)

| # | Category | Regex Pattern | Threat | |---|----------|---------------|--------| | 12 | HTML Tag Injection | `<(iframe\|embed\|object\|link\|meta\|form\|input\|textarea\|button)[\s>]` | Injected HTML elements | | 13 | Suspicious Markdown Links | `\[.*?\]\(data:` then `\[.*?\]\(javascript:` then `\[.*?\]\(vbscript:` | Malicious link targets | | 14 | Prompt Injection (NL) | `(?i)(ignore\s+(all\s+)?previous\s+instructions\|you\s+are\s+now\|forget\s+(all\s+)?previous\|system\s*:\s*you\s+are\|disregard\s+(all\s+)?prior\|override\s+(all\s+)?instructions\|new\s+instructions?:\|IMPORTANT:.*ignore\|do\s+not\s+follow)` | AI/LLM prompt hijacking | | 15 | Prompt Injection (Token) | `(?i)(\[INST\]\|\[\/INST\]\|<\|im_start\|>\|<\|im_end\|>\|<\|system\|>\|<\|user\|>\|<\|assistant\|>\|Human:\|Assistant:\|###\s*System\s*Prompt\|BEGIN\s+HIDDEN\|END\s+HIDDEN)` | LLM token format injection | | 16 | Shell Command Injection | `(curl\s+\|wget\s+\|bash\s+-c\|sh\s+-c\|powershell\|cmd\.exe\|/bin/sh\|/bin/bash\|rm\s+-rf\|chmod\s+777\|sudo\s+)` | Shell command execution | | 17 | Executable File Links | `(https?://[^\s)>\]]*\.(exe\|bat\|cmd\|ps1\|sh\|msi\|dll\|vbs\|wsf\|hta\|scr))` | Links to malicious executables | | 18 | Malware Keywords | `(?i)(steganograph\|obfusc\|malware\|payload\|exploit\|backdoor\|trojan\|keylog\|ransom\|phish)` | Direct malware references |

Subagent Prompt Templates

Use 3 subagents via `use_subagents`, each with prompts corresponding to their batch patterns above. Replace `[TARGET_DIR]` with the actual target directory.

**Subagent 1 — Script and Code Injection:**

Search for script and code injection patterns in .md files in "[TARGET_DIR]". Use search_files with these regex patterns on *.md files, one at a time:
1. `<script[^>]*>`
2. `(onclick|onerror|onload|onmouseover|onfocus|onblur|onresize|onsubmit|onchange|oninput|onkeydown|onkeyup|onkeypress|ontouchstart|onmouseenter|onmouseleave)\s*=`
3. `(javascript:|vbscript:)`
4. `(eval\s*\(|Function\s*\(|setTimeout\s*\(|setInterval\s*\()`
5. `(document\.(cookie|domain|write)|window\.(location|open)|XMLHttpRequest|fetch\s*\()`
Report all findings per pattern.

**Subagent 2 — Obfuscation and Encoding:**

Search for obfuscation and encoding patterns in .md files in "[TARGET_DIR]". Use search_files with these regex patterns on *.md files, one at a time:
1. `(base64|atob|btoa|b64decode|b64encode)[\s(]`
2. `data:\s*(text/html|application/javascript|text/javascript)`
3. `<svg[^>]*>`
4. `(\\x[0-9a-fA-F]{2}|\\u[0-9a-fA-F]{4}|&#x[0-9a-fA-F]+;)`
5. `<(span|div|p)[^>]*style\s*=\s*['"][^'"]*display\s*:\s*none`
6. `font-size\s*:\s*0`
Report all findings per pattern.

**Subagent 3 — Injection Vectors:**

Search for injection vectors in .md files in "[TARGET_DIR]". Use search_files with these regex patterns on *.md files, one at a time:
1. `<(iframe|embed|object|link|meta|form|input|textarea|button
Read more
@tranhieutt
Ships withsoftware-development-department

Software Development Department

74116 skills28 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
74
Star history of tranhieutt/software_development_department on GitHub, a chart by star-history.com

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react4d252k
@facebook@facebookInstall Skill

Questions about markdown-injection-scanner.

Which coding agents can use markdown-injection-scanner?
markdown-injection-scanner installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.