claude-skills/scripts
Claude 9ed709aef3
fix(book-to-skill): guard EPUB XML, cap zip expansion, refuse symlinked trees
Addresses the second automated review on PR #941. All three code findings
verified against the actual behaviour, not just patched.

[Medium] shutil.copytree dereferenced symlinks the validator never saw. The
validator checks SKILL.md, the three supporting files and chapters/*.md; the
copy then followed a link anywhere else in the tree (assets/, any subdirectory)
and baked the target's real content into a package that can go out as
--distribution shareable. _assert_no_symlinks() now walks the whole tree and
refuses, and runs BEFORE the validation branch so --skip-validation cannot
bypass it. copytree also passes symlinks=True so loosening that check later
cannot silently reintroduce dereferencing.
Verified: a symlink in assets/ pointing at a secret file is refused both with
and without --skip-validation, the secret never lands in a package, and a clean
tree still emits.

[Medium] The DOCX XXE/entity guard did not extend to EPUB's ebooklib path.
Upstream hardened DOCX only. EPUB is the same zip-of-XML shape and ebooklib —
one of the packages this skill recommends installing — parsed container.xml,
the OPF and content docs with no equivalent pre-check. The guard moved to a new
book_to_skill/zip_safety.py and now runs for both formats.
Verified: an EPUB whose OPF declares an entity is refused; a clean EPUB still
extracts and detects its chapter.

[Low] No size cap before decompressing zip members. Every archive read now goes
through safe_read(), which checks the declared uncompressed size and the
compression ratio against the central directory before decompressing, and
charges actual bytes against a per-archive budget so a lying directory cannot
get past it either.
Verified: a 200 MB / 1029x bomb is refused at ~14 MB peak RSS instead of being
materialized.

[Low] The PR body's "12 numbered items" was stale against README's list. Fixed
in the PR description; the in-repo count is synced to 18 across plugin.json,
CLAUDE.md and CHANGELOG.

Recorded as deviations 17 and 18. Counters: tools 662 -> 663 (zip_safety.py);
that module is allowlisted in smoke_exceptions.txt like its siblings.

All gates green: compileall, check_paths --all, check_dual_publish,
smoke_scripts (0 failed), derive_counters --check, check_plugin_json --all
(0 FAIL). Security auditor unchanged at 0 critical / 4 high.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017zu9Gmm9S78c2t3kDLnpPX
2026-08-05 07:31:04 +00:00
..
audit_skills.py chore(registry,ci): derive counters, register 11 plugins, add CI guards 2026-06-10 14:33:19 +00:00
check_dual_publish.py chore(registry,ci): derive counters, register 11 plugins, add CI guards 2026-06-10 14:33:19 +00:00
check_paths.py fix(ci,scripts): post-merge review items M1/M2/A3/A4 2026-06-11 15:23:27 +00:00
check_paths_allowlist.txt fix(ci): allowlist 3 arquiteto-de-empresa teaching-example path refs 2026-06-24 12:48:43 +00:00
check_plugin_json.py fix(plugin-schema): align with live Claude Code spec — migrate to "./"-prefixed skills field 2026-05-21 07:03:11 +00:00
codex-install.bat Dev (#44) 2026-01-23 09:09:42 +01:00
codex-install.sh Fix bugs and improve inline Python script functionality (#857) 2026-07-01 04:32:28 +02:00
convert.sh fix(scripts,plugins): exclude tool-sync dirs from convert.sh; rename si plugin's status/review skills 2026-07-08 05:37:03 +00:00
derive_counters.py fix(scripts): fail loudly when a README badge is missing/renamed 2026-07-03 06:46:37 +00:00
extract_release_notes.py feat(release): auto-tag + GitHub Release from CHANGELOG on push to main 2026-05-19 04:00:06 +00:00
gemini-install.sh feat: add Gemini CLI + OpenClaw support, fix Codex missing 25 skills 2026-03-09 14:58:41 +01:00
generate-docs.py Merge origin/dev: reconcile docs redesign with upstream skill changes 2026-06-11 15:52:42 +00:00
install.sh feat(integrations): change Augment from flat rules to skill bundles 2026-04-25 04:48:41 +05:30
openclaw-install.sh fix(ci): fix workflow errors + add OpenClaw support (#222) 2026-02-24 17:33:21 +01:00
review-new-skills.sh feat(ci): add automated Tessl skill quality review on PRs 2026-04-07 12:21:30 +02:00
smoke_exceptions.txt fix(book-to-skill): guard EPUB XML, cap zip expansion, refuse symlinked trees 2026-08-05 07:31:04 +00:00
smoke_json_output.py feat(tooling): JSON-output sample gate (G9) + --sample fixtures (#654) 2026-06-11 15:29:39 +00:00
smoke_scripts.py polish: PR #838 second-pass nits (non-blocking) 2026-06-11 15:40:45 +00:00
sync-codebuff-skills.py fix: resolve open GitHub issues #805 #806 #807 #748 #785 2026-06-11 03:34:13 +00:00
sync-codex-skills.py docs(audit): add productivity domain audit record + update codex sync domain description 2026-07-17 06:03:12 +00:00
sync-gemini-skills.py chore(registry,ci): derive counters, register 11 plugins, add CI guards 2026-06-10 14:33:19 +00:00
sync-hermes-skills.py chore(registry,ci): derive counters, register 11 plugins, add CI guards 2026-06-10 14:33:19 +00:00
sync-vibe-skills.py Merge remote-tracking branch 'origin/dev' into claude/skills-plugins-audit-vrttx1 2026-06-11 03:59:40 +00:00
sync_skill_bundles.py chore(phase-0): add dual-publish + plugin.json validation tools 2026-05-09 05:54:15 +00:00
vibe-install.sh feat(install): add Mistral Vibe cross-platform sync (closes #705) 2026-05-23 02:04:17 +00:00