ScoringSystem.get() and compute() return NotImplementedError instead of raising it

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

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

@sc-lacanlale がすでに取り組んでいます。

2026年11月30日 から。

  • #2553 @sc-lacanlale による — オープン

評価

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

調査の方向性

issueで指定された3つのメソッドについて vulnerabilities/severity_systems.py を読み、続いて列挙された呼び出し元を調べて、NotImplementedError をどのように処理しているか確認してください。これらのメソッドが想定どおり例外を送出するように変更し、重大度スコアリングと未サポートのシステムに関する関連テストを実行してください。未サポートのシステムがスキップされ、例外クラスが severity_vectors に追加されない状態になれば完了です。

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

説明

ScoringSystem.compute(), ScoringSystem.get(), and EPSSScoringSystem.compute() in vulnerabilities/severity_systems.py (lines 39, 42, 230) use return NotImplementedError instead of raise NotImplementedError.

All four callers of ScoringSystem.get() (vulnerabilities/models.py:493-504, vulnerabilities/views.py:548-557 and 711-720, and vulnerabilities/api.py:268-276) catch NotImplementedError. Because get() returns the exception class (which is truthy), unsupported scoring systems bypass except NotImplementedError and append <class 'NotImplementedError'> to severity_vectors.

Expected behavior: ScoringSystem.compute(), ScoringSystem.get(), and EPSSScoringSystem.compute() raise NotImplementedError so callers skip unsupported systems as intended.

主要言語
Python
スター
722
フォーク
364
平均マージ
2日 22時間
マージ済み PR(30日)
2

環境構築

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

はじめの一歩

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

aboutcode-org/vulnerablecode のほかの issue

aboutcode-org/vulnerablecode の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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