thumbs: the image fetch has no private-host, scheme, body-size or converter-time limits, and no workflow has a job timeout
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- github-actions, javascript, node.js
調査の方向性
Start with site/lib/thumbs.mjs, site/checks.mjs, and the thumbs.yml and links.yml workflows. Trace image URL validation, redirects, body reading, and the ffmpeg call, then check how workflow jobs are declared. Done means the private-host, size-cap, converter-timeout, and workflow-timeout cases in the issue are handled; the issue does not name tests, so identify or add focused fixtures for those cases.
索引モデルが issue の本文から書いたものです。
説明
Why it matters
site/thumbs.mjs runs monthly on an Actions runner with contents: write and follows whatever a third-party page's og:image says. A broken or hostile publisher page can make it request internal addresses, buffer an unbounded body in memory, or leave ffmpeg running until the job's 6-hour default timeout. None of this reaches the deployed site (a bad image is still just a resized image), so this is hardening rather than a vulnerability, and each item is a small fix.
Evidence (at 69387df)
site/lib/thumbs.mjs:93-95accepts anyhttp:/https:host; anog:imagepointing at a loopback address is returned as a valid URL.validateguards entry URLs withisPrivateHost(site/checks.mjs:651, 671) butthumbs.mjsandcheckPreviewField(checks.mjs:787-792) do not reuse it.- Plain-http images are fetched and stored:
adventure-kid-irs,eric-skiff-resistor-anthems,synfiginsite/thumbs.json. site/thumbs.mjs:99-107reads the whole body (await res.arrayBuffer()) before comparing toMAX_IMAGE_BYTES;content-lengthis optional and unverified.site/thumbs.mjs:87-97callsexecFileSync("ffmpeg", ...)with notimeoutand nomaxBuffer.- No
timeout-minuteson any job in.github/workflows/*.yml.
Suggested approach
Move isPrivateHost into site/lib/ and apply it to the og:image URL, to preview: in checkPreviewField, and to the final res.url after redirects. Reject http: images or upgrade to https: and fall back only when the upgrade fails. Stream the body with a byte cap, aborting past MAX_IMAGE_BYTES. Pass { timeout: 30_000, killSignal: "SIGKILL" } to execFileSync, and sniff the first bytes for PNG/JPEG/GIF/WebP magic before invoking the converter. Add timeout-minutes: 30 to thumbs.yml and links.yml, and a smaller value to the others.
Done when
A fixture with a private og:image is reported as "skipped: private host"; a fetch that exceeds the cap aborts without buffering; a converter hang ends with "convert failed: timed out"; every workflow job has a timeout.
- 主要言語
- JavaScript
- スター
- 58
- フォーク
- 15
- 平均マージ
- 16時間 53分
- マージ済み PR(30日)
- 14
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TMHSDigital/Free-Game-Dev-Assets のほかの issue
-
community marketing priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
TMHSDigital/Free-Game-Dev-Assets#151 ·
メンテナーはふだん 1 日以内に返信
-
community marketing priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
TMHSDigital/Free-Game-Dev-Assets#150 ·
メンテナーはふだん 1 日以内に返信
-
community enhancement priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
TMHSDigital/Free-Game-Dev-Assets#149 ·
メンテナーはふだん 1 日以内に返信
-
community documentation priority: medium
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
TMHSDigital/Free-Game-Dev-Assets#148 ·
メンテナーはふだん 1 日以内に返信
-
site: the Unreal guide is missing from the homepage Guides list, and the hero calls tools "assets"オープンbug marketing priority: medium
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
TMHSDigital/Free-Game-Dev-Assets#147 ·
メンテナーはふだん 1 日以内に返信
TMHSDigital/Free-Game-Dev-Assets の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
oskarrough/dodgethis#115 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefix対応中かも @ItsDeadlyProgrammer が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
appsmithorg/appsmith#42471 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
external-plugin requires-submitter-fixes
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
github/awesome-copilot#5396 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
chenasraf/nextcloud-forum#348 ·
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
melodic-software/claude-code-plugins#9619 ·
メンテナーはふだん 1 日以内に返信