|
| 1 | +// Copyright 2025 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 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package grafeas.v1; |
| 18 | + |
| 19 | +import "google/api/field_behavior.proto"; |
| 20 | +import "google/protobuf/timestamp.proto"; |
| 21 | +import "grafeas/v1/common.proto"; |
| 22 | + |
| 23 | +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; |
| 24 | +option java_multiple_files = true; |
| 25 | +option java_package = "io.grafeas.v1"; |
| 26 | +option objc_class_prefix = "GRA"; |
| 27 | + |
| 28 | +// The note representing a secret. |
| 29 | +message SecretNote {} |
| 30 | + |
| 31 | +// The occurrence provides details of a secret. |
| 32 | +message SecretOccurrence { |
| 33 | + // Type of secret. |
| 34 | + SecretKind kind = 1 [(google.api.field_behavior) = REQUIRED]; |
| 35 | + |
| 36 | + // Locations where the secret is detected. |
| 37 | + repeated SecretLocation locations = 2 |
| 38 | + [(google.api.field_behavior) = OPTIONAL]; |
| 39 | + |
| 40 | + // Status of the secret. |
| 41 | + repeated SecretStatus statuses = 3 [(google.api.field_behavior) = OPTIONAL]; |
| 42 | +} |
| 43 | + |
| 44 | +// The location of the secret. |
| 45 | +message SecretLocation { |
| 46 | + // The detailed location of the secret. |
| 47 | + oneof location { |
| 48 | + // The secret is found from a file. |
| 49 | + FileLocation file_location = 1; |
| 50 | + } |
| 51 | +} |
| 52 | + |
| 53 | +// The status of the secret with a timestamp. |
| 54 | +message SecretStatus { |
| 55 | + // The status of the secret. |
| 56 | + enum Status { |
| 57 | + // Unspecified |
| 58 | + STATUS_UNSPECIFIED = 0; |
| 59 | + |
| 60 | + // The status of the secret is unknown. |
| 61 | + UNKNOWN = 1; |
| 62 | + |
| 63 | + // The secret is valid. |
| 64 | + VALID = 2; |
| 65 | + |
| 66 | + // The secret is invalid. |
| 67 | + INVALID = 3; |
| 68 | + } |
| 69 | + |
| 70 | + // The status of the secret. |
| 71 | + Status status = 1 [(google.api.field_behavior) = OPTIONAL]; |
| 72 | + |
| 73 | + // The time the secret status was last updated. |
| 74 | + google.protobuf.Timestamp update_time = 2 |
| 75 | + [(google.api.field_behavior) = OPTIONAL]; |
| 76 | + |
| 77 | + // Optional message about the status code. |
| 78 | + string message = 3 [(google.api.field_behavior) = OPTIONAL]; |
| 79 | +} |
| 80 | + |
| 81 | +// Kind of secret. |
| 82 | +enum SecretKind { |
| 83 | + // Unspecified |
| 84 | + SECRET_KIND_UNSPECIFIED = 0; |
| 85 | + // The secret kind is unknown. |
| 86 | + SECRET_KIND_UNKNOWN = 1; |
| 87 | + // A GCP service account key per: |
| 88 | + // https://cloud.google.com/iam/docs/creating-managing-service-account-keys |
| 89 | + SECRET_KIND_GCP_SERVICE_ACCOUNT_KEY = 2; |
| 90 | +} |
0 commit comments