DataDog / agent-payload

Payload format description for communication between the agent and the Datadog backend
BSD 3-Clause "New" or "Revised" License
21 stars 19 forks source link

Add SBOM protocol buffer definitions #212

Closed L3n41c closed 1 year ago

L3n41c commented 1 year ago

Reviewers: please see the review guidelines.

Define the SBOM message to be sent by the agent to the sbom EVP track.

This payload is further described in the “Container images vulnerabilities” RFC.

This PR is built on top of #213.

Generating the upstream CycloneDX .proto file with the current versions of protoc and gogo/protobuf doesn’t work.

Upgrading the version of the ProtocolBuffer compiler for all the messages doesn’t work because it adds some state, sizeCache and unknownFields google.golang.org/protobuf/runtime/protoimpl unexported fields which are making the generated struct unsuitable for:

That’s why I had to use different version of protoc depending on the message.

L3n41c commented 1 year ago

I’ve extracted the protoc upgrade in a dedicated PR: #213.

L3n41c commented 1 year ago

~~I’ve rebased this PR on top of #213, which allowed me to undo the hack I had to apply on top of the upstream CycloneDX .proto file to make it accepted by the deprecated gogo/protobuf compiler. In order to review only the SBOM related changes, you should have a look at https://github.com/DataDog/agent-payload/pull/212/commits/ba624131723304931147cef0f0aba359a4b3f549.~~