manage.py run: Fix Package URL (pkg:) handling and comma-splitting in input_location
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
Read scanpipe/management/commands/run.py, especially get_input_options() and its handling of input_location. Reproduce with the two pkg: examples in the issue. Done means Package URLs reach create-project as input URLs and commas inside qualifiers are preserved; a linked pull request is already open for this issue.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
In scanpipe/management/commands/run.py, get_input_options() inspects the input argument using location.startswith(tuple(SCHEME_TO_FETCHER_MAPPING.keys())).
Because SCHEME_TO_FETCHER_MAPPING only maps http, https, and docker, Package URLs (pkg:) are not recognized as URLs. They fall into the file handling block, where Path("pkg:...").exists() fails with CommandError: pkg:... not found.
In addition, splitting input_location indiscriminately using split(",") breaks Package URLs that contain commas in qualifiers (for example: pkg:deb/debian/[email protected]?arch=i386,distro=jessie).
System configuration
- Which version of ScanCode.io are you running? main branch
- Are you running the app using Docker? No
- On which OS? macOS
- What inputs are you using? Package URL (e.g. pkg:npm/[email protected] or pkg:deb/debian/[email protected]?arch=i386,distro=jessie)
- Which pipeline are you running? Any pipeline run via manage.py run (e.g. scan_single_package)
To Reproduce
Steps to reproduce the behavior:
- Run: python manage.py run scan_single_package pkg:npm/[email protected]
- See error: CommandError: pkg:npm/[email protected] not found.
- Or run: python manage.py run scan_single_package "pkg:deb/debian/[email protected]?arch=i386,distro=jessie"
- See error: CommandError: distro=jessie not found.
Expected behavior
Package URLs starting with pkg: should be recognized as input URLs, qualifiers containing commas should not be split, and inputs should be passed to create-project in input_urls.
- 主要言語
- Python
- スター
- 226
- フォーク
- 222
- 平均マージ
- 1日 5時間
- マージ済み PR(30日)
- 32
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aboutcode-org/scancode.io のほかの issue
-
Register Missing Models in Django Admin (DiscoveredLicense, ProjectMessage, CodebaseRelation, Run, WebhookSubscription)対応中かも @Rucha0901 が 5 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
aboutcode-org/scancode.io#2329 ·
メンテナーはふだん 1 日以内に返信
-
ignored_dependency_scopes does not exclude npm devDependencies対応中かも @MGpromax が 83 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
aboutcode-org/scancode.io#2215 ·
メンテナーはふだん 1 日以内に返信
-
Delivery Error in scan_single_package: No connection adapters were found for '/notifications/send_scan_notification/再び着手できるかも @akshat-lakhera が 30 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
aboutcode-org/scancode.io#2206 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
update `run` cli command to run pipelines without an input対応中かも @NoiceHax が 95 日前に担当しました。 オープンnice-to-have
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
aboutcode-org/scancode.io#2203 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Local developement docs are outdated対応中かも @nik-767 が 125 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
aboutcode-org/scancode.io#2197 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
aboutcode-org/scancode.io の issue をすべて見る
似ている issue
-
author-page correction move-papers
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
acl-org/acl-anthology#10978 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
GoogleCloudPlatform/professional-services-data-validator#1899 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
HKUDS/CLI-Anything#652 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Project-N-E-K-O/N.E.K.O#3813 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Dao-AILab/flash-attention#3191 ·
メンテナーはふだん 4 日以内に返信