vulnerability.proto 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. // Copyright 2018 The Grafeas Authors. All rights reserved.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package grafeas.v1beta1.vulnerability;
  16. import "google/protobuf/timestamp.proto";
  17. import "google/devtools/containeranalysis/v1beta1/common/common.proto";
  18. import "google/devtools/containeranalysis/v1beta1/cvss/cvss.proto";
  19. import "google/devtools/containeranalysis/v1beta1/package/package.proto";
  20. option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/vulnerability;vulnerability";
  21. option java_multiple_files = true;
  22. option java_package = "io.grafeas.v1beta1.vulnerability";
  23. option objc_class_prefix = "GRA";
  24. // Note provider-assigned severity/impact ranking.
  25. enum Severity {
  26. // Unknown.
  27. SEVERITY_UNSPECIFIED = 0;
  28. // Minimal severity.
  29. MINIMAL = 1;
  30. // Low severity.
  31. LOW = 2;
  32. // Medium severity.
  33. MEDIUM = 3;
  34. // High severity.
  35. HIGH = 4;
  36. // Critical severity.
  37. CRITICAL = 5;
  38. }
  39. // Vulnerability provides metadata about a security vulnerability in a Note.
  40. message Vulnerability {
  41. // The CVSS score for this vulnerability.
  42. float cvss_score = 1;
  43. // Note provider assigned impact of the vulnerability.
  44. Severity severity = 2;
  45. // All information about the package to specifically identify this
  46. // vulnerability. One entry per (version range and cpe_uri) the package
  47. // vulnerability has manifested in.
  48. repeated Detail details = 3;
  49. // Identifies all appearances of this vulnerability in the package for a
  50. // specific distro/location. For example: glibc in
  51. // cpe:/o:debian:debian_linux:8 for versions 2.1 - 2.2
  52. message Detail {
  53. // Required. The CPE URI in
  54. // [cpe format](https://cpe.mitre.org/specification/) in which the
  55. // vulnerability manifests. Examples include distro or storage location for
  56. // vulnerable jar.
  57. string cpe_uri = 1;
  58. // Required. The name of the package where the vulnerability was found.
  59. string package = 2;
  60. // The min version of the package in which the vulnerability exists.
  61. grafeas.v1beta1.package.Version min_affected_version = 3;
  62. // The max version of the package in which the vulnerability exists.
  63. grafeas.v1beta1.package.Version max_affected_version = 4;
  64. // The severity (eg: distro assigned severity) for this vulnerability.
  65. string severity_name = 5;
  66. // A vendor-specific description of this note.
  67. string description = 6;
  68. // The fix for this specific package version.
  69. VulnerabilityLocation fixed_location = 7;
  70. // The type of package; whether native or non native(ruby gems, node.js
  71. // packages etc).
  72. string package_type = 8;
  73. // Whether this detail is obsolete. Occurrences are expected not to point to
  74. // obsolete details.
  75. bool is_obsolete = 9;
  76. // The time this information was last changed at the source. This is an
  77. // upstream timestamp from the underlying information source - e.g. Ubuntu
  78. // security tracker.
  79. google.protobuf.Timestamp source_update_time = 10;
  80. }
  81. // The full description of the CVSSv3.
  82. CVSSv3 cvss_v3 = 4;
  83. // Windows details get their own format because the information format and
  84. // model don't match a normal detail. Specifically Windows updates are done as
  85. // patches, thus Windows vulnerabilities really are a missing package, rather
  86. // than a package being at an incorrect version.
  87. repeated WindowsDetail windows_details = 5;
  88. message WindowsDetail {
  89. // Required. The CPE URI in
  90. // [cpe format](https://cpe.mitre.org/specification/) in which the
  91. // vulnerability manifests. Examples include distro or storage location for
  92. // vulnerable jar.
  93. string cpe_uri = 1;
  94. // Required. The name of the vulnerability.
  95. string name = 2;
  96. // The description of the vulnerability.
  97. string description = 3;
  98. // Required. The names of the KBs which have hotfixes to mitigate this
  99. // vulnerability. Note that there may be multiple hotfixes (and thus
  100. // multiple KBs) that mitigate a given vulnerability. Currently any listed
  101. // kb's presence is considered a fix.
  102. repeated KnowledgeBase fixing_kbs = 4;
  103. message KnowledgeBase {
  104. // The KB name (generally of the form KB[0-9]+ i.e. KB123456).
  105. string name = 1;
  106. // A link to the KB in the Windows update catalog -
  107. // https://www.catalog.update.microsoft.com/
  108. string url = 2;
  109. }
  110. }
  111. // The time this information was last changed at the source. This is an
  112. // upstream timestamp from the underlying information source - e.g. Ubuntu
  113. // security tracker.
  114. google.protobuf.Timestamp source_update_time = 6;
  115. // Next free ID is 7.
  116. }
  117. // Details of a vulnerability Occurrence.
  118. message Details {
  119. // The type of package; whether native or non native(ruby gems, node.js
  120. // packages etc)
  121. string type = 1;
  122. // Output only. The note provider assigned Severity of the vulnerability.
  123. Severity severity = 2;
  124. // Output only. The CVSS score of this vulnerability. CVSS score is on a
  125. // scale of 0-10 where 0 indicates low severity and 10 indicates high
  126. // severity.
  127. float cvss_score = 3;
  128. // Required. The set of affected locations and their fixes (if available)
  129. // within the associated resource.
  130. repeated PackageIssue package_issue = 4;
  131. // Output only. A one sentence description of this vulnerability.
  132. string short_description = 5;
  133. // Output only. A detailed description of this vulnerability.
  134. string long_description = 6;
  135. // Output only. URLs related to this vulnerability.
  136. repeated grafeas.v1beta1.RelatedUrl related_urls = 7;
  137. // The distro assigned severity for this vulnerability when it is
  138. // available, and note provider assigned severity when distro has not yet
  139. // assigned a severity for this vulnerability.
  140. Severity effective_severity = 8;
  141. }
  142. // This message wraps a location affected by a vulnerability and its
  143. // associated fix (if one is available).
  144. message PackageIssue {
  145. // Required. The location of the vulnerability.
  146. VulnerabilityLocation affected_location = 1;
  147. // The location of the available fix for vulnerability.
  148. VulnerabilityLocation fixed_location = 2;
  149. // Deprecated, use Details.effective_severity instead
  150. // The severity (e.g., distro assigned severity) for this vulnerability.
  151. string severity_name = 3;
  152. }
  153. // The location of the vulnerability.
  154. message VulnerabilityLocation {
  155. // Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/)
  156. // format. Examples include distro or storage location for vulnerable jar.
  157. string cpe_uri = 1;
  158. // Required. The package being described.
  159. string package = 2;
  160. // Required. The version of the package being described.
  161. grafeas.v1beta1.package.Version version = 3;
  162. }