kunlun-m-general
Kunlun-M is a static code vulnerability scanner for PHP, JavaScript, Solidity, and Chrome extensions.
Community author
- Agents
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode
- License
- MIT (permissive)
- Pin
- 9629653pinned Oct 9, 2026
- Context cost
- about 740 tokenswhen the skill loads
- GitHub stars
- 2,416on lorexxar/kunlun-m
- Scripts
- 4 scripts
What it does
“当你要用 Kunlun-M(静态白盒漏洞扫描)扫描 PHP/JS/Solidity/Chrome Ext 源码,或需要通过命令 scan/generate 快速落地 source/sink(tamper/rule)并回归验证时使用。触发命令:kunlun.py scan / kunlun.py generate rule / kunlun.py generate tamper。”
Generated summary from the skill's own text
Kunlun-M is a static code vulnerability scanner for PHP, JavaScript, Solidity, and Chrome extensions. This skill wraps the scanner with Python scripts to quickly perform scans, generate custom detection rules (sink-based), and create data flow policies (source/sanitization), then validate changes through regression testing.
When to use it
- Scanning PHP or JavaScript source code for security vulnerabilities
- Creating or adjusting detection rules to catch specific unsafe patterns
- Defining data flow policies to reduce false positives or adapt to frameworks
- Validating rule and policy changes against test code
When not to
- Projects without Python 3 or pip installed
- Dynamic analysis or runtime vulnerability detection needed
- Scanning closed-source or binary-only applications
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add lorexxar/kunlun-m --skill kunlun-m-generalInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install lorexxar/kunlun-m kunlun-m-general@96296533fc8ce4eaac2766f5cc9e0eb0202be71bInstalls the commit we checked (9629653).
Copy by hand
Download the folder at 9629653 and put it in .claude/skills/kunlun-m-general for Claude Code and in .agents/skills/kunlun-m-general for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "kunlun-m-general" by LoRexxar. Source, pinned to commit 96296533fc8ce4eaac2766f5cc9e0eb0202be71b: https://github.com/lorexxar/kunlun-m/tree/96296533fc8ce4eaac2766f5cc9e0eb0202be71b/skills/kunlun-m-general 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/kunlun-m-general/ for Claude Code and .agents/skills/kunlun-m-general/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/lorexxar/kunlun-m-general
SKILL.md at the pin
--- name: kunlun-m-general description: "当你要用 Kunlun-M(静态白盒漏洞扫描)扫描 PHP/JS/Solidity/Chrome Ext 源码,或需要通过命令 scan/generate 快速落地 source/sink(tamper/rule)并回归验证时使用。触发命令:kunlun.py scan / kunlun.py generate rule / kunlun.py generate tamper。" compatibility: "需要 Python 3 + pip;需要联网;可选依赖 git(优先 clone)与 unzip(zip 回退路径)。" metadata: repo: "https://github.com/LoRexxar/Kunlun-M" --- # Kunlun-M 通用 Skill(脚本落地版) 本 skill 只包含可直接执行的脚本与最小流程,优先用脚本完成动作,不在 SKILL.md 里展开原理解释。 ## 0. 一键准备环境(没有 Kunlun-M 时) ```bash python skills/kunlun-m-general/scripts/bootstrap_kunlunm.py --repo-dir ./Kunlun-M ``` 默认行为:优先 git clone,失败回退 zip;然后执行 `pip install`、复制 `settings.py`、初始化 DB、load rules/tamper。 ## 1. 用脚本执行日常动作(推荐) 约定:`--repo-root` 指向 Kunlun-M 目录(里面有 `kunlun.py`)。 ### 扫描 ```bash python skills/kunlun-m-general/scripts/kunlun_ops.py --repo-root ./Kunlun-M scan -t <target> -lan php -b vendor,node_modules -d ``` ### 生成 rule(漏报补齐) ```bash python skills/kunlun-m-general/scripts/kunlun_ops.py --repo-root ./Kunlun-M gen-rule -lan php --name "<rule_name>" --match "<regex>" python skills/kunlun-m-general/scripts/kunlun_ops.py --repo-root ./Kunlun-M scan -t <target> -lan php -r <id> ``` ### 生成 tamper(误报治理/框架适配) ```bash python skills/kunlun-m-general/scripts/kunlun_ops.py --repo-root ./Kunlun-M gen-tamper --name <proj> --controlled "$_GET,$_POST" python skills/kunlun-m-general/scripts/kunlun_ops.py --repo-root ./Kunlun-M scan -t <target> -lan php -tp <proj> ``` ### 同步到数据库(可选:仅 Web 管理需要) ```bash python skills/kunlun-m-general/scripts/kunlun_ops.py --repo-root ./Kunlun-M sync --rule --tamper ``` ## 2. 最小概念(只留决策点) - 规则(rule)≈ sink(危险点):要扫哪些危险函数/语句就生成/调整 rule,然后用 `scan -r <id>` 回归 - 污点策略(tamper)≈ source + repair:要定义输入源或净化函数就生成/调整 tamper,然后用 `scan -tp <name>` 回归 更详细的概念与场景说明见:[concepts.md](file:///d:/program/Kunlun_M/skills/kunlun-m-general/references/concepts.md) ## 3. 测试命令(冒烟验证) 在本仓库根目录执行(或把 `--repo-root` 指向你的 Kunlun-M 目录): ```bash python skills/kunlun-m-general/scripts/bootstrap_kunlunm.py --repo-dir ./Kunlun-M --force python skills/kunlun-m-general/scripts/kunlun_ops.py --repo-root ./Kunlun-M gen-rule -lan php --name "Skill Smoke Rule" --match "echo|print" --force python skills/kunlun-m-general/scripts/kunlun_ops.py --repo-root ./Kunlun-M gen-tamper --name skill_smoke --controlled "$_GET,$_POST" --force python skills/kunlun-m-general/scripts/kunlun_ops.py --repo-root ./Kunlun-M scan -t ./Kunlun-M/tests -lan php -d ``` ## 4. 报告(给 skill 输出稳定结果) 已有 CI 报告产出脚本:`tools/ci_scan.py`,输出稳定的 JSON(`meta/summary/vulnerabilities/exit`),适合 skill/CI 使用。 ```bash python tools/ci_scan.py --target ./Kunlun-M/tests --output artifacts/kunlun-ci.json --fail-on none python skills/kunlun-m-general/scripts/render_ci_report.py --input artifacts/kunlun-ci.json --output artifacts/kunlun-ci.md ``` 报告模板参考: [report_template.md](file:///d:/program/Kunlun_M/skills/kunlun-m-general/references/report_template.md) ## 多平台结构(同一份内容) - 该 skill 不维护多份表述;不同平台主要差异是“放在哪个目录/可选元数据文件” - 平台落地路径与说明: [README.md](file:///d:/program/Kunlun_M/skills/kunlun-m-general/platforms/README.md) - 一键复制到目标平台目录(可选):`python skills/kunlun-m-general/scripts/install_platform.py --platform <openclaw|codex|claude-code|hermes> --scope <user|project> --repo-root <repo>` ## 安全约束 - 不在 rule/tamper 中写入真实密钥、token、真实 URL、账号密码等敏感信息 - 只维护“函数名 / 输入源 / 规则编号 / 规则逻辑”这类抽象信息
From lorexxar/kunlun-m at 9629653, shown as plain text under its license: MIT (permissive). The license text is in LICENSE.
View SKILL.md on GitHub at 9629653Files
- SKILL.md4.3 KB · 61f75a84d0ca
- agents/
- openai.yaml332 B · 13f130f1fdbe
- platforms/
- README.md1.3 KB · a4f04ad8d2ed
- references/
- concepts.md1.8 KB · b115c1ac79bc
- report_template.md694 B · 7b30f08b45a8
- scripts/
- bootstrap_kunlunm.py6.3 KB · 8177129d2086
- install_platform.py2.9 KB · 515d13ae1add
- kunlun_ops.py5.7 KB · 8349446cc3bc
- render_ci_report.py3.8 KB · 20501a57dfd8
9 files, 27 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at 9629653Related in Security
claude-security
Scans your repository for security issues using Claude, examines code changes or commits for vulnerabilities, and generates patch files to fix findings.
by AnthropicOfficial publisher
Claude Code · about 1K tokens · pinned 6 days ago
sensitive-logging-audit
The skill helps audit and fix sensitive data leaks in Python SDK logging, exceptions, and telemetry by collecting candidate sinks, manually tracing values…
by OpenAIOfficial publisher
Contains scripts
Claude Code, Codex, Cursor +3 · about 970 tokens · pinned 6 days ago
security-audit
This skill guides security audits of codebases, APIs, and services by finding vulnerabilities that cross real trust boundaries.
by CloudflareOfficial publisher
Contains scripts
Claude Code · about 5.4K tokens · pinned 6 days ago
assess-patch-risk
This skill analyzes patch artifacts to assess their program impact, regression risk, and suitability for automated merging.
by OpenAIOfficial publisher
Codex · about 2.3K tokens · pinned 6 days ago
attack-path-analysis
This skill analyzes security findings to build explicit attack paths from source to sink, calibrates severity, and decides whether each finding is reportable.
by OpenAIOfficial publisher
Codex · about 2.1K tokens · pinned 6 days ago
deep-security-scan
Performs exhaustive, multi-pass security analysis across a repository or scoped directory by running repeated independent security scans and aggregating…
by OpenAIOfficial publisher
Codex · about 3.4K tokens · pinned 6 days ago