Skip to content

Commit

Permalink
feat: [containeranalysis] add enum for grafeas v1 cvss to support bot…
Browse files Browse the repository at this point in the history
…h cvss v2 and v3 (#4163)

* feat: add GeneratePackagesSummary method

PiperOrigin-RevId: 523410324

Source-Link: googleapis/googleapis@61f94e6

Source-Link: googleapis/googleapis-gen@8ba38bf
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWRldnRvb2xzLWNvbnRhaW5lcmFuYWx5c2lzLy5Pd2xCb3QueWFtbCIsImgiOiI4YmEzOGJmNTFiNzlmMzA3NTVlOGJlY2RlZjNlMTI5MDJjOGIzZDAyIn0=

* 🦉 Updates from OwlBot post-processor

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

* feat: add enum for grafeas v1 cvss to support both cvss v2 and v3

PiperOrigin-RevId: 523785347

Source-Link: googleapis/googleapis@4e8d390

Source-Link: googleapis/googleapis-gen@d1e6d67
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWRldnRvb2xzLWNvbnRhaW5lcmFuYWx5c2lzLy5Pd2xCb3QueWFtbCIsImgiOiJkMWU2ZDY3ZWNlNTk4ZTk3ZjkzOThjNmNiMzVmZmM2MTMwOGU2ZGJjIn0=

* 🦉 Updates from OwlBot post-processor

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

* 🦉 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>
Co-authored-by: Denis DelGrosso <[email protected]>
  • Loading branch information
3 people authored Apr 17, 2023
1 parent 8020de1 commit 0904936
Show file tree
Hide file tree
Showing 15 changed files with 1,521 additions and 7 deletions.
1 change: 1 addition & 0 deletions packages/google-devtools-containeranalysis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
| Grafeas.list_occurrences | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_occurrences.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_occurrences.js,samples/README.md) |
| Grafeas.update_note | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_note.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_note.js,samples/README.md) |
| Grafeas.update_occurrence | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_occurrence.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_occurrence.js,samples/README.md) |
| Container_analysis_v1_beta1.generate_packages_summary | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.generate_packages_summary.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.generate_packages_summary.js,samples/README.md) |
| Container_analysis_v1_beta1.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_iam_policy.js,samples/README.md) |
| Container_analysis_v1_beta1.get_scan_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_scan_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_scan_config.js,samples/README.md) |
| Container_analysis_v1_beta1.list_scan_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.list_scan_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.list_scan_configs.js,samples/README.md) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,38 @@ service ContainerAnalysisV1Beta1 {
};
option (google.api.method_signature) = "resource,permissions";
}

// Gets a summary of the packages within a given resource.
rpc GeneratePackagesSummary(GeneratePackagesSummaryRequest)
returns (PackagesSummaryResponse) {}
}

// GeneratePackagesSummaryRequest is the request body for the
// GeneratePackagesSummary API method. It just takes a single name argument,
// referring to the resource.
message GeneratePackagesSummaryRequest {
// Required. The name of the resource to get a packages summary for in the
// form of `projects/[PROJECT_ID]/resources/[RESOURCE_URL]`.
string name = 1 [(google.api.field_behavior) = REQUIRED];
}

// A summary of the packages found within the given resource.
message PackagesSummaryResponse {
// Per license count
message LicensesSummary {
// The license of the package. Note that the format of this value is not
// guaranteed. It may be nil, an empty string, a boolean value (A | B), a
// differently formed boolean value (A OR B), etc...
string license = 1;

// The number of fixable vulnerabilities associated with this resource.
int64 count = 2;
}

// The unique URL of the image or the container for which this summary
// applies.
string resource_url = 1;

// A listing by license name of each of the licenses and their counts.
repeated LicensesSummary licenses_summary = 2;
}
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ message CVSS {
ATTACK_COMPLEXITY_UNSPECIFIED = 0;
ATTACK_COMPLEXITY_LOW = 1;
ATTACK_COMPLEXITY_HIGH = 2;
ATTACK_COMPLEXITY_MEDIUM = 3;
}

enum Authentication {
Expand Down Expand Up @@ -155,6 +156,8 @@ message CVSS {
IMPACT_HIGH = 1;
IMPACT_LOW = 2;
IMPACT_NONE = 3;
IMPACT_PARTIAL = 4;
IMPACT_COMPLETE = 5;
}
}

Expand Down
Loading

0 comments on commit 0904936

Please sign in to comment.