Skip to content

A local video studio for your coding agent. Describe a video in one sentence: your agent directs, your machine renders. Claude Code, Codex, Cursor, Devin and more. No API keys, no uploads.

Code scanning: review page media URL from the server's route; pr_video hostname check

Favio Vázquezc7d99504e08e
diff --git a/skills/showtime/lib/st/pr_video.py b/skills/showtime/lib/st/pr_video.py
index 790aad3..0754f1b 100644
--- a/skills/showtime/lib/st/pr_video.py
+++ b/skills/showtime/lib/st/pr_video.py
@@ -17,6 +17,7 @@ import math
import os
import re
import time
+import urllib.parse
from pathlib import Path
from typing import Any, Dict, List, Optional, Sequence, Tuple
@@ -295,7 +296,7 @@ def normalize_meta(d: Dict[str, Any]) -> Dict[str, Any]:
"""`gh pr view --json ...` output or a REST `pulls/N` object -> one shape."""
author = d.get("author") or d.get("user") or {}
url = d.get("url") or d.get("html_url") or ""
- if "api.github.com" in url:
+ if (urllib.parse.urlparse(url).hostname or "").lower() == "api.github.com": # a REST object's API url
url = d.get("html_url") or ""
repo, number = parse_pr_ref(url)
files = []
diff --git a/skills/showtime/runtime/review/review.js b/skills/showtime/runtime/review/review.js
index 7237204..3402a92 100644
--- a/skills/showtime/runtime/review/review.js
+++ b/skills/showtime/runtime/review/review.js
@@ -35,7 +35,7 @@
function videoSource() {
var v = D.createElement('video');
v.preload = 'auto'; v.playsInline = true; v.setAttribute('playsinline', ''); v.setAttribute('aria-hidden', 'true');
- v.src = CFG.src;
+ v.src = '/video/' + encodeURIComponent(String(CFG.media || '')); // the server's own route, never a URL from the page
stage.insertBefore(v, layer);
var s = {
kind: 'video', el: v,
@@ -61,7 +61,7 @@
function exportSource() {
var f = D.createElement('iframe');
f.title = 'video'; f.setAttribute('tabindex', '-1'); f.setAttribute('aria-hidden', 'true');
- f.src = CFG.src;
+ f.src = '/export/' + encodeURIComponent(String(CFG.media || '')); // the server's own route, never a URL from the page
stage.insertBefore(f, layer);
var P = null;
var s = {