test : add unit tests for _contextual_severity_score helper
@taneesha-reyyi đang làm issue này rồi.
Từ ngày 30/7/2026.
- #2256 của @tmdeveloper007 — đã đóng, không merge
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Summary of What Needs to be Done:
Add unit tests for risk_scoring._contextual_severity_score in testing/backend/unit/test_risk_scoring_helpers.py. This helper function adjusts severity based on business context but is not directly tested.
Changes that Need to be Made:
Add tests for _contextual_severity_score(score, context) in testing/backend/unit/test_risk_scoring_helpers.py:
For _contextual_severity_score:
- boosts score when context is 'critical' (business-critical asset)
- boosts score when context is 'high'
- reduces score when context is 'low' or None
- clamps to max 10.0
- clamps to min 0.0
- neutral context ('medium') returns original score
- unknown context string returns original score (no crash)
Impact that it would Provide:
- Ensures business context properly adjusts risk scores
- Tests a critical risk scoring path that is exercised indirectly
- Pure function, fully mockable
Note: This task is being handled by tmdeveloper007 — please assign to that account when picking it up.
- Ngôn ngữ chính
- Python
- Star
- 36
- Fork
- 234
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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 utksh1/SecuScan
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
area:frontend good first issue level:intermediate priority:low type:testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
-
area:frontend good first issue level:intermediate priority:low type:testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
area:frontend good first issue level:beginner priority:low type:testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
area:frontend good first issue level:intermediate priority:low type:testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Tất cả issue của utksh1/SecuScan
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
comp/desktop P3 type/feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
NousResearch/hermes-agent#154285 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
docs: qualify copied and custom kubectl debug policy notesCó thể đã có người làm @nym01 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
kubescape/cel-admission-library#166 · 1 bình luận ·
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 68/100
SACGF/variantgrid#2804 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] HTTP lifecycle dispatch treats a NO_PROXY-only environment as corporate egress and skips the resolve-and-pinned sessionCó thể đã có người làm @bodapatisaikrishna đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày