Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update CreateNote.java to use attestations instead of vulnerabilities#10177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
lvoelz wants to merge1 commit intoGoogleCloudPlatform:main
base:main
Choose a base branch
Loading
fromlvoelz:main
Open
Changes fromall 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 numberDiff line numberDiff 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 useAttestationNote, 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

[8]ページ先頭

©2009-2025 Movatter.jp