cd /news/ai-agents/toolfence-scan-static-checks-for-cur… · home › topics › ai-agents › article
[ARTICLE · art-175122] src=github.com ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Toolfence-scan – static checks for Cursor/Claude/Copilot skills

ToolFence released toolfence-scan@0.1.3, an open-source CLI that statically scans Cursor, Claude and GitHub Copilot skills, rules, agent files and MCP configs for prompt injection, hidden Unicode, credential exfiltration and over-broad permissions before installation. The scanner ships eight rules — including critical-severity prompt-injection, hide-from-user, credential-exfil and hardcoded-secret checks and high-severity hidden-unicode, network-exfil, mcp-overbroad and remote-exec checks — and runs via `npx toolfence-scan .`, with SARIF, HTML and text output plus a `--fail-on high` flag for CI. High and critical findings can be exported with `--emit-gate-rules` as a rules fragment for ToolFence Gate, and the unscoped npm name `skill-scan` is blocked because it is too similar to the existing `skillscan` package.

key takeaway

Run `npx toolfence-scan . --fail-on high` in CI to block skills, agent files and MCP configs that trip the critical prompt-injection, hide-from-user, credential-exfil or hardcoded-secret rules before they are trusted.

read2 min views4 publishedNov 24, 2026
Toolfence-scan – static checks for Cursor/Claude/Copilot skills
Image: Michielbdejong (auto-discovered)

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.

Part of ToolFence:

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.)

npx toolfence-scan ./fixtures --format text --fail-on high

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

Against your own repo:

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

Full walkthrough: Scan → Gate.

Kind Examples
Skills SKILL.md ,.cursor/skills/** ,.github/skills/** ,.claude/skills/**
Cursor rules .cursorrules ,.cursor/rules/**
Agents AGENTS.md ,CLAUDE.md ,GEMINI.md
GitHub Copilot .github/copilot-instructions.md ,.github/instructions/*.instructions.md ,.github/prompts/*.prompt.md ,.github/agents/*.md
MCP .cursor/mcp.json ,.vscode/mcp.json ,mcp.json ,claude_desktop_config.json

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

See RULES.md for the full catalog.

Rule Severity Catches
hidden-unicode high Bidi / zero-width concealment
prompt-injection critical Ignore-previous / jailbreak / disable safety
hide-from-user critical Conceal actions / run without confirmation
credential-exfil critical Secret reads / send-credentials language
hardcoded-secret critical AWS/GitHub/OpenAI/Slack/Google key shapes
network-exfil high Paste/callback hosts, Discord webhooks, raw IPs
mcp-overbroad high Wildcard tools, auto-approve, shell MCP
remote-exec high curl | bash ,iwr | iex

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

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.

Guide: Scan → Gate.

- 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.

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.)

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).

── more in #ai-agents 4 stories · sorted by recency
── more on @toolfence 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/toolfence-scan-stati…] indexed:0 read:2min 2026-11-24 · —