Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,9 @@ public static Note createNote(String noteId, String projectId)
// Associate the Note with the metadata type
// https://cloud.google.com/container-registry/docs/container-analysis#supported_metadata_types
// Here, we use the type "vulnerability"
.setVulnerability(VulnerabilityNote.newBuilder()
.addDetails(VulnerabilityNote.Detail.newBuilder()
.setAffectedCpeUri("your-uri-here")
.setAffectedPackage("your-package-here")
.setAffectedVersionStart(Version.newBuilder()
.setKind(Version.VersionKind.MINIMUM))
.setAffectedVersionEnd(Version.newBuilder()
.setKind(Version.VersionKind.MAXIMUM))))
.setAttestation(AttestationNote.newBuilder()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The code has been updated to use AttestationNote, but the comment on the preceding line (43) is now outdated as it still refers to 'vulnerability'. To maintain code clarity and prevent confusion, please update the comment to reflect that an 'attestation' note is being created.

Suggested change for line 43:

// Here, we use the type "attestation"

.setHint(AttestationNote.Hint.newBuilder()
.setHumanReadableName("my-attestation-authority")))
.build();

// Initialize client that will be used to send requests. After completing all of your requests,
Expand Down