FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: [containeranalysis] add enum for grafeas v1 cvss to support both cvss v2 and v3 by gcf-owl-bot[bot] · Pull Request #9341 · googleapis/google-cloud-java · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .java  (2) .md  (1) .proto  (1) All 3 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 1 addition & 1 deletion java-grafeas/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.11.0</version>
<version>26.12.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
18 changes: 18 additions & 0 deletions java-grafeas/src/main/java/io/grafeas/v1/CVSS.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ public enum AttackComplexity implements com.google.protobuf.ProtocolMessageEnum
ATTACK_COMPLEXITY_LOW(1),
/** <code>ATTACK_COMPLEXITY_HIGH = 2;</code> */
ATTACK_COMPLEXITY_HIGH(2),
/** <code>ATTACK_COMPLEXITY_MEDIUM = 3;</code> */
ATTACK_COMPLEXITY_MEDIUM(3),
UNRECOGNIZED(-1),
;

Expand All @@ -206,6 +208,8 @@ public enum AttackComplexity implements com.google.protobuf.ProtocolMessageEnum
public static final int ATTACK_COMPLEXITY_LOW_VALUE = 1;
/** <code>ATTACK_COMPLEXITY_HIGH = 2;</code> */
public static final int ATTACK_COMPLEXITY_HIGH_VALUE = 2;
/** <code>ATTACK_COMPLEXITY_MEDIUM = 3;</code> */
public static final int ATTACK_COMPLEXITY_MEDIUM_VALUE = 3;

public final int getNumber() {
if (this == UNRECOGNIZED) {
Expand Down Expand Up @@ -237,6 +241,8 @@ public static AttackComplexity forNumber(int value) {
return ATTACK_COMPLEXITY_LOW;
case 2:
return ATTACK_COMPLEXITY_HIGH;
case 3:
return ATTACK_COMPLEXITY_MEDIUM;
default:
return null;
}
Expand Down Expand Up @@ -723,6 +729,10 @@ public enum Impact implements com.google.protobuf.ProtocolMessageEnum {
IMPACT_LOW(2),
/** <code>IMPACT_NONE = 3;</code> */
IMPACT_NONE(3),
/** <code>IMPACT_PARTIAL = 4;</code> */
IMPACT_PARTIAL(4),
/** <code>IMPACT_COMPLETE = 5;</code> */
IMPACT_COMPLETE(5),
UNRECOGNIZED(-1),
;

Expand All @@ -734,6 +744,10 @@ public enum Impact implements com.google.protobuf.ProtocolMessageEnum {
public static final int IMPACT_LOW_VALUE = 2;
/** <code>IMPACT_NONE = 3;</code> */
public static final int IMPACT_NONE_VALUE = 3;
/** <code>IMPACT_PARTIAL = 4;</code> */
public static final int IMPACT_PARTIAL_VALUE = 4;
/** <code>IMPACT_COMPLETE = 5;</code> */
public static final int IMPACT_COMPLETE_VALUE = 5;

public final int getNumber() {
if (this == UNRECOGNIZED) {
Expand Down Expand Up @@ -767,6 +781,10 @@ public static Impact forNumber(int value) {
return IMPACT_LOW;
case 3:
return IMPACT_NONE;
case 4:
return IMPACT_PARTIAL;
case 5:
return IMPACT_COMPLETE;
default:
return null;
}
Expand Down
49 changes: 25 additions & 24 deletions java-grafeas/src/main/java/io/grafeas/v1/CVSSProto.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "E_UNSPECIFIED\020\000\022\023\n\017SCOPE_UNCHANGED\020\001\022\021\n\r"
+ "SCOPE_CHANGED\020\002\"R\n\006Impact\022\026\n\022IMPACT_UNSP"
+ "ECIFIED\020\000\022\017\n\013IMPACT_HIGH\020\001\022\016\n\nIMPACT_LOW"
+ "\020\002\022\017\n\013IMPACT_NONE\020\003\"\360\n\n\004CVSS\022\022\n\nbase_sco"
+ "\020\002\022\017\n\013IMPACT_NONE\020\003\"\270\013\n\004CVSS\022\022\n\nbase_sco"
+ "re\030\001 \001(\002\022\034\n\024exploitability_score\030\002 \001(\002\022\024"
+ "\n\014impact_score\030\003 \001(\002\0224\n\rattack_vector\030\004 "
+ "\001(\0162\035.grafeas.v1.CVSS.AttackVector\022<\n\021at"
Expand All @@ -94,29 +94,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\"\231\001\n\014AttackVector\022\035\n\031ATTACK_VECTOR_UNSPE"
+ "CIFIED\020\000\022\031\n\025ATTACK_VECTOR_NETWORK\020\001\022\032\n\026A"
+ "TTACK_VECTOR_ADJACENT\020\002\022\027\n\023ATTACK_VECTOR"
+ "_LOCAL\020\003\022\032\n\026ATTACK_VECTOR_PHYSICAL\020\004\"l\n\020"
+ "AttackComplexity\022!\n\035ATTACK_COMPLEXITY_UN"
+ "SPECIFIED\020\000\022\031\n\025ATTACK_COMPLEXITY_LOW\020\001\022\032"
+ "\n\026ATTACK_COMPLEXITY_HIGH\020\002\"\201\001\n\016Authentic"
+ "ation\022\036\n\032AUTHENTICATION_UNSPECIFIED\020\000\022\033\n"
+ "\027AUTHENTICATION_MULTIPLE\020\001\022\031\n\025AUTHENTICA"
+ "TION_SINGLE\020\002\022\027\n\023AUTHENTICATION_NONE\020\003\"\222"
+ "\001\n\022PrivilegesRequired\022#\n\037PRIVILEGES_REQU"
+ "IRED_UNSPECIFIED\020\000\022\034\n\030PRIVILEGES_REQUIRE"
+ "D_NONE\020\001\022\033\n\027PRIVILEGES_REQUIRED_LOW\020\002\022\034\n"
+ "\030PRIVILEGES_REQUIRED_HIGH\020\003\"m\n\017UserInter"
+ "action\022 \n\034USER_INTERACTION_UNSPECIFIED\020\000"
+ "\022\031\n\025USER_INTERACTION_NONE\020\001\022\035\n\031USER_INTE"
+ "RACTION_REQUIRED\020\002\"F\n\005Scope\022\025\n\021SCOPE_UNS"
+ "PECIFIED\020\000\022\023\n\017SCOPE_UNCHANGED\020\001\022\021\n\rSCOPE"
+ "_CHANGED\020\002\"R\n\006Impact\022\026\n\022IMPACT_UNSPECIFI"
+ "ED\020\000\022\017\n\013IMPACT_HIGH\020\001\022\016\n\nIMPACT_LOW\020\002\022\017\n"
+ "\013IMPACT_NONE\020\003*S\n\013CVSSVersion\022\034\n\030CVSS_VE"
+ "RSION_UNSPECIFIED\020\000\022\022\n\016CVSS_VERSION_2\020\001\022"
+ "\022\n\016CVSS_VERSION_3\020\002B\\\n\rio.grafeas.v1B\tCV"
+ "SSProtoP\001Z8google.golang.org/genproto/go"
+ "ogleapis/grafeas/v1;grafeas\242\002\003GRAb\006proto"
+ "3"
+ "_LOCAL\020\003\022\032\n\026ATTACK_VECTOR_PHYSICAL\020\004\"\212\001\n"
+ "\020AttackComplexity\022!\n\035ATTACK_COMPLEXITY_U"
+ "NSPECIFIED\020\000\022\031\n\025ATTACK_COMPLEXITY_LOW\020\001\022"
+ "\032\n\026ATTACK_COMPLEXITY_HIGH\020\002\022\034\n\030ATTACK_CO"
+ "MPLEXITY_MEDIUM\020\003\"\201\001\n\016Authentication\022\036\n\032"
+ "AUTHENTICATION_UNSPECIFIED\020\000\022\033\n\027AUTHENTI"
+ "CATION_MULTIPLE\020\001\022\031\n\025AUTHENTICATION_SING"
+ "LE\020\002\022\027\n\023AUTHENTICATION_NONE\020\003\"\222\001\n\022Privil"
+ "egesRequired\022#\n\037PRIVILEGES_REQUIRED_UNSP"
+ "ECIFIED\020\000\022\034\n\030PRIVILEGES_REQUIRED_NONE\020\001\022"
+ "\033\n\027PRIVILEGES_REQUIRED_LOW\020\002\022\034\n\030PRIVILEG"
+ "ES_REQUIRED_HIGH\020\003\"m\n\017UserInteraction\022 \n"
+ "\034USER_INTERACTION_UNSPECIFIED\020\000\022\031\n\025USER_"
+ "INTERACTION_NONE\020\001\022\035\n\031USER_INTERACTION_R"
+ "EQUIRED\020\002\"F\n\005Scope\022\025\n\021SCOPE_UNSPECIFIED\020"
+ "\000\022\023\n\017SCOPE_UNCHANGED\020\001\022\021\n\rSCOPE_CHANGED\020"
+ "\002\"{\n\006Impact\022\026\n\022IMPACT_UNSPECIFIED\020\000\022\017\n\013I"
+ "MPACT_HIGH\020\001\022\016\n\nIMPACT_LOW\020\002\022\017\n\013IMPACT_N"
+ "ONE\020\003\022\022\n\016IMPACT_PARTIAL\020\004\022\023\n\017IMPACT_COMP"
+ "LETE\020\005*S\n\013CVSSVersion\022\034\n\030CVSS_VERSION_UN"
+ "SPECIFIED\020\000\022\022\n\016CVSS_VERSION_2\020\001\022\022\n\016CVSS_"
+ "VERSION_3\020\002B\\\n\rio.grafeas.v1B\tCVSSProtoP"
+ "\001Z8google.golang.org/genproto/googleapis"
+ "/grafeas/v1;grafeas\242\002\003GRAb\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
Expand Down
3 changes: 3 additions & 0 deletions java-grafeas/src/main/proto/grafeas/v1/cvss.proto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Back | FazBrowse Home | New Git URL