You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] ExternalReferenceType misspells 'rfc-9116' enum member as RFC_9166 instead of RFC_9116 #1074
cyclonedx.model.ExternalReferenceType defines the CycloneDX 1.6+ 'rfc-9116' external reference type with transposed digits as RFC_9166 instead of RFC_9116, so accessing ExternalReferenceType.RFC_9116 raises AttributeError.
pip install cyclonedx-python-lib==11.12.0
python3 - <<'PY'from cyclonedx.model import ExternalReferenceTypeprint("Member for 'rfc-9116':", ExternalReferenceType("rfc-9116").name)assert not hasattr(ExternalReferenceType, "RFC_9116")PY
Actual output:
Member for 'rfc-9116': RFC_9166
Expected ExternalReferenceType.RFC_9116 with .name == 'RFC_9116' and .value == 'rfc-9116', matching the CycloneDX externalReferenceType schema value 'rfc-9116' (https://cyclonedx.org/docs/1.7/xml/#type_externalReferenceType) and the UPPER_SNAKE_CASE naming of the other ExternalReferenceType members.
Tested with cyclonedx-python-lib 11.12.0 (45da84afdf) on Linux with Python 3, and verified unchanged in main (3d62bf6723).
In cyclonedx/model/__init__.py line 517 (and _ExternalReferenceSerializationHelper.__CASES at line 589), the enum member is spelled RFC_9166 = 'rfc-9116' (missed by TestEnumExternalReferenceType.test_knows_value in tests/test_enums.py because _test_knows_value only checks ExternalReferenceType(value)).
Found with a differential-testing tool; the report was drafted with AI assistance and reviewed and edited by me.
changed the title [-]ExternalReferenceType misspells 'rfc-9116' enum member as RFC_9166 instead of RFC_9116[/-][+][BUG] ExternalReferenceType misspells 'rfc-9116' enum member as RFC_9166 instead of RFC_9116[/+]on Nov 25, 2026
Activity
jkowalleck commentedon Nov 25, 2026
yep, this is a bug.
cyclonedx-python-lib/cyclonedx/model/__init__.py
Line 517 in 3d62bf6
RFC_9166should beRFC_9116A bug fix would be a breaking change. this is not a blocker, just a remark
[-]ExternalReferenceType misspells 'rfc-9116' enum member as RFC_9166 instead of RFC_9116[/-][+][BUG] ExternalReferenceType misspells 'rfc-9116' enum member as RFC_9166 instead of RFC_9116[/+]jkowalleck commentedon Nov 25, 2026
this library is a community effort - feel free to contribute.