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