Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

TaskType enum fails to deserialize lowercase "lint" value defined by CycloneDX 1.6 schema

未关闭 适合新手
#819 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
java
领域
backend

调研方向

从 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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

CycloneDX/cyclonedx-core-java 的其他 Issue

查看 CycloneDX/cyclonedx-core-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。