// Copyright 2025 The Grafeas Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package grafeas.v1;

option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
option java_multiple_files = true;
option java_package = "io.grafeas.v1";
option objc_class_prefix = "GRA";

message Risk {
  // CISA maintains the authoritative source of vulnerabilities that have been
  // exploited in the wild.
  CISAKnownExploitedVulnerabilities cisa_kev = 1;
  // The Exploit Prediction Scoring System (EPSS) estimates the likelihood
  // (probability) that a software vulnerability will be exploited in the wild.
  ExploitPredictionScoringSystem epss = 2;
}

message CISAKnownExploitedVulnerabilities {
  // Whether the vulnerability is known to have been leveraged as part of a
  // ransomware campaign.
  string known_ransomware_campaign_use = 1;
}

message ExploitPredictionScoringSystem {
  // The percentile of the current score, the proportion of all scored
  // vulnerabilities with the same or a lower EPSS score
  double percentile = 1;
  // The EPSS score representing the probability [0-1] of exploitation in the
  // wild in the next 30 days
  double score = 2;
}
