aquasecurity/trivy

enhancement(cyclonedx): use `component.evidence.occurrences.location` for filapaths and linenumber

开放

#9,832 创建于 2025年11月20日

 (1 条评论) (1 个反应) (0 位负责人)Go (371 个派生)batch import
help wanted

仓库指标

星标
 (35,000 个星标)
PR 合并指标
 (平均合并 5天 2小时) (30 天内合并 53 个 PR)

描述

Description

In CycloneDX 1.5, the location and line fields were added under component.evidence.occurrences. These are fields we can use in Trivy:

  1. location can be used instead of property.filePath
  2. line can be used if Trivy supports detecting line numbers for that file

Example:

https://github.com/CycloneDX/cyclonedx-go/blob/72e4629d580624c7d6bd815e2d209a0a62d08047/testdata/valid-evidence.json#L74-L77

Discussed in https://github.com/aquasecurity/trivy/discussions/9823

贡献者指南