CycloneDX / CycloneDX/cyclonedx-python-lib

Wrong input should result into an exception

Đang mở
#766 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
breaking change
Ngôn ngữ chính
Python
Star
116
Fork
67
Merge trung bình
8 ngày 2 giờ
Pull request đã merge (30 ngày)
2

Mô tả

The code in spdx.py function `is_compound_expression` may run into an exception for several cases, and this results into a `return False`.

This is semantically overloaded.
In case of `False` we cannot distinguish between
- the value cannot be interpreted at all (invalid characters)
- it is a compound expression, but consists of partially unknown, but maybe valid simple (e.g. LicenseRef-*) expression(s)

So it may not be clear what is feasible of how to proceed in case of False.

In case of invalid characters the exception should not be caught, but (re)raised so that an appropriate exception handling can be applied.

The `validate` parameter should be made available in the `is_compound_expression` function to allow either both license item validation along with the compound check or compound check only.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.