Compare commits

...

7 Commits

Author SHA1 Message Date
Aqua Security automated builds
60c57ad5ad release: v0.67.2 [release/v0.67] (#9639) 2025-10-10 12:53:16 +00:00
DmitriyLewen
f3ee80c8e0 fix: Use fetch-level: 1 to check out trivy-repo in the release workflow [backport: release/v0.67] (#9638) 2025-10-10 12:30:14 +00:00
Aqua Security automated builds
cbed239f39 release: v0.67.1 [release/v0.67] (#9614) 2025-10-09 10:55:07 +00:00
Aqua Security automated builds
1a840935bb fix: restore compatibility for google.protobuf.Value [backport: release/v0.67] (#9631)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2025-10-09 10:32:28 +00:00
Aqua Security automated builds
3bc1490c8c fix: using SrcVersion instead of Version for echo detector [backport: release/v0.67] (#9629)
Co-authored-by: Ori <59772293+orizerah@users.noreply.github.com>
2025-10-09 07:59:51 +00:00
Aqua Security automated builds
542eee7c38 fix: add buildInfo for BlobInfo in rpc package [backport: release/v0.67] (#9615)
Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com>
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2025-10-08 12:22:15 +00:00
Aqua Security automated builds
f65dd05309 fix(vex): don't use reused BOM [backport: release/v0.67] (#9612)
Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com>
2025-10-08 10:58:02 +00:00
19 changed files with 842 additions and 628 deletions

View File

@@ -39,7 +39,6 @@ jobs:
with: with:
repository: ${{ github.repository_owner }}/trivy-repo repository: ${{ github.repository_owner }}/trivy-repo
path: trivy-repo path: trivy-repo
fetch-depth: 0
token: ${{ secrets.ORG_REPO_TOKEN }} token: ${{ secrets.ORG_REPO_TOKEN }}
- name: Setup git settings - name: Setup git settings

View File

@@ -1 +1 @@
{".":"0.67.0"} {".":"0.67.2"}

View File

@@ -1,5 +1,22 @@
# Changelog # Changelog
## [0.67.2](https://github.com/aquasecurity/trivy/compare/v0.67.1...v0.67.2) (2025-10-10)
### Bug Fixes
* Use `fetch-level: 1` to check out trivy-repo in the release workflow [backport: release/v0.67] ([#9638](https://github.com/aquasecurity/trivy/issues/9638)) ([f3ee80c](https://github.com/aquasecurity/trivy/commit/f3ee80c8e0a92a7d61f2fee21bfb9a44d95067da))
## [0.67.1](https://github.com/aquasecurity/trivy/compare/v0.67.0...v0.67.1) (2025-10-09)
### Bug Fixes
* add `buildInfo` for `BlobInfo` in `rpc` package [backport: release/v0.67] ([#9615](https://github.com/aquasecurity/trivy/issues/9615)) ([542eee7](https://github.com/aquasecurity/trivy/commit/542eee7c387de4ef885ee7364b0264c0fd614587))
* restore compatibility for google.protobuf.Value [backport: release/v0.67] ([#9631](https://github.com/aquasecurity/trivy/issues/9631)) ([1a84093](https://github.com/aquasecurity/trivy/commit/1a840935bbd93b26bdbe3994d68487ca134fc407))
* using SrcVersion instead of Version for echo detector [backport: release/v0.67] ([#9629](https://github.com/aquasecurity/trivy/issues/9629)) ([3bc1490](https://github.com/aquasecurity/trivy/commit/3bc1490c8ca941989e219b9fccacff0f72df950c))
* **vex:** don't use reused BOM [backport: release/v0.67] ([#9612](https://github.com/aquasecurity/trivy/issues/9612)) ([f65dd05](https://github.com/aquasecurity/trivy/commit/f65dd053096795e7beb88c92340430ee8d89c3e8))
## [0.67.0](https://github.com/aquasecurity/trivy/compare/v0.66.0...v0.67.0) (2025-09-30) ## [0.67.0](https://github.com/aquasecurity/trivy/compare/v0.66.0...v0.67.0) (2025-09-30)

View File

@@ -36,7 +36,7 @@ func (s *Scanner) Detect(ctx context.Context, _ string, _ *ftypes.Repository, pk
if err != nil { if err != nil {
return nil, xerrors.Errorf("failed to get echo advisories: %w", err) return nil, xerrors.Errorf("failed to get echo advisories: %w", err)
} }
formattedInstalledVersion := utils.FormatVersion(pkg) formattedInstalledVersion := utils.FormatSrcVersion(pkg)
installedVersion, err := version.NewVersion(formattedInstalledVersion) installedVersion, err := version.NewVersion(formattedInstalledVersion)
if err != nil { if err != nil {
return nil, xerrors.Errorf("failed to parse installed version: %w", err) return nil, xerrors.Errorf("failed to parse installed version: %w", err)

View File

@@ -152,6 +152,7 @@ func TestScanner_Detect(t *testing.T) {
SrcName: "nginx", SrcName: "nginx",
SrcVersion: "1.14.2", SrcVersion: "1.14.2",
Release: "1ubuntu1", Release: "1ubuntu1",
SrcRelease: "1ubuntu1",
Layer: ftypes.Layer{ Layer: ftypes.Layer{
DiffID: "sha256:932da51564135c98a49a34a193d6cd363d8fa4184d957fde16c9d8527b3f3b02", DiffID: "sha256:932da51564135c98a49a34a193d6cd363d8fa4184d957fde16c9d8527b3f3b02",
}, },
@@ -163,6 +164,7 @@ func TestScanner_Detect(t *testing.T) {
Version: "2.4.24", Version: "2.4.24",
SrcVersion: "2.4.24", SrcVersion: "2.4.24",
Release: "2", Release: "2",
SrcRelease: "2",
Layer: ftypes.Layer{ Layer: ftypes.Layer{
DiffID: "sha256:932da51564135c98a49a34a193d6cd363d8fa4184d957fde16c9d8527b3f3b02", DiffID: "sha256:932da51564135c98a49a34a193d6cd363d8fa4184d957fde16c9d8527b3f3b02",
}, },
@@ -226,7 +228,7 @@ func TestScanner_Detect(t *testing.T) {
name: "happy path - no matching packages", name: "happy path - no matching packages",
args: args{ args: args{
pkgs: []ftypes.Package{ pkgs: []ftypes.Package{
{ID: "echo", Version: "1.0.0"}, {ID: "echo", Version: "1.0.0", SrcVersion: "1.0.0", SrcName: "echo"},
}, },
}, },
want: nil, want: nil,
@@ -239,7 +241,7 @@ func TestScanner_Detect(t *testing.T) {
}, },
args: args{ args: args{
pkgs: []ftypes.Package{ pkgs: []ftypes.Package{
{SrcName: "apache2", Version: "1.0.0"}, {SrcName: "apache2", Version: "1.0.0", SrcVersion: "1.0.0"},
}, },
}, },
wantErr: "failed to get echo advisories", wantErr: "failed to get echo advisories",

View File

@@ -140,13 +140,13 @@ func TestScanner_Scan(t *testing.T) {
CweIDs: []string{"CWE-78"}, CweIDs: []string{"CWE-78"},
LastModifiedDate: utils.MustTimeParse("2020-01-01T01:01:00Z"), LastModifiedDate: utils.MustTimeParse("2020-01-01T01:01:00Z"),
PublishedDate: utils.MustTimeParse("2001-01-01T01:01:00Z"), PublishedDate: utils.MustTimeParse("2001-01-01T01:01:00Z"),
Custom: []uint8(nil), Custom: nil,
}, },
SeveritySource: "nvd", SeveritySource: "nvd",
Layer: ftypes.Layer{ Layer: ftypes.Layer{
DiffID: "sha256:5216338b40a7b96416b8b9858974bbe4acc3096ee60acbc4dfb1ee02aecceb10", DiffID: "sha256:5216338b40a7b96416b8b9858974bbe4acc3096ee60acbc4dfb1ee02aecceb10",
}, },
Custom: []uint8(nil), Custom: nil,
}, },
}, },
}, },

View File

@@ -1,7 +1,8 @@
package rpc package rpc
import ( import (
"encoding/json" jsonv2 "encoding/json/v2"
"strings"
"time" "time"
"github.com/package-url/packageurl-go" "github.com/package-url/packageurl-go"
@@ -299,14 +300,17 @@ func ConvertToRPCVulns(vulns []types.DetectedVulnerability) []*common.Vulnerabil
publishedDate = timestamppb.New(*vuln.PublishedDate) // nolint: errcheck publishedDate = timestamppb.New(*vuln.PublishedDate) // nolint: errcheck
} }
var customAdvisoryData, customVulnData []byte var customAdvisoryData, customVulnData *structpb.Value
var builder strings.Builder
if vuln.Custom != nil { if vuln.Custom != nil {
jsonBytes, _ := json.Marshal(vuln.Custom) // nolint: errcheck builder.Reset()
customAdvisoryData = jsonBytes _ = jsonv2.MarshalWrite(&builder, vuln.Custom) // nolint: errcheck
customAdvisoryData = structpb.NewStringValue(builder.String())
} }
if vuln.Vulnerability.Custom != nil { if vuln.Vulnerability.Custom != nil {
jsonBytes, _ := json.Marshal(vuln.Vulnerability.Custom) // nolint: errcheck builder.Reset()
customVulnData = jsonBytes _ = jsonv2.MarshalWrite(&builder, vuln.Vulnerability.Custom) // nolint: errcheck
customVulnData = structpb.NewStringValue(builder.String())
} }
rpcVulns = append(rpcVulns, &common.Vulnerability{ rpcVulns = append(rpcVulns, &common.Vulnerability{
@@ -600,6 +604,15 @@ func ConvertFromRPCVulns(rpcVulns []*common.Vulnerability) []types.DetectedVulne
publishedDate = lo.ToPtr(vuln.PublishedDate.AsTime()) publishedDate = lo.ToPtr(vuln.PublishedDate.AsTime())
} }
// Handle custom data conversion from protobuf.Value
var customVulnData, customAdvisoryData any
if vuln.CustomVulnData != nil {
customVulnData = vuln.CustomVulnData.AsInterface()
}
if vuln.CustomAdvisoryData != nil {
customAdvisoryData = vuln.CustomAdvisoryData.AsInterface()
}
vulns = append(vulns, types.DetectedVulnerability{ vulns = append(vulns, types.DetectedVulnerability{
VulnerabilityID: vuln.VulnerabilityId, VulnerabilityID: vuln.VulnerabilityId,
VendorIDs: vuln.VendorIds, VendorIDs: vuln.VendorIds,
@@ -619,13 +632,13 @@ func ConvertFromRPCVulns(rpcVulns []*common.Vulnerability) []types.DetectedVulne
CweIDs: vuln.CweIds, CweIDs: vuln.CweIds,
LastModifiedDate: lastModifiedDate, LastModifiedDate: lastModifiedDate,
PublishedDate: publishedDate, PublishedDate: publishedDate,
Custom: vuln.CustomVulnData, Custom: customVulnData,
VendorSeverity: vendorSeverityMap, VendorSeverity: vendorSeverityMap,
}, },
Layer: ConvertFromRPCLayer(vuln.Layer), Layer: ConvertFromRPCLayer(vuln.Layer),
SeveritySource: dbTypes.SourceID(vuln.SeveritySource), SeveritySource: dbTypes.SourceID(vuln.SeveritySource),
PrimaryURL: vuln.PrimaryUrl, PrimaryURL: vuln.PrimaryUrl,
Custom: vuln.CustomAdvisoryData, Custom: customAdvisoryData,
DataSource: ConvertFromRPCDataSource(vuln.DataSource), DataSource: ConvertFromRPCDataSource(vuln.DataSource),
}) })
} }
@@ -834,6 +847,7 @@ func ConvertFromRPCPutBlobRequest(req *cache.PutBlobRequest) ftypes.BlobInfo {
CreatedBy: req.BlobInfo.CreatedBy, CreatedBy: req.BlobInfo.CreatedBy,
OpaqueDirs: req.BlobInfo.OpaqueDirs, OpaqueDirs: req.BlobInfo.OpaqueDirs,
WhiteoutFiles: req.BlobInfo.WhiteoutFiles, WhiteoutFiles: req.BlobInfo.WhiteoutFiles,
BuildInfo: ConvertFromRPCBuildInfo(req.BlobInfo.BuildInfo),
} }
} }
@@ -858,6 +872,18 @@ func ConvertToRPCRepository(repo *ftypes.Repository) *common.Repository {
} }
} }
// ConvertFromRPCBuildInfo converts *common.BuildInfo to *ftypes.BuildInfo
func ConvertFromRPCBuildInfo(buildInfo *common.BuildInfo) *ftypes.BuildInfo {
if buildInfo == nil {
return nil
}
return &ftypes.BuildInfo{
ContentSets: buildInfo.ContentSets,
Nvr: buildInfo.Nvr,
Arch: buildInfo.Arch,
}
}
// ConvertToRPCArtifactInfo returns PutArtifactRequest // ConvertToRPCArtifactInfo returns PutArtifactRequest
func ConvertToRPCArtifactInfo(imageID string, imageInfo ftypes.ArtifactInfo) *cache.PutArtifactRequest { func ConvertToRPCArtifactInfo(imageID string, imageInfo ftypes.ArtifactInfo) *cache.PutArtifactRequest {
@@ -947,10 +973,23 @@ func ConvertToRPCPutBlobRequest(diffID string, blobInfo ftypes.BlobInfo) *cache.
CreatedBy: blobInfo.CreatedBy, CreatedBy: blobInfo.CreatedBy,
OpaqueDirs: blobInfo.OpaqueDirs, OpaqueDirs: blobInfo.OpaqueDirs,
WhiteoutFiles: blobInfo.WhiteoutFiles, WhiteoutFiles: blobInfo.WhiteoutFiles,
BuildInfo: ConvertToRPCBuildInfo(blobInfo.BuildInfo),
}, },
} }
} }
// ConvertToRPCBuildInfo converts *ftypes.BuildInfo to *common.BuildInfo
func ConvertToRPCBuildInfo(buildInfo *ftypes.BuildInfo) *common.BuildInfo {
if buildInfo == nil {
return nil
}
return &common.BuildInfo{
ContentSets: buildInfo.ContentSets,
Nvr: buildInfo.Nvr,
Arch: buildInfo.Arch,
}
}
// ConvertToMisconfResults returns common.MisconfResult // ConvertToMisconfResults returns common.MisconfResult
func ConvertToMisconfResults(results []ftypes.MisconfResult) []*common.MisconfResult { func ConvertToMisconfResults(results []ftypes.MisconfResult) []*common.MisconfResult {
var rpcResults []*common.MisconfResult var rpcResults []*common.MisconfResult

View File

@@ -1,10 +1,13 @@
package rpc package rpc
import ( import (
jsonv2 "encoding/json/v2"
"testing" "testing"
"time" "time"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/types/known/structpb"
"google.golang.org/protobuf/types/known/timestamppb" "google.golang.org/protobuf/types/known/timestamppb"
dbTypes "github.com/aquasecurity/trivy-db/pkg/types" dbTypes "github.com/aquasecurity/trivy-db/pkg/types"
@@ -273,6 +276,14 @@ func TestConvertFromRpcPkgs(t *testing.T) {
func TestConvertToRpcVulns(t *testing.T) { func TestConvertToRpcVulns(t *testing.T) {
fixedPublishedDate := time.Unix(1257894000, 0) fixedPublishedDate := time.Unix(1257894000, 0)
fixedLastModifiedDate := time.Unix(1257894010, 0) fixedLastModifiedDate := time.Unix(1257894010, 0)
type customStruct struct {
Field string
Number int
}
customData := customStruct{Field: "value", Number: 1}
customJSONBytes, err := jsonv2.Marshal(customData)
require.NoError(t, err)
customJSON := string(customJSONBytes)
type args struct { type args struct {
vulns []types.DetectedVulnerability vulns []types.DetectedVulnerability
@@ -295,6 +306,7 @@ func TestConvertToRpcVulns(t *testing.T) {
Title: "DoS", Title: "DoS",
Description: "Denial of Service", Description: "Denial of Service",
Severity: "MEDIUM", Severity: "MEDIUM",
Custom: customData,
VendorSeverity: dbTypes.VendorSeverity{ VendorSeverity: dbTypes.VendorSeverity{
vulnerability.RedHat: dbTypes.SeverityMedium, vulnerability.RedHat: dbTypes.SeverityMedium,
}, },
@@ -327,6 +339,7 @@ func TestConvertToRpcVulns(t *testing.T) {
Name: "GitHub Security Advisory Maven", Name: "GitHub Security Advisory Maven",
URL: "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Amaven", URL: "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Amaven",
}, },
Custom: customData,
}, },
}, },
}, },
@@ -363,9 +376,11 @@ func TestConvertToRpcVulns(t *testing.T) {
Digest: "sha256:154ad0735c360b212b167f424d33a62305770a1fcfb6363882f5c436cfbd9812", Digest: "sha256:154ad0735c360b212b167f424d33a62305770a1fcfb6363882f5c436cfbd9812",
DiffId: "sha256:b2a1a2d80bf0c747a4f6b0ca6af5eef23f043fcdb1ed4f3a3e750aef2dc68079", DiffId: "sha256:b2a1a2d80bf0c747a4f6b0ca6af5eef23f043fcdb1ed4f3a3e750aef2dc68079",
}, },
PrimaryUrl: "https://avd.aquasec.com/nvd/CVE-2019-0001", CustomVulnData: structpb.NewStringValue(customJSON),
PublishedDate: timestamppb.New(fixedPublishedDate), CustomAdvisoryData: structpb.NewStringValue(customJSON),
LastModifiedDate: timestamppb.New(fixedLastModifiedDate), PrimaryUrl: "https://avd.aquasec.com/nvd/CVE-2019-0001",
PublishedDate: timestamppb.New(fixedPublishedDate),
LastModifiedDate: timestamppb.New(fixedLastModifiedDate),
DataSource: &common.DataSource{ DataSource: &common.DataSource{
Name: "GitHub Security Advisory Maven", Name: "GitHub Security Advisory Maven",
Url: "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Amaven", Url: "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Amaven",
@@ -434,6 +449,7 @@ func TestConvertToRpcVulns(t *testing.T) {
func TestConvertFromRPCResults(t *testing.T) { func TestConvertFromRPCResults(t *testing.T) {
fixedPublishedDate := time.Date(2009, 11, 10, 23, 0, 0, 0, time.UTC) fixedPublishedDate := time.Date(2009, 11, 10, 23, 0, 0, 0, time.UTC)
fixedLastModifiedDate := time.Date(2009, 11, 10, 23, 0, 10, 0, time.UTC) fixedLastModifiedDate := time.Date(2009, 11, 10, 23, 0, 10, 0, time.UTC)
customJSON := `{"Field":"value","Number":1}`
type args struct { type args struct {
rpcResults []*scanner.Result rpcResults []*scanner.Result
@@ -480,9 +496,11 @@ func TestConvertFromRPCResults(t *testing.T) {
Digest: "sha256:154ad0735c360b212b167f424d33a62305770a1fcfb6363882f5c436cfbd9812", Digest: "sha256:154ad0735c360b212b167f424d33a62305770a1fcfb6363882f5c436cfbd9812",
DiffId: "sha256:b2a1a2d80bf0c747a4f6b0ca6af5eef23f043fcdb1ed4f3a3e750aef2dc68079", DiffId: "sha256:b2a1a2d80bf0c747a4f6b0ca6af5eef23f043fcdb1ed4f3a3e750aef2dc68079",
}, },
PrimaryUrl: "https://avd.aquasec.com/nvd/CVE-2019-0001", CustomVulnData: structpb.NewStringValue(customJSON),
PublishedDate: timestamppb.New(fixedPublishedDate), CustomAdvisoryData: structpb.NewStringValue(customJSON),
LastModifiedDate: timestamppb.New(fixedLastModifiedDate), PrimaryUrl: "https://avd.aquasec.com/nvd/CVE-2019-0001",
PublishedDate: timestamppb.New(fixedPublishedDate),
LastModifiedDate: timestamppb.New(fixedLastModifiedDate),
DataSource: &common.DataSource{ DataSource: &common.DataSource{
Name: "GitHub Security Advisory Maven", Name: "GitHub Security Advisory Maven",
Url: "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Amaven", Url: "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Amaven",
@@ -530,13 +548,13 @@ func TestConvertFromRPCResults(t *testing.T) {
References: []string{"http://example.com"}, References: []string{"http://example.com"},
PublishedDate: &fixedPublishedDate, PublishedDate: &fixedPublishedDate,
LastModifiedDate: &fixedLastModifiedDate, LastModifiedDate: &fixedLastModifiedDate,
Custom: []uint8(nil), Custom: customJSON,
}, },
DataSource: &dbTypes.DataSource{ DataSource: &dbTypes.DataSource{
Name: "GitHub Security Advisory Maven", Name: "GitHub Security Advisory Maven",
URL: "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Amaven", URL: "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Amaven",
}, },
Custom: []uint8(nil), Custom: customJSON,
}, },
}, },
}, },
@@ -618,9 +636,9 @@ func TestConvertFromRPCResults(t *testing.T) {
}, },
}, },
References: []string{"http://example.com"}, References: []string{"http://example.com"},
Custom: []uint8(nil), Custom: any(nil),
}, },
Custom: []uint8(nil), Custom: any(nil),
}, },
}, },
}, },

View File

@@ -56,8 +56,7 @@ func NewMarshaler(version string) Marshaler {
// MarshalReport converts the Trivy report to the CycloneDX format // MarshalReport converts the Trivy report to the CycloneDX format
func (m *Marshaler) MarshalReport(ctx context.Context, report types.Report) (*cdx.BOM, error) { func (m *Marshaler) MarshalReport(ctx context.Context, report types.Report) (*cdx.BOM, error) {
// Convert into an intermediate representation // Convert into an intermediate representation
opts := core.Options{GenerateBOMRef: true} bom, err := sbomio.NewEncoder(sbomio.WithBOMRef()).Encode(report)
bom, err := sbomio.NewEncoder(opts).Encode(report)
if err != nil { if err != nil {
return nil, xerrors.Errorf("failed to marshal report: %w", err) return nil, xerrors.Errorf("failed to marshal report: %w", err)
} }

View File

@@ -19,21 +19,49 @@ import (
"github.com/aquasecurity/trivy/pkg/types" "github.com/aquasecurity/trivy/pkg/types"
) )
type Encoder struct { type EncoderOption func(*Encoder)
bom *core.BOM
opts core.Options // WithBOMRef enables BOM-Ref generation for CycloneDX components
func WithBOMRef() EncoderOption {
return func(e *Encoder) {
e.bomOpts.GenerateBOMRef = true
}
} }
func NewEncoder(opts core.Options) *Encoder { // WithParents enables holding parent maps in the BOM structure
return &Encoder{opts: opts} func WithParents() EncoderOption {
return func(e *Encoder) {
e.bomOpts.Parents = true
}
}
// ForceRegenerate forces regeneration of BOM instead of reusing existing one
func ForceRegenerate() EncoderOption {
return func(e *Encoder) {
e.forceRegenerate = true
}
}
type Encoder struct {
bom *core.BOM
bomOpts core.Options
forceRegenerate bool
}
func NewEncoder(opts ...EncoderOption) *Encoder {
e := &Encoder{}
for _, opt := range opts {
opt(e)
}
return e
} }
func (e *Encoder) Encode(report types.Report) (*core.BOM, error) { func (e *Encoder) Encode(report types.Report) (*core.BOM, error) {
// When report.BOM is not nil, reuse the existing BOM structure. // When report.BOM is not nil, reuse the existing BOM structure unless ForceRegenerate is set.
// This happens in two scenarios: // This happens in two scenarios:
// 1. SBOM scanning: When scanning an existing SBOM file to refresh vulnerabilities // 1. SBOM scanning: When scanning an existing SBOM file to refresh vulnerabilities
// 2. Library usage: When using Trivy as a library with a custom BOM in the report // 2. Library usage: When using Trivy as a library with a custom BOM in the report
if report.BOM != nil { if report.BOM != nil && !e.forceRegenerate {
return e.reuseExistingBOM(report) return e.reuseExistingBOM(report)
} }
// Metadata component // Metadata component
@@ -42,7 +70,7 @@ func (e *Encoder) Encode(report types.Report) (*core.BOM, error) {
return nil, xerrors.Errorf("failed to create root component: %w", err) return nil, xerrors.Errorf("failed to create root component: %w", err)
} }
e.bom = core.NewBOM(e.opts) e.bom = core.NewBOM(e.bomOpts)
if report.BOM != nil { if report.BOM != nil {
e.bom.SerialNumber = report.BOM.SerialNumber e.bom.SerialNumber = report.BOM.SerialNumber
e.bom.Version = report.BOM.Version e.bom.Version = report.BOM.Version

View File

@@ -1466,8 +1466,7 @@ func TestEncoder_Encode(t *testing.T) {
t.Run(tt.name, func(t *testing.T) { t.Run(tt.name, func(t *testing.T) {
uuid.SetFakeUUID(t, "3ff14136-e09f-4df9-80ea-%012d") uuid.SetFakeUUID(t, "3ff14136-e09f-4df9-80ea-%012d")
opts := core.Options{GenerateBOMRef: true} got, err := sbomio.NewEncoder(sbomio.WithBOMRef()).Encode(tt.report)
got, err := sbomio.NewEncoder(opts).Encode(tt.report)
if tt.wantErr != "" { if tt.wantErr != "" {
require.ErrorContains(t, err, tt.wantErr) require.ErrorContains(t, err, tt.wantErr)
return return

View File

@@ -115,7 +115,7 @@ func NewMarshaler(version string, opts ...marshalOption) *Marshaler {
func (m *Marshaler) MarshalReport(ctx context.Context, report types.Report) (*spdx.Document, error) { func (m *Marshaler) MarshalReport(ctx context.Context, report types.Report) (*spdx.Document, error) {
// Convert into an intermediate representation // Convert into an intermediate representation
bom, err := sbomio.NewEncoder(core.Options{}).Encode(report) bom, err := sbomio.NewEncoder().Encode(report)
if err != nil { if err != nil {
return nil, xerrors.Errorf("failed to marshal report: %w", err) return nil, xerrors.Errorf("failed to marshal report: %w", err)
} }

View File

@@ -75,7 +75,7 @@ func Filter(ctx context.Context, report *types.Report, opts Options) error {
} }
// NOTE: This method call has a side effect on the report // NOTE: This method call has a side effect on the report
bom, err := sbomio.NewEncoder(core.Options{Parents: true}).Encode(*report) bom, err := sbomio.NewEncoder(sbomio.WithParents(), sbomio.ForceRegenerate()).Encode(*report)
if err != nil { if err != nil {
return xerrors.Errorf("unable to encode the SBOM: %w", err) return xerrors.Errorf("unable to encode the SBOM: %w", err)
} }

View File

@@ -665,13 +665,18 @@ func createCycloneDXBOMWithSpringComponent() *core.BOM {
bom := core.NewBOM(core.Options{}) bom := core.NewBOM(core.Options{})
bom.SerialNumber = "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" bom.SerialNumber = "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79"
bom.Version = 1 bom.Version = 1
pkgIdentifier := ftypes.PkgIdentifier{
// Components got from scanned SBOM files don't have UID
BOMRef: springPackage.Identifier.BOMRef,
PURL: springPackage.Identifier.PURL,
}
// Add the spring component to match vuln1's BOM-Ref // Add the spring component to match vuln1's BOM-Ref
springComponent := &core.Component{ springComponent := &core.Component{
Type: core.TypeLibrary, Type: core.TypeLibrary,
Name: springPackage.Identifier.PURL.Name, Name: springPackage.Identifier.PURL.Name,
Group: springPackage.Identifier.PURL.Namespace, Group: springPackage.Identifier.PURL.Namespace,
Version: springPackage.Version, Version: springPackage.Version,
PkgIdentifier: springPackage.Identifier, PkgIdentifier: pkgIdentifier,
} }
bom.AddComponent(springComponent) bom.AddComponent(springComponent)
return bom return bom

View File

@@ -193,6 +193,7 @@ type BlobInfo struct {
Licenses []*common.LicenseFile `protobuf:"bytes,13,rep,name=licenses,proto3" json:"licenses,omitempty"` Licenses []*common.LicenseFile `protobuf:"bytes,13,rep,name=licenses,proto3" json:"licenses,omitempty"`
Size int64 `protobuf:"varint,14,opt,name=size,proto3" json:"size,omitempty"` Size int64 `protobuf:"varint,14,opt,name=size,proto3" json:"size,omitempty"`
CreatedBy string `protobuf:"bytes,15,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"` CreatedBy string `protobuf:"bytes,15,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"`
BuildInfo *common.BuildInfo `protobuf:"bytes,16,opt,name=build_info,json=buildInfo,proto3" json:"build_info,omitempty"`
} }
func (x *BlobInfo) Reset() { func (x *BlobInfo) Reset() {
@@ -332,6 +333,13 @@ func (x *BlobInfo) GetCreatedBy() string {
return "" return ""
} }
func (x *BlobInfo) GetBuildInfo() *common.BuildInfo {
if x != nil {
return x.BuildInfo
}
return nil
}
type PutBlobRequest struct { type PutBlobRequest struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@@ -637,7 +645,7 @@ var file_rpc_cache_service_proto_rawDesc = []byte{
0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79,
0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61,
0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74,
0x49, 0x6e, 0x66, 0x6f, 0x22, 0xb6, 0x05, 0x0a, 0x08, 0x42, 0x6c, 0x6f, 0x62, 0x49, 0x6e, 0x66, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xee, 0x05, 0x0a, 0x08, 0x42, 0x6c, 0x6f, 0x62, 0x49, 0x6e, 0x66,
0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d,
0x61, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x02, 0x61, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x02,
@@ -680,56 +688,60 @@ var file_rpc_cache_service_proto_rawDesc = []byte{
0x52, 0x08, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x52, 0x08, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69,
0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d,
0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x0f, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x22, 0x60, 0x0a, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x12, 0x36, 0x0a,
0x0e, 0x50, 0x75, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x10, 0x20, 0x01, 0x28,
0x17, 0x0a, 0x07, 0x64, 0x69, 0x66, 0x66, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
0x52, 0x06, 0x64, 0x69, 0x66, 0x66, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c,
0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x72, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x60, 0x0a, 0x0e, 0x50, 0x75, 0x74, 0x42, 0x6c, 0x6f, 0x62,
0x69, 0x76, 0x79, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x69, 0x66, 0x66, 0x5f,
0x62, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x66, 0x66, 0x49, 0x64,
0x43, 0x0a, 0x0b, 0x50, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x12, 0x35, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20,
0x0a, 0x02, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x72, 0x69, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x61, 0x63, 0x68,
0x76, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4f, 0x53, 0x52, 0x02, 0x6f, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x62,
0x12, 0x12, 0x0a, 0x04, 0x65, 0x6f, 0x73, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6c, 0x6f, 0x62, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x43, 0x0a, 0x0b, 0x50, 0x75, 0x74, 0x52, 0x65,
0x65, 0x6f, 0x73, 0x6c, 0x22, 0x51, 0x0a, 0x13, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x42, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01,
0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x6e, 0x2e, 0x4f, 0x53, 0x52, 0x02, 0x6f, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x6f, 0x73, 0x6c,
0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x65, 0x6f, 0x73, 0x6c, 0x22, 0x51, 0x0a, 0x13,
0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75,
0x62, 0x6c, 0x6f, 0x62, 0x49, 0x64, 0x73, 0x22, 0x6b, 0x0a, 0x14, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f,
0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61,
0x29, 0x0a, 0x10, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x63, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x73,
0x61, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x49, 0x64, 0x73, 0x22,
0x6e, 0x67, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x69, 0x6b, 0x0a, 0x14, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52,
0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x6d, 0x69, 0x73, 0x73, 0x69,
0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
0x62, 0x49, 0x64, 0x73, 0x22, 0x2f, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6c, 0x08, 0x52, 0x0f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61,
0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x63, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6c,
0x6f, 0x62, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x69,
0x6f, 0x62, 0x49, 0x64, 0x73, 0x32, 0xbb, 0x02, 0x0a, 0x05, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x62, 0x49, 0x64, 0x73, 0x22, 0x2f, 0x0a, 0x12,
0x49, 0x0a, 0x0b, 0x50, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x22, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01,
0x50, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x49, 0x64, 0x73, 0x32, 0xbb, 0x02,
0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x0a, 0x05, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x49, 0x0a, 0x0b, 0x50, 0x75, 0x74, 0x41, 0x72,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x41, 0x0a, 0x07, 0x50, 0x75, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x22, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63,
0x74, 0x42, 0x6c, 0x6f, 0x62, 0x12, 0x1e, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x61, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66,
0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x59, 0x0a, 0x74, 0x79, 0x12, 0x41, 0x0a, 0x07, 0x50, 0x75, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x12, 0x1e, 0x2e,
0x0c, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x12, 0x23, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50,
0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x75, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,
0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x73, 0x74, 0x1a, 0x24, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x59, 0x0a, 0x0c, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67,
0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x12, 0x23, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x61,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x42, 0x6c,
0x74, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x12, 0x22, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x74, 0x72, 0x69,
0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x76, 0x79, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x73, 0x73,
0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x12, 0x49, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x12,
0x70, 0x74, 0x79, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x22, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31,
0x6d, 0x2f, 0x61, 0x71, 0x75, 0x61, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75,
0x72, 0x69, 0x76, 0x79, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x3b, 0x63, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x61, 0x63, 0x68, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x2f, 0x5a, 0x2d, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x71, 0x75, 0x61, 0x73, 0x65,
0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2f, 0x72, 0x70, 0x63,
0x2f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x3b, 0x63, 0x61, 0x63, 0x68, 0x65, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@@ -764,7 +776,8 @@ var file_rpc_cache_service_proto_goTypes = []interface{}{
(*common.Misconfiguration)(nil), // 15: trivy.common.Misconfiguration (*common.Misconfiguration)(nil), // 15: trivy.common.Misconfiguration
(*common.CustomResource)(nil), // 16: trivy.common.CustomResource (*common.CustomResource)(nil), // 16: trivy.common.CustomResource
(*common.LicenseFile)(nil), // 17: trivy.common.LicenseFile (*common.LicenseFile)(nil), // 17: trivy.common.LicenseFile
(*emptypb.Empty)(nil), // 18: google.protobuf.Empty (*common.BuildInfo)(nil), // 18: trivy.common.BuildInfo
(*emptypb.Empty)(nil), // 19: google.protobuf.Empty
} }
var file_rpc_cache_service_proto_depIdxs = []int32{ var file_rpc_cache_service_proto_depIdxs = []int32{
8, // 0: trivy.cache.v1.ArtifactInfo.created:type_name -> google.protobuf.Timestamp 8, // 0: trivy.cache.v1.ArtifactInfo.created:type_name -> google.protobuf.Timestamp
@@ -779,21 +792,22 @@ var file_rpc_cache_service_proto_depIdxs = []int32{
16, // 9: trivy.cache.v1.BlobInfo.custom_resources:type_name -> trivy.common.CustomResource 16, // 9: trivy.cache.v1.BlobInfo.custom_resources:type_name -> trivy.common.CustomResource
10, // 10: trivy.cache.v1.BlobInfo.secrets:type_name -> trivy.common.Secret 10, // 10: trivy.cache.v1.BlobInfo.secrets:type_name -> trivy.common.Secret
17, // 11: trivy.cache.v1.BlobInfo.licenses:type_name -> trivy.common.LicenseFile 17, // 11: trivy.cache.v1.BlobInfo.licenses:type_name -> trivy.common.LicenseFile
2, // 12: trivy.cache.v1.PutBlobRequest.blob_info:type_name -> trivy.cache.v1.BlobInfo 18, // 12: trivy.cache.v1.BlobInfo.build_info:type_name -> trivy.common.BuildInfo
11, // 13: trivy.cache.v1.PutResponse.os:type_name -> trivy.common.OS 2, // 13: trivy.cache.v1.PutBlobRequest.blob_info:type_name -> trivy.cache.v1.BlobInfo
1, // 14: trivy.cache.v1.Cache.PutArtifact:input_type -> trivy.cache.v1.PutArtifactRequest 11, // 14: trivy.cache.v1.PutResponse.os:type_name -> trivy.common.OS
3, // 15: trivy.cache.v1.Cache.PutBlob:input_type -> trivy.cache.v1.PutBlobRequest 1, // 15: trivy.cache.v1.Cache.PutArtifact:input_type -> trivy.cache.v1.PutArtifactRequest
5, // 16: trivy.cache.v1.Cache.MissingBlobs:input_type -> trivy.cache.v1.MissingBlobsRequest 3, // 16: trivy.cache.v1.Cache.PutBlob:input_type -> trivy.cache.v1.PutBlobRequest
7, // 17: trivy.cache.v1.Cache.DeleteBlobs:input_type -> trivy.cache.v1.DeleteBlobsRequest 5, // 17: trivy.cache.v1.Cache.MissingBlobs:input_type -> trivy.cache.v1.MissingBlobsRequest
18, // 18: trivy.cache.v1.Cache.PutArtifact:output_type -> google.protobuf.Empty 7, // 18: trivy.cache.v1.Cache.DeleteBlobs:input_type -> trivy.cache.v1.DeleteBlobsRequest
18, // 19: trivy.cache.v1.Cache.PutBlob:output_type -> google.protobuf.Empty 19, // 19: trivy.cache.v1.Cache.PutArtifact:output_type -> google.protobuf.Empty
6, // 20: trivy.cache.v1.Cache.MissingBlobs:output_type -> trivy.cache.v1.MissingBlobsResponse 19, // 20: trivy.cache.v1.Cache.PutBlob:output_type -> google.protobuf.Empty
18, // 21: trivy.cache.v1.Cache.DeleteBlobs:output_type -> google.protobuf.Empty 6, // 21: trivy.cache.v1.Cache.MissingBlobs:output_type -> trivy.cache.v1.MissingBlobsResponse
18, // [18:22] is the sub-list for method output_type 19, // 22: trivy.cache.v1.Cache.DeleteBlobs:output_type -> google.protobuf.Empty
14, // [14:18] is the sub-list for method input_type 19, // [19:23] is the sub-list for method output_type
14, // [14:14] is the sub-list for extension type_name 15, // [15:19] is the sub-list for method input_type
14, // [14:14] is the sub-list for extension extendee 15, // [15:15] is the sub-list for extension type_name
0, // [0:14] is the sub-list for field type_name 15, // [15:15] is the sub-list for extension extendee
0, // [0:15] is the sub-list for field type_name
} }
func init() { file_rpc_cache_service_proto_init() } func init() { file_rpc_cache_service_proto_init() }

View File

@@ -46,6 +46,7 @@ message BlobInfo {
repeated common.LicenseFile licenses = 13; repeated common.LicenseFile licenses = 13;
int64 size = 14; int64 size = 14;
string created_by = 15; string created_by = 15;
common.BuildInfo build_info = 16;
} }
message PutBlobRequest { message PutBlobRequest {

View File

@@ -1926,60 +1926,61 @@ func callClientError(ctx context.Context, h *twirp.ClientHooks, err twirp.Error)
} }
var twirpFileDescriptor0 = []byte{ var twirpFileDescriptor0 = []byte{
// 871 bytes of a gzipped FileDescriptorProto // 896 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xef, 0x8f, 0xdb, 0x44, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0x6d, 0x6f, 0xe3, 0x44,
0x10, 0x55, 0x92, 0xb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, 0xa3, 0xfb, 0x04, 0xbe, 0xae, 0xca,
0xc5, 0x7f, 0x6d, 0x7f, 0x67, 0x27, 0xb6, 0xc0, 0x17, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xe5, 0x4b, 0xff, 0xb7, 0x4f, 0x16, 0x4c, 0x2d, 0x8b, 0x50, 0x4b, 0xcb, 0x0f, 0x6e, 0x8b, 0x40, 0x52,
0xb0, 0xd7, 0x0b, 0xfc, 0x07, 0x00, 0x00, 0x52, 0x08, 0xa6, 0x56, 0xbe, 0x09, 0xea, 0xaf, 0xff, 0x35, 0xf8, 0xca, 0xfc, 0x0d, 0x4f, 0x4c,
0x80, 0xcf, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xb5, 0xf0, 0xeb, 0x72, 0x34, 0x08, 0x00, 0x00,
} }

File diff suppressed because it is too large Load Diff

View File

@@ -69,6 +69,12 @@ message Location {
int32 end_line = 2; int32 end_line = 2;
} }
message BuildInfo {
repeated string content_sets = 1;
string nvr = 2;
string arch = 3;
}
message Misconfiguration { message Misconfiguration {
string file_type = 1; string file_type = 1;
string file_path = 2; string file_path = 2;
@@ -134,8 +140,8 @@ message Vulnerability {
string primary_url = 14; string primary_url = 14;
google.protobuf.Timestamp published_date = 15; google.protobuf.Timestamp published_date = 15;
google.protobuf.Timestamp last_modified_date = 16; google.protobuf.Timestamp last_modified_date = 16;
bytes custom_advisory_data = 17; google.protobuf.Value custom_advisory_data = 17;
bytes custom_vuln_data = 18; google.protobuf.Value custom_vuln_data = 18;
repeated string vendor_ids = 19; repeated string vendor_ids = 19;
DataSource data_source = 20; DataSource data_source = 20;
map<string, Severity> vendor_severity = 21; map<string, Severity> vendor_severity = 21;