Skip to content

Commit b9d9704

Browse files
feat!: added getVulnerabilityOccurrencesSummary to v1 (#263)
1 parent 4aeb396 commit b9d9704

23 files changed

Lines changed: 20678 additions & 16928 deletions
Lines changed: 87 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,94 @@
1-
# Contributor Code of Conduct
1+
<!-- # Generated by synthtool. DO NOT EDIT! !-->
2+
# Code of Conduct
23

3-
As contributors and maintainers of this project,
4-
and in the interest of fostering an open and welcoming community,
5-
we pledge to respect all people who contribute through reporting issues,
6-
posting feature requests, updating documentation,
7-
submitting pull requests or patches, and other activities.
4+
## Our Pledge
85

9-
We are committed to making participation in this project
10-
a harassment-free experience for everyone,
11-
regardless of level of experience, gender, gender identity and expression,
12-
sexual orientation, disability, personal appearance,
13-
body size, race, ethnicity, age, religion, or nationality.
6+
In the interest of fostering an open and welcoming environment, we as
7+
contributors and maintainers pledge to making participation in our project and
8+
our community a harassment-free experience for everyone, regardless of age, body
9+
size, disability, ethnicity, gender identity and expression, level of
10+
experience, education, socio-economic status, nationality, personal appearance,
11+
race, religion, or sexual identity and orientation.
12+
13+
## Our Standards
14+
15+
Examples of behavior that contributes to creating a positive environment
16+
include:
17+
18+
* Using welcoming and inclusive language
19+
* Being respectful of differing viewpoints and experiences
20+
* Gracefully accepting constructive criticism
21+
* Focusing on what is best for the community
22+
* Showing empathy towards other community members
1423

1524
Examples of unacceptable behavior by participants include:
1625

17-
* The use of sexualized language or imagery
18-
* Personal attacks
19-
* Trolling or insulting/derogatory comments
20-
* Public or private harassment
21-
* Publishing other's private information,
22-
such as physical or electronic
23-
addresses, without explicit permission
24-
* Other unethical or unprofessional conduct.
26+
* The use of sexualized language or imagery and unwelcome sexual attention or
27+
advances
28+
* Trolling, insulting/derogatory comments, and personal or political attacks
29+
* Public or private harassment
30+
* Publishing others' private information, such as a physical or electronic
31+
address, without explicit permission
32+
* Other conduct which could reasonably be considered inappropriate in a
33+
professional setting
34+
35+
## Our Responsibilities
36+
37+
Project maintainers are responsible for clarifying the standards of acceptable
38+
behavior and are expected to take appropriate and fair corrective action in
39+
response to any instances of unacceptable behavior.
2540

2641
Project maintainers have the right and responsibility to remove, edit, or reject
27-
comments, commits, code, wiki edits, issues, and other contributions
28-
that are not aligned to this Code of Conduct.
29-
By adopting this Code of Conduct,
30-
project maintainers commit themselves to fairly and consistently
31-
applying these principles to every aspect of managing this project.
32-
Project maintainers who do not follow or enforce the Code of Conduct
33-
may be permanently removed from the project team.
34-
35-
This code of conduct applies both within project spaces and in public spaces
36-
when an individual is representing the project or its community.
37-
38-
Instances of abusive, harassing, or otherwise unacceptable behavior
39-
may be reported by opening an issue
40-
or contacting one or more of the project maintainers.
41-
42-
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0,
43-
available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
42+
comments, commits, code, wiki edits, issues, and other contributions that are
43+
not aligned to this Code of Conduct, or to ban temporarily or permanently any
44+
contributor for other behaviors that they deem inappropriate, threatening,
45+
offensive, or harmful.
46+
47+
## Scope
48+
49+
This Code of Conduct applies both within project spaces and in public spaces
50+
when an individual is representing the project or its community. Examples of
51+
representing a project or community include using an official project e-mail
52+
address, posting via an official social media account, or acting as an appointed
53+
representative at an online or offline event. Representation of a project may be
54+
further defined and clarified by project maintainers.
55+
56+
This Code of Conduct also applies outside the project spaces when the Project
57+
Steward has a reasonable belief that an individual's behavior may have a
58+
negative impact on the project or its community.
59+
60+
## Conflict Resolution
61+
62+
We do not believe that all conflict is bad; healthy debate and disagreement
63+
often yield positive results. However, it is never okay to be disrespectful or
64+
to engage in behavior that violates the project’s code of conduct.
65+
66+
If you see someone violating the code of conduct, you are encouraged to address
67+
the behavior directly with those involved. Many issues can be resolved quickly
68+
and easily, and this gives people more control over the outcome of their
69+
dispute. If you are unable to resolve the matter for any reason, or if the
70+
behavior is threatening or harassing, report it. We are dedicated to providing
71+
an environment where participants feel welcome and safe.
72+
73+
Reports should be directed to *googleapis-stewards@google.com*, the
74+
Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to
75+
receive and address reported violations of the code of conduct. They will then
76+
work with a committee consisting of representatives from the Open Source
77+
Programs Office and the Google Open Source Strategy team. If for any reason you
78+
are uncomfortable reaching out to the Project Steward, please email
79+
opensource@google.com.
80+
81+
We will investigate every complaint, but you may not receive a direct response.
82+
We will use our discretion in determining when and how to follow up on reported
83+
incidents, which may range from not taking action to permanent expulsion from
84+
the project and project-sponsored spaces. We will notify the accused of the
85+
report and provide them an opportunity to discuss it before any action is taken.
86+
The identity of the reporter will be omitted from the details of the report
87+
supplied to the accused. In potentially harmful situations, such as ongoing
88+
harassment or threats to anyone's safety, we may take action without notice.
89+
90+
## Attribution
91+
92+
This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
93+
available at
94+
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

packages/google-devtools-containeranalysis/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"compile": "tsc -p . && cp -r protos build/",
6060
"compile-protos": "compileProtos src",
6161
"predocs-test": "npm run docs",
62-
"prepare": "npm run compile",
62+
"prepare": "npm run compile-protos && npm run compile",
6363
"prelint": "cd samples; npm link ../; npm install",
6464
"precompile": "gts clean",
6565
"api-extractor": "api-extractor run --local",

packages/google-devtools-containeranalysis/protos/google/cloud/common_resources.proto

Lines changed: 0 additions & 52 deletions
This file was deleted.

packages/google-devtools-containeranalysis/protos/google/devtools/containeranalysis/v1/containeranalysis.proto

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019 Google LLC.
1+
// Copyright 2019 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -11,17 +11,19 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
//
1514

1615
syntax = "proto3";
1716

1817
package google.devtools.containeranalysis.v1;
1918

2019
import "google/api/annotations.proto";
2120
import "google/api/client.proto";
21+
import "google/api/field_behavior.proto";
22+
import "google/api/resource.proto";
2223
import "google/iam/v1/iam_policy.proto";
2324
import "google/iam/v1/policy.proto";
2425
import "google/protobuf/timestamp.proto";
26+
import "grafeas/v1/vulnerability.proto";
2527

2628
option csharp_namespace = "Google.Cloud.DevTools.ContainerAnalysis.V1";
2729
option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1;containeranalysis";
@@ -105,4 +107,48 @@ service ContainerAnalysis {
105107
};
106108
option (google.api.method_signature) = "resource,permissions";
107109
}
110+
111+
// Gets a summary of the number and severity of occurrences.
112+
rpc GetVulnerabilityOccurrencesSummary(GetVulnerabilityOccurrencesSummaryRequest) returns (VulnerabilityOccurrencesSummary) {
113+
option (google.api.http) = {
114+
get: "/v1/{parent=projects/*}/occurrences:vulnerabilitySummary"
115+
};
116+
option (google.api.method_signature) = "parent,filter";
117+
}
118+
}
119+
120+
// Request to get a vulnerability summary for some set of occurrences.
121+
message GetVulnerabilityOccurrencesSummaryRequest {
122+
// The name of the project to get a vulnerability summary for in the form of
123+
// `projects/[PROJECT_ID]`.
124+
string parent = 1 [
125+
(google.api.resource_reference).type = "cloudresourcemanager.googleapis.com/Project",
126+
(google.api.field_behavior) = REQUIRED
127+
];
128+
129+
// The filter expression.
130+
string filter = 2;
131+
}
132+
133+
// A summary of how many vulnerability occurrences there are per resource and
134+
// severity type.
135+
message VulnerabilityOccurrencesSummary {
136+
// Per resource and severity counts of fixable and total vulnerabilities.
137+
message FixableTotalByDigest {
138+
// The affected resource.
139+
string resource_uri = 1;
140+
141+
// The severity for this count. SEVERITY_UNSPECIFIED indicates total across
142+
// all severities.
143+
grafeas.v1.Severity severity = 2;
144+
145+
// The number of fixable vulnerabilities associated with this resource.
146+
int64 fixable_count = 3;
147+
148+
// The total number of vulnerabilities associated with this resource.
149+
int64 total_count = 4;
150+
}
151+
152+
// A listing by resource of the number of fixable and total vulnerabilities.
153+
repeated FixableTotalByDigest counts = 1;
108154
}

0 commit comments

Comments
 (0)