summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2026-02-12Move import-skill from plugin to project-level commandDan Guido
The import-skill command doesn't belong in the marketplace — it's a repo maintenance tool. Move it to .claude/commands/ so it's available to anyone cloning the repo as /import-skill, no plugin install needed. - Move command to .claude/commands/import-skill.md - Move fetch script to scripts/fetch_github_tree.py - Remove plugin from marketplace.json and README - Unignore .claude/commands/ in .gitignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12Scope security scanner to changed plugins and rename skill-importer to ↵Dan Guido
trailofbits (#7) Scanner changes: - Accept multiple target paths (nargs='+') - Workflow extracts changed plugin dirs from PR via gh API - Only scans plugins modified in the PR, not the entire repo - Label fallback scans all plugins if no plugin files changed Plugin rename: - Rename skill-importer -> trailofbits so command becomes /trailofbits:import-skill - Update marketplace.json, README, plugin.json references Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12Add deterministic security scanner for imported plugins (#6)Dan Guido
* Add deterministic security scanner for imported plugins Scans plugin directories for external network access (URLs, curl, Python network imports), unicode tricks (bidi overrides, zero-width chars, homoglyphs in code, punycode domains), and destructive operations (rm -rf, force push, chmod 777). BLOCK findings fail CI; WARN findings surface for human review. - scripts/scan_plugin.py: zero-dependency stdlib scanner (~440 lines) - .github/workflows/security-scan.yml: CI workflow running on push/PR - plugins/skill-importer/commands/import-skill.md: insert scan as Step 17 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: resolve code review findings for PR #6 - Fix fence marker length bug: store full fence length so 4-backtick fences aren't closed by 3-backtick lines - Fix CI always failing: use distinct exit codes (0=clean, 1=usage, 2=BLOCK, 3=WARN) and allow WARN to pass in CI - Fix double PUNYCODE_RE.search: capture match once, remove type: ignore - Fix silent error swallowing: warn on stderr for unreadable files - Use Literal type for Finding.level instead of bare str - Add line.isascii() fast-path to skip unicode checks on ASCII lines - Precompute frozenset of code lines for O(1) lookup instead of O(R) - Detect rm -Rf (capital R) and rm --recursive --force - Extract _discover_plugins and _read_file_text helpers from main - Pass precomputed suffix string instead of Path objects to check fns - Add docstrings to all public and non-trivial functions - Add summary line to stderr output Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add 7 security check categories to plugin scanner New detections: code execution (pipe-to-shell, eval/exec, subprocess), credential access, encoded payloads, privilege escalation, and compiled bytecode (.pyc/__pycache__). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Convert security scanner from CI gate to PR comment Surface findings as an idempotent PR comment instead of failing CI, so reviewers can see them inline and merge at their discretion. - Add --format=markdown output mode to scan_plugin.py (argparse CLI) - Post/update a single comment using <!-- security-scan --> marker - Auto-trigger only when plugins/ files change (gh API path check) - Manual trigger via 'security-scan' label on any PR Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11Add OpenAI skills converter and 16 converted plugins (#4)Dan Guido
* Add OpenAI skills converter and 16 converted plugins Add scripts/convert_openai_skills.py, a PEP 723 script that fetches curated skills from openai/skills and converts them to Claude Code plugin format. The script rewrites Codex-specific paths, frontmatter, sandbox instructions, and branch naming conventions. 16 portable skills converted. Skipped 14 (MCP-dependent, OpenAI API, or Codex-hosted infrastructure like vercel-deploy's deploy endpoint). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix CI lint failures in imported OpenAI scripts - Add --unsafe-fixes to ruff in lint_plugin() for auto-fixable errors - Add per-file ruff ignores for unfixable vendor code issues (B023, B904, E501, SIM105, SIM117) - Regenerate all plugins with lint fixes applied Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>