URLDataTypeSerializer treats mixed-case HTTP(S) schemes as local paths

オープン 初心者向け
#3,861 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

@akhil9tiet がすでに取り組んでいます。

2026年11月3日 から。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python, sqlite
領域
data

調査の方向性

まず URLDataTypeSerializer クラスと、URLかローカルパスかを判定する大文字小文字を区別する接頭辞チェックから始めてください。合成値 HTTPS://example.invalid/é?q=☃ をハッシュ処理と、インメモリSQLiteメモリ上の add_seeds_to_memory_async に通して再現します。http と https が大文字小文字を区別せずに一致し、ハッシュ入力には元のURLの表記が保持され、ローカルパスは従来どおり動作すれば完了です。

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

説明

Bug: triage help wanted
Describe the bug

URLDataTypeSerializer uses a case-sensitive prefix check to decide whether a value is a URL or a local path. HTTPS://... and HtTp://... are valid HTTP(S) URLs, but are classified as files. Hashing and public seed ingestion then raise FileNotFoundError.

Steps/Code to Reproduce

Use a SQLiteMemory and URLDataTypeSerializer with the synthetic URL HTTPS://example.invalid/é?q=☃, then hash it or pass it to add_seeds_to_memory_async. No URL needs to be fetched.

Expected Results

Recognize http and https schemes case-insensitively while preserving the original URL spelling and hash input; continue handling local paths normally.

Actual Results

Lowercase https:// hashes and ingests successfully. Uppercase and mixed-case schemes set data_on_disk=true; both operations raise FileNotFoundError for the URL string treated as a path.

Screenshots

N/A. SDK and local SQLite reproduction; no external URL was fetched.

Versions

Linux; Python 3.12.3; PyRIT 1.2.0.dev0 at revision 01ce6ca66a315770b36c7dca1f320668c0d92d7c. Real SDK and in-memory SQLite; no network fetch or model call.

主要言語
Python
スター
4.7k
フォーク
1k
平均マージ
2日 3時間
マージ済み PR(30日)
465

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

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

microsoft/PyRIT のほかの issue

microsoft/PyRIT の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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