hiw3c 日报精选
Hacker News Top 网页快照

Toolfence-scan – Cursor/Claude/Copilot 技能静态检查

原文标题 · Toolfence-scan – static checks for Cursor/Claude/Copilot skills

HN ⭐ 6 · 0 评论

来源:Hacker News Top · github.com

正文为英文,可一键机器翻译(仅首次需要等待)

Latest commit

History

Folders and files

Repository files navigation

toolfence-scan

ToolFence Scan — pre-install security for AI coding agents.

Scan Cursor / Claude / GitHub Copilot skills, instructions, prompts, and MCP configs for prompt injection, hidden Unicode, credential risks, and over-broad permissions before you trust them.

Scan what you install → Gate what can hurt you → Radar on cost and risk.
npx toolfence-scan .

( skill-scan is also installed as a CLI alias.)

30-second demo

# From this package (fixtures include known-bad skills) npx toolfence-scan ./fixtures --format text --fail-on high

Expect critical/high findings on the planted bad skills (and a non-zero exit).

npx toolfence-scan . npx toolfence-scan . --format sarif --output results.sarif npx toolfence-scan . --format html --output report.html npx toolfence-scan . --fail-on high npx toolfence-scan . --emit-gate-rules --output gate-rules.json

What it scans

Also: toolfence-scan inventory . lists discovered files by kind before rules run.

Rule packs (v0.1.3)

Suppress a line with # skill-scan-ignore / # skill-scan-ignore-next-line , or add globs to .skill-scanignore .

Bridge to ToolFence Gate

High/critical findings can emit a Rules fragment for Gate :

npx toolfence-scan . --emit-gate-rules --output gate-rules.json

Includes policy.* , ready-to-paste paste.deny_tools / paste.tool_overrides_json , and how_to_apply steps (also printed to stderr). Merge carefully into Inbox → Rules — don’t blind-overwrite production policy.

CI (GitHub)

- run : npx toolfence-scan . --format sarif --output skill-scan.sarif --fail-on high - uses : github/codeql-action/upload-sarif@v3 with : sarif_file : skill-scan.sarif

This monorepo also runs .github/workflows/skill-scan.yml against the package build.

Develop locally

git clone https://github.com/StockGorilla/skill-scan.git cd skill-scan npm install npm test # build + fixture self-test (expects findings) node dist/cli.js --help

(Also vendored in the ToolFence monorepo under packages/skill-scan .)

Docs

CONTRIBUTING.md — add a rule + fixture

SECURITY.md — false positives / missed malware

Status

toolfence-scan@0.1.3 — OSS wedge for ToolFence Scan . Scoped alias @toolfence/scan can follow when the npm org lands.

Note: The unscoped name skill-scan is blocked on npm (too similar to existing skillscan ).

About

ToolFence Scan — pre-install security for agent skills, MCP configs, and Cursor rules

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages