manage.py run: Fix Package URL (pkg:) handling and comma-splitting in input_location
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 30/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 226
- Fork
- 222
- Merge trung bình
- 1 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 32
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của aboutcode-org/scancode.io
-
project_inputs.html uses undefined file variable for dropdown IDs, lacks visual tag badges, and has empty delete labelsCó thể đã có người làm @Rucha0901 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
aboutcode-org/scancode.io#2354 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Register Missing Models in Django Admin (DiscoveredLicense, ProjectMessage, CodebaseRelation, Run, WebhookSubscription)Có thể đã có người làm @Rucha0901 đã nhận 5 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
aboutcode-org/scancode.io#2329 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ignored_dependency_scopes does not exclude npm devDependenciesCó thể đã có người làm @MGpromax đã nhận 83 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
aboutcode-org/scancode.io#2215 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Delivery Error in scan_single_package: No connection adapters were found for '/notifications/send_scan_notification/Có thể làm lại được @akshat-lakhera đã nhận 30 ngày trước và không có pull request nào đang mở. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
aboutcode-org/scancode.io#2206 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
update `run` cli command to run pipelines without an inputCó thể đã có người làm @NoiceHax đã nhận 95 ngày trước. Đang mởnice-to-have
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
aboutcode-org/scancode.io#2203 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của aboutcode-org/scancode.io
Issue tương tự
-
author-page correction move-papers
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
acl-org/acl-anthology#10978 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
PostgreSQL results table stores labels with single quotes, and a double quote in a label fails the writeCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
GoogleCloudPlatform/professional-services-data-validator#1899 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
HKUDS/CLI-Anything#652 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Project-N-E-K-O/N.E.K.O#3813 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Dao-AILab/flash-attention#3191 ·
Maintainer thường phản hồi trong vòng 4 ngày