Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
feat: add new analysis status and cvss version fields (#187)
Browse files Browse the repository at this point in the history
* feat: add new analysis status and cvss version fields

PiperOrigin-RevId: 477815955

Source-Link: googleapis/googleapis@57e38f0

Source-Link: https://github.com/googleapis/googleapis-gen/commit/3a587e147521ff94c68a79163aa16855db9a7a8c
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2E1ODdlMTQ3NTIxZmY5NGM2OGE3OTE2M2FhMTY4NTVkYjlhN2E4YyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Oct 6, 2022
1 parent 2b5fc77 commit d461de8
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
7 changes: 7 additions & 0 deletions protos/grafeas/v1/cvss.proto
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,10 @@ message CVSS {
IMPACT_NONE = 3;
}
}

// CVSS Version.
enum CVSSVersion {
CVSS_VERSION_UNSPECIFIED = 0;
CVSS_VERSION_2 = 1;
CVSS_VERSION_3 = 2;
}
18 changes: 17 additions & 1 deletion protos/grafeas/v1/discovery.proto
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ message DiscoveryOccurrence {
// Analysis status for a resource. Currently for initial analysis only (not
// updated in continuous analysis).
enum AnalysisStatus {
option allow_alias = true;

// Unknown.
ANALYSIS_STATUS_UNSPECIFIED = 0;
// Resource is known but no action has been taken yet.
Expand All @@ -61,16 +63,30 @@ message DiscoveryOccurrence {
SCANNING = 2;
// Analysis has finished successfully.
FINISHED_SUCCESS = 3;
// Analysis has completed.
COMPLETE = 3;
// Analysis has finished unsuccessfully, the analysis itself is in a bad
// state.
FINISHED_FAILED = 4;
// The resource is known not to be supported
// The resource is known not to be supported.
FINISHED_UNSUPPORTED = 5;
}

// The status of discovery for the resource.
AnalysisStatus analysis_status = 2;

// Indicates which analysis completed successfully. Multiple types of
// analysis can be performed on a single resource.
message AnalysisCompleted {
repeated string analysis_type = 1;
}

AnalysisCompleted analysis_completed = 7;

// Indicates any errors encountered during analysis of a resource. There
// could be 0 or more of these errors.
repeated google.rpc.Status analysis_error = 8;

// When an error is encountered this will contain a LocalizedMessage under
// details to show to the user. The LocalizedMessage is output only and
// populated by the API.
Expand Down
10 changes: 10 additions & 0 deletions protos/grafeas/v1/vulnerability.proto
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ message VulnerabilityNote {
// upstream timestamp from the underlying information source - e.g. Ubuntu
// security tracker.
google.protobuf.Timestamp source_update_time = 6;

// CVSS version used to populate cvss_score and severity.
grafeas.v1.CVSSVersion cvss_version = 7;

// Next free ID is 8.
}

// An occurrence of a severity vulnerability on a resource.
Expand Down Expand Up @@ -238,4 +243,9 @@ message VulnerabilityOccurrence {
// Output only. Whether at least one of the affected packages has a fix
// available.
bool fix_available = 9;

// Output only. CVSS version used to populate cvss_score and severity.
grafeas.v1.CVSSVersion cvss_version = 11;

// Next free ID is 12.
}

0 comments on commit d461de8

Please sign in to comment.