GeezerVison is showing github.com — feat: Add VULNERABILITY_ASSESSMENT Note type to grafeas v1 API, adds … · googleapis/googleapis@a4e6205
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: grafeas/v1/BUILD.bazel +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -39,6 +39,7 @@ proto_library( | 39 | 39 | "slsa_provenance.proto", | 40 | 40 | "slsa_provenance_zero_two.proto", | 41 | 41 | "upgrade.proto", | | 42 | + "vex.proto", | 42 | 43 | "vulnerability.proto", | 43 | 44 | ], | 44 | 45 | deps = [ | |
Collapse file Copy file name to clipboardExpand all lines: grafeas/v1/common.proto +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -45,6 +45,8 @@ enum NoteKind { | 45 | 45 | COMPLIANCE = 9; | 46 | 46 | // This represents a DSSE attestation Note | 47 | 47 | DSSE_ATTESTATION = 10; | | 48 | + // This represents a Vulnerability Assessment. | | 49 | + VULNERABILITY_ASSESSMENT = 11; | 48 | 50 | } | 49 | 51 |
| 50 | 52 | // Metadata for any related URL information. | |
Collapse file Copy file name to clipboardExpand all lines: grafeas/v1/grafeas.proto +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -33,6 +33,7 @@ import "grafeas/v1/dsse_attestation.proto"; | 33 | 33 | import "grafeas/v1/image.proto"; | 34 | 34 | import "grafeas/v1/package.proto"; | 35 | 35 | import "grafeas/v1/upgrade.proto"; | | 36 | +import "grafeas/v1/vex.proto"; | 36 | 37 | import "grafeas/v1/vulnerability.proto"; | 37 | 38 |
| 38 | 39 | option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; | @@ -314,6 +315,8 @@ message Note { | 314 | 315 | grafeas.v1.ComplianceNote compliance = 18; | 315 | 316 | // A note describing a dsse attestation note. | 316 | 317 | grafeas.v1.DSSEAttestationNote dsse_attestation = 19; | | 318 | + // A note describing a vulnerability assessment. | | 319 | + grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; | 317 | 320 | } | 318 | 321 | } | 319 | 322 |
| |
Collapse file Copy file name to clipboardExpand all lines: grafeas/v1/swagger/grafeas.swagger.json +240-2Lines changed: 240 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 796 | 796 | "default": "KIND_UNSPECIFIED", | 797 | 797 | "description": "The type of an alias.\n\n - KIND_UNSPECIFIED: Unknown.\n - FIXED: Git tag.\n - MOVABLE: Git branch.\n - OTHER: Used to specify non-standard aliases. For example, if a Git repo has a\nref named \"refs/foo/bar\"." | 798 | 798 | }, | | 799 | + "AssessmentJustification": { | | 800 | + "type": "object", | | 801 | + "properties": { | | 802 | + "justificationType": { | | 803 | + "$ref": "#/definitions/JustificationJustificationType", | | 804 | + "description": "The justification type for this vulnerability." | | 805 | + }, | | 806 | + "details": { | | 807 | + "type": "string", | | 808 | + "description": "Additional details on why this justification was chosen." | | 809 | + } | | 810 | + }, | | 811 | + "description": "Justification provides the justification when the state of the\nassessment if NOT_AFFECTED." | | 812 | + }, | | 813 | + "AssessmentRemediation": { | | 814 | + "type": "object", | | 815 | + "properties": { | | 816 | + "remediationType": { | | 817 | + "$ref": "#/definitions/RemediationRemediationType", | | 818 | + "description": "The type of remediation that can be applied." | | 819 | + }, | | 820 | + "details": { | | 821 | + "type": "string", | | 822 | + "description": "Contains a comprehensive human-readable discussion of the remediation." | | 823 | + }, | | 824 | + "remediationUri": { | | 825 | + "$ref": "#/definitions/v1RelatedUrl", | | 826 | + "description": "Contains the URL where to obtain the remediation." | | 827 | + } | | 828 | + }, | | 829 | + "description": "Specifies details on how to handle (and presumably, fix) a vulnerability." | | 830 | + }, | | 831 | + "AssessmentState": { | | 832 | + "type": "string", | | 833 | + "enum": [ | | 834 | + "STATE_UNSPECIFIED", | | 835 | + "AFFECTED", | | 836 | + "NOT_AFFECTED", | | 837 | + "FIXED", | | 838 | + "UNDER_INVESTIGATION" | | 839 | + ], | | 840 | + "default": "STATE_UNSPECIFIED", | | 841 | + "description": "Provides the state of this Vulnerability assessment.\n\n - STATE_UNSPECIFIED: No state is specified.\n - AFFECTED: This product is known to be affected by this vulnerability.\n - NOT_AFFECTED: This product is known to be not affected by this vulnerability.\n - FIXED: This product contains a fix for this vulnerability.\n - UNDER_INVESTIGATION: It is not known yet whether these versions are or are not affected\nby the vulnerability. However, it is still under investigation." | | 842 | + }, | 799 | 843 | "AttestationNoteHint": { | 800 | 844 | "type": "object", | 801 | 845 | "properties": { | | 886 | 930 | "default": "CONTINUOUS_ANALYSIS_UNSPECIFIED", | 887 | 931 | "description": "Whether the resource is continuously analyzed.\n\n - CONTINUOUS_ANALYSIS_UNSPECIFIED: Unknown.\n - ACTIVE: The resource is continuously analyzed.\n - INACTIVE: The resource is ignored for continuous analysis." | 888 | 932 | }, | | 933 | + "JustificationJustificationType": { | | 934 | + "type": "string", | | 935 | + "enum": [ | | 936 | + "JUSTIFICATION_TYPE_UNSPECIFIED", | | 937 | + "COMPONENT_NOT_PRESENT", | | 938 | + "VULNERABLE_CODE_NOT_PRESENT", | | 939 | + "VULNERABLE_CODE_NOT_IN_EXECUTE_PATH", | | 940 | + "VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY", | | 941 | + "INLINE_MITIGATIONS_ALREADY_EXIST" | | 942 | + ], | | 943 | + "default": "JUSTIFICATION_TYPE_UNSPECIFIED", | | 944 | + "description": "Provides the type of justification.\n\n - JUSTIFICATION_TYPE_UNSPECIFIED: JUSTIFICATION_TYPE_UNSPECIFIED.\n - COMPONENT_NOT_PRESENT: The vulnerable component is not present in the product.\n - VULNERABLE_CODE_NOT_PRESENT: The vulnerable code is not present. Typically this case\noccurs when source code is configured or built in a way that excludes\nthe vulnerable code.\n - VULNERABLE_CODE_NOT_IN_EXECUTE_PATH: The vulnerable code can not be executed.\nTypically this case occurs when the product includes the vulnerable\ncode but does not call or use the vulnerable code.\n - VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY: The vulnerable code cannot be controlled by an attacker to exploit\nthe vulnerability.\n - INLINE_MITIGATIONS_ALREADY_EXIST: The product includes built-in protections or features that prevent\nexploitation of the vulnerability. These built-in protections cannot\nbe subverted by the attacker and cannot be configured or disabled by\nthe user. These mitigations completely prevent exploitation based on\nknown attack vectors." | | 945 | + }, | | 946 | + "RemediationRemediationType": { | | 947 | + "type": "string", | | 948 | + "enum": [ | | 949 | + "REMEDIATION_TYPE_UNSPECIFIED", | | 950 | + "MITIGATION", | | 951 | + "NO_FIX_PLANNED", | | 952 | + "NONE_AVAILABLE", | | 953 | + "VENDOR_FIX", | | 954 | + "WORKAROUND" | | 955 | + ], | | 956 | + "default": "REMEDIATION_TYPE_UNSPECIFIED", | | 957 | + "description": "The type of remediation that can be applied.\n\n - REMEDIATION_TYPE_UNSPECIFIED: No remediation type specified.\n - MITIGATION: A MITIGATION is available.\n - NO_FIX_PLANNED: No fix is planned.\n - NONE_AVAILABLE: Not available.\n - VENDOR_FIX: A vendor fix is available.\n - WORKAROUND: A workaround is available." | | 958 | + }, | 889 | 959 | "SlsaProvenanceMaterial": { | 890 | 960 | "type": "object", | 891 | 961 | "properties": { | | 986 | 1056 | "default": "VERSION_KIND_UNSPECIFIED", | 987 | 1057 | "description": "Whether this is an ordinary package version or a sentinel MIN/MAX version.\n\n - VERSION_KIND_UNSPECIFIED: Unknown.\n - NORMAL: A standard package version.\n - MINIMUM: A special version representing negative infinity.\n - MAXIMUM: A special version representing positive infinity." | 988 | 1058 | }, | | 1059 | + "VulnerabilityAssessmentNoteAssessment": { | | 1060 | + "type": "object", | | 1061 | + "properties": { | | 1062 | + "cve": { | | 1063 | + "type": "string", | | 1064 | + "description": "Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)\ntracking number for the vulnerability." | | 1065 | + }, | | 1066 | + "shortDescription": { | | 1067 | + "type": "string", | | 1068 | + "description": "A one sentence description of this Vex." | | 1069 | + }, | | 1070 | + "longDescription": { | | 1071 | + "type": "string", | | 1072 | + "description": "A detailed description of this Vex." | | 1073 | + }, | | 1074 | + "relatedUris": { | | 1075 | + "type": "array", | | 1076 | + "items": { | | 1077 | + "$ref": "#/definitions/v1RelatedUrl" | | 1078 | + }, | | 1079 | + "description": "Holds a list of references associated with this vulnerability item and\nassessment. These uris have additional information about the\nvulnerability and the assessment itself. E.g. Link to a document which\ndetails how this assessment concluded the state of this vulnerability." | | 1080 | + }, | | 1081 | + "state": { | | 1082 | + "$ref": "#/definitions/AssessmentState", | | 1083 | + "description": "Provides the state of this Vulnerability assessment." | | 1084 | + }, | | 1085 | + "impacts": { | | 1086 | + "type": "array", | | 1087 | + "items": { | | 1088 | + "type": "string" | | 1089 | + }, | | 1090 | + "description": "Contains information about the impact of this vulnerability,\nthis will change with time." | | 1091 | + }, | | 1092 | + "justification": { | | 1093 | + "$ref": "#/definitions/AssessmentJustification", | | 1094 | + "description": "Justification provides the justification when the state of the\nassessment if NOT_AFFECTED." | | 1095 | + }, | | 1096 | + "remediations": { | | 1097 | + "type": "array", | | 1098 | + "items": { | | 1099 | + "$ref": "#/definitions/AssessmentRemediation" | | 1100 | + }, | | 1101 | + "description": "Specifies details on how to handle (and presumably, fix) a vulnerability." | | 1102 | + } | | 1103 | + }, | | 1104 | + "description": "Assessment provides all information that is related to a single\nvulnerability for this product." | | 1105 | + }, | | 1106 | + "VulnerabilityAssessmentNoteProduct": { | | 1107 | + "type": "object", | | 1108 | + "properties": { | | 1109 | + "name": { | | 1110 | + "type": "string", | | 1111 | + "description": "Name of the product." | | 1112 | + }, | | 1113 | + "id": { | | 1114 | + "type": "string", | | 1115 | + "description": "Token that identifies a product so that it can be referred to from other\nparts in the document. There is no predefined format as long as it\nuniquely identifies a group in the context of the current document." | | 1116 | + }, | | 1117 | + "genericUri": { | | 1118 | + "type": "string", | | 1119 | + "description": "Contains a URI which is vendor-specific.\nExample: The artifact repository URL of an image." | | 1120 | + } | | 1121 | + }, | | 1122 | + "title": "Product contains information about a product and how to uniquely identify\nit.\n(-- api-linter: core::0123::resource-annotation=disabled\n aip.dev/not-precedent: Product is not a separate resource. --)" | | 1123 | + }, | | 1124 | + "VulnerabilityAssessmentNotePublisher": { | | 1125 | + "type": "object", | | 1126 | + "properties": { | | 1127 | + "name": { | | 1128 | + "type": "string", | | 1129 | + "description": "Name of the publisher.\nExamples: 'Google', 'Google Cloud Platform'." | | 1130 | + }, | | 1131 | + "issuingAuthority": { | | 1132 | + "type": "string", | | 1133 | + "description": "Provides information about the authority of the issuing party to\nrelease the document, in particular, the party's constituency and\nresponsibilities or other obligations." | | 1134 | + }, | | 1135 | + "publisherNamespace": { | | 1136 | + "type": "string", | | 1137 | + "title": "The context or namespace.\nContains a URL which is under control of the issuing party and can\nbe used as a globally unique identifier for that issuing party.\nExample: https://csaf.io" | | 1138 | + } | | 1139 | + }, | | 1140 | + "title": "Publisher contains information about the publisher of\nthis Note.\n(-- api-linter: core::0123::resource-annotation=disabled\n aip.dev/not-precedent: Publisher is not a separate resource. --)" | | 1141 | + }, | 989 | 1142 | "VulnerabilityNoteDetail": { | 990 | 1143 | "type": "object", | 991 | 1144 | "properties": { | | 1123 | 1276 | }, | 1124 | 1277 | "description": "A detail for a distro and package this vulnerability occurrence was found in\nand its associated fix (if one is available)." | 1125 | 1278 | }, | | 1279 | + "VulnerabilityOccurrenceVexAssessment": { | | 1280 | + "type": "object", | | 1281 | + "properties": { | | 1282 | + "cve": { | | 1283 | + "type": "string", | | 1284 | + "description": "Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)\ntracking number for the vulnerability." | | 1285 | + }, | | 1286 | + "relatedUris": { | | 1287 | + "type": "array", | | 1288 | + "items": { | | 1289 | + "$ref": "#/definitions/v1RelatedUrl" | | 1290 | + }, | | 1291 | + "description": "Holds a list of references associated with this vulnerability item and\nassessment." | | 1292 | + }, | | 1293 | + "noteName": { | | 1294 | + "type": "string", | | 1295 | + "title": "The VulnerabilityAssessment note from which this VexAssessment was\ngenerated.\nThis will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.\n(-- api-linter: core::0122::name-suffix=disabled\n aip.dev/not-precedent: The suffix is kept for consistency. --)" | | 1296 | + }, | | 1297 | + "state": { | | 1298 | + "$ref": "#/definitions/AssessmentState", | | 1299 | + "description": "Provides the state of this Vulnerability assessment." | | 1300 | + }, | | 1301 | + "impacts": { | | 1302 | + "type": "array", | | 1303 | + "items": { | | 1304 | + "type": "string" | | 1305 | + }, | | 1306 | + "description": "Contains information about the impact of this vulnerability,\nthis will change with time." | | 1307 | + }, | | 1308 | + "remediations": { | | 1309 | + "type": "array", | | 1310 | + "items": { | | 1311 | + "$ref": "#/definitions/AssessmentRemediation" | | 1312 | + }, | | 1313 | + "description": "Specifies details on how to handle (and presumably, fix) a vulnerability." | | 1314 | + }, | | 1315 | + "justification": { | | 1316 | + "$ref": "#/definitions/AssessmentJustification", | | 1317 | + "description": "Justification provides the justification when the state of the\nassessment if NOT_AFFECTED." | | 1318 | + } | | 1319 | + }, | | 1320 | + "description": "VexAssessment provides all publisher provided Vex information that is\nrelated to this vulnerability." | | 1321 | + }, | 1126 | 1322 | "WindowsDetailKnowledgeBase": { | 1127 | 1323 | "type": "object", | 1128 | 1324 | "properties": { | | 2453 | 2649 | "dsseAttestation": { | 2454 | 2650 | "$ref": "#/definitions/v1DSSEAttestationNote", | 2455 | 2651 | "description": "A note describing a dsse attestation note." | | 2652 | + }, | | 2653 | + "vulnerabilityAssessment": { | | 2654 | + "$ref": "#/definitions/v1VulnerabilityAssessmentNote", | | 2655 | + "description": "A note describing a vulnerability assessment." | 2456 | 2656 | } | 2457 | 2657 | }, | 2458 | 2658 | "description": "A type of analysis that can be done for a resource." | | 2470 | 2670 | "ATTESTATION", | 2471 | 2671 | "UPGRADE", | 2472 | 2672 | "COMPLIANCE", | 2473 | | - "DSSE_ATTESTATION" | | 2673 | + "DSSE_ATTESTATION", | | 2674 | + "VULNERABILITY_ASSESSMENT" | 2474 | 2675 | ], | 2475 | 2676 | "default": "NOTE_KIND_UNSPECIFIED", | 2476 | | - "description": "Kind represents the kinds of notes supported.\n\n - NOTE_KIND_UNSPECIFIED: Default value. This value is unused.\n - VULNERABILITY: The note and occurrence represent a package vulnerability.\n - BUILD: The note and occurrence assert build provenance.\n - IMAGE: This represents an image basis relationship.\n - PACKAGE: This represents a package installed via a package manager.\n - DEPLOYMENT: The note and occurrence track deployment events.\n - DISCOVERY: The note and occurrence track the initial discovery status of a resource.\n - ATTESTATION: This represents a logical \"role\" that can attest to artifacts.\n - UPGRADE: This represents an available package upgrade.\n - COMPLIANCE: This represents a Compliance Note\n - DSSE_ATTESTATION: This represents a DSSE attestation Note" | | 2677 | + "description": "Kind represents the kinds of notes supported.\n\n - NOTE_KIND_UNSPECIFIED: Default value. This value is unused.\n - VULNERABILITY: The note and occurrence represent a package vulnerability.\n - BUILD: The note and occurrence assert build provenance.\n - IMAGE: This represents an image basis relationship.\n - PACKAGE: This represents a package installed via a package manager.\n - DEPLOYMENT: The note and occurrence track deployment events.\n - DISCOVERY: The note and occurrence track the initial discovery status of a resource.\n - ATTESTATION: This represents a logical \"role\" that can attest to artifacts.\n - UPGRADE: This represents an available package upgrade.\n - COMPLIANCE: This represents a Compliance Note\n - DSSE_ATTESTATION: This represents a DSSE attestation Note\n - VULNERABILITY_ASSESSMENT: This represents a Vulnerability Assessment." | 2477 | 2678 | }, | 2478 | 2679 | "v1Occurrence": { | 2479 | 2680 | "type": "object", | | 3090 | 3291 | }, | 3091 | 3292 | "description": "Version contains structured information about the version of a package." | 3092 | 3293 | }, | | 3294 | + "v1VulnerabilityAssessmentNote": { | | 3295 | + "type": "object", | | 3296 | + "properties": { | | 3297 | + "title": { | | 3298 | + "type": "string", | | 3299 | + "title": "The title of the note. E.g. `Vex-Debian-11.4`" | | 3300 | + }, | | 3301 | + "shortDescription": { | | 3302 | + "type": "string", | | 3303 | + "description": "A one sentence description of this Vex." | | 3304 | + }, | | 3305 | + "longDescription": { | | 3306 | + "type": "string", | | 3307 | + "description": "A detailed description of this Vex." | | 3308 | + }, | | 3309 | + "languageCode": { | | 3310 | + "type": "string", | | 3311 | + "description": "Identifies the language used by this document,\ncorresponding to IETF BCP 47 / RFC 5646." | | 3312 | + }, | | 3313 | + "publisher": { | | 3314 | + "$ref": "#/definitions/VulnerabilityAssessmentNotePublisher", | | 3315 | + "description": "Publisher details of this Note." | | 3316 | + }, | | 3317 | + "product": { | | 3318 | + "$ref": "#/definitions/VulnerabilityAssessmentNoteProduct", | | 3319 | + "description": "The product affected by this vex." | | 3320 | + }, | | 3321 | + "assessment": { | | 3322 | + "$ref": "#/definitions/VulnerabilityAssessmentNoteAssessment", | | 3323 | + "description": "Represents a vulnerability assessment for the product." | | 3324 | + } | | 3325 | + }, | | 3326 | + "description": "A single VulnerabilityAssessmentNote represents\none particular product's vulnerability assessment for one CVE." | | 3327 | + }, | 3093 | 3328 | "v1VulnerabilityNote": { | 3094 | 3329 | "type": "object", | 3095 | 3330 | "properties": { | | 3200 | 3435 | "cvssV2": { | 3201 | 3436 | "$ref": "#/definitions/v1CVSS", | 3202 | 3437 | "description": "The cvss v2 score for the vulnerability." | | 3438 | + }, | | 3439 | + "vexAssessment": { | | 3440 | + "$ref": "#/definitions/VulnerabilityOccurrenceVexAssessment" | 3203 | 3441 | } | 3204 | 3442 | }, | 3205 | 3443 | "description": "An occurrence of a severity vulnerability on a resource." | |
|