upgrade.proto 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. // Copyright 2019 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.v1;
  16. import "google/protobuf/timestamp.proto";
  17. import "grafeas/v1/package.proto";
  18. option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
  19. option java_multiple_files = true;
  20. option java_package = "io.grafeas.v1";
  21. option objc_class_prefix = "GRA";
  22. // An Upgrade Note represents a potential upgrade of a package to a given
  23. // version. For each package version combination (i.e. bash 4.0, bash 4.1,
  24. // bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field
  25. // represents the information related to the update.
  26. message UpgradeNote {
  27. // Required for non-Windows OS. The package this Upgrade is for.
  28. string package = 1;
  29. // Required for non-Windows OS. The version of the package in machine + human
  30. // readable form.
  31. grafeas.v1.Version version = 2;
  32. // Metadata about the upgrade for each specific operating system.
  33. repeated UpgradeDistribution distributions = 3;
  34. // Required for Windows OS. Represents the metadata about the Windows update.
  35. WindowsUpdate windows_update = 4;
  36. }
  37. // The Upgrade Distribution represents metadata about the Upgrade for each
  38. // operating system (CPE). Some distributions have additional metadata around
  39. // updates, classifying them into various categories and severities.
  40. message UpgradeDistribution {
  41. // Required - The specific operating system this metadata applies to. See
  42. // https://cpe.mitre.org/specification/.
  43. string cpe_uri = 1;
  44. // The operating system classification of this Upgrade, as specified by the
  45. // upstream operating system upgrade feed. For Windows the classification is
  46. // one of the category_ids listed at
  47. // https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
  48. string classification = 2;
  49. // The severity as specified by the upstream operating system.
  50. string severity = 3;
  51. // The cve tied to this Upgrade.
  52. repeated string cve = 4;
  53. }
  54. // Windows Update represents the metadata about the update for the Windows
  55. // operating system. The fields in this message come from the Windows Update API
  56. // documented at
  57. // https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate.
  58. message WindowsUpdate {
  59. // The unique identifier of the update.
  60. message Identity {
  61. // The revision independent identifier of the update.
  62. string update_id = 1;
  63. // The revision number of the update.
  64. int32 revision = 2;
  65. }
  66. // Required - The unique identifier for the update.
  67. Identity identity = 1;
  68. // The localized title of the update.
  69. string title = 2;
  70. // The localized description of the update.
  71. string description = 3;
  72. // The category to which the update belongs.
  73. message Category {
  74. // The identifier of the category.
  75. string category_id = 1;
  76. // The localized name of the category.
  77. string name = 2;
  78. }
  79. // The list of categories to which the update belongs.
  80. repeated Category categories = 4;
  81. // The Microsoft Knowledge Base article IDs that are associated with the
  82. // update.
  83. repeated string kb_article_ids = 5;
  84. // The hyperlink to the support information for the update.
  85. string support_url = 6;
  86. // The last published timestamp of the update.
  87. google.protobuf.Timestamp last_published_timestamp = 7;
  88. }
  89. // An Upgrade Occurrence represents that a specific resource_url could install a
  90. // specific upgrade. This presence is supplied via local sources (i.e. it is
  91. // present in the mirror and the running system has noticed its availability).
  92. // For Windows, both distribution and windows_update contain information for the
  93. // Windows update.
  94. message UpgradeOccurrence {
  95. // Required for non-Windows OS. The package this Upgrade is for.
  96. string package = 1;
  97. // Required for non-Windows OS. The version of the package in a machine +
  98. // human readable form.
  99. grafeas.v1.Version parsed_version = 3;
  100. // Metadata about the upgrade for available for the specific operating system
  101. // for the resource_url. This allows efficient filtering, as well as
  102. // making it easier to use the occurrence.
  103. UpgradeDistribution distribution = 4;
  104. // Required for Windows OS. Represents the metadata about the Windows update.
  105. WindowsUpdate windows_update = 5;
  106. }