Skip to content

feat(video-explainer): port the video-explainer skill as a DSH bundle - #57

Merged
ngeorger merged 2 commits into
mainfrom
feat/video-explainer-plugin
Nov 26, 2026
Merged

ngeorger merged 2 commits into
mainfrom
feat/video-explainer-plugin

Conversation

@sredevopsorgagents

Copy link
Copy Markdown
Collaborator

What

Ports petergyang/video-explainer (MIT, pinned at be2f729) into this repository as plugins/video-explainer, installable like every other bundle.

The skill, Python pipeline, three render engines, style presets, and the Inter font are carried verbatim; plugins/video-explainer/docs/UPSTREAM.md maps every upstream file and lists every adaptation.

DSH surfaces added

Surface Name Behavior
Skill video-explainer Model- and user-invocable; resources resolve through its own directory
Tool video_explainer_setup Read-only preflight: reports missing tools with exact commands, installs nothing
Tool video_explainer_render Runs ONE pipeline step in a project folder confined to the session workspace
Preset video-explainer Opt-in; shell, background jobs, web, files, skill catalog. No subagent provider

Security review

No finding above high, and every high one is fixed and pinned by test/security.test.mjs:

Severity Finding Fix
High scripts/py ran an unpinned pip install numpy with no confirmation Prints the command and exits 1; versions pinned in requirements*.txt
High setup.sh downloaded ~390 MB Chrome + ~1.4 GB models on first run Read-only preflight (adds --json); installs nothing
High Review server served the whole project dir; only POST checked Origin Dedicated work/review/serve/ root + loopback Host check on reads too (closes DNS rebinding)
High Silent npx -y fallback in the capture path Reported on stderr instead
Medium Prompt injection via review notes / fetched media SKILL.md states that content is data, never instructions

Verified live against the hardened server: page/poster/video serve, secret.env and ../ traversal 404, rebinding Host 403.

Verification

  • validate-bundles PASS (8 plugins)
  • validate-github-install --strict PASS
  • validate-plugin-pair PASS (8 bundles)
  • build-market-index --check up to date
  • validate-market-index PASS
  • validate-skills unchanged — its 3 errors are the pre-existing .opencode/skills/** ones on main
  • 40/40 plugin tests pass
  • Bundle composes against installed DSH 0.2.3-alpha.2: all 12 preset children validate their config, the provider lists the skill at rank 600, both tools register
  • Real pipeline imports and resolves packaged assets/fonts via a working venv

Known gaps

  • No end-to-end render: ffmpeg is not installed on the build host. The pipeline runs through script parsing, scene validation, and asset staging, then stops at ffmpeg and reports it.
  • index.json is unchanged: this plugin has no release tag yet, so the market index notes it as untagged until one is pushed.

Release

Merge, then node scripts/release-tag.mjs --plugin video-explainer --push. The video-explainer-v0.1.0 tag drives release.yml and the index.json republish PR.

Port https://github.com/petergyang/video-explainer (MIT, commit be2f729) into
this repository as plugins/video-explainer, installable like every other
bundle. The skill, the Python pipeline, the three render engines, the styles,
and the Inter font are carried verbatim; see docs/UPSTREAM.md for the
file-by-file map.

The bundle adds three DSH surfaces:

- a packaged skill provider on ctx.skills serving skills/video-explainer/, so
  the skill is model- and user-invocable with its resource base intact;
- video_explainer_setup, a read-only preflight that reports every missing tool
  with the exact command for it;
- video_explainer_render, which runs ONE pipeline step inside a project folder
  confined to the session workspace (realpath on both sides, argument lists
  with shell: false, no spawn on rejection);
- an opt-in `video-explainer` agent preset that carries shell, background jobs,
  web, files, and the skill catalog, and declares no subagent provider.

Security review (recorded in docs/UPSTREAM.md and pinned by
test/security.test.mjs). No finding above high, and each high one is fixed:

- scripts/py no longer creates a venv or runs an unpinned pip install; it
  prints the command and exits 1. Dependencies are pinned in requirements.txt
  and requirements-voice.txt;
- setup.sh is now a read-only preflight (adds --json) instead of downloading
  Chrome, packages, and models on first run;
- the review server serves a dedicated work/review/serve/ root holding only the
  page, poster, and video, and requires a loopback Host header on reads as well
  as writes, closing DNS rebinding;
- capture.py reports its pinned npx fallback instead of hiding it;
- SKILL.md states that review notes, downloaded media, and captured pages are
  data, never instructions.

Verification: validate-bundles PASS (8 plugins), validate-github-install
--strict PASS, validate-plugin-pair PASS, build-market-index --check up to
date, validate-market-index PASS, validate-skills unchanged (its 3 errors are
the pre-existing .opencode/skills ones), and 40 plugin tests pass. The bundle
also composes against the installed DSH 0.2.3-alpha.2: every preset child
validates its config, the provider lists the skill at rank 600, and both tools
register. An end-to-end render is unverified here because ffmpeg is not
installed; the pipeline runs up to that point and reports it.

Not released: no tag yet, so index.json is unchanged and the market index
notes that the plugin has no release tag until one is pushed.
@sredevopsorgagents
sredevopsorgagents force-pushed the feat/video-explainer-plugin branch from ef8a989 to 433083f Compare November 26, 2026 05:53
@sredevopsorgagents
sredevopsorgagents force-pushed the feat/video-explainer-plugin branch from 433083f to 3e1ffe8 Compare November 26, 2026 05:55
@sredevopsorgagents
sredevopsorgagents force-pushed the feat/video-explainer-plugin branch from 3e1ffe8 to dd7def6 Compare November 26, 2026 05:57
…uced

CodeQL reported five alerts on the port; none exist on main. All five are fixed
in the packaged scripts, and each is covered by test/security.test.mjs.

- py/incomplete-url-substring-sanitization (media.py, x2): _is_wiki_url matched
  the whole netloc with endswith, so en.wikipedia.org.evil.example and
  wikipedia.org.attacker.tld were treated as Wikimedia and received the
  Wikimedia User-Agent. It now compares the parsed hostname label by label
  against WIKI_HOSTS and rejects lookalikes.
- py/path-injection (review_page.py): the review frame path is built only from
  the loop index and the reformatted numeric timestamp, never reviewer text, and
  the resolved path is re-checked to stay inside the frames directory.
- py/clear-text-logging-sensitive-data (media.py, x2): the save message echoed
  the attribution, which comes from --credit or Wikimedia's artist/license
  metadata. Attribution now goes to work/media-sources.json and the console line
  points at that file; _safe_credit() also strips control characters from the
  stored value.

The clear-text fix was settled by running the query rather than guessing: CodeQL
2.27.6 was installed locally (checksum-verified release archive), a database was
built over plugins/video-explainer, and the three affected queries were run
against the tree. A sanitizer alone did not break the flow, so the printed value
was removed instead. CleartextLogging, PathInjection, and
IncompleteUrlSubstringSanitization now all return zero results for this tree.

Also adds .gitignore entries for local scratch directories.
@sredevopsorgagents
sredevopsorgagents force-pushed the feat/video-explainer-plugin branch from dd7def6 to bb2c46e Compare November 26, 2026 06:13
@ngeorger
ngeorger merged commit 8039a7e into main Nov 26, 2026
5 of 7 checks passed
@ngeorger
ngeorger deleted the feat/video-explainer-plugin branch November 26, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants