Scan then Gate
Trust what you install, then authorize what can run. This is the ToolFence glue path:
toolfence-scan (pre-install)
│
▼ findings + gate-rules.json
│
ToolFence Gate Rules (deny / require_approval)
│
▼
Runtime tool calls pause in Inbox / Slack until a human clears them
Product pages: Scan · Gate · Hosted Gate: toolpause.fly.dev
1. Scan a skill or MCP folder
npx toolfence-scan .
npx toolfence-scan ./skills --format html --output report.html
npx toolfence-scan . --format sarif --output results.sarif --fail-on high
Point it at Cursor skills, GitHub Copilot instructions/prompts, SKILL.md trees, .cursor/mcp.json, or a whole repo. High/critical hits exit 1 for CI.
2. Emit Gate Rules
npx toolfence-scan . --emit-gate-rules --output gate-rules.json
The JSON includes:
policy.deny_tools/policy.deny_tags/policy.tool_overridespaste.*— strings ready for the Gate Rules formhow_to_apply— step list printed to stderr
Mapping defaults:
| Finding | Suggested Gate action |
|---|---|
| Critical (injection, secrets, hide-from-user) | deny |
| MCP over-broad / remote-exec / credential sinks | deny |
| Other high findings | require_approval |
| Skill markdown (not a tool name) | deny tags untrusted-skill, notes for operators |
Merge carefully — do not paste over a production policy blind. Union deny lists; review overrides.
3. Apply in Gate
- Open Gate Inbox → Rules
- Merge
paste.deny_toolsinto Never allow these tools - Merge
paste.deny_tagsif you tag agents/skills - Merge
paste.tool_overrides_jsoninto per-tool overrides - Save, then trigger a risky tool via SDK / MCP / HTTP
# Example: inspect paste fields
node -e "const j=require('./gate-rules.json'); console.log(j.paste)"
4. Cursor, Claude Code & GitHub Copilot
Cursor
- Before enabling a marketplace / git skill:
npx toolfence-scan path/to/skill - If MCP config looks over-broad: scan
.cursor/mcp.json, emit rules, tighten Gate - Keep high-impact tools behind Gate MCP or the SDK so clearance stays bound
Claude Code
- Scan any skill pack you add under
skills/or project instructions - Point Claude Code at ToolFence Gate over MCP (see MCP)
- High-impact tools pause in Inbox or Slack until Approve / Edit / Deny
GitHub Copilot
- Scan repo instructions before merge:
.github/copilot-instructions.md,.github/instructions/*.instructions.md - Also covered:
.github/prompts/*.prompt.md,.github/agents/*.md,.github/skills/**/SKILL.md - Emit Gate rules from findings, then wrap high-impact tools the same way as Cursor/Claude
npx toolfence-scan .github --format text --fail-on high
5. CI one-liner
- 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
- if: failure()
run: npx toolfence-scan . --emit-gate-rules --output gate-rules.from-scan.json || true
Links
ToolFence docs
Quickstart · Gate