From dd778715e0972cda27897fb578574ef7a4110448 Mon Sep 17 00:00:00 2001 From: Miao Yang Date: Tue, 30 Jun 2026 17:46:23 +0800 Subject: [PATCH 1/4] fix(skills): clear Snyk findings and harden supply-chain surface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address the security-audit findings on the published skills with no change to any skill's behaviour. - media-use: resolve.test.mjs runs resolve.mjs via execFileSync with an argv array instead of execSync(`node … "${tmp}" …`), removing the command-injection (CWE-78) sink that drove the Snyk Fail. - music-to-video: replace dynamic `element.innerHTML = ` with a setSvg() helper (DOMParser image/svg+xml + importNode, text fallback) in the intro-kinetic-cascade and logo-split-lockup-pulse frame templates, clearing the DOM-XSS (CWE-79) Snyk Fail. Renders identical SVG. - pr-to-video: fetch-people-avatars.mjs refuses any avatar URL that is not https on a GitHub avatar host (SSRF guard) and only writes under the project dir (path-traversal guard); best-effort, always-exit-0 behaviour is unchanged. - embedded-captions: pin `uvx --from whisperx==3.8.6` (overridable via $WHISPERX_VERSION) so transcription no longer resolves "latest" at runtime. - gsap: add Subresource Integrity (integrity + crossorigin) to the 8 render-time CDN GSAP `; +const GSAP = ``; function bgSkeleton(stageHtml, css, js) { const FONT_CSS = fontCssFor(stageHtml + css); diff --git a/skills/embedded-captions/scripts/transcribe.cjs b/skills/embedded-captions/scripts/transcribe.cjs index c92db2ba2c..8185759747 100644 --- a/skills/embedded-captions/scripts/transcribe.cjs +++ b/skills/embedded-captions/scripts/transcribe.cjs @@ -175,11 +175,15 @@ function main() { const outDir = path.join(project, "_wx_out"); fs.mkdirSync(outDir, { recursive: true }); const wxModel = model.replace(/\.en$/, ""); // whisperx model names are multilingual ids + // Pin whisperx so `uvx` fetches a reproducible build instead of resolving + // "latest" on every run (a supply-chain + determinism foot-gun). Override + // with $WHISPERX_VERSION if you've validated a different release. + const whisperxSpec = `whisperx==${process.env.WHISPERX_VERSION || "3.8.6"}`; const wxArgs = [ "--python", "3.12", "--from", - "whisperx", + whisperxSpec, "whisperx", wav, "--model", diff --git a/skills/faceless-explainer/scripts/assemble-index.mjs b/skills/faceless-explainer/scripts/assemble-index.mjs index f24b32e154..0648a39135 100644 --- a/skills/faceless-explainer/scripts/assemble-index.mjs +++ b/skills/faceless-explainer/scripts/assemble-index.mjs @@ -523,7 +523,7 @@ const html = ` - + diff --git a/skills/faceless-explainer/scripts/captions.mjs b/skills/faceless-explainer/scripts/captions.mjs index f238218d02..433248deb8 100644 --- a/skills/faceless-explainer/scripts/captions.mjs +++ b/skills/faceless-explainer/scripts/captions.mjs @@ -466,7 +466,7 @@ function buildCaptionsHtml(groups, total, W, H) { color: rgba(255, 255, 255, 0.55); } - + + diff --git a/skills/pr-to-video/scripts/assemble-index.mjs b/skills/pr-to-video/scripts/assemble-index.mjs index f24b32e154..0648a39135 100644 --- a/skills/pr-to-video/scripts/assemble-index.mjs +++ b/skills/pr-to-video/scripts/assemble-index.mjs @@ -523,7 +523,7 @@ const html = ` - + diff --git a/skills/pr-to-video/scripts/captions.mjs b/skills/pr-to-video/scripts/captions.mjs index f238218d02..433248deb8 100644 --- a/skills/pr-to-video/scripts/captions.mjs +++ b/skills/pr-to-video/scripts/captions.mjs @@ -466,7 +466,7 @@ function buildCaptionsHtml(groups, total, W, H) { color: rgba(255, 255, 255, 0.55); } - + + diff --git a/skills/product-launch-video/scripts/captions.mjs b/skills/product-launch-video/scripts/captions.mjs index f238218d02..433248deb8 100644 --- a/skills/product-launch-video/scripts/captions.mjs +++ b/skills/product-launch-video/scripts/captions.mjs @@ -466,7 +466,7 @@ function buildCaptionsHtml(groups, total, W, H) { color: rgba(255, 255, 255, 0.55); } - +