TaskType enum fails to deserialize lowercase "lint" value defined by CycloneDX 1.6 schema
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 org.cyclonedx.model.formulation.FormulationCommon$TaskType 和 JsonParser.parse(...) 入口点开始,然后将枚举值与 src/main/resources/bom-1.6.schema.json 进行比较。验证包含 "lint"、"scan"、"deploy" 和 "test" 等 taskTypes 值的 CycloneDX 1.6 BOM 能够成功解析,且不会出现 InvalidFormatException。
由索引模型根据 Issue 内容生成。
描述
When parsing a CycloneDX 1.6 JSON BOM that contains a formulation[].workflows[].taskTypes array with the value "lint" (as defined by the official spec), JsonParser.parse(...) throws an InvalidFormatException. The library expects "LINT" (uppercase) — a case mismatch that violates the official CycloneDX 1.6 JSON schema.
Library version :- org.cyclonedx:cyclonedx-core-java:12.1.0
As per the official CycloneDX 1.6 JSON schema (https://github.com/CycloneDX/cyclonedx-core-java/blob/cyclonedx-core-java-12.1.0/src/main/resources/bom-1.6.schema.json), the taskType definition declares lowercase enum values:
Expected behavior
"taskType": {
"type": "string",
"enum": [
"copy", "clone", "lint", "scan", "merge", "build",
"test", "deliver", "deploy", "release", "clean", "other"
]
}
Therefore, a BOM containing "taskTypes": ["lint", "scan", "deploy", "test"] should parse successfully.
Actual behavior
JsonParser.parse(...) throws:
com.fasterxml.jackson.databind.exc.InvalidFormatException:
Cannot deserialize value of type org.cyclonedx.model.formulation.FormulationCommon$TaskType
from String "lint": not one of the values accepted for Enum class:
[other, test, LINT, deliver, release, merge, clean, clone, build, copy, deploy, scan]
- 主要语言
- Java
- 星标
- 122
- 派生
- 92
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 10
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CycloneDX/cyclonedx-core-java 的其他 Issue
-
breaking change
难度 2/5 1-3 小时 新手友好度 72/100
CycloneDX/cyclonedx-core-java#917 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
CycloneDX/cyclonedx-core-java#681 · 1 条评论 ·
维护者通常 1 天内回复
-
XML deserialization fails for pedigree/commits on a metadata/tools/components component可能重新可做 @Dushyant7090 于 19 天前认领,目前没有进行中的 PR。 未关闭
难度 3/5 1-2 天 新手友好度 35/100
CycloneDX/cyclonedx-core-java#942 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 68/100
CycloneDX/cyclonedx-core-java#938 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 55/100
CycloneDX/cyclonedx-core-java#902 ·
维护者通常 1 天内回复
查看 CycloneDX/cyclonedx-core-java 的全部 Issue
相似的 Issue
-
status: waiting-for-triage
难度 2/5 1-3 小时 新手友好度 72/100
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
AOT compilation fails for derived delete queries returning Set可能已有人在做 @ryujungkyun 今天认领。 未关闭status: waiting-for-triage
难度 2/5 1-3 小时 新手友好度 72/100
spring-projects/spring-data-jpa#4387 ·
维护者通常 3 天内回复
-
:ml/Transform >bug Team:ML
难度 2/5 半天 新手友好度 64/100
elastic/elasticsearch#161960 · 2 条评论 · 1 个 reaction ·
维护者通常 1 天内回复