Pipeline run pages return 500 for a schedule whose pipeline is not registered
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 85/100
調査の方向性
vulnerabilities/models.py の PipelineSchedule.pipeline_class から始め、その後 PipelineRunListView と PipelineRunDetailView、および PipelineRun.pipeline_url での使用をたどってください。vulnerabilities/tests/test_view.py の新しい PipelineRunViewsUnregisteredPipelineTestCase を実行してください。未登録のパイプラインに対して両方の実行ページが 200 を返し、その id をページ名として表示すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Problem
PipelineSchedule rows persist in the database. When a pipeline is removed or renamed (for example the open "Remove v1 code" work), every stale schedule's run pages crash:
GET /pipelines/<pipeline_id>/runs/→ 500GET /pipelines/<pipeline_id>/run/<uuid>/→ 500
Evidence
PipelineSchedule.pipeline_class (vulnerabilities/models.py) does a bare dict lookup, pipeline_registry[self.pipeline_id], which raises KeyError for an id that is no longer registered. Both PipelineRunListView.get_context_data and PipelineRunDetailView.get_context_data dereference it (pipeline_class.__name__), and the run detail template also reaches it through PipelineRun.pipeline_url when the run has a commit recorded.
Reproduced locally on PostgreSQL 16 with a schedule and a run using pipeline_id="hunt_probe_no_such_pipeline": both pages 500 with KeyError: 'hunt_probe_no_such_pipeline'. The dashboard list page is not affected — its template never calls pipeline_class.
Fix
pipeline_classreturnsNonefor an unregistered id (.get()instead of[]);descriptionalready guards on a falsy class.- Both views fall back to the raw
pipeline_idas the page name when the class is unknown. pipeline_urlreturnsNonewhen the class is unknown, so the detail template's commit link degrades cleanly.
Tests
New PipelineRunViewsUnregisteredPipelineTestCase in vulnerabilities/tests/test_view.py: both pages return 200 with the pipeline id as the name for an unregistered pipeline. Both tests fail on unmodified main and pass with the fix. Full test_view.py: 14 passed (1 pre-existing flaky timing failure in test_aggregate_fixed_and_affected_packages, fails on main too); pipeline model tests 10 passed.
- 主要言語
- Python
- スター
- 719
- フォーク
- 359
- 平均マージ
- 11時間 59分
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aboutcode-org/vulnerablecode のほかの issue
-
Affected-by-advisories v2 page returns 500 for a purl with no matching package対応中かも @sanchit955 が 2 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
aboutcode-org/vulnerablecode#2501 ·
メンテナーはふだん 1 日以内に返信
-
OSV v3 parser shares introduced/fixed commit patches across affected packages対応中かも @Celestial-0 が 15 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
aboutcode-org/vulnerablecode#2489 ·
メンテナーはふだん 1 日以内に返信
-
OSV parser drops all crates.io affected entries because the ecosystem mapping uses cargo対応中かも @Ashutosh-Panda2004 が 22 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
aboutcode-org/vulnerablecode#2485 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Docker Compose setup fails on wait-for-it host web:8000 and missing runtime .env対応中かも @Anurag-S1ngh が 25 日前に担当しました。 オープン
難易度 2/5 半日 初心者へのやさしさ 77/100
aboutcode-org/vulnerablecode#2477 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
OVAL parser corrupts version bounds when the epoch is 10, 20 or the version contains "0:"対応中かも @Ashutosh-Panda2004 が 23 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
aboutcode-org/vulnerablecode#2474 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
aboutcode-org/vulnerablecode の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
mohanraj00/entelos#200 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
-
sweep
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
bketelsen/truenas-mcp#77 ·
メンテナーはふだん 1 日以内に返信
-
Console writes URL credentials to the local log, though AGENTS.md says secrets never reach diskオープン
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
sandbox-quantum/switch#2163 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
openedx/xblock-lti-consumer#765 ·
メンテナーはふだん 1 日以内に返信