Skip to content

Commit

Permalink
feat: A new field version is added to message `.grafeas.v1.Complian…
Browse files Browse the repository at this point in the history
…ceOccurrence`

feat: A new message `VulnerabilityAttestation` is added
feat: A new field `vulnerability_attestation` is added to message `.grafeas.v1.DiscoveryOccurrence`

PiperOrigin-RevId: 657298794
  • Loading branch information
Google APIs authored and copybara-github committed Jul 29, 2024
1 parent 05e8031 commit ad5c477
Show file tree
Hide file tree
Showing 4 changed files with 467 additions and 16 deletions.
2 changes: 2 additions & 0 deletions grafeas/v1/compliance.proto
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ message ComplianceVersion {
message ComplianceOccurrence {
repeated NonCompliantFile non_compliant_files = 2;
string non_compliance_reason = 3;
// The OS and config version the benchmark was run on.
grafeas.v1.ComplianceVersion version = 4;
}

// Details about files that caused a compliance check to fail.
Expand Down
25 changes: 25 additions & 0 deletions grafeas/v1/discovery.proto
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,29 @@ message DiscoveryOccurrence {

// The status of an SBOM generation.
SBOMStatus sbom_status = 9;

// The status of an vulnerability attestation generation.
message VulnerabilityAttestation {
// An enum indicating the state of the attestation generation.
enum VulnerabilityAttestationState {
// Default unknown state.
VULNERABILITY_ATTESTATION_STATE_UNSPECIFIED = 0;
// Attestation was successfully generated and stored.
SUCCESS = 1;
// Attestation was unsuccessfully generated and stored.
FAILURE = 2;
}

// The last time we attempted to generate an attestation.
google.protobuf.Timestamp last_attempt_time = 1;

// The success/failure state of the latest attestation attempt.
VulnerabilityAttestationState state = 2;

// If failure, the error reason for why the attestation generation failed.
string error = 3;
}

// The status of an vulnerability attestation generation.
VulnerabilityAttestation vulnerability_attestation = 10;
}
30 changes: 30 additions & 0 deletions grafeas/v1/grafeas.proto
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ service Grafeas {
returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/occurrences/*}"
additional_bindings {
delete: "/v1/{name=projects/*/locations/*/occurrences/*}"
}
};
option (google.api.method_signature) = "name";
}
Expand All @@ -102,6 +105,10 @@ service Grafeas {
option (google.api.http) = {
post: "/v1/{parent=projects/*}/occurrences"
body: "occurrence"
additional_bindings {
post: "/v1/{parent=projects/*/locations/*}/occurrences"
body: "occurrence"
}
};
option (google.api.method_signature) = "parent,occurrence";
}
Expand All @@ -112,6 +119,10 @@ service Grafeas {
option (google.api.http) = {
post: "/v1/{parent=projects/*}/occurrences:batchCreate"
body: "*"
additional_bindings {
post: "/v1/{parent=projects/*/locations/*}/occurrences:batchCreate"
body: "*"
}
};
option (google.api.method_signature) = "parent,occurrences";
}
Expand All @@ -121,6 +132,10 @@ service Grafeas {
option (google.api.http) = {
patch: "/v1/{name=projects/*/occurrences/*}"
body: "occurrence"
additional_bindings {
patch: "/v1/{name=projects/*/locations/*/occurrences/*}"
body: "occurrence"
}
};
option (google.api.method_signature) = "name,occurrence,update_mask";
}
Expand Down Expand Up @@ -159,6 +174,9 @@ service Grafeas {
rpc DeleteNote(DeleteNoteRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/notes/*}"
additional_bindings {
delete: "/v1/{name=projects/*/locations/*/notes/*}"
}
};
option (google.api.method_signature) = "name";
}
Expand All @@ -168,6 +186,10 @@ service Grafeas {
option (google.api.http) = {
post: "/v1/{parent=projects/*}/notes"
body: "note"
additional_bindings {
post: "/v1/{parent=projects/*/locations/*}/notes"
body: "note"
}
};
option (google.api.method_signature) = "parent,note_id,note";
}
Expand All @@ -178,6 +200,10 @@ service Grafeas {
option (google.api.http) = {
post: "/v1/{parent=projects/*}/notes:batchCreate"
body: "*"
additional_bindings {
post: "/v1/{parent=projects/*/locations/*}/notes:batchCreate"
body: "*"
}
};
option (google.api.method_signature) = "parent,notes";
}
Expand All @@ -187,6 +213,10 @@ service Grafeas {
option (google.api.http) = {
patch: "/v1/{name=projects/*/notes/*}"
body: "note"
additional_bindings {
patch: "/v1/{name=projects/*/locations/*/notes/*}"
body: "note"
}
};
option (google.api.method_signature) = "name,note,update_mask";
}
Expand Down
Loading

0 comments on commit ad5c477

Please sign in to comment.