Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Warden skill: detect unsafe URI rendering in HTML templates

オープン
#843 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript
領域
security, tooling

調査の方向性

PR #842 と sanitizeHrefURL の allow-list から始めて、修正された脆弱性と想定される URI の処理を理解します。既存の Warden ルールと ESLint 設定を調査し、そのうえで href、src、または action に到達するテンプレートリテラルや連結をどのように検出できるかを判断します。選択した enforcement によって、コードベース全体にある安全でない未検証の sink が報告され、提案されたパターンがカバーされれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Summary

PR #842 fixed a stored XSS in the OAuth approval dialog where client_uri, policy_uri, and tos_uri fields were rendered as clickable href attributes without validating the URI scheme. javascript: URIs bypassed HTML escaping entirely. The fix added an allow-list (sanitizeHrefURL) restricting schemes to http/https.

This class of bug — untrusted string → href without scheme validation — is easy to miss in review and should be caught automatically via a Warden rule.

Current behavior

No static analysis or Warden rule exists to flag patterns like:

// dangerous: href value from external input without scheme validation
`<a href="${uri}">`

Gap

HTML-escaping does not protect against javascript: URIs. Any place where user-controlled or API-sourced strings are interpolated directly into href, src, or action attributes is a latent XSS vector that code review can silently miss.

Options

  • Warden semgrep rule — pattern-match template literals or string concatenation that feeds into href/src/action without passing through an allow-list sanitizer. Flag for human review.
  • ESLint plugin (e.g. eslint-plugin-no-unsanitized) — enforce at lint time in CI; blocks merges rather than async Warden alerts.
  • Both — Warden for existing codebase sweep + ESLint for ongoing enforcement.

Recommendation

Ship a Warden rule first for a broad sweep across the codebase, then layer in an ESLint rule (or extend the existing config) so new instances are caught at PR time before merge.

Action taken on behalf of David Cramer.

主要言語
TypeScript
スター
938
フォーク
166
平均マージ
1日 7時間
マージ済み PR(30日)
156

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

getsentry/toolkit のほかの issue

getsentry/toolkit の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。