From af81aaf67fb0e710cd7a6987247a0ae069ffa830 Mon Sep 17 00:00:00 2001 From: Ethan Anderson Date: Tue, 28 Feb 2023 12:11:09 -0600 Subject: [PATCH 1/3] regenerate client with fixed swagger, move away from versions in directory --- .gitignore | 4 +- 0.1.0/README.md | 132 - 0.1.0/api/swagger.yaml | 5416 ---------- 0.1.0/docs/PackageInstallation.md | 11 - 0.1.0/docs/PackagePackage.md | 11 - 0.1.0/docs/ProtobufAny.md | 11 - 0.1.0/docs/ProtobufFieldMask.md | 10 - 0.1.0/docs/V1beta1BatchCreateNotesRequest.md | 11 - .../V1beta1BatchCreateOccurrencesRequest.md | 11 - 0.1.0/docs/VulnerabilityCvsSv3.md | 20 - 0.1.0/model_cvs_sv3_attack_complexity.go | 19 - 0.1.0/model_cvs_sv3_attack_vector.go | 21 - 0.1.0/model_cvs_sv3_impact.go | 20 - 0.1.0/model_cvs_sv3_privileges_required.go | 20 - 0.1.0/model_cvs_sv3_user_interaction.go | 19 - 0.1.0/model_package_installation.go | 18 - 0.1.0/model_package_package.go | 18 - 0.1.0/model_protobuf_any.go | 18 - 0.1.0/model_protobuf_field_mask.go | 16 - ...odel_v1beta1_batch_create_notes_request.go | 18 - 0.1.0/model_v1beta1_note_kind.go | 24 - 0.1.0/model_v1beta1vulnerability_details.go | 29 - 0.1.0/model_vulnerability_cvs_sv3.go | 26 - config.go.json | 1 - generate/main.go | 180 + generate_client.go | 4 +- go.mod | 15 + go.sum | 25 + {0.1.0 => grafeas}/.gitignore | 0 {0.1.0 => grafeas}/.swagger-codegen-ignore | 2 - {0.1.0 => grafeas}/.swagger-codegen/VERSION | 0 {0.1.0 => grafeas}/.travis.yml | 0 grafeas/README.md | 173 + grafeas/api/swagger.yaml | 9038 +++++++++++++++++ {0.1.0 => grafeas}/api_grafeas_v1_beta1.go | 289 +- {0.1.0 => grafeas}/client.go | 4 +- {0.1.0 => grafeas}/configuration.go | 6 +- {0.1.0 => grafeas}/docs/AliasContextKind.md | 0 grafeas/docs/AssessmentJustification.md | 11 + grafeas/docs/AssessmentRemediation.md | 13 + .../docs/AssessmentState.md | 2 +- .../docs/AttestationAttestation.md | 0 .../docs/AttestationAuthority.md | 0 .../AttestationGenericSignedAttestation.md | 2 +- ...tionGenericSignedAttestationContentType.md | 0 .../docs/AttestationPgpSignedAttestation.md | 2 +- ...estationPgpSignedAttestationContentType.md | 0 {0.1.0 => grafeas}/docs/AuthorityHint.md | 0 grafeas/docs/Body.md | 10 + grafeas/docs/Body1.md | 10 + {0.1.0 => grafeas}/docs/BuildBuild.md | 0 .../docs/BuildBuildSignature.md | 0 .../docs/BuildSignatureKeyType.md | 0 .../docs/CvssAttackComplexity.md | 2 +- grafeas/docs/CvssAttackVector.md | 9 + grafeas/docs/CvssAuthentication.md | 9 + .../docs/CvssImpact.md | 2 +- .../docs/CvssPrivilegesRequired.md | 2 +- .../docs/CvssScope.md | 2 +- grafeas/docs/CvssUserInteraction.md | 9 + .../docs/DeploymentDeployable.md | 0 .../docs/DeploymentDeployment.md | 0 {0.1.0 => grafeas}/docs/DeploymentPlatform.md | 0 grafeas/docs/DetailsVexAssessment.md | 16 + grafeas/docs/DiscoveredAnalysisCompleted.md | 10 + .../docs/DiscoveredAnalysisStatus.md | 0 .../docs/DiscoveredContinuousAnalysis.md | 0 .../docs/DiscoveryDiscovered.md | 2 + {0.1.0 => grafeas}/docs/DiscoveryDiscovery.md | 0 grafeas/docs/ExternalRefCategory.md | 9 + grafeas/docs/FileNoteFileType.md | 9 + {0.1.0 => grafeas}/docs/GrafeasV1Beta1Api.md | 143 +- .../docs/Grafeasv1beta1Signature.md | 4 +- {0.1.0 => grafeas}/docs/HashHashType.md | 0 {0.1.0 => grafeas}/docs/ImageBasis.md | 0 {0.1.0 => grafeas}/docs/ImageDerived.md | 0 {0.1.0 => grafeas}/docs/ImageFingerprint.md | 0 {0.1.0 => grafeas}/docs/ImageLayer.md | 0 grafeas/docs/InTotoArtifactRule.md | 10 + grafeas/docs/IntotoInToto.md | 15 + grafeas/docs/IntotoLink.md | 14 + grafeas/docs/IntotoLinkArtifact.md | 11 + grafeas/docs/IntotoSigningKey.md | 13 + .../docs/JustificationJustificationType.md | 9 + {0.1.0 => grafeas}/docs/LayerDirective.md | 0 grafeas/docs/LinkArtifactHashes.md | 10 + grafeas/docs/LinkByProducts.md | 10 + grafeas/docs/LinkEnvironment.md | 10 + .../docs/PackageArchitecture.md | 0 .../docs/PackageDistribution.md | 2 +- grafeas/docs/PackageInfoNoteExternalRef.md | 13 + grafeas/docs/PackageInstallation.md | 16 + grafeas/docs/PackagePackage.md | 20 + {0.1.0 => grafeas}/docs/PackageVersion.md | 1 + grafeas/docs/ProtobufAny.md | 10 + .../docs/ProvenanceBuildProvenance.md | 2 +- {0.1.0 => grafeas}/docs/ProvenanceCommand.md | 0 .../docs/ProvenanceFileHashes.md | 0 {0.1.0 => grafeas}/docs/ProvenanceHash.md | 0 {0.1.0 => grafeas}/docs/ProvenanceSource.md | 0 grafeas/docs/RemediationRemediationType.md | 9 + {0.1.0 => grafeas}/docs/RpcStatus.md | 0 {0.1.0 => grafeas}/docs/SourceAliasContext.md | 0 .../docs/SourceCloudRepoSourceContext.md | 0 .../docs/SourceGerritSourceContext.md | 0 .../docs/SourceGitSourceContext.md | 0 .../docs/SourceProjectRepoId.md | 0 {0.1.0 => grafeas}/docs/SourceRepoId.md | 0 .../docs/SourceSourceContext.md | 0 grafeas/docs/SpdxDocumentNote.md | 11 + grafeas/docs/SpdxDocumentOccurrence.md | 18 + grafeas/docs/SpdxFileNote.md | 12 + grafeas/docs/SpdxFileOccurrence.md | 17 + grafeas/docs/SpdxPackageInfoNote.md | 26 + grafeas/docs/SpdxPackageInfoOccurrence.md | 19 + grafeas/docs/SpdxRelationshipNote.md | 10 + grafeas/docs/SpdxRelationshipOccurrence.md | 13 + grafeas/docs/SpdxRelationshipType.md | 9 + .../docs/V1beta1BatchCreateNotesResponse.md | 0 .../V1beta1BatchCreateOccurrencesResponse.md | 0 grafeas/docs/V1beta1Digest.md | 11 + grafeas/docs/V1beta1Envelope.md | 12 + grafeas/docs/V1beta1EnvelopeSignature.md | 11 + grafeas/docs/V1beta1License.md | 11 + .../V1beta1ListNoteOccurrencesResponse.md | 0 .../docs/V1beta1ListNotesResponse.md | 0 .../docs/V1beta1ListOccurrencesResponse.md | 0 {0.1.0 => grafeas}/docs/V1beta1Note.md | 6 + {0.1.0 => grafeas}/docs/V1beta1NoteKind.md | 0 {0.1.0 => grafeas}/docs/V1beta1Occurrence.md | 6 + {0.1.0 => grafeas}/docs/V1beta1RelatedUrl.md | 0 {0.1.0 => grafeas}/docs/V1beta1Resource.md | 0 .../V1beta1VulnerabilityOccurrencesSummary.md | 0 .../docs/V1beta1attestationDetails.md | 0 .../docs/V1beta1buildDetails.md | 0 .../docs/V1beta1deploymentDetails.md | 0 .../docs/V1beta1discoveryDetails.md | 0 .../docs/V1beta1imageDetails.md | 0 grafeas/docs/V1beta1intotoDetails.md | 11 + grafeas/docs/V1beta1intotoSignature.md | 11 + .../docs/V1beta1packageDetails.md | 0 .../docs/V1beta1packageLocation.md | 4 +- .../docs/V1beta1provenanceArtifact.md | 2 +- .../docs/V1beta1vulnerabilityDetails.md | 6 +- {0.1.0 => grafeas}/docs/VersionVersionKind.md | 0 .../docs/VexVulnerabilityAssessmentNote.md | 16 + .../VulnerabilityAssessmentNoteAssessment.md | 17 + .../VulnerabilityAssessmentNoteProduct.md | 12 + .../VulnerabilityAssessmentNotePublisher.md | 12 + grafeas/docs/VulnerabilityCvss.md | 21 + .../docs/VulnerabilityCvssVersion.md | 2 +- .../docs/VulnerabilityDetail.md | 5 +- ...yOccurrencesSummaryFixableTotalByDigest.md | 0 .../docs/VulnerabilityPackageIssue.md | 2 + .../docs/VulnerabilitySeverity.md | 0 .../docs/VulnerabilityVulnerability.md | 6 +- .../VulnerabilityVulnerabilityLocation.md | 0 .../docs/VulnerabilityWindowsDetail.md | 0 .../docs/WindowsDetailKnowledgeBase.md | 0 {0.1.0 => grafeas}/git_push.sh | 0 .../model_alias_context_kind.go | 2 +- grafeas/model_assessment_justification.go | 18 + grafeas/model_assessment_remediation.go | 26 + grafeas/model_assessment_state.go | 21 + .../model_attestation_attestation.go | 6 +- .../model_attestation_authority.go | 2 +- ..._attestation_generic_signed_attestation.go | 8 +- ...generic_signed_attestation_content_type.go | 2 +- ...odel_attestation_pgp_signed_attestation.go | 8 +- ...ion_pgp_signed_attestation_content_type.go | 2 +- {0.1.0 => grafeas}/model_authority_hint.go | 4 +- grafeas/model_body.go | 16 + .../model_body_1.go | 8 +- {0.1.0 => grafeas}/model_build_build.go | 4 +- .../model_build_build_signature.go | 8 +- .../model_build_signature_key_type.go | 2 +- grafeas/model_cvss_attack_complexity.go | 20 + grafeas/model_cvss_attack_vector.go | 21 + grafeas/model_cvss_authentication.go | 20 + grafeas/model_cvss_impact.go | 22 + grafeas/model_cvss_privileges_required.go | 20 + .../model_cvss_scope.go | 12 +- grafeas/model_cvss_user_interaction.go | 19 + .../model_deployment_deployable.go | 4 +- .../model_deployment_deployment.go | 10 +- .../model_deployment_platform.go | 2 +- grafeas/model_details_vex_assessment.go | 27 + .../model_discovered_analysis_completed.go | 15 + .../model_discovered_analysis_status.go | 5 +- .../model_discovered_continuous_analysis.go | 2 +- .../model_discovery_discovered.go | 13 +- .../model_discovery_discovery.go | 4 +- grafeas/model_external_ref_category.go | 21 + grafeas/model_file_note_file_type.go | 28 + .../model_grafeasv1beta1_signature.go | 8 +- {0.1.0 => grafeas}/model_hash_hash_type.go | 2 +- {0.1.0 => grafeas}/model_image_basis.go | 4 +- {0.1.0 => grafeas}/model_image_derived.go | 6 +- {0.1.0 => grafeas}/model_image_fingerprint.go | 8 +- {0.1.0 => grafeas}/model_image_layer.go | 2 +- grafeas/model_in_toto_artifact_rule.go | 14 + grafeas/model_intoto_in_toto.go | 25 + grafeas/model_intoto_link.go | 21 + grafeas/model_intoto_link_artifact.go | 15 + grafeas/model_intoto_signing_key.go | 22 + .../model_justification_justification_type.go | 22 + {0.1.0 => grafeas}/model_layer_directive.go | 2 +- grafeas/model_link_artifact_hashes.go | 15 + grafeas/model_link_by_products.go | 15 + grafeas/model_link_environment.go | 15 + .../model_package_architecture.go | 2 +- .../model_package_distribution.go | 8 +- .../model_package_info_note_external_ref.go | 17 + grafeas/model_package_installation.go | 28 + grafeas/model_package_package.go | 36 + {0.1.0 => grafeas}/model_package_version.go | 4 +- grafeas/model_protobuf_any.go | 16 + .../model_provenance_build_provenance.go | 22 +- .../model_provenance_command.go | 4 +- .../model_provenance_file_hashes.go | 4 +- {0.1.0 => grafeas}/model_provenance_hash.go | 2 +- {0.1.0 => grafeas}/model_provenance_source.go | 8 +- grafeas/model_remediation_remediation_type.go | 22 + {0.1.0 => grafeas}/model_rpc_status.go | 2 +- .../model_source_alias_context.go | 2 +- .../model_source_cloud_repo_source_context.go | 8 +- .../model_source_gerrit_source_context.go | 10 +- .../model_source_git_source_context.go | 4 +- .../model_source_project_repo_id.go | 6 +- {0.1.0 => grafeas}/model_source_repo_id.go | 4 +- .../model_source_source_context.go | 4 +- grafeas/model_spdx_document_note.go | 15 + grafeas/model_spdx_document_occurrence.go | 26 + grafeas/model_spdx_file_note.go | 16 + grafeas/model_spdx_file_occurrence.go | 21 + grafeas/model_spdx_package_info_note.go | 31 + grafeas/model_spdx_package_info_occurrence.go | 24 + grafeas/model_spdx_relationship_note.go | 14 + grafeas/model_spdx_relationship_occurrence.go | 17 + grafeas/model_spdx_relationship_type.go | 60 + ...del_v1beta1_batch_create_notes_response.go | 2 +- ...beta1_batch_create_occurrences_response.go | 2 +- grafeas/model_v1beta1_digest.go | 18 + grafeas/model_v1beta1_envelope.go | 17 + grafeas/model_v1beta1_envelope_signature.go | 15 + grafeas/model_v1beta1_license.go | 17 + ..._v1beta1_list_note_occurrences_response.go | 4 +- .../model_v1beta1_list_notes_response.go | 4 +- ...model_v1beta1_list_occurrences_response.go | 4 +- {0.1.0 => grafeas}/model_v1beta1_note.go | 32 +- grafeas/model_v1beta1_note_kind.go | 30 + .../model_v1beta1_occurrence.go | 21 +- .../model_v1beta1_related_url.go | 2 +- {0.1.0 => grafeas}/model_v1beta1_resource.go | 4 +- ...beta1_vulnerability_occurrences_summary.go | 2 +- .../model_v1beta1attestation_details.go | 2 +- .../model_v1beta1build_details.go | 4 +- .../model_v1beta1deployment_details.go | 2 +- .../model_v1beta1discovery_details.go | 2 +- .../model_v1beta1image_details.go | 4 +- grafeas/model_v1beta1intoto_details.go | 16 + grafeas/model_v1beta1intoto_signature.go | 16 + .../model_v1beta1package_details.go | 2 +- .../model_v1beta1package_location.go | 8 +- .../model_v1beta1provenance_artifact.go | 4 +- grafeas/model_v1beta1vulnerability_details.go | 36 + .../model_version_version_kind.go | 2 +- ...model_vex_vulnerability_assessment_note.go | 27 + ...ulnerability_assessment_note_assessment.go | 30 + ...l_vulnerability_assessment_note_product.go | 19 + ...vulnerability_assessment_note_publisher.go | 18 + grafeas/model_vulnerability_cvss.go | 27 + grafeas/model_vulnerability_cvss_version.go | 19 + .../model_vulnerability_detail.go | 28 +- ...rrences_summary_fixable_total_by_digest.go | 6 +- .../model_vulnerability_package_issue.go | 12 +- .../model_vulnerability_severity.go | 2 +- .../model_vulnerability_vulnerability.go | 21 +- ...el_vulnerability_vulnerability_location.go | 4 +- .../model_vulnerability_windows_detail.go | 6 +- .../model_windows_detail_knowledge_base.go | 2 +- {0.1.0 => grafeas}/response.go | 2 +- project/.gitignore | 24 + project/.swagger-codegen-ignore | 23 + project/.swagger-codegen/VERSION | 1 + project/.travis.yml | 8 + project/README.md | 45 + project/api/swagger.yaml | 163 + project/api_projects.go | 442 + project/client.go | 464 + project/configuration.go | 72 + project/docs/ProjectListProjectsResponse.md | 11 + project/docs/ProjectProject.md | 10 + project/docs/ProjectsApi.md | 125 + project/docs/ProtobufAny.md | 10 + project/docs/RpcStatus.md | 12 + project/git_push.sh | 52 + .../model_project_list_projects_response.go | 18 + project/model_project_project.go | 16 + project/model_protobuf_any.go | 14 + project/model_rpc_status.go | 16 + project/response.go | 43 + 302 files changed, 13283 insertions(+), 6228 deletions(-) delete mode 100644 0.1.0/README.md delete mode 100644 0.1.0/api/swagger.yaml delete mode 100644 0.1.0/docs/PackageInstallation.md delete mode 100644 0.1.0/docs/PackagePackage.md delete mode 100644 0.1.0/docs/ProtobufAny.md delete mode 100644 0.1.0/docs/ProtobufFieldMask.md delete mode 100644 0.1.0/docs/V1beta1BatchCreateNotesRequest.md delete mode 100644 0.1.0/docs/V1beta1BatchCreateOccurrencesRequest.md delete mode 100644 0.1.0/docs/VulnerabilityCvsSv3.md delete mode 100644 0.1.0/model_cvs_sv3_attack_complexity.go delete mode 100644 0.1.0/model_cvs_sv3_attack_vector.go delete mode 100644 0.1.0/model_cvs_sv3_impact.go delete mode 100644 0.1.0/model_cvs_sv3_privileges_required.go delete mode 100644 0.1.0/model_cvs_sv3_user_interaction.go delete mode 100644 0.1.0/model_package_installation.go delete mode 100644 0.1.0/model_package_package.go delete mode 100644 0.1.0/model_protobuf_any.go delete mode 100644 0.1.0/model_protobuf_field_mask.go delete mode 100644 0.1.0/model_v1beta1_batch_create_notes_request.go delete mode 100644 0.1.0/model_v1beta1_note_kind.go delete mode 100644 0.1.0/model_v1beta1vulnerability_details.go delete mode 100644 0.1.0/model_vulnerability_cvs_sv3.go create mode 100644 generate/main.go create mode 100644 go.mod create mode 100644 go.sum rename {0.1.0 => grafeas}/.gitignore (100%) rename {0.1.0 => grafeas}/.swagger-codegen-ignore (98%) rename {0.1.0 => grafeas}/.swagger-codegen/VERSION (100%) rename {0.1.0 => grafeas}/.travis.yml (100%) create mode 100644 grafeas/README.md create mode 100644 grafeas/api/swagger.yaml rename {0.1.0 => grafeas}/api_grafeas_v1_beta1.go (79%) rename {0.1.0 => grafeas}/client.go (98%) rename {0.1.0 => grafeas}/configuration.go (94%) rename {0.1.0 => grafeas}/docs/AliasContextKind.md (100%) create mode 100644 grafeas/docs/AssessmentJustification.md create mode 100644 grafeas/docs/AssessmentRemediation.md rename 0.1.0/docs/CvsSv3AttackVector.md => grafeas/docs/AssessmentState.md (92%) rename {0.1.0 => grafeas}/docs/AttestationAttestation.md (100%) rename {0.1.0 => grafeas}/docs/AttestationAuthority.md (100%) rename {0.1.0 => grafeas}/docs/AttestationGenericSignedAttestation.md (69%) rename {0.1.0 => grafeas}/docs/AttestationGenericSignedAttestationContentType.md (100%) rename {0.1.0 => grafeas}/docs/AttestationPgpSignedAttestation.md (97%) rename {0.1.0 => grafeas}/docs/AttestationPgpSignedAttestationContentType.md (100%) rename {0.1.0 => grafeas}/docs/AuthorityHint.md (100%) create mode 100644 grafeas/docs/Body.md create mode 100644 grafeas/docs/Body1.md rename {0.1.0 => grafeas}/docs/BuildBuild.md (100%) rename {0.1.0 => grafeas}/docs/BuildBuildSignature.md (100%) rename {0.1.0 => grafeas}/docs/BuildSignatureKeyType.md (100%) rename 0.1.0/docs/CvsSv3UserInteraction.md => grafeas/docs/CvssAttackComplexity.md (91%) create mode 100644 grafeas/docs/CvssAttackVector.md create mode 100644 grafeas/docs/CvssAuthentication.md rename 0.1.0/docs/CvsSv3Scope.md => grafeas/docs/CvssImpact.md (95%) rename 0.1.0/docs/CvsSv3AttackComplexity.md => grafeas/docs/CvssPrivilegesRequired.md (91%) rename 0.1.0/docs/CvsSv3Impact.md => grafeas/docs/CvssScope.md (94%) create mode 100644 grafeas/docs/CvssUserInteraction.md rename {0.1.0 => grafeas}/docs/DeploymentDeployable.md (100%) rename {0.1.0 => grafeas}/docs/DeploymentDeployment.md (100%) rename {0.1.0 => grafeas}/docs/DeploymentPlatform.md (100%) create mode 100644 grafeas/docs/DetailsVexAssessment.md create mode 100644 grafeas/docs/DiscoveredAnalysisCompleted.md rename {0.1.0 => grafeas}/docs/DiscoveredAnalysisStatus.md (100%) rename {0.1.0 => grafeas}/docs/DiscoveredContinuousAnalysis.md (100%) rename {0.1.0 => grafeas}/docs/DiscoveryDiscovered.md (76%) rename {0.1.0 => grafeas}/docs/DiscoveryDiscovery.md (100%) create mode 100644 grafeas/docs/ExternalRefCategory.md create mode 100644 grafeas/docs/FileNoteFileType.md rename {0.1.0 => grafeas}/docs/GrafeasV1Beta1Api.md (68%) rename 0.1.0/docs/V1beta1Signature.md => grafeas/docs/Grafeasv1beta1Signature.md (51%) rename {0.1.0 => grafeas}/docs/HashHashType.md (100%) rename {0.1.0 => grafeas}/docs/ImageBasis.md (100%) rename {0.1.0 => grafeas}/docs/ImageDerived.md (100%) rename {0.1.0 => grafeas}/docs/ImageFingerprint.md (100%) rename {0.1.0 => grafeas}/docs/ImageLayer.md (100%) create mode 100644 grafeas/docs/InTotoArtifactRule.md create mode 100644 grafeas/docs/IntotoInToto.md create mode 100644 grafeas/docs/IntotoLink.md create mode 100644 grafeas/docs/IntotoLinkArtifact.md create mode 100644 grafeas/docs/IntotoSigningKey.md create mode 100644 grafeas/docs/JustificationJustificationType.md rename {0.1.0 => grafeas}/docs/LayerDirective.md (100%) create mode 100644 grafeas/docs/LinkArtifactHashes.md create mode 100644 grafeas/docs/LinkByProducts.md create mode 100644 grafeas/docs/LinkEnvironment.md rename {0.1.0 => grafeas}/docs/PackageArchitecture.md (100%) rename {0.1.0 => grafeas}/docs/PackageDistribution.md (83%) create mode 100644 grafeas/docs/PackageInfoNoteExternalRef.md create mode 100644 grafeas/docs/PackageInstallation.md create mode 100644 grafeas/docs/PackagePackage.md rename {0.1.0 => grafeas}/docs/PackageVersion.md (63%) create mode 100644 grafeas/docs/ProtobufAny.md rename {0.1.0 => grafeas}/docs/ProvenanceBuildProvenance.md (93%) rename {0.1.0 => grafeas}/docs/ProvenanceCommand.md (100%) rename {0.1.0 => grafeas}/docs/ProvenanceFileHashes.md (100%) rename {0.1.0 => grafeas}/docs/ProvenanceHash.md (100%) rename {0.1.0 => grafeas}/docs/ProvenanceSource.md (100%) create mode 100644 grafeas/docs/RemediationRemediationType.md rename {0.1.0 => grafeas}/docs/RpcStatus.md (100%) rename {0.1.0 => grafeas}/docs/SourceAliasContext.md (100%) rename {0.1.0 => grafeas}/docs/SourceCloudRepoSourceContext.md (100%) rename {0.1.0 => grafeas}/docs/SourceGerritSourceContext.md (100%) rename {0.1.0 => grafeas}/docs/SourceGitSourceContext.md (100%) rename {0.1.0 => grafeas}/docs/SourceProjectRepoId.md (100%) rename {0.1.0 => grafeas}/docs/SourceRepoId.md (100%) rename {0.1.0 => grafeas}/docs/SourceSourceContext.md (100%) create mode 100644 grafeas/docs/SpdxDocumentNote.md create mode 100644 grafeas/docs/SpdxDocumentOccurrence.md create mode 100644 grafeas/docs/SpdxFileNote.md create mode 100644 grafeas/docs/SpdxFileOccurrence.md create mode 100644 grafeas/docs/SpdxPackageInfoNote.md create mode 100644 grafeas/docs/SpdxPackageInfoOccurrence.md create mode 100644 grafeas/docs/SpdxRelationshipNote.md create mode 100644 grafeas/docs/SpdxRelationshipOccurrence.md create mode 100644 grafeas/docs/SpdxRelationshipType.md rename {0.1.0 => grafeas}/docs/V1beta1BatchCreateNotesResponse.md (100%) rename {0.1.0 => grafeas}/docs/V1beta1BatchCreateOccurrencesResponse.md (100%) create mode 100644 grafeas/docs/V1beta1Digest.md create mode 100644 grafeas/docs/V1beta1Envelope.md create mode 100644 grafeas/docs/V1beta1EnvelopeSignature.md create mode 100644 grafeas/docs/V1beta1License.md rename {0.1.0 => grafeas}/docs/V1beta1ListNoteOccurrencesResponse.md (100%) rename {0.1.0 => grafeas}/docs/V1beta1ListNotesResponse.md (100%) rename {0.1.0 => grafeas}/docs/V1beta1ListOccurrencesResponse.md (100%) rename {0.1.0 => grafeas}/docs/V1beta1Note.md (75%) rename {0.1.0 => grafeas}/docs/V1beta1NoteKind.md (100%) rename {0.1.0 => grafeas}/docs/V1beta1Occurrence.md (75%) rename {0.1.0 => grafeas}/docs/V1beta1RelatedUrl.md (100%) rename {0.1.0 => grafeas}/docs/V1beta1Resource.md (100%) rename {0.1.0 => grafeas}/docs/V1beta1VulnerabilityOccurrencesSummary.md (100%) rename {0.1.0 => grafeas}/docs/V1beta1attestationDetails.md (100%) rename {0.1.0 => grafeas}/docs/V1beta1buildDetails.md (100%) rename {0.1.0 => grafeas}/docs/V1beta1deploymentDetails.md (100%) rename {0.1.0 => grafeas}/docs/V1beta1discoveryDetails.md (100%) rename {0.1.0 => grafeas}/docs/V1beta1imageDetails.md (100%) create mode 100644 grafeas/docs/V1beta1intotoDetails.md create mode 100644 grafeas/docs/V1beta1intotoSignature.md rename {0.1.0 => grafeas}/docs/V1beta1packageDetails.md (100%) rename {0.1.0 => grafeas}/docs/V1beta1packageLocation.md (55%) rename 0.1.0/docs/ProvenanceArtifact.md => grafeas/docs/V1beta1provenanceArtifact.md (97%) rename {0.1.0 => grafeas}/docs/V1beta1vulnerabilityDetails.md (60%) rename {0.1.0 => grafeas}/docs/VersionVersionKind.md (100%) create mode 100644 grafeas/docs/VexVulnerabilityAssessmentNote.md create mode 100644 grafeas/docs/VulnerabilityAssessmentNoteAssessment.md create mode 100644 grafeas/docs/VulnerabilityAssessmentNoteProduct.md create mode 100644 grafeas/docs/VulnerabilityAssessmentNotePublisher.md create mode 100644 grafeas/docs/VulnerabilityCvss.md rename 0.1.0/docs/CvsSv3PrivilegesRequired.md => grafeas/docs/VulnerabilityCvssVersion.md (91%) rename {0.1.0 => grafeas}/docs/VulnerabilityDetail.md (73%) rename {0.1.0 => grafeas}/docs/VulnerabilityOccurrencesSummaryFixableTotalByDigest.md (100%) rename {0.1.0 => grafeas}/docs/VulnerabilityPackageIssue.md (69%) rename {0.1.0 => grafeas}/docs/VulnerabilitySeverity.md (100%) rename {0.1.0 => grafeas}/docs/VulnerabilityVulnerability.md (61%) rename {0.1.0 => grafeas}/docs/VulnerabilityVulnerabilityLocation.md (100%) rename {0.1.0 => grafeas}/docs/VulnerabilityWindowsDetail.md (100%) rename {0.1.0 => grafeas}/docs/WindowsDetailKnowledgeBase.md (100%) rename {0.1.0 => grafeas}/git_push.sh (100%) rename {0.1.0 => grafeas}/model_alias_context_kind.go (96%) create mode 100644 grafeas/model_assessment_justification.go create mode 100644 grafeas/model_assessment_remediation.go create mode 100644 grafeas/model_assessment_state.go rename {0.1.0 => grafeas}/model_attestation_attestation.go (91%) rename {0.1.0 => grafeas}/model_attestation_authority.go (96%) rename {0.1.0 => grafeas}/model_attestation_generic_signed_attestation.go (88%) rename {0.1.0 => grafeas}/model_attestation_generic_signed_attestation_content_type.go (97%) rename {0.1.0 => grafeas}/model_attestation_pgp_signed_attestation.go (93%) rename {0.1.0 => grafeas}/model_attestation_pgp_signed_attestation_content_type.go (97%) rename {0.1.0 => grafeas}/model_authority_hint.go (89%) create mode 100644 grafeas/model_body.go rename 0.1.0/model_v1beta1_batch_create_occurrences_request.go => grafeas/model_body_1.go (54%) rename {0.1.0 => grafeas}/model_build_build.go (87%) rename {0.1.0 => grafeas}/model_build_build_signature.go (89%) rename {0.1.0 => grafeas}/model_build_signature_key_type.go (96%) create mode 100644 grafeas/model_cvss_attack_complexity.go create mode 100644 grafeas/model_cvss_attack_vector.go create mode 100644 grafeas/model_cvss_authentication.go create mode 100644 grafeas/model_cvss_impact.go create mode 100644 grafeas/model_cvss_privileges_required.go rename 0.1.0/model_cvs_sv3_scope.go => grafeas/model_cvss_scope.go (52%) create mode 100644 grafeas/model_cvss_user_interaction.go rename {0.1.0 => grafeas}/model_deployment_deployable.go (82%) rename {0.1.0 => grafeas}/model_deployment_deployment.go (79%) rename {0.1.0 => grafeas}/model_deployment_platform.go (96%) create mode 100644 grafeas/model_details_vex_assessment.go create mode 100644 grafeas/model_discovered_analysis_completed.go rename {0.1.0 => grafeas}/model_discovered_analysis_status.go (79%) rename {0.1.0 => grafeas}/model_discovered_continuous_analysis.go (96%) rename {0.1.0 => grafeas}/model_discovery_discovered.go (61%) rename {0.1.0 => grafeas}/model_discovery_discovery.go (85%) create mode 100644 grafeas/model_external_ref_category.go create mode 100644 grafeas/model_file_note_file_type.go rename 0.1.0/model_v1beta1_signature.go => grafeas/model_grafeasv1beta1_signature.go (74%) rename {0.1.0 => grafeas}/model_hash_hash_type.go (94%) rename {0.1.0 => grafeas}/model_image_basis.go (90%) rename {0.1.0 => grafeas}/model_image_derived.go (87%) rename {0.1.0 => grafeas}/model_image_fingerprint.go (81%) rename {0.1.0 => grafeas}/model_image_layer.go (94%) create mode 100644 grafeas/model_in_toto_artifact_rule.go create mode 100644 grafeas/model_intoto_in_toto.go create mode 100644 grafeas/model_intoto_link.go create mode 100644 grafeas/model_intoto_link_artifact.go create mode 100644 grafeas/model_intoto_signing_key.go create mode 100644 grafeas/model_justification_justification_type.go rename {0.1.0 => grafeas}/model_layer_directive.go (98%) create mode 100644 grafeas/model_link_artifact_hashes.go create mode 100644 grafeas/model_link_by_products.go create mode 100644 grafeas/model_link_environment.go rename {0.1.0 => grafeas}/model_package_architecture.go (95%) rename {0.1.0 => grafeas}/model_package_distribution.go (77%) create mode 100644 grafeas/model_package_info_note_external_ref.go create mode 100644 grafeas/model_package_installation.go create mode 100644 grafeas/model_package_package.go rename {0.1.0 => grafeas}/model_package_version.go (63%) create mode 100644 grafeas/model_protobuf_any.go rename {0.1.0 => grafeas}/model_provenance_build_provenance.go (71%) rename {0.1.0 => grafeas}/model_provenance_command.go (93%) rename {0.1.0 => grafeas}/model_provenance_file_hashes.go (84%) rename {0.1.0 => grafeas}/model_provenance_hash.go (94%) rename {0.1.0 => grafeas}/model_provenance_source.go (81%) create mode 100644 grafeas/model_remediation_remediation_type.go rename {0.1.0 => grafeas}/model_rpc_status.go (99%) rename {0.1.0 => grafeas}/model_source_alias_context.go (93%) rename {0.1.0 => grafeas}/model_source_cloud_repo_source_context.go (70%) rename {0.1.0 => grafeas}/model_source_gerrit_source_context.go (71%) rename {0.1.0 => grafeas}/model_source_git_source_context.go (85%) rename {0.1.0 => grafeas}/model_source_project_repo_id.go (79%) rename {0.1.0 => grafeas}/model_source_repo_id.go (81%) rename {0.1.0 => grafeas}/model_source_source_context.go (89%) create mode 100644 grafeas/model_spdx_document_note.go create mode 100644 grafeas/model_spdx_document_occurrence.go create mode 100644 grafeas/model_spdx_file_note.go create mode 100644 grafeas/model_spdx_file_occurrence.go create mode 100644 grafeas/model_spdx_package_info_note.go create mode 100644 grafeas/model_spdx_package_info_occurrence.go create mode 100644 grafeas/model_spdx_relationship_note.go create mode 100644 grafeas/model_spdx_relationship_occurrence.go create mode 100644 grafeas/model_spdx_relationship_type.go rename {0.1.0 => grafeas}/model_v1beta1_batch_create_notes_response.go (93%) rename {0.1.0 => grafeas}/model_v1beta1_batch_create_occurrences_response.go (93%) create mode 100644 grafeas/model_v1beta1_digest.go create mode 100644 grafeas/model_v1beta1_envelope.go create mode 100644 grafeas/model_v1beta1_envelope_signature.go create mode 100644 grafeas/model_v1beta1_license.go rename {0.1.0 => grafeas}/model_v1beta1_list_note_occurrences_response.go (85%) rename {0.1.0 => grafeas}/model_v1beta1_list_notes_response.go (86%) rename {0.1.0 => grafeas}/model_v1beta1_list_occurrences_response.go (86%) rename {0.1.0 => grafeas}/model_v1beta1_note.go (59%) create mode 100644 grafeas/model_v1beta1_note_kind.go rename {0.1.0 => grafeas}/model_v1beta1_occurrence.go (71%) rename {0.1.0 => grafeas}/model_v1beta1_related_url.go (94%) rename {0.1.0 => grafeas}/model_v1beta1_resource.go (89%) rename {0.1.0 => grafeas}/model_v1beta1_vulnerability_occurrences_summary.go (94%) rename {0.1.0 => grafeas}/model_v1beta1attestation_details.go (93%) rename {0.1.0 => grafeas}/model_v1beta1build_details.go (91%) rename {0.1.0 => grafeas}/model_v1beta1deployment_details.go (93%) rename {0.1.0 => grafeas}/model_v1beta1discovery_details.go (93%) rename {0.1.0 => grafeas}/model_v1beta1image_details.go (81%) create mode 100644 grafeas/model_v1beta1intoto_details.go create mode 100644 grafeas/model_v1beta1intoto_signature.go rename {0.1.0 => grafeas}/model_v1beta1package_details.go (93%) rename {0.1.0 => grafeas}/model_v1beta1package_location.go (69%) rename 0.1.0/model_provenance_artifact.go => grafeas/model_v1beta1provenance_artifact.go (93%) create mode 100644 grafeas/model_v1beta1vulnerability_details.go rename {0.1.0 => grafeas}/model_version_version_kind.go (96%) create mode 100644 grafeas/model_vex_vulnerability_assessment_note.go create mode 100644 grafeas/model_vulnerability_assessment_note_assessment.go create mode 100644 grafeas/model_vulnerability_assessment_note_product.go create mode 100644 grafeas/model_vulnerability_assessment_note_publisher.go create mode 100644 grafeas/model_vulnerability_cvss.go create mode 100644 grafeas/model_vulnerability_cvss_version.go rename {0.1.0 => grafeas}/model_vulnerability_detail.go (52%) rename {0.1.0 => grafeas}/model_vulnerability_occurrences_summary_fixable_total_by_digest.go (85%) rename {0.1.0 => grafeas}/model_vulnerability_package_issue.go (57%) rename {0.1.0 => grafeas}/model_vulnerability_severity.go (96%) rename {0.1.0 => grafeas}/model_vulnerability_vulnerability.go (57%) rename {0.1.0 => grafeas}/model_vulnerability_vulnerability_location.go (90%) rename {0.1.0 => grafeas}/model_vulnerability_windows_detail.go (86%) rename {0.1.0 => grafeas}/model_windows_detail_knowledge_base.go (93%) rename {0.1.0 => grafeas}/response.go (97%) create mode 100644 project/.gitignore create mode 100644 project/.swagger-codegen-ignore create mode 100644 project/.swagger-codegen/VERSION create mode 100644 project/.travis.yml create mode 100644 project/README.md create mode 100644 project/api/swagger.yaml create mode 100644 project/api_projects.go create mode 100644 project/client.go create mode 100644 project/configuration.go create mode 100644 project/docs/ProjectListProjectsResponse.md create mode 100644 project/docs/ProjectProject.md create mode 100644 project/docs/ProjectsApi.md create mode 100644 project/docs/ProtobufAny.md create mode 100644 project/docs/RpcStatus.md create mode 100644 project/git_push.sh create mode 100644 project/model_project_list_projects_response.go create mode 100644 project/model_project_project.go create mode 100644 project/model_protobuf_any.go create mode 100644 project/model_rpc_status.go create mode 100644 project/response.go diff --git a/.gitignore b/.gitignore index 8fed7d4..2985216 100644 --- a/.gitignore +++ b/.gitignore @@ -24,5 +24,5 @@ _testmain.go *.prof swagger-codegen-cli.jar -grafeas.swagger.json -grafeas.swagger.json.* +*.swagger.json +*.swagger.json.* diff --git a/0.1.0/README.md b/0.1.0/README.md deleted file mode 100644 index cb01602..0000000 --- a/0.1.0/README.md +++ /dev/null @@ -1,132 +0,0 @@ -# Go API client for Grafeas - -This is a client library for the [Grafeas API](https://github.com/grafeas/grafeas) in Go, generated by [Swagger Codegen](https://github.com/swagger-api/swagger-codegen). - -## Overview - -- API version: v1beta1 -- Package version: 0.1.0 -- Build package: io.swagger.codegen.languages.GoClientCodegen - -## Installation -Put the package under your project folder and add the following in import: - -```golang -import "./grafeas" -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*GrafeasV1Beta1Api* | [**BatchCreateNotes**](docs/GrafeasV1Beta1Api.md#batchcreatenotes) | **Post** /v1beta1/{parent=projects/*}/notes:batchCreate | Creates new notes in batch. -*GrafeasV1Beta1Api* | [**BatchCreateOccurrences**](docs/GrafeasV1Beta1Api.md#batchcreateoccurrences) | **Post** /v1beta1/{parent=projects/*}/occurrences:batchCreate | Creates new occurrences in batch. -*GrafeasV1Beta1Api* | [**CreateNote**](docs/GrafeasV1Beta1Api.md#createnote) | **Post** /v1beta1/{parent=projects/*}/notes | Creates a new note. -*GrafeasV1Beta1Api* | [**CreateOccurrence**](docs/GrafeasV1Beta1Api.md#createoccurrence) | **Post** /v1beta1/{parent=projects/*}/occurrences | Creates a new occurrence. -*GrafeasV1Beta1Api* | [**DeleteNote**](docs/GrafeasV1Beta1Api.md#deletenote) | **Delete** /v1beta1/{name=projects/*/notes/*} | Deletes the specified note. -*GrafeasV1Beta1Api* | [**DeleteOccurrence**](docs/GrafeasV1Beta1Api.md#deleteoccurrence) | **Delete** /v1beta1/{name=projects/*/occurrences/*} | Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource. -*GrafeasV1Beta1Api* | [**GetNote**](docs/GrafeasV1Beta1Api.md#getnote) | **Get** /v1beta1/{name=projects/*/notes/*} | Gets the specified note. -*GrafeasV1Beta1Api* | [**GetOccurrence**](docs/GrafeasV1Beta1Api.md#getoccurrence) | **Get** /v1beta1/{name=projects/*/occurrences/*} | Gets the specified occurrence. -*GrafeasV1Beta1Api* | [**GetOccurrenceNote**](docs/GrafeasV1Beta1Api.md#getoccurrencenote) | **Get** /v1beta1/{name=projects/*/occurrences/*}/notes | Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project. -*GrafeasV1Beta1Api* | [**GetVulnerabilityOccurrencesSummary**](docs/GrafeasV1Beta1Api.md#getvulnerabilityoccurrencessummary) | **Get** /v1beta1/{parent=projects/*}/occurrences:vulnerabilitySummary | Gets a summary of the number and severity of occurrences. -*GrafeasV1Beta1Api* | [**ListNoteOccurrences**](docs/GrafeasV1Beta1Api.md#listnoteoccurrences) | **Get** /v1beta1/{name=projects/*/notes/*}/occurrences | Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note. -*GrafeasV1Beta1Api* | [**ListNotes**](docs/GrafeasV1Beta1Api.md#listnotes) | **Get** /v1beta1/{parent=projects/*}/notes | Lists notes for the specified project. -*GrafeasV1Beta1Api* | [**ListOccurrences**](docs/GrafeasV1Beta1Api.md#listoccurrences) | **Get** /v1beta1/{parent=projects/*}/occurrences | Lists occurrences for the specified project. -*GrafeasV1Beta1Api* | [**UpdateNote**](docs/GrafeasV1Beta1Api.md#updatenote) | **Patch** /v1beta1/{name=projects/*/notes/*} | Updates the specified note. -*GrafeasV1Beta1Api* | [**UpdateOccurrence**](docs/GrafeasV1Beta1Api.md#updateoccurrence) | **Patch** /v1beta1/{name=projects/*/occurrences/*} | Updates the specified occurrence. - - -## Documentation For Models - - - [AliasContextKind](docs/AliasContextKind.md) - - [AttestationAttestation](docs/AttestationAttestation.md) - - [AttestationAuthority](docs/AttestationAuthority.md) - - [AttestationGenericSignedAttestation](docs/AttestationGenericSignedAttestation.md) - - [AttestationGenericSignedAttestationContentType](docs/AttestationGenericSignedAttestationContentType.md) - - [AttestationPgpSignedAttestation](docs/AttestationPgpSignedAttestation.md) - - [AttestationPgpSignedAttestationContentType](docs/AttestationPgpSignedAttestationContentType.md) - - [AuthorityHint](docs/AuthorityHint.md) - - [BuildBuild](docs/BuildBuild.md) - - [BuildBuildSignature](docs/BuildBuildSignature.md) - - [BuildSignatureKeyType](docs/BuildSignatureKeyType.md) - - [CvsSv3AttackComplexity](docs/CvsSv3AttackComplexity.md) - - [CvsSv3AttackVector](docs/CvsSv3AttackVector.md) - - [CvsSv3Impact](docs/CvsSv3Impact.md) - - [CvsSv3PrivilegesRequired](docs/CvsSv3PrivilegesRequired.md) - - [CvsSv3Scope](docs/CvsSv3Scope.md) - - [CvsSv3UserInteraction](docs/CvsSv3UserInteraction.md) - - [DeploymentDeployable](docs/DeploymentDeployable.md) - - [DeploymentDeployment](docs/DeploymentDeployment.md) - - [DeploymentPlatform](docs/DeploymentPlatform.md) - - [DiscoveredAnalysisStatus](docs/DiscoveredAnalysisStatus.md) - - [DiscoveredContinuousAnalysis](docs/DiscoveredContinuousAnalysis.md) - - [DiscoveryDiscovered](docs/DiscoveryDiscovered.md) - - [DiscoveryDiscovery](docs/DiscoveryDiscovery.md) - - [HashHashType](docs/HashHashType.md) - - [ImageBasis](docs/ImageBasis.md) - - [ImageDerived](docs/ImageDerived.md) - - [ImageFingerprint](docs/ImageFingerprint.md) - - [ImageLayer](docs/ImageLayer.md) - - [LayerDirective](docs/LayerDirective.md) - - [PackageArchitecture](docs/PackageArchitecture.md) - - [PackageDistribution](docs/PackageDistribution.md) - - [PackageInstallation](docs/PackageInstallation.md) - - [PackagePackage](docs/PackagePackage.md) - - [PackageVersion](docs/PackageVersion.md) - - [ProtobufAny](docs/ProtobufAny.md) - - [ProtobufFieldMask](docs/ProtobufFieldMask.md) - - [ProvenanceArtifact](docs/ProvenanceArtifact.md) - - [ProvenanceBuildProvenance](docs/ProvenanceBuildProvenance.md) - - [ProvenanceCommand](docs/ProvenanceCommand.md) - - [ProvenanceFileHashes](docs/ProvenanceFileHashes.md) - - [ProvenanceHash](docs/ProvenanceHash.md) - - [ProvenanceSource](docs/ProvenanceSource.md) - - [RpcStatus](docs/RpcStatus.md) - - [SourceAliasContext](docs/SourceAliasContext.md) - - [SourceCloudRepoSourceContext](docs/SourceCloudRepoSourceContext.md) - - [SourceGerritSourceContext](docs/SourceGerritSourceContext.md) - - [SourceGitSourceContext](docs/SourceGitSourceContext.md) - - [SourceProjectRepoId](docs/SourceProjectRepoId.md) - - [SourceRepoId](docs/SourceRepoId.md) - - [SourceSourceContext](docs/SourceSourceContext.md) - - [V1beta1BatchCreateNotesRequest](docs/V1beta1BatchCreateNotesRequest.md) - - [V1beta1BatchCreateNotesResponse](docs/V1beta1BatchCreateNotesResponse.md) - - [V1beta1BatchCreateOccurrencesRequest](docs/V1beta1BatchCreateOccurrencesRequest.md) - - [V1beta1BatchCreateOccurrencesResponse](docs/V1beta1BatchCreateOccurrencesResponse.md) - - [V1beta1ListNoteOccurrencesResponse](docs/V1beta1ListNoteOccurrencesResponse.md) - - [V1beta1ListNotesResponse](docs/V1beta1ListNotesResponse.md) - - [V1beta1ListOccurrencesResponse](docs/V1beta1ListOccurrencesResponse.md) - - [V1beta1Note](docs/V1beta1Note.md) - - [V1beta1NoteKind](docs/V1beta1NoteKind.md) - - [V1beta1Occurrence](docs/V1beta1Occurrence.md) - - [V1beta1RelatedUrl](docs/V1beta1RelatedUrl.md) - - [V1beta1Resource](docs/V1beta1Resource.md) - - [V1beta1Signature](docs/V1beta1Signature.md) - - [V1beta1VulnerabilityOccurrencesSummary](docs/V1beta1VulnerabilityOccurrencesSummary.md) - - [V1beta1attestationDetails](docs/V1beta1attestationDetails.md) - - [V1beta1buildDetails](docs/V1beta1buildDetails.md) - - [V1beta1deploymentDetails](docs/V1beta1deploymentDetails.md) - - [V1beta1discoveryDetails](docs/V1beta1discoveryDetails.md) - - [V1beta1imageDetails](docs/V1beta1imageDetails.md) - - [V1beta1packageDetails](docs/V1beta1packageDetails.md) - - [V1beta1packageLocation](docs/V1beta1packageLocation.md) - - [V1beta1vulnerabilityDetails](docs/V1beta1vulnerabilityDetails.md) - - [VersionVersionKind](docs/VersionVersionKind.md) - - [VulnerabilityCvsSv3](docs/VulnerabilityCvsSv3.md) - - [VulnerabilityDetail](docs/VulnerabilityDetail.md) - - [VulnerabilityOccurrencesSummaryFixableTotalByDigest](docs/VulnerabilityOccurrencesSummaryFixableTotalByDigest.md) - - [VulnerabilityPackageIssue](docs/VulnerabilityPackageIssue.md) - - [VulnerabilitySeverity](docs/VulnerabilitySeverity.md) - - [VulnerabilityVulnerability](docs/VulnerabilityVulnerability.md) - - [VulnerabilityVulnerabilityLocation](docs/VulnerabilityVulnerabilityLocation.md) - - [VulnerabilityWindowsDetail](docs/VulnerabilityWindowsDetail.md) - - [WindowsDetailKnowledgeBase](docs/WindowsDetailKnowledgeBase.md) - - -## Documentation For Authorization - Endpoints do not require authorization. - -## Author -Grafeas authors. diff --git a/0.1.0/api/swagger.yaml b/0.1.0/api/swagger.yaml deleted file mode 100644 index 366203c..0000000 --- a/0.1.0/api/swagger.yaml +++ /dev/null @@ -1,5416 +0,0 @@ ---- -swagger: "2.0" -info: - version: "version not set" - title: "proto/v1beta1/grafeas.proto" -schemes: -- "http" -- "https" -consumes: -- "application/json" -produces: -- "application/json" -paths: - /v1beta1/{name=projects/*/notes/*}: - get: - tags: - - "GrafeasV1Beta1" - summary: "Gets the specified note." - operationId: "GetNote" - parameters: - - name: "name" - in: "path" - description: "The name of the note in the form of\n`projects/[PROVIDER_ID]/notes/[NOTE_ID]`." - required: true - type: "string" - x-exportParamName: "Name" - responses: - 200: - description: "A successful response." - schema: - $ref: "#/definitions/v1beta1Note" - delete: - tags: - - "GrafeasV1Beta1" - summary: "Deletes the specified note." - operationId: "DeleteNote" - parameters: - - name: "name" - in: "path" - description: "The name of the note in the form of\n`projects/[PROVIDER_ID]/notes/[NOTE_ID]`." - required: true - type: "string" - x-exportParamName: "Name" - responses: - 200: - description: "A successful response." - schema: {} - patch: - tags: - - "GrafeasV1Beta1" - summary: "Updates the specified note." - operationId: "UpdateNote" - parameters: - - name: "name" - in: "path" - description: "The name of the note in the form of\n`projects/[PROVIDER_ID]/notes/[NOTE_ID]`." - required: true - type: "string" - x-exportParamName: "Name" - - in: "body" - name: "body" - description: "The updated note." - required: true - schema: - $ref: "#/definitions/v1beta1Note" - x-exportParamName: "Body" - responses: - 200: - description: "A successful response." - schema: - $ref: "#/definitions/v1beta1Note" - /v1beta1/{name=projects/*/notes/*}/occurrences: - get: - tags: - - "GrafeasV1Beta1" - summary: "Lists occurrences referencing the specified note. Provider projects\ - \ can use\nthis method to get all occurrences across consumer projects referencing\ - \ the\nspecified note." - operationId: "ListNoteOccurrences" - parameters: - - name: "name" - in: "path" - description: "The name of the note to list occurrences for in the form of\n\ - `projects/[PROVIDER_ID]/notes/[NOTE_ID]`." - required: true - type: "string" - x-exportParamName: "Name" - - name: "filter" - in: "query" - description: "The filter expression." - required: false - type: "string" - x-exportParamName: "Filter" - x-optionalDataType: "String" - - name: "page_size" - in: "query" - description: "Number of occurrences to return in the list." - required: false - type: "integer" - format: "int32" - x-exportParamName: "PageSize" - x-optionalDataType: "Int32" - - name: "page_token" - in: "query" - description: "Token to provide to skip to a particular spot in the list." - required: false - type: "string" - x-exportParamName: "PageToken" - x-optionalDataType: "String" - responses: - 200: - description: "A successful response." - schema: - $ref: "#/definitions/v1beta1ListNoteOccurrencesResponse" - /v1beta1/{name=projects/*/occurrences/*}: - get: - tags: - - "GrafeasV1Beta1" - summary: "Gets the specified occurrence." - operationId: "GetOccurrence" - parameters: - - name: "name" - in: "path" - description: "The name of the occurrence in the form of\n`projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`." - required: true - type: "string" - x-exportParamName: "Name" - responses: - 200: - description: "A successful response." - schema: - $ref: "#/definitions/v1beta1Occurrence" - delete: - tags: - - "GrafeasV1Beta1" - summary: "Deletes the specified occurrence. For example, use this method to\ - \ delete an\noccurrence when the occurrence is no longer applicable for the\ - \ given\nresource." - operationId: "DeleteOccurrence" - parameters: - - name: "name" - in: "path" - description: "The name of the occurrence in the form of\n`projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`." - required: true - type: "string" - x-exportParamName: "Name" - responses: - 200: - description: "A successful response." - schema: {} - patch: - tags: - - "GrafeasV1Beta1" - summary: "Updates the specified occurrence." - operationId: "UpdateOccurrence" - parameters: - - name: "name" - in: "path" - description: "The name of the occurrence in the form of\n`projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`." - required: true - type: "string" - x-exportParamName: "Name" - - in: "body" - name: "body" - description: "The updated occurrence." - required: true - schema: - $ref: "#/definitions/v1beta1Occurrence" - x-exportParamName: "Body" - responses: - 200: - description: "A successful response." - schema: - $ref: "#/definitions/v1beta1Occurrence" - /v1beta1/{name=projects/*/occurrences/*}/notes: - get: - tags: - - "GrafeasV1Beta1" - summary: "Gets the note attached to the specified occurrence. Consumer projects\ - \ can\nuse this method to get a note that belongs to a provider project." - operationId: "GetOccurrenceNote" - parameters: - - name: "name" - in: "path" - description: "The name of the occurrence in the form of\n`projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`." - required: true - type: "string" - x-exportParamName: "Name" - responses: - 200: - description: "A successful response." - schema: - $ref: "#/definitions/v1beta1Note" - /v1beta1/{parent=projects/*}/notes: - get: - tags: - - "GrafeasV1Beta1" - summary: "Lists notes for the specified project." - operationId: "ListNotes" - parameters: - - name: "parent" - in: "path" - description: "The name of the project to list notes for in the form of\n`projects/[PROJECT_ID]`." - required: true - type: "string" - x-exportParamName: "Parent" - - name: "filter" - in: "query" - description: "The filter expression." - required: false - type: "string" - x-exportParamName: "Filter" - x-optionalDataType: "String" - - name: "page_size" - in: "query" - description: "Number of notes to return in the list. Must be positive. Max\ - \ allowed page\nsize is 1000. If not specified, page size defaults to 20." - required: false - type: "integer" - format: "int32" - x-exportParamName: "PageSize" - x-optionalDataType: "Int32" - - name: "page_token" - in: "query" - description: "Token to provide to skip to a particular spot in the list." - required: false - type: "string" - x-exportParamName: "PageToken" - x-optionalDataType: "String" - responses: - 200: - description: "A successful response." - schema: - $ref: "#/definitions/v1beta1ListNotesResponse" - post: - tags: - - "GrafeasV1Beta1" - summary: "Creates a new note." - operationId: "CreateNote" - parameters: - - name: "parent" - in: "path" - description: "The name of the project in the form of `projects/[PROJECT_ID]`,\ - \ under which\nthe note is to be created." - required: true - type: "string" - x-exportParamName: "Parent" - - in: "body" - name: "body" - description: "The note to create." - required: true - schema: - $ref: "#/definitions/v1beta1Note" - x-exportParamName: "Body" - responses: - 200: - description: "A successful response." - schema: - $ref: "#/definitions/v1beta1Note" - /v1beta1/{parent=projects/*}/notes:batchCreate: - post: - tags: - - "GrafeasV1Beta1" - summary: "Creates new notes in batch." - operationId: "BatchCreateNotes" - parameters: - - name: "parent" - in: "path" - description: "The name of the project in the form of `projects/[PROJECT_ID]`,\ - \ under which\nthe notes are to be created." - required: true - type: "string" - x-exportParamName: "Parent" - - in: "body" - name: "body" - required: true - schema: - $ref: "#/definitions/v1beta1BatchCreateNotesRequest" - x-exportParamName: "Body" - responses: - 200: - description: "A successful response." - schema: - $ref: "#/definitions/v1beta1BatchCreateNotesResponse" - /v1beta1/{parent=projects/*}/occurrences: - get: - tags: - - "GrafeasV1Beta1" - summary: "Lists occurrences for the specified project." - operationId: "ListOccurrences" - parameters: - - name: "parent" - in: "path" - description: "The name of the project to list occurrences for in the form\ - \ of\n`projects/[PROJECT_ID]`." - required: true - type: "string" - x-exportParamName: "Parent" - - name: "filter" - in: "query" - description: "The filter expression." - required: false - type: "string" - x-exportParamName: "Filter" - x-optionalDataType: "String" - - name: "page_size" - in: "query" - description: "Number of occurrences to return in the list. Must be positive.\ - \ Max allowed\npage size is 1000. If not specified, page size defaults to\ - \ 20." - required: false - type: "integer" - format: "int32" - x-exportParamName: "PageSize" - x-optionalDataType: "Int32" - - name: "page_token" - in: "query" - description: "Token to provide to skip to a particular spot in the list." - required: false - type: "string" - x-exportParamName: "PageToken" - x-optionalDataType: "String" - responses: - 200: - description: "A successful response." - schema: - $ref: "#/definitions/v1beta1ListOccurrencesResponse" - post: - tags: - - "GrafeasV1Beta1" - summary: "Creates a new occurrence." - operationId: "CreateOccurrence" - parameters: - - name: "parent" - in: "path" - description: "The name of the project in the form of `projects/[PROJECT_ID]`,\ - \ under which\nthe occurrence is to be created." - required: true - type: "string" - x-exportParamName: "Parent" - - in: "body" - name: "body" - description: "The occurrence to create." - required: true - schema: - $ref: "#/definitions/v1beta1Occurrence" - x-exportParamName: "Body" - responses: - 200: - description: "A successful response." - schema: - $ref: "#/definitions/v1beta1Occurrence" - /v1beta1/{parent=projects/*}/occurrences:batchCreate: - post: - tags: - - "GrafeasV1Beta1" - summary: "Creates new occurrences in batch." - operationId: "BatchCreateOccurrences" - parameters: - - name: "parent" - in: "path" - description: "The name of the project in the form of `projects/[PROJECT_ID]`,\ - \ under which\nthe occurrences are to be created." - required: true - type: "string" - x-exportParamName: "Parent" - - in: "body" - name: "body" - required: true - schema: - $ref: "#/definitions/v1beta1BatchCreateOccurrencesRequest" - x-exportParamName: "Body" - responses: - 200: - description: "A successful response." - schema: - $ref: "#/definitions/v1beta1BatchCreateOccurrencesResponse" - /v1beta1/{parent=projects/*}/occurrences:vulnerabilitySummary: - get: - tags: - - "GrafeasV1Beta1" - summary: "Gets a summary of the number and severity of occurrences." - operationId: "GetVulnerabilityOccurrencesSummary" - parameters: - - name: "parent" - in: "path" - description: "The name of the project to get a vulnerability summary for in\ - \ the form of\n`projects/[PROJECT_ID]`." - required: true - type: "string" - x-exportParamName: "Parent" - - name: "filter" - in: "query" - description: "The filter expression." - required: false - type: "string" - x-exportParamName: "Filter" - x-optionalDataType: "String" - responses: - 200: - description: "A successful response." - schema: - $ref: "#/definitions/v1beta1VulnerabilityOccurrencesSummary" -definitions: - AliasContextKind: - type: "string" - description: "The type of an alias.\n\n - KIND_UNSPECIFIED: Unknown.\n - FIXED:\ - \ Git tag.\n - MOVABLE: Git branch.\n - OTHER: Used to specify non-standard\ - \ aliases. For example, if a Git repo has a\nref named \"refs/foo/bar\"." - enum: - - "KIND_UNSPECIFIED" - - "FIXED" - - "MOVABLE" - - "OTHER" - default: "KIND_UNSPECIFIED" - AuthorityHint: - type: "object" - properties: - human_readable_name: - type: "string" - description: "Required. The human readable name of this attestation authority,\ - \ for\nexample \"qa\"." - description: "This submessage provides human-readable hints about the purpose\ - \ of the\nauthority. Because the name of a note acts as its resource reference,\ - \ it is\nimportant to disambiguate the canonical name of the Note (which might\ - \ be a\nUUID for security purposes) from \"readable\" names more suitable for\ - \ debug\noutput. Note that these hints should not be used to look up authorities\ - \ in\nsecurity sensitive contexts, such as when looking up attestations to\n\ - verify." - example: - human_readable_name: "human_readable_name" - BuildSignatureKeyType: - type: "string" - description: "Public key formats.\n\n - KEY_TYPE_UNSPECIFIED: `KeyType` is not\ - \ set.\n - PGP_ASCII_ARMORED: `PGP ASCII Armored` public key.\n - PKIX_PEM:\ - \ `PKIX PEM` public key." - enum: - - "KEY_TYPE_UNSPECIFIED" - - "PGP_ASCII_ARMORED" - - "PKIX_PEM" - default: "KEY_TYPE_UNSPECIFIED" - CVSSv3AttackComplexity: - type: "string" - enum: - - "ATTACK_COMPLEXITY_UNSPECIFIED" - - "ATTACK_COMPLEXITY_LOW" - - "ATTACK_COMPLEXITY_HIGH" - default: "ATTACK_COMPLEXITY_UNSPECIFIED" - CVSSv3AttackVector: - type: "string" - enum: - - "ATTACK_VECTOR_UNSPECIFIED" - - "ATTACK_VECTOR_NETWORK" - - "ATTACK_VECTOR_ADJACENT" - - "ATTACK_VECTOR_LOCAL" - - "ATTACK_VECTOR_PHYSICAL" - default: "ATTACK_VECTOR_UNSPECIFIED" - CVSSv3Impact: - type: "string" - enum: - - "IMPACT_UNSPECIFIED" - - "IMPACT_HIGH" - - "IMPACT_LOW" - - "IMPACT_NONE" - default: "IMPACT_UNSPECIFIED" - CVSSv3PrivilegesRequired: - type: "string" - enum: - - "PRIVILEGES_REQUIRED_UNSPECIFIED" - - "PRIVILEGES_REQUIRED_NONE" - - "PRIVILEGES_REQUIRED_LOW" - - "PRIVILEGES_REQUIRED_HIGH" - default: "PRIVILEGES_REQUIRED_UNSPECIFIED" - CVSSv3Scope: - type: "string" - enum: - - "SCOPE_UNSPECIFIED" - - "SCOPE_UNCHANGED" - - "SCOPE_CHANGED" - default: "SCOPE_UNSPECIFIED" - CVSSv3UserInteraction: - type: "string" - enum: - - "USER_INTERACTION_UNSPECIFIED" - - "USER_INTERACTION_NONE" - - "USER_INTERACTION_REQUIRED" - default: "USER_INTERACTION_UNSPECIFIED" - DeploymentPlatform: - type: "string" - description: "Types of platforms.\n\n - PLATFORM_UNSPECIFIED: Unknown.\n - GKE:\ - \ Google Container Engine.\n - FLEX: Google App Engine: Flexible Environment.\n\ - \ - CUSTOM: Custom user-defined platform." - enum: - - "PLATFORM_UNSPECIFIED" - - "GKE" - - "FLEX" - - "CUSTOM" - default: "PLATFORM_UNSPECIFIED" - DiscoveredAnalysisStatus: - type: "string" - description: "Analysis status for a resource. Currently for initial analysis only\ - \ (not\nupdated in continuous analysis).\n\n - ANALYSIS_STATUS_UNSPECIFIED:\ - \ Unknown.\n - PENDING: Resource is known but no action has been taken yet.\n\ - \ - SCANNING: Resource is being analyzed.\n - FINISHED_SUCCESS: Analysis has\ - \ finished successfully.\n - FINISHED_FAILED: Analysis has finished unsuccessfully,\ - \ the analysis itself is in a bad\nstate.\n - FINISHED_UNSUPPORTED: The resource\ - \ is known not to be supported" - enum: - - "ANALYSIS_STATUS_UNSPECIFIED" - - "PENDING" - - "SCANNING" - - "FINISHED_SUCCESS" - - "FINISHED_FAILED" - - "FINISHED_UNSUPPORTED" - default: "ANALYSIS_STATUS_UNSPECIFIED" - DiscoveredContinuousAnalysis: - type: "string" - description: "Whether the resource is continuously analyzed.\n\n - CONTINUOUS_ANALYSIS_UNSPECIFIED:\ - \ Unknown.\n - ACTIVE: The resource is continuously analyzed.\n - INACTIVE:\ - \ The resource is ignored for continuous analysis." - enum: - - "CONTINUOUS_ANALYSIS_UNSPECIFIED" - - "ACTIVE" - - "INACTIVE" - default: "CONTINUOUS_ANALYSIS_UNSPECIFIED" - HashHashType: - type: "string" - description: "Specifies the hash algorithm.\n\n - HASH_TYPE_UNSPECIFIED: Unknown.\n\ - \ - SHA256: A SHA-256 hash." - enum: - - "HASH_TYPE_UNSPECIFIED" - - "SHA256" - default: "HASH_TYPE_UNSPECIFIED" - LayerDirective: - type: "string" - description: "Instructions from Dockerfile.\n\n - DIRECTIVE_UNSPECIFIED: Default\ - \ value for unsupported/missing directive.\n - MAINTAINER: https://docs.docker.com/engine/reference/builder/\n\ - \ - RUN: https://docs.docker.com/engine/reference/builder/\n - CMD: https://docs.docker.com/engine/reference/builder/\n\ - \ - LABEL: https://docs.docker.com/engine/reference/builder/\n - EXPOSE: https://docs.docker.com/engine/reference/builder/\n\ - \ - ENV: https://docs.docker.com/engine/reference/builder/\n - ADD: https://docs.docker.com/engine/reference/builder/\n\ - \ - COPY: https://docs.docker.com/engine/reference/builder/\n - ENTRYPOINT:\ - \ https://docs.docker.com/engine/reference/builder/\n - VOLUME: https://docs.docker.com/engine/reference/builder/\n\ - \ - USER: https://docs.docker.com/engine/reference/builder/\n - WORKDIR: https://docs.docker.com/engine/reference/builder/\n\ - \ - ARG: https://docs.docker.com/engine/reference/builder/\n - ONBUILD: https://docs.docker.com/engine/reference/builder/\n\ - \ - STOPSIGNAL: https://docs.docker.com/engine/reference/builder/\n - HEALTHCHECK:\ - \ https://docs.docker.com/engine/reference/builder/\n - SHELL: https://docs.docker.com/engine/reference/builder/" - enum: - - "DIRECTIVE_UNSPECIFIED" - - "MAINTAINER" - - "RUN" - - "CMD" - - "LABEL" - - "EXPOSE" - - "ENV" - - "ADD" - - "COPY" - - "ENTRYPOINT" - - "VOLUME" - - "USER" - - "WORKDIR" - - "ARG" - - "ONBUILD" - - "STOPSIGNAL" - - "HEALTHCHECK" - - "SHELL" - default: "DIRECTIVE_UNSPECIFIED" - VersionVersionKind: - type: "string" - description: "Whether this is an ordinary package version or a sentinel MIN/MAX\ - \ version.\n\n - VERSION_KIND_UNSPECIFIED: Unknown.\n - NORMAL: A standard package\ - \ version.\n - MINIMUM: A special version representing negative infinity.\n\ - \ - MAXIMUM: A special version representing positive infinity." - enum: - - "VERSION_KIND_UNSPECIFIED" - - "NORMAL" - - "MINIMUM" - - "MAXIMUM" - default: "VERSION_KIND_UNSPECIFIED" - VulnerabilityDetail: - type: "object" - properties: - cpe_uri: - type: "string" - description: "Required. The CPE URI in\n[cpe format](https://cpe.mitre.org/specification/)\ - \ in which the\nvulnerability manifests. Examples include distro or storage\ - \ location for\nvulnerable jar." - package: - type: "string" - description: "Required. The name of the package where the vulnerability was\ - \ found." - min_affected_version: - description: "The min version of the package in which the vulnerability exists." - $ref: "#/definitions/packageVersion" - max_affected_version: - description: "Deprecated, do not use. Use fixed_location instead.\n\nThe max\ - \ version of the package in which the vulnerability exists." - $ref: "#/definitions/packageVersion" - severity_name: - type: "string" - description: "The severity (eg: distro assigned severity) for this vulnerability." - description: - type: "string" - description: "A vendor-specific description of this note." - fixed_location: - description: "The fix for this specific package version." - $ref: "#/definitions/vulnerabilityVulnerabilityLocation" - package_type: - type: "string" - description: "The type of package; whether native or non native(ruby gems,\ - \ node.js\npackages etc)." - is_obsolete: - type: "boolean" - format: "boolean" - description: "Whether this detail is obsolete. Occurrences are expected not\ - \ to point to\nobsolete details." - title: "Identifies all appearances of this vulnerability in the package for a\n\ - specific distro/location. For example: glibc in\ncpe:/o:debian:debian_linux:8\ - \ for versions 2.1 - 2.2" - example: - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - package: "package" - cpe_uri: "cpe_uri" - max_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - description: "description" - min_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - package_type: "package_type" - is_obsolete: true - VulnerabilityOccurrencesSummaryFixableTotalByDigest: - type: "object" - properties: - resource: - description: "The affected resource." - $ref: "#/definitions/v1beta1Resource" - severity: - description: "The severity for this count. SEVERITY_UNSPECIFIED indicates\ - \ total across\nall severities." - $ref: "#/definitions/vulnerabilitySeverity" - fixable_count: - type: "string" - format: "int64" - description: "The number of fixable vulnerabilities associated with this resource." - total_count: - type: "string" - format: "int64" - description: "The total number of vulnerabilities associated with this resource." - description: "Per resource and severity counts of fixable and total vulnerabilities." - example: - severity: {} - resource: - name: "name" - content_hash: - type: {} - value: "value" - uri: "uri" - total_count: "total_count" - fixable_count: "fixable_count" - VulnerabilityWindowsDetail: - type: "object" - properties: - cpe_uri: - type: "string" - description: "Required. The CPE URI in\n[cpe format](https://cpe.mitre.org/specification/)\ - \ in which the\nvulnerability manifests. Examples include distro or storage\ - \ location for\nvulnerable jar." - name: - type: "string" - description: "Required. The name of the vulnerability." - description: - type: "string" - description: "The description of the vulnerability." - fixing_kbs: - type: "array" - description: "Required. The names of the KBs which have hotfixes to mitigate\ - \ this\nvulnerability. Note that there may be multiple hotfixes (and thus\n\ - multiple KBs) that mitigate a given vulnerability. Currently any listed\n\ - kb's presence is considered a fix." - items: - $ref: "#/definitions/WindowsDetailKnowledgeBase" - example: - cpe_uri: "cpe_uri" - fixing_kbs: - - name: "name" - url: "url" - - name: "name" - url: "url" - name: "name" - description: "description" - WindowsDetailKnowledgeBase: - type: "object" - properties: - name: - type: "string" - description: "The KB name (generally of the form KB[0-9]+ i.e. KB123456)." - url: - type: "string" - title: "A link to the KB in the Windows update catalog -\nhttps://www.catalog.update.microsoft.com/" - example: - name: "name" - url: "url" - attestationAttestation: - type: "object" - properties: - pgp_signed_attestation: - description: "A PGP signed attestation." - $ref: "#/definitions/attestationPgpSignedAttestation" - generic_signed_attestation: - description: "An attestation that supports multiple `Signature`s\nover the\ - \ same attestation payload. The signatures\n(defined in common.proto) support\ - \ a superset of\npublic key types and IDs compared to PgpSignedAttestation." - $ref: "#/definitions/attestationGenericSignedAttestation" - description: "Occurrence that represents a single \"attestation\". The authenticity\ - \ of an\nattestation can be verified using the attached signature. If the verifier\n\ - trusts the public key of the signer, then verifying the signature is\nsufficient\ - \ to establish trust. In this circumstance, the authority to which\nthis attestation\ - \ is attached is primarily useful for look-up (how to find\nthis attestation\ - \ if you already know the authority and artifact to be\nverified) and intent\ - \ (which authority was this attestation intended to sign\nfor)." - example: - pgp_signed_attestation: - content_type: {} - signature: "signature" - pgp_key_id: "pgp_key_id" - generic_signed_attestation: - content_type: {} - serialized_payload: "serialized_payload" - signatures: - - signature: "signature" - public_key_id: "public_key_id" - - signature: "signature" - public_key_id: "public_key_id" - attestationAuthority: - type: "object" - properties: - hint: - description: "Hint hints at the purpose of the attestation authority." - $ref: "#/definitions/AuthorityHint" - description: "Note kind that represents a logical attestation \"role\" or \"authority\"\ - . For\nexample, an organization might have one `Authority` for \"QA\" and one\ - \ for\n\"build\". This note is intended to act strictly as a grouping mechanism\ - \ for\nthe attached occurrences (Attestations). This grouping mechanism also\n\ - provides a security boundary, since IAM ACLs gate the ability for a principle\n\ - to attach an occurrence to a given note. It also provides a single point of\n\ - lookup to find all attached attestation occurrences, even if they don't all\n\ - live in the same project." - example: - hint: - human_readable_name: "human_readable_name" - attestationGenericSignedAttestation: - type: "object" - properties: - content_type: - description: "Type (for example schema) of the attestation payload that was\ - \ signed.\nThe verifier must ensure that the provided type is one that the\ - \ verifier\nsupports, and that the attestation payload is a valid instantiation\ - \ of that\ntype (for example by validating a JSON schema)." - $ref: "#/definitions/attestationGenericSignedAttestationContentType" - serialized_payload: - type: "string" - format: "byte" - description: "The serialized payload that is verified by one or more `signatures`.\n\ - The encoding and semantic meaning of this payload must match what is set\ - \ in\n`content_type`." - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" - signatures: - type: "array" - description: "One or more signatures over `serialized_payload`. Verifier\ - \ implementations\nshould consider this attestation message verified if\ - \ at least one\n`signature` verifies `serialized_payload`. See `Signature`\ - \ in common.proto\nfor more details on signature structure and verification." - items: - $ref: "#/definitions/v1beta1Signature" - description: "An attestation wrapper that uses the Grafeas `Signature` message.\n\ - This attestation must define the `serialized_payload` that the `signatures`\ - \ verify\nand any metadata necessary to interpret that plaintext. The signatures\n\ - should always be over the `serialized_payload` bytestring." - example: - content_type: {} - serialized_payload: "serialized_payload" - signatures: - - signature: "signature" - public_key_id: "public_key_id" - - signature: "signature" - public_key_id: "public_key_id" - attestationGenericSignedAttestationContentType: - type: "string" - description: "Type of the attestation plaintext that was signed.\n\n - CONTENT_TYPE_UNSPECIFIED:\ - \ `ContentType` is not set.\n - SIMPLE_SIGNING_JSON: Atomic format attestation\ - \ signature. See\nhttps://github.com/containers/image/blob/8a5d2f82a6e3263290c8e0276c3e0f64e77723e7/docs/atomic-signature.md\n\ - The payload extracted in `plaintext` is a JSON blob conforming to the\nlinked\ - \ schema." - enum: - - "CONTENT_TYPE_UNSPECIFIED" - - "SIMPLE_SIGNING_JSON" - default: "CONTENT_TYPE_UNSPECIFIED" - attestationPgpSignedAttestation: - type: "object" - properties: - signature: - type: "string" - description: "Required. The raw content of the signature, as output by GNU\ - \ Privacy Guard\n(GPG) or equivalent. Since this message only supports attached\ - \ signatures,\nthe payload that was signed must be attached. While the signature\ - \ format\nsupported is dependent on the verification implementation, currently\ - \ only\nASCII-armored (`--armor` to gpg), non-clearsigned (`--sign` rather\ - \ than\n`--clearsign` to gpg) are supported. Concretely, `gpg --sign --armor\n\ - --output=signature.gpg payload.json` will create the signature content\n\ - expected in this field in `signature.gpg` for the `payload.json`\nattestation\ - \ payload." - content_type: - description: "Type (for example schema) of the attestation payload that was\ - \ signed.\nThe verifier must ensure that the provided type is one that the\ - \ verifier\nsupports, and that the attestation payload is a valid instantiation\ - \ of that\ntype (for example by validating a JSON schema)." - $ref: "#/definitions/attestationPgpSignedAttestationContentType" - pgp_key_id: - type: "string" - description: "The cryptographic fingerprint of the key used to generate the\ - \ signature,\nas output by, e.g. `gpg --list-keys`. This should be the version\ - \ 4, full\n160-bit fingerprint, expressed as a 40 character hexidecimal\ - \ string. See\nhttps://tools.ietf.org/html/rfc4880#section-12.2 for details.\n\ - Implementations may choose to acknowledge \"LONG\", \"SHORT\", or other\n\ - abbreviated key IDs, but only the full fingerprint is guaranteed to work.\n\ - In gpg, the full fingerprint can be retrieved from the `fpr` field\nreturned\ - \ when calling --list-keys with --with-colons. For example:\n```\ngpg --with-colons\ - \ --with-fingerprint --force-v4-certs \\\n --list-keys attester@example.com\n\ - tru::1:1513631572:0:3:1:5\npub:......\nfpr:::::::::24FF6481B76AC91E66A00AC657A93A81EF3AE6FB:\n\ - ```\nAbove, the fingerprint is `24FF6481B76AC91E66A00AC657A93A81EF3AE6FB`." - description: "An attestation wrapper with a PGP-compatible signature. This message\ - \ only\nsupports `ATTACHED` signatures, where the payload that is signed is\ - \ included\nalongside the signature itself in the same file." - example: - content_type: {} - signature: "signature" - pgp_key_id: "pgp_key_id" - attestationPgpSignedAttestationContentType: - type: "string" - description: "Type (for example schema) of the attestation payload that was signed.\n\ - \n - CONTENT_TYPE_UNSPECIFIED: `ContentType` is not set.\n - SIMPLE_SIGNING_JSON:\ - \ Atomic format attestation signature. See\nhttps://github.com/containers/image/blob/8a5d2f82a6e3263290c8e0276c3e0f64e77723e7/docs/atomic-signature.md\n\ - The payload extracted from `signature` is a JSON blob conforming to the\nlinked\ - \ schema." - enum: - - "CONTENT_TYPE_UNSPECIFIED" - - "SIMPLE_SIGNING_JSON" - default: "CONTENT_TYPE_UNSPECIFIED" - buildBuild: - type: "object" - properties: - builder_version: - type: "string" - description: "Required. Immutable. Version of the builder which produced this\ - \ build." - signature: - description: "Signature of the build in occurrences pointing to this build\ - \ note\ncontaining build details." - $ref: "#/definitions/buildBuildSignature" - description: "Note holding the version of the provider's builder and the signature\ - \ of the\nprovenance message in the build details occurrence." - example: - signature: - public_key: "public_key" - key_type: {} - signature: "signature" - key_id: "key_id" - builder_version: "builder_version" - buildBuildSignature: - type: "object" - properties: - public_key: - type: "string" - description: "Public key of the builder which can be used to verify that the\ - \ related\nfindings are valid and unchanged. If `key_type` is empty, this\ - \ defaults\nto PEM encoded public keys.\n\nThis field may be empty if `key_id`\ - \ references an external key.\n\nFor Cloud Build based signatures, this\ - \ is a PEM encoded public\nkey. To verify the Cloud Build signature, place\ - \ the contents of\nthis field into a file (public.pem). The signature field\ - \ is base64-decoded\ninto its binary representation in signature.bin, and\ - \ the provenance bytes\nfrom `BuildDetails` are base64-decoded into a binary\ - \ representation in\nsigned.bin. OpenSSL can then verify the signature:\n\ - `openssl sha256 -verify public.pem -signature signature.bin signed.bin`" - signature: - type: "string" - format: "byte" - description: "Required. Signature of the related `BuildProvenance`. In JSON,\ - \ this is\nbase-64 encoded." - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" - key_id: - type: "string" - description: "An ID for the key used to sign. This could be either an ID for\ - \ the key\nstored in `public_key` (such as the ID or fingerprint for a PGP\ - \ key, or the\nCN for a cert), or a reference to an external key (such as\ - \ a reference to a\nkey in Cloud Key Management Service)." - key_type: - description: "The type of the key, either stored in `public_key` or referenced\ - \ in\n`key_id`." - $ref: "#/definitions/BuildSignatureKeyType" - description: "Message encapsulating the signature of the verified build." - example: - public_key: "public_key" - key_type: {} - signature: "signature" - key_id: "key_id" - deploymentDeployable: - type: "object" - properties: - resource_uri: - type: "array" - description: "Required. Resource URI for the artifact being deployed." - items: - type: "string" - description: "An artifact that can be deployed in some runtime." - example: - resource_uri: - - "resource_uri" - - "resource_uri" - deploymentDeployment: - type: "object" - properties: - user_email: - type: "string" - description: "Identity of the user that triggered this deployment." - deploy_time: - type: "string" - format: "date-time" - description: "Required. Beginning of the lifetime of this deployment." - undeploy_time: - type: "string" - format: "date-time" - description: "End of the lifetime of this deployment." - config: - type: "string" - description: "Configuration used to create this deployment." - address: - type: "string" - description: "Address of the runtime element hosting this deployment." - resource_uri: - type: "array" - description: "Output only. Resource URI for the artifact being deployed taken\ - \ from\nthe deployable field with the same name." - readOnly: true - items: - type: "string" - platform: - description: "Platform hosting this deployment." - $ref: "#/definitions/DeploymentPlatform" - description: "The period during which some deployable was active in a runtime." - example: - user_email: "user_email" - address: "address" - resource_uri: - - "resource_uri" - - "resource_uri" - undeploy_time: "2000-01-23T04:56:07.000+00:00" - deploy_time: "2000-01-23T04:56:07.000+00:00" - config: "config" - platform: {} - discoveryDiscovered: - type: "object" - properties: - continuous_analysis: - description: "Whether the resource is continuously analyzed." - $ref: "#/definitions/DiscoveredContinuousAnalysis" - last_analysis_time: - type: "string" - format: "date-time" - description: "The last time continuous analysis was done for this resource.\n\ - Deprecated, do not use." - analysis_status: - description: "The status of discovery for the resource." - $ref: "#/definitions/DiscoveredAnalysisStatus" - analysis_status_error: - description: "When an error is encountered this will contain a LocalizedMessage\ - \ under\ndetails to show to the user. The LocalizedMessage is output only\ - \ and\npopulated by the API." - $ref: "#/definitions/rpcStatus" - description: "Provides information about the analysis status of a discovered resource." - example: - last_analysis_time: "2000-01-23T04:56:07.000+00:00" - analysis_status: {} - continuous_analysis: {} - analysis_status_error: - code: 1 - details: - - value: "value" - type_url: "type_url" - - value: "value" - type_url: "type_url" - message: "message" - discoveryDiscovery: - type: "object" - properties: - analysis_kind: - description: "Required. Immutable. The kind of analysis that is handled by\ - \ this\ndiscovery." - $ref: "#/definitions/v1beta1NoteKind" - description: "A note that indicates a type of analysis a provider would perform.\ - \ This note\nexists in a provider's project. A `Discovery` occurrence is created\ - \ in a\nconsumer's project at the start of analysis." - example: {} - imageBasis: - type: "object" - properties: - resource_url: - type: "string" - description: "Required. Immutable. The resource_url for the resource representing\ - \ the\nbasis of associated occurrence images." - fingerprint: - description: "Required. Immutable. The fingerprint of the base image." - $ref: "#/definitions/imageFingerprint" - description: "Basis describes the base image portion (Note) of the DockerImage\n\ - relationship. Linked occurrences are derived from this or an\nequivalent image\ - \ via:\n FROM \nOr an equivalent reference, e.g. a tag\ - \ of the resource_url." - example: - resource_url: "resource_url" - fingerprint: - v2_name: "v2_name" - v1_name: "v1_name" - v2_blob: - - "v2_blob" - - "v2_blob" - imageDerived: - type: "object" - properties: - fingerprint: - description: "Required. The fingerprint of the derived image." - $ref: "#/definitions/imageFingerprint" - distance: - type: "integer" - format: "int32" - description: "Output only. The number of layers by which this image differs\ - \ from the\nassociated image basis." - readOnly: true - layer_info: - type: "array" - description: "This contains layer-specific metadata, if populated it has length\n\ - \"distance\" and is ordered with [distance] being the layer immediately\n\ - following the base image and [1] being the final layer." - items: - $ref: "#/definitions/imageLayer" - base_resource_url: - type: "string" - description: "Output only. This contains the base image URL for the derived\ - \ image\noccurrence." - readOnly: true - description: "Derived describes the derived image portion (Occurrence) of the\ - \ DockerImage\nrelationship. This image would be produced from a Dockerfile\ - \ with FROM\n." - example: - distance: 6 - base_resource_url: "base_resource_url" - fingerprint: - v2_name: "v2_name" - v1_name: "v1_name" - v2_blob: - - "v2_blob" - - "v2_blob" - layer_info: - - arguments: "arguments" - directive: {} - - arguments: "arguments" - directive: {} - imageFingerprint: - type: "object" - properties: - v1_name: - type: "string" - description: "Required. The layer ID of the final layer in the Docker image's\ - \ v1\nrepresentation." - v2_blob: - type: "array" - description: "Required. The ordered list of v2 blobs that represent a given\ - \ image." - items: - type: "string" - v2_name: - type: "string" - description: "Output only. The name of the image's v2 blobs computed via:\n\ - \ [bottom] := v2_blob[bottom]\n [N] := sha256(v2_blob[N] + \" \" + v2_name[N+1])\n\ - Only the name of the final blob is kept." - readOnly: true - description: "A set of properties that uniquely identify a given Docker image." - example: - v2_name: "v2_name" - v1_name: "v1_name" - v2_blob: - - "v2_blob" - - "v2_blob" - imageLayer: - type: "object" - properties: - directive: - description: "Required. The recovered Dockerfile directive used to construct\ - \ this layer." - $ref: "#/definitions/LayerDirective" - arguments: - type: "string" - description: "The recovered arguments to the Dockerfile directive." - description: "Layer holds metadata specific to a layer of a Docker image." - example: - arguments: "arguments" - directive: {} - packageArchitecture: - type: "string" - description: "Instruction set architectures supported by various package managers.\n\ - \n - ARCHITECTURE_UNSPECIFIED: Unknown architecture.\n - X86: X86 architecture.\n\ - \ - X64: X64 architecture." - enum: - - "ARCHITECTURE_UNSPECIFIED" - - "X86" - - "X64" - default: "ARCHITECTURE_UNSPECIFIED" - packageDistribution: - type: "object" - properties: - cpe_uri: - type: "string" - description: "Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)\n\ - denoting the package manager version distributing a package." - architecture: - description: "The CPU architecture for which packages in this distribution\ - \ channel were\nbuilt." - $ref: "#/definitions/packageArchitecture" - latest_version: - description: "The latest available version of this package in this distribution\ - \ channel." - $ref: "#/definitions/packageVersion" - maintainer: - type: "string" - description: "A freeform string denoting the maintainer of this package." - url: - type: "string" - description: "The distribution channel-specific homepage for this package." - description: - type: "string" - description: "The distribution channel-specific description of this package." - description: "This represents a particular channel of distribution for a given\ - \ package.\nE.g., Debian's jessie-backports dpkg mirror." - example: - latest_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - cpe_uri: "cpe_uri" - description: "description" - maintainer: "maintainer" - url: "url" - architecture: {} - packageInstallation: - type: "object" - properties: - name: - type: "string" - description: "Output only. The name of the installed package." - readOnly: true - location: - type: "array" - description: "Required. All of the places within the filesystem versions of\ - \ this package\nhave been found." - items: - $ref: "#/definitions/v1beta1packageLocation" - description: "This represents how a particular software package may be installed\ - \ on a\nsystem." - example: - name: "name" - location: - - path: "path" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - - path: "path" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - packagePackage: - type: "object" - properties: - name: - type: "string" - description: "Required. Immutable. The name of the package." - distribution: - type: "array" - description: "The various channels by which a package is distributed." - items: - $ref: "#/definitions/packageDistribution" - description: "This represents a particular package that is distributed over various\n\ - channels. E.g., glibc (aka libc6) is distributed by many, at various\nversions." - example: - name: "name" - distribution: - - latest_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - cpe_uri: "cpe_uri" - description: "description" - maintainer: "maintainer" - url: "url" - architecture: {} - - latest_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - cpe_uri: "cpe_uri" - description: "description" - maintainer: "maintainer" - url: "url" - architecture: {} - packageVersion: - type: "object" - properties: - epoch: - type: "integer" - format: "int32" - description: "Used to correct mistakes in the version numbering scheme." - name: - type: "string" - description: "Required only when version kind is NORMAL. The main part of\ - \ the version\nname." - revision: - type: "string" - description: "The iteration of the package build from the above version." - kind: - description: "Required. Distinguishes between sentinel MIN/MAX versions and\ - \ normal\nversions." - $ref: "#/definitions/VersionVersionKind" - description: "Version contains structured information about the version of a package." - example: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - protobufAny: - type: "object" - properties: - type_url: - type: "string" - description: "A URL/resource name whose content describes the type of the\n\ - serialized protocol buffer message.\n\nFor URLs which use the scheme `http`,\ - \ `https`, or no scheme, the\nfollowing restrictions and interpretations\ - \ apply:\n\n* If no scheme is provided, `https` is assumed.\n* The last\ - \ segment of the URL's path must represent the fully\n qualified name of\ - \ the type (as in `path/google.protobuf.Duration`).\n The name should be\ - \ in a canonical form (e.g., leading \".\" is\n not accepted).\n* An HTTP\ - \ GET on the URL must yield a [google.protobuf.Type][]\n value in binary\ - \ format, or produce an error.\n* Applications are allowed to cache lookup\ - \ results based on the\n URL, or have them precompiled into a binary to\ - \ avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n\ - \ on changes to types. (Use versioned type names to manage\n breaking\ - \ changes.)\n\nSchemes other than `http`, `https` (or the empty scheme)\ - \ might be\nused with implementation specific semantics." - value: - type: "string" - format: "byte" - description: "Must be a valid serialized protocol buffer of the above specified\ - \ type." - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" - description: "`Any` contains an arbitrary serialized protocol buffer message along\ - \ with a\nURL that describes the type of the serialized message.\n\nProtobuf\ - \ library provides support to pack/unpack Any values in the form\nof utility\ - \ functions or additional generated methods of the Any type.\n\nExample 1: Pack\ - \ and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n\ - \ ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack\ - \ and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n\ - \ ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n\ - \ }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n\ - \ any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n\ - \ any.Unpack(foo)\n ...\n\nThe pack methods provided by protobuf library\ - \ will by default use\n'type.googleapis.com/full.type.name' as the type URL\ - \ and the unpack\nmethods only use the fully qualified type name after the last\ - \ '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\n\ - name \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses\ - \ the regular\nrepresentation of the deserialized, embedded message, with an\n\ - additional field `@type` which contains the type URL. Example:\n\n package\ - \ google.profile;\n message Person {\n string first_name = 1;\n \ - \ string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\"\ - ,\n \"firstName\": ,\n \"lastName\": \n }\n\nIf\ - \ the embedded message type is well-known and has a custom JSON\nrepresentation,\ - \ that representation will be embedded adding a field\n`value` which holds the\ - \ custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\ - \n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n\ - \ \"value\": \"1.212s\"\n }" - example: - value: "value" - type_url: "type_url" - protobufFieldMask: - type: "object" - properties: - paths: - type: "array" - description: "The set of field mask paths." - items: - type: "string" - title: "`FieldMask` represents a set of symbolic field paths, for example:" - description: "paths: \"f.a\"\n paths: \"f.b.d\"\n\nHere `f` represents a field\ - \ in some root message, `a` and `b`\nfields in the message found in `f`, and\ - \ `d` a field found in the\nmessage in `f.b`.\n\nField masks are used to specify\ - \ a subset of fields that should be\nreturned by a get operation or modified\ - \ by an update operation.\nField masks also have a custom JSON encoding (see\ - \ below).\n\n# Field Masks in Projections\n\nWhen used in the context of a projection,\ - \ a response message or\nsub-message is filtered by the API to only contain\ - \ those fields as\nspecified in the mask. For example, if the mask in the previous\n\ - example is applied to a response message as follows:\n\n f {\n a : 22\n\ - \ b {\n d : 1\n x : 2\n }\n y : 13\n }\n \ - \ z: 8\n\nThe result will not contain specific values for fields x,y and z\n\ - (their value will be set to the default, and omitted in proto text\noutput):\n\ - \n\n f {\n a : 22\n b {\n d : 1\n }\n }\n\nA repeated\ - \ field is not allowed except at the last position of a\npaths string.\n\nIf\ - \ a FieldMask object is not present in a get operation, the\noperation applies\ - \ to all fields (as if a FieldMask of all fields\nhad been specified).\n\nNote\ - \ that a field mask does not necessarily apply to the\ntop-level response message.\ - \ In case of a REST get operation, the\nfield mask applies directly to the response,\ - \ but in case of a REST\nlist operation, the mask instead applies to each individual\ - \ message\nin the returned resource list. In case of a REST custom method,\n\ - other definitions may be used. Where the mask applies will be\nclearly documented\ - \ together with its declaration in the API. In\nany case, the effect on the\ - \ returned resource/resources is required\nbehavior for APIs.\n\n# Field Masks\ - \ in Update Operations\n\nA field mask in update operations specifies which\ - \ fields of the\ntargeted resource are going to be updated. The API is required\n\ - to only change the values of the fields as specified in the mask\nand leave\ - \ the others untouched. If a resource is passed in to\ndescribe the updated\ - \ values, the API ignores the values of all\nfields not covered by the mask.\n\ - \nIf a repeated field is specified for an update operation, the existing\nrepeated\ - \ values in the target resource will be overwritten by the new values.\nNote\ - \ that a repeated field is only allowed in the last position of a `paths`\n\ - string.\n\nIf a sub-message is specified in the last position of the field mask\ - \ for an\nupdate operation, then the existing sub-message in the target resource\ - \ is\noverwritten. Given the target message:\n\n f {\n b {\n \ - \ d : 1\n x : 2\n }\n c : 1\n }\n\nAnd an update message:\n\ - \n f {\n b {\n d : 10\n }\n }\n\nthen if the field mask\ - \ is:\n\n paths: \"f.b\"\n\nthen the result will be:\n\n f {\n b {\n\ - \ d : 10\n }\n c : 1\n }\n\nHowever, if the update mask\ - \ was:\n\n paths: \"f.b.d\"\n\nthen the result would be:\n\n f {\n b\ - \ {\n d : 10\n x : 2\n }\n c : 1\n }\n\nIn order\ - \ to reset a field's value to the default, the field must\nbe in the mask and\ - \ set to the default value in the provided resource.\nHence, in order to reset\ - \ all fields of a resource, provide a default\ninstance of the resource and\ - \ set all fields in the mask, or do\nnot provide a mask as described below.\n\ - \nIf a field mask is not present on update, the operation applies to\nall fields\ - \ (as if a field mask of all fields has been specified).\nNote that in the presence\ - \ of schema evolution, this may mean that\nfields the client does not know and\ - \ has therefore not filled into\nthe request will be reset to their default.\ - \ If this is unwanted\nbehavior, a specific service may require a client to\ - \ always specify\na field mask, producing an error if not.\n\nAs with get operations,\ - \ the location of the resource which\ndescribes the updated values in the request\ - \ message depends on the\noperation kind. In any case, the effect of the field\ - \ mask is\nrequired to be honored by the API.\n\n## Considerations for HTTP\ - \ REST\n\nThe HTTP kind of an update operation which uses a field mask must\n\ - be set to PATCH instead of PUT in order to satisfy HTTP semantics\n(PUT must\ - \ only be used for full updates).\n\n# JSON Encoding of Field Masks\n\nIn JSON,\ - \ a field mask is encoded as a single string where paths are\nseparated by a\ - \ comma. Fields name in each path are converted\nto/from lower-camel naming\ - \ conventions.\n\nAs an example, consider the following message declarations:\n\ - \n message Profile {\n User user = 1;\n Photo photo = 2;\n }\n\ - \ message User {\n string display_name = 1;\n string address =\ - \ 2;\n }\n\nIn proto a field mask for `Profile` may look as such:\n\n \ - \ mask {\n paths: \"user.display_name\"\n paths: \"photo\"\n }\n\ - \nIn JSON, the same mask is represented as below:\n\n {\n mask: \"user.displayName,photo\"\ - \n }\n\n# Field Masks and Oneof Fields\n\nField masks treat fields in oneofs\ - \ just as regular fields. Consider the\nfollowing message:\n\n message SampleMessage\ - \ {\n oneof test_oneof {\n string name = 4;\n SubMessage\ - \ sub_message = 9;\n }\n }\n\nThe field mask can be:\n\n mask {\n\ - \ paths: \"name\"\n }\n\nOr:\n\n mask {\n paths: \"sub_message\"\ - \n }\n\nNote that oneof type names (\"test_oneof\" in this case) cannot be\ - \ used in\npaths." - provenanceArtifact: - type: "object" - properties: - checksum: - type: "string" - description: "Hash or checksum value of a binary, or Docker Registry 2.0 digest\ - \ of a\ncontainer." - id: - type: "string" - description: "Artifact ID, if any; for container images, this will be a URL\ - \ by digest\nlike `gcr.io/projectID/imagename@sha256:123456`." - names: - type: "array" - description: "Related artifact names. This may be the path to a binary or\ - \ jar file, or in\nthe case of a container build, the name used to push\ - \ the container image to\nGoogle Container Registry, as presented to `docker\ - \ push`. Note that a\nsingle Artifact ID can have multiple names, for example\ - \ if two tags are\napplied to one image." - items: - type: "string" - description: "Artifact describes a build product." - example: - names: - - "names" - - "names" - checksum: "checksum" - id: "id" - provenanceBuildProvenance: - type: "object" - properties: - id: - type: "string" - description: "Required. Unique identifier of the build." - project_id: - type: "string" - description: "ID of the project." - commands: - type: "array" - description: "Commands requested by the build." - items: - $ref: "#/definitions/provenanceCommand" - built_artifacts: - type: "array" - description: "Output of the build." - items: - $ref: "#/definitions/provenanceArtifact" - create_time: - type: "string" - format: "date-time" - description: "Time at which the build was created." - start_time: - type: "string" - format: "date-time" - description: "Time at which execution of the build was started." - end_time: - type: "string" - format: "date-time" - description: "Time at which execution of the build was finished." - creator: - type: "string" - description: "E-mail address of the user who initiated this build. Note that\ - \ this was the\nuser's e-mail address at the time the build was initiated;\ - \ this address may\nnot represent the same end-user for all time." - logs_uri: - type: "string" - description: "URI where any logs for this provenance were written." - source_provenance: - description: "Details of the Source input to the build." - $ref: "#/definitions/provenanceSource" - trigger_id: - type: "string" - description: "Trigger identifier if the build was triggered automatically;\ - \ empty if not." - build_options: - type: "object" - description: "Special options applied to this build. This is a catch-all field\ - \ where\nbuild providers can enter any desired additional details." - additionalProperties: - type: "string" - builder_version: - type: "string" - description: "Version string of the builder at the time this build was executed." - description: "Provenance of a build. Contains all information needed to verify\ - \ the full\ndetails about the build from source to completion." - example: - creator: "creator" - create_time: "2000-01-23T04:56:07.000+00:00" - trigger_id: "trigger_id" - end_time: "2000-01-23T04:56:07.000+00:00" - built_artifacts: - - names: - - "names" - - "names" - checksum: "checksum" - id: "id" - - names: - - "names" - - "names" - checksum: "checksum" - id: "id" - logs_uri: "logs_uri" - builder_version: "builder_version" - source_provenance: - artifact_storage_source_uri: "artifact_storage_source_uri" - additional_contexts: - - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - file_hashes: - key: - file_hash: - - type: {} - value: "value" - - type: {} - value: "value" - context: - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - start_time: "2000-01-23T04:56:07.000+00:00" - project_id: "project_id" - id: "id" - commands: - - args: - - "args" - - "args" - name: "name" - id: "id" - wait_for: - - "wait_for" - - "wait_for" - env: - - "env" - - "env" - dir: "dir" - - args: - - "args" - - "args" - name: "name" - id: "id" - wait_for: - - "wait_for" - - "wait_for" - env: - - "env" - - "env" - dir: "dir" - build_options: - key: "build_options" - provenanceCommand: - type: "object" - properties: - name: - type: "string" - description: "Required. Name of the command, as presented on the command line,\ - \ or if the\ncommand is packaged as a Docker container, as presented to\ - \ `docker pull`." - env: - type: "array" - description: "Environment variables set before running this command." - items: - type: "string" - args: - type: "array" - description: "Command-line arguments used when executing this command." - items: - type: "string" - dir: - type: "string" - description: "Working directory (relative to project source root) used when\ - \ running this\ncommand." - id: - type: "string" - description: "Optional unique identifier for this command, used in wait_for\ - \ to reference\nthis command as a dependency." - wait_for: - type: "array" - description: "The ID(s) of the command(s) that this command depends on." - items: - type: "string" - description: "Command describes a step performed as part of the build pipeline." - example: - args: - - "args" - - "args" - name: "name" - id: "id" - wait_for: - - "wait_for" - - "wait_for" - env: - - "env" - - "env" - dir: "dir" - provenanceFileHashes: - type: "object" - properties: - file_hash: - type: "array" - description: "Required. Collection of file hashes." - items: - $ref: "#/definitions/provenanceHash" - description: "Container message for hashes of byte content of files, used in source\n\ - messages to verify integrity of source input to the build." - example: - file_hash: - - type: {} - value: "value" - - type: {} - value: "value" - provenanceHash: - type: "object" - properties: - type: - description: "Required. The type of hash that was performed." - $ref: "#/definitions/HashHashType" - value: - type: "string" - format: "byte" - description: "Required. The hash value." - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" - description: "Container message for hash values." - example: - type: {} - value: "value" - provenanceSource: - type: "object" - properties: - artifact_storage_source_uri: - type: "string" - description: "If provided, the input binary artifacts for the build came from\ - \ this\nlocation." - file_hashes: - type: "object" - description: "Hash(es) of the build source, which can be used to verify that\ - \ the original\nsource integrity was maintained in the build.\n\nThe keys\ - \ to this map are file paths used as build source and the values\ncontain\ - \ the hash values for those files.\n\nIf the build source came in a single\ - \ package such as a gzipped tarfile\n(.tar.gz), the FileHash will be for\ - \ the single path to that file." - additionalProperties: - $ref: "#/definitions/provenanceFileHashes" - context: - description: "If provided, the source code used for the build came from this\ - \ location." - $ref: "#/definitions/sourceSourceContext" - additional_contexts: - type: "array" - description: "If provided, some of the source code used for the build may\ - \ be found in\nthese locations, in the case where the source repository\ - \ had multiple\nremotes or submodules. This list will not include the context\ - \ specified in\nthe context field." - items: - $ref: "#/definitions/sourceSourceContext" - description: "Source describes the location of the source used for the build." - example: - artifact_storage_source_uri: "artifact_storage_source_uri" - additional_contexts: - - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - file_hashes: - key: - file_hash: - - type: {} - value: "value" - - type: {} - value: "value" - context: - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - rpcStatus: - type: "object" - properties: - code: - type: "integer" - format: "int32" - description: "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]." - message: - type: "string" - description: "A developer-facing error message, which should be in English.\ - \ Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details]\ - \ field, or localized by the client." - details: - type: "array" - description: "A list of messages that carry the error details. There is a\ - \ common set of\nmessage types for APIs to use." - items: - $ref: "#/definitions/protobufAny" - title: "The `Status` type defines a logical error model that is suitable for different\n\ - programming environments, including REST APIs and RPC APIs. It is used by\n\ - [gRPC](https://github.com/grpc). The error model is designed to be:" - description: "- Simple to use and understand for most users\n- Flexible enough\ - \ to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three\ - \ pieces of data: error code, error message,\nand error details. The error code\ - \ should be an enum value of\n[google.rpc.Code][google.rpc.Code], but it may\ - \ accept additional error codes if needed. The\nerror message should be a developer-facing\ - \ English message that helps\ndevelopers *understand* and *resolve* the error.\ - \ If a localized user-facing\nerror message is needed, put the localized message\ - \ in the error details or\nlocalize it in the client. The optional error details\ - \ may contain arbitrary\ninformation about the error. There is a predefined\ - \ set of error detail types\nin the package `google.rpc` that can be used for\ - \ common error conditions.\n\n# Language mapping\n\nThe `Status` message is\ - \ the logical representation of the error model, but it\nis not necessarily\ - \ the actual wire format. When the `Status` message is\nexposed in different\ - \ client libraries and different wire protocols, it can be\nmapped differently.\ - \ For example, it will likely be mapped to some exceptions\nin Java, but more\ - \ likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model\ - \ and the `Status` message can be used in a variety of\nenvironments, either\ - \ with or without APIs, to provide a\nconsistent developer experience across\ - \ different environments.\n\nExample uses of this error model include:\n\n-\ - \ Partial errors. If a service needs to return partial errors to the client,\n\ - \ it may embed the `Status` in the normal response to indicate the partial\n\ - \ errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each\ - \ step may\n have a `Status` message for error reporting.\n\n- Batch operations.\ - \ If a client uses batch request and batch response, the\n `Status` message\ - \ should be used directly inside batch response, one for\n each error sub-response.\n\ - \n- Asynchronous operations. If an API call embeds asynchronous operation\n\ - \ results in its response, the status of those operations should be\n \ - \ represented directly using the `Status` message.\n\n- Logging. If some API\ - \ errors are stored in logs, the message `Status` could\n be used directly\ - \ after any stripping needed for security/privacy reasons." - example: - code: 1 - details: - - value: "value" - type_url: "type_url" - - value: "value" - type_url: "type_url" - message: "message" - sourceAliasContext: - type: "object" - properties: - kind: - description: "The alias kind." - $ref: "#/definitions/AliasContextKind" - name: - type: "string" - description: "The alias name." - description: "An alias to a repo revision." - example: - kind: {} - name: "name" - sourceCloudRepoSourceContext: - type: "object" - properties: - repo_id: - description: "The ID of the repo." - $ref: "#/definitions/sourceRepoId" - revision_id: - type: "string" - description: "A revision ID." - alias_context: - description: "An alias, which may be a branch or tag." - $ref: "#/definitions/sourceAliasContext" - description: "A CloudRepoSourceContext denotes a particular revision in a Google\ - \ Cloud\nSource Repo." - example: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - sourceGerritSourceContext: - type: "object" - properties: - host_uri: - type: "string" - description: "The URI of a running Gerrit instance." - gerrit_project: - type: "string" - description: "The full project name within the host. Projects may be nested,\ - \ so\n\"project/subproject\" is a valid project name. The \"repo name\"\ - \ is the\nhostURI/project." - revision_id: - type: "string" - description: "A revision (commit) ID." - alias_context: - description: "An alias, which may be a branch or tag." - $ref: "#/definitions/sourceAliasContext" - description: "A SourceContext referring to a Gerrit project." - example: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - sourceGitSourceContext: - type: "object" - properties: - url: - type: "string" - description: "Git repository URL." - revision_id: - type: "string" - description: "Git commit hash." - description: "A GitSourceContext denotes a particular revision in a third party\ - \ Git\nrepository (e.g., GitHub)." - example: - url: "url" - revision_id: "revision_id" - sourceProjectRepoId: - type: "object" - properties: - project_id: - type: "string" - description: "The ID of the project." - repo_name: - type: "string" - description: "The name of the repo. Leave empty for the default repo." - description: "Selects a repo using a Google Cloud Platform project ID (e.g.,\n\ - winged-cargo-31) and a repo name within that project." - example: - project_id: "project_id" - repo_name: "repo_name" - sourceRepoId: - type: "object" - properties: - project_repo_id: - description: "A combination of a project ID and a repo name." - $ref: "#/definitions/sourceProjectRepoId" - uid: - type: "string" - description: "A server-assigned, globally unique identifier." - description: "A unique identifier for a Cloud Repo." - example: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - sourceSourceContext: - type: "object" - properties: - cloud_repo: - description: "A SourceContext referring to a revision in a Google Cloud Source\ - \ Repo." - $ref: "#/definitions/sourceCloudRepoSourceContext" - gerrit: - description: "A SourceContext referring to a Gerrit project." - $ref: "#/definitions/sourceGerritSourceContext" - git: - description: "A SourceContext referring to any third party Git repo (e.g.,\ - \ GitHub)." - $ref: "#/definitions/sourceGitSourceContext" - labels: - type: "object" - description: "Labels with user defined metadata." - additionalProperties: - type: "string" - description: "A SourceContext is a reference to a tree of files. A SourceContext\ - \ together\nwith a path point to a unique revision of a single file or directory." - example: - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - v1beta1BatchCreateNotesRequest: - type: "object" - properties: - parent: - type: "string" - description: "The name of the project in the form of `projects/[PROJECT_ID]`,\ - \ under which\nthe notes are to be created." - notes: - type: "object" - description: "The notes to create. Max allowed length is 1000." - additionalProperties: - $ref: "#/definitions/v1beta1Note" - description: "Request to create notes in batch." - v1beta1BatchCreateNotesResponse: - type: "object" - properties: - notes: - type: "array" - description: "The notes that were created." - items: - $ref: "#/definitions/v1beta1Note" - description: "Response for creating notes in batch." - example: - notes: - - attestation_authority: - hint: - human_readable_name: "human_readable_name" - short_description: "short_description" - related_note_names: - - "related_note_names" - - "related_note_names" - package: - name: "name" - distribution: - - latest_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - cpe_uri: "cpe_uri" - description: "description" - maintainer: "maintainer" - url: "url" - architecture: {} - - latest_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - cpe_uri: "cpe_uri" - description: "description" - maintainer: "maintainer" - url: "url" - architecture: {} - create_time: "2000-01-23T04:56:07.000+00:00" - kind: {} - related_url: - - label: "label" - url: "url" - - label: "label" - url: "url" - expiration_time: "2000-01-23T04:56:07.000+00:00" - long_description: "long_description" - vulnerability: - severity: {} - cvss_score: 0.8008282 - cvss_v3: - attack_complexity: {} - base_score: 1.4658129 - user_interaction: {} - scope: {} - impact_score: 5.637377 - confidentiality_impact: {} - attack_vector: {} - exploitability_score: 5.962134 - privileges_required: {} - details: - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - package: "package" - cpe_uri: "cpe_uri" - max_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - description: "description" - min_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - package_type: "package_type" - is_obsolete: true - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - package: "package" - cpe_uri: "cpe_uri" - max_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - description: "description" - min_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - package_type: "package_type" - is_obsolete: true - windows_details: - - cpe_uri: "cpe_uri" - fixing_kbs: - - name: "name" - url: "url" - - name: "name" - url: "url" - name: "name" - description: "description" - - cpe_uri: "cpe_uri" - fixing_kbs: - - name: "name" - url: "url" - - name: "name" - url: "url" - name: "name" - description: "description" - update_time: "2000-01-23T04:56:07.000+00:00" - base_image: - resource_url: "resource_url" - fingerprint: - v2_name: "v2_name" - v1_name: "v1_name" - v2_blob: - - "v2_blob" - - "v2_blob" - deployable: - resource_uri: - - "resource_uri" - - "resource_uri" - build: - signature: - public_key: "public_key" - key_type: {} - signature: "signature" - key_id: "key_id" - builder_version: "builder_version" - discovery: {} - name: "name" - - attestation_authority: - hint: - human_readable_name: "human_readable_name" - short_description: "short_description" - related_note_names: - - "related_note_names" - - "related_note_names" - package: - name: "name" - distribution: - - latest_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - cpe_uri: "cpe_uri" - description: "description" - maintainer: "maintainer" - url: "url" - architecture: {} - - latest_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - cpe_uri: "cpe_uri" - description: "description" - maintainer: "maintainer" - url: "url" - architecture: {} - create_time: "2000-01-23T04:56:07.000+00:00" - kind: {} - related_url: - - label: "label" - url: "url" - - label: "label" - url: "url" - expiration_time: "2000-01-23T04:56:07.000+00:00" - long_description: "long_description" - vulnerability: - severity: {} - cvss_score: 0.8008282 - cvss_v3: - attack_complexity: {} - base_score: 1.4658129 - user_interaction: {} - scope: {} - impact_score: 5.637377 - confidentiality_impact: {} - attack_vector: {} - exploitability_score: 5.962134 - privileges_required: {} - details: - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - package: "package" - cpe_uri: "cpe_uri" - max_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - description: "description" - min_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - package_type: "package_type" - is_obsolete: true - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - package: "package" - cpe_uri: "cpe_uri" - max_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - description: "description" - min_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - package_type: "package_type" - is_obsolete: true - windows_details: - - cpe_uri: "cpe_uri" - fixing_kbs: - - name: "name" - url: "url" - - name: "name" - url: "url" - name: "name" - description: "description" - - cpe_uri: "cpe_uri" - fixing_kbs: - - name: "name" - url: "url" - - name: "name" - url: "url" - name: "name" - description: "description" - update_time: "2000-01-23T04:56:07.000+00:00" - base_image: - resource_url: "resource_url" - fingerprint: - v2_name: "v2_name" - v1_name: "v1_name" - v2_blob: - - "v2_blob" - - "v2_blob" - deployable: - resource_uri: - - "resource_uri" - - "resource_uri" - build: - signature: - public_key: "public_key" - key_type: {} - signature: "signature" - key_id: "key_id" - builder_version: "builder_version" - discovery: {} - name: "name" - v1beta1BatchCreateOccurrencesRequest: - type: "object" - properties: - parent: - type: "string" - description: "The name of the project in the form of `projects/[PROJECT_ID]`,\ - \ under which\nthe occurrences are to be created." - occurrences: - type: "array" - description: "The occurrences to create. Max allowed length is 1000." - items: - $ref: "#/definitions/v1beta1Occurrence" - description: "Request to create occurrences in batch." - v1beta1BatchCreateOccurrencesResponse: - type: "object" - properties: - occurrences: - type: "array" - description: "The occurrences that were created." - items: - $ref: "#/definitions/v1beta1Occurrence" - description: "Response for creating occurrences in batch." - example: - occurrences: - - discovered: - discovered: - last_analysis_time: "2000-01-23T04:56:07.000+00:00" - analysis_status: {} - continuous_analysis: {} - analysis_status_error: - code: 1 - details: - - value: "value" - type_url: "type_url" - - value: "value" - type_url: "type_url" - message: "message" - attestation: - attestation: - pgp_signed_attestation: - content_type: {} - signature: "signature" - pgp_key_id: "pgp_key_id" - generic_signed_attestation: - content_type: {} - serialized_payload: "serialized_payload" - signatures: - - signature: "signature" - public_key_id: "public_key_id" - - signature: "signature" - public_key_id: "public_key_id" - create_time: "2000-01-23T04:56:07.000+00:00" - resource: - name: "name" - content_hash: - type: {} - value: "value" - uri: "uri" - kind: {} - vulnerability: - severity: {} - short_description: "short_description" - cvss_score: 0.8008282 - long_description: "long_description" - related_urls: - - label: "label" - url: "url" - - label: "label" - url: "url" - type: "type" - package_issue: - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - affected_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - affected_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - remediation: "remediation" - update_time: "2000-01-23T04:56:07.000+00:00" - build: - provenance: - creator: "creator" - create_time: "2000-01-23T04:56:07.000+00:00" - trigger_id: "trigger_id" - end_time: "2000-01-23T04:56:07.000+00:00" - built_artifacts: - - names: - - "names" - - "names" - checksum: "checksum" - id: "id" - - names: - - "names" - - "names" - checksum: "checksum" - id: "id" - logs_uri: "logs_uri" - builder_version: "builder_version" - source_provenance: - artifact_storage_source_uri: "artifact_storage_source_uri" - additional_contexts: - - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - file_hashes: - key: - file_hash: - - type: {} - value: "value" - - type: {} - value: "value" - context: - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - start_time: "2000-01-23T04:56:07.000+00:00" - project_id: "project_id" - id: "id" - commands: - - args: - - "args" - - "args" - name: "name" - id: "id" - wait_for: - - "wait_for" - - "wait_for" - env: - - "env" - - "env" - dir: "dir" - - args: - - "args" - - "args" - name: "name" - id: "id" - wait_for: - - "wait_for" - - "wait_for" - env: - - "env" - - "env" - dir: "dir" - build_options: - key: "build_options" - provenance_bytes: "provenance_bytes" - installation: - installation: - name: "name" - location: - - path: "path" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - - path: "path" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - name: "name" - derived_image: - derived_image: - distance: 6 - base_resource_url: "base_resource_url" - fingerprint: - v2_name: "v2_name" - v1_name: "v1_name" - v2_blob: - - "v2_blob" - - "v2_blob" - layer_info: - - arguments: "arguments" - directive: {} - - arguments: "arguments" - directive: {} - note_name: "note_name" - deployment: - deployment: - user_email: "user_email" - address: "address" - resource_uri: - - "resource_uri" - - "resource_uri" - undeploy_time: "2000-01-23T04:56:07.000+00:00" - deploy_time: "2000-01-23T04:56:07.000+00:00" - config: "config" - platform: {} - - discovered: - discovered: - last_analysis_time: "2000-01-23T04:56:07.000+00:00" - analysis_status: {} - continuous_analysis: {} - analysis_status_error: - code: 1 - details: - - value: "value" - type_url: "type_url" - - value: "value" - type_url: "type_url" - message: "message" - attestation: - attestation: - pgp_signed_attestation: - content_type: {} - signature: "signature" - pgp_key_id: "pgp_key_id" - generic_signed_attestation: - content_type: {} - serialized_payload: "serialized_payload" - signatures: - - signature: "signature" - public_key_id: "public_key_id" - - signature: "signature" - public_key_id: "public_key_id" - create_time: "2000-01-23T04:56:07.000+00:00" - resource: - name: "name" - content_hash: - type: {} - value: "value" - uri: "uri" - kind: {} - vulnerability: - severity: {} - short_description: "short_description" - cvss_score: 0.8008282 - long_description: "long_description" - related_urls: - - label: "label" - url: "url" - - label: "label" - url: "url" - type: "type" - package_issue: - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - affected_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - affected_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - remediation: "remediation" - update_time: "2000-01-23T04:56:07.000+00:00" - build: - provenance: - creator: "creator" - create_time: "2000-01-23T04:56:07.000+00:00" - trigger_id: "trigger_id" - end_time: "2000-01-23T04:56:07.000+00:00" - built_artifacts: - - names: - - "names" - - "names" - checksum: "checksum" - id: "id" - - names: - - "names" - - "names" - checksum: "checksum" - id: "id" - logs_uri: "logs_uri" - builder_version: "builder_version" - source_provenance: - artifact_storage_source_uri: "artifact_storage_source_uri" - additional_contexts: - - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - file_hashes: - key: - file_hash: - - type: {} - value: "value" - - type: {} - value: "value" - context: - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - start_time: "2000-01-23T04:56:07.000+00:00" - project_id: "project_id" - id: "id" - commands: - - args: - - "args" - - "args" - name: "name" - id: "id" - wait_for: - - "wait_for" - - "wait_for" - env: - - "env" - - "env" - dir: "dir" - - args: - - "args" - - "args" - name: "name" - id: "id" - wait_for: - - "wait_for" - - "wait_for" - env: - - "env" - - "env" - dir: "dir" - build_options: - key: "build_options" - provenance_bytes: "provenance_bytes" - installation: - installation: - name: "name" - location: - - path: "path" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - - path: "path" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - name: "name" - derived_image: - derived_image: - distance: 6 - base_resource_url: "base_resource_url" - fingerprint: - v2_name: "v2_name" - v1_name: "v1_name" - v2_blob: - - "v2_blob" - - "v2_blob" - layer_info: - - arguments: "arguments" - directive: {} - - arguments: "arguments" - directive: {} - note_name: "note_name" - deployment: - deployment: - user_email: "user_email" - address: "address" - resource_uri: - - "resource_uri" - - "resource_uri" - undeploy_time: "2000-01-23T04:56:07.000+00:00" - deploy_time: "2000-01-23T04:56:07.000+00:00" - config: "config" - platform: {} - v1beta1ListNoteOccurrencesResponse: - type: "object" - properties: - occurrences: - type: "array" - description: "The occurrences attached to the specified note." - items: - $ref: "#/definitions/v1beta1Occurrence" - next_page_token: - type: "string" - description: "Token to provide to skip to a particular spot in the list." - description: "Response for listing occurrences for a note." - example: - occurrences: - - discovered: - discovered: - last_analysis_time: "2000-01-23T04:56:07.000+00:00" - analysis_status: {} - continuous_analysis: {} - analysis_status_error: - code: 1 - details: - - value: "value" - type_url: "type_url" - - value: "value" - type_url: "type_url" - message: "message" - attestation: - attestation: - pgp_signed_attestation: - content_type: {} - signature: "signature" - pgp_key_id: "pgp_key_id" - generic_signed_attestation: - content_type: {} - serialized_payload: "serialized_payload" - signatures: - - signature: "signature" - public_key_id: "public_key_id" - - signature: "signature" - public_key_id: "public_key_id" - create_time: "2000-01-23T04:56:07.000+00:00" - resource: - name: "name" - content_hash: - type: {} - value: "value" - uri: "uri" - kind: {} - vulnerability: - severity: {} - short_description: "short_description" - cvss_score: 0.8008282 - long_description: "long_description" - related_urls: - - label: "label" - url: "url" - - label: "label" - url: "url" - type: "type" - package_issue: - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - affected_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - affected_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - remediation: "remediation" - update_time: "2000-01-23T04:56:07.000+00:00" - build: - provenance: - creator: "creator" - create_time: "2000-01-23T04:56:07.000+00:00" - trigger_id: "trigger_id" - end_time: "2000-01-23T04:56:07.000+00:00" - built_artifacts: - - names: - - "names" - - "names" - checksum: "checksum" - id: "id" - - names: - - "names" - - "names" - checksum: "checksum" - id: "id" - logs_uri: "logs_uri" - builder_version: "builder_version" - source_provenance: - artifact_storage_source_uri: "artifact_storage_source_uri" - additional_contexts: - - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - file_hashes: - key: - file_hash: - - type: {} - value: "value" - - type: {} - value: "value" - context: - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - start_time: "2000-01-23T04:56:07.000+00:00" - project_id: "project_id" - id: "id" - commands: - - args: - - "args" - - "args" - name: "name" - id: "id" - wait_for: - - "wait_for" - - "wait_for" - env: - - "env" - - "env" - dir: "dir" - - args: - - "args" - - "args" - name: "name" - id: "id" - wait_for: - - "wait_for" - - "wait_for" - env: - - "env" - - "env" - dir: "dir" - build_options: - key: "build_options" - provenance_bytes: "provenance_bytes" - installation: - installation: - name: "name" - location: - - path: "path" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - - path: "path" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - name: "name" - derived_image: - derived_image: - distance: 6 - base_resource_url: "base_resource_url" - fingerprint: - v2_name: "v2_name" - v1_name: "v1_name" - v2_blob: - - "v2_blob" - - "v2_blob" - layer_info: - - arguments: "arguments" - directive: {} - - arguments: "arguments" - directive: {} - note_name: "note_name" - deployment: - deployment: - user_email: "user_email" - address: "address" - resource_uri: - - "resource_uri" - - "resource_uri" - undeploy_time: "2000-01-23T04:56:07.000+00:00" - deploy_time: "2000-01-23T04:56:07.000+00:00" - config: "config" - platform: {} - - discovered: - discovered: - last_analysis_time: "2000-01-23T04:56:07.000+00:00" - analysis_status: {} - continuous_analysis: {} - analysis_status_error: - code: 1 - details: - - value: "value" - type_url: "type_url" - - value: "value" - type_url: "type_url" - message: "message" - attestation: - attestation: - pgp_signed_attestation: - content_type: {} - signature: "signature" - pgp_key_id: "pgp_key_id" - generic_signed_attestation: - content_type: {} - serialized_payload: "serialized_payload" - signatures: - - signature: "signature" - public_key_id: "public_key_id" - - signature: "signature" - public_key_id: "public_key_id" - create_time: "2000-01-23T04:56:07.000+00:00" - resource: - name: "name" - content_hash: - type: {} - value: "value" - uri: "uri" - kind: {} - vulnerability: - severity: {} - short_description: "short_description" - cvss_score: 0.8008282 - long_description: "long_description" - related_urls: - - label: "label" - url: "url" - - label: "label" - url: "url" - type: "type" - package_issue: - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - affected_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - affected_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - remediation: "remediation" - update_time: "2000-01-23T04:56:07.000+00:00" - build: - provenance: - creator: "creator" - create_time: "2000-01-23T04:56:07.000+00:00" - trigger_id: "trigger_id" - end_time: "2000-01-23T04:56:07.000+00:00" - built_artifacts: - - names: - - "names" - - "names" - checksum: "checksum" - id: "id" - - names: - - "names" - - "names" - checksum: "checksum" - id: "id" - logs_uri: "logs_uri" - builder_version: "builder_version" - source_provenance: - artifact_storage_source_uri: "artifact_storage_source_uri" - additional_contexts: - - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - file_hashes: - key: - file_hash: - - type: {} - value: "value" - - type: {} - value: "value" - context: - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - start_time: "2000-01-23T04:56:07.000+00:00" - project_id: "project_id" - id: "id" - commands: - - args: - - "args" - - "args" - name: "name" - id: "id" - wait_for: - - "wait_for" - - "wait_for" - env: - - "env" - - "env" - dir: "dir" - - args: - - "args" - - "args" - name: "name" - id: "id" - wait_for: - - "wait_for" - - "wait_for" - env: - - "env" - - "env" - dir: "dir" - build_options: - key: "build_options" - provenance_bytes: "provenance_bytes" - installation: - installation: - name: "name" - location: - - path: "path" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - - path: "path" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - name: "name" - derived_image: - derived_image: - distance: 6 - base_resource_url: "base_resource_url" - fingerprint: - v2_name: "v2_name" - v1_name: "v1_name" - v2_blob: - - "v2_blob" - - "v2_blob" - layer_info: - - arguments: "arguments" - directive: {} - - arguments: "arguments" - directive: {} - note_name: "note_name" - deployment: - deployment: - user_email: "user_email" - address: "address" - resource_uri: - - "resource_uri" - - "resource_uri" - undeploy_time: "2000-01-23T04:56:07.000+00:00" - deploy_time: "2000-01-23T04:56:07.000+00:00" - config: "config" - platform: {} - next_page_token: "next_page_token" - v1beta1ListNotesResponse: - type: "object" - properties: - notes: - type: "array" - description: "The notes requested." - items: - $ref: "#/definitions/v1beta1Note" - next_page_token: - type: "string" - description: "The next pagination token in the list response. It should be\ - \ used as\n`page_token` for the following request. An empty value means\ - \ no more\nresults." - description: "Response for listing notes." - example: - notes: - - attestation_authority: - hint: - human_readable_name: "human_readable_name" - short_description: "short_description" - related_note_names: - - "related_note_names" - - "related_note_names" - package: - name: "name" - distribution: - - latest_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - cpe_uri: "cpe_uri" - description: "description" - maintainer: "maintainer" - url: "url" - architecture: {} - - latest_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - cpe_uri: "cpe_uri" - description: "description" - maintainer: "maintainer" - url: "url" - architecture: {} - create_time: "2000-01-23T04:56:07.000+00:00" - kind: {} - related_url: - - label: "label" - url: "url" - - label: "label" - url: "url" - expiration_time: "2000-01-23T04:56:07.000+00:00" - long_description: "long_description" - vulnerability: - severity: {} - cvss_score: 0.8008282 - cvss_v3: - attack_complexity: {} - base_score: 1.4658129 - user_interaction: {} - scope: {} - impact_score: 5.637377 - confidentiality_impact: {} - attack_vector: {} - exploitability_score: 5.962134 - privileges_required: {} - details: - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - package: "package" - cpe_uri: "cpe_uri" - max_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - description: "description" - min_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - package_type: "package_type" - is_obsolete: true - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - package: "package" - cpe_uri: "cpe_uri" - max_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - description: "description" - min_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - package_type: "package_type" - is_obsolete: true - windows_details: - - cpe_uri: "cpe_uri" - fixing_kbs: - - name: "name" - url: "url" - - name: "name" - url: "url" - name: "name" - description: "description" - - cpe_uri: "cpe_uri" - fixing_kbs: - - name: "name" - url: "url" - - name: "name" - url: "url" - name: "name" - description: "description" - update_time: "2000-01-23T04:56:07.000+00:00" - base_image: - resource_url: "resource_url" - fingerprint: - v2_name: "v2_name" - v1_name: "v1_name" - v2_blob: - - "v2_blob" - - "v2_blob" - deployable: - resource_uri: - - "resource_uri" - - "resource_uri" - build: - signature: - public_key: "public_key" - key_type: {} - signature: "signature" - key_id: "key_id" - builder_version: "builder_version" - discovery: {} - name: "name" - - attestation_authority: - hint: - human_readable_name: "human_readable_name" - short_description: "short_description" - related_note_names: - - "related_note_names" - - "related_note_names" - package: - name: "name" - distribution: - - latest_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - cpe_uri: "cpe_uri" - description: "description" - maintainer: "maintainer" - url: "url" - architecture: {} - - latest_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - cpe_uri: "cpe_uri" - description: "description" - maintainer: "maintainer" - url: "url" - architecture: {} - create_time: "2000-01-23T04:56:07.000+00:00" - kind: {} - related_url: - - label: "label" - url: "url" - - label: "label" - url: "url" - expiration_time: "2000-01-23T04:56:07.000+00:00" - long_description: "long_description" - vulnerability: - severity: {} - cvss_score: 0.8008282 - cvss_v3: - attack_complexity: {} - base_score: 1.4658129 - user_interaction: {} - scope: {} - impact_score: 5.637377 - confidentiality_impact: {} - attack_vector: {} - exploitability_score: 5.962134 - privileges_required: {} - details: - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - package: "package" - cpe_uri: "cpe_uri" - max_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - description: "description" - min_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - package_type: "package_type" - is_obsolete: true - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - package: "package" - cpe_uri: "cpe_uri" - max_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - description: "description" - min_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - package_type: "package_type" - is_obsolete: true - windows_details: - - cpe_uri: "cpe_uri" - fixing_kbs: - - name: "name" - url: "url" - - name: "name" - url: "url" - name: "name" - description: "description" - - cpe_uri: "cpe_uri" - fixing_kbs: - - name: "name" - url: "url" - - name: "name" - url: "url" - name: "name" - description: "description" - update_time: "2000-01-23T04:56:07.000+00:00" - base_image: - resource_url: "resource_url" - fingerprint: - v2_name: "v2_name" - v1_name: "v1_name" - v2_blob: - - "v2_blob" - - "v2_blob" - deployable: - resource_uri: - - "resource_uri" - - "resource_uri" - build: - signature: - public_key: "public_key" - key_type: {} - signature: "signature" - key_id: "key_id" - builder_version: "builder_version" - discovery: {} - name: "name" - next_page_token: "next_page_token" - v1beta1ListOccurrencesResponse: - type: "object" - properties: - occurrences: - type: "array" - description: "The occurrences requested." - items: - $ref: "#/definitions/v1beta1Occurrence" - next_page_token: - type: "string" - description: "The next pagination token in the list response. It should be\ - \ used as\n`page_token` for the following request. An empty value means\ - \ no more\nresults." - description: "Response for listing occurrences." - example: - occurrences: - - discovered: - discovered: - last_analysis_time: "2000-01-23T04:56:07.000+00:00" - analysis_status: {} - continuous_analysis: {} - analysis_status_error: - code: 1 - details: - - value: "value" - type_url: "type_url" - - value: "value" - type_url: "type_url" - message: "message" - attestation: - attestation: - pgp_signed_attestation: - content_type: {} - signature: "signature" - pgp_key_id: "pgp_key_id" - generic_signed_attestation: - content_type: {} - serialized_payload: "serialized_payload" - signatures: - - signature: "signature" - public_key_id: "public_key_id" - - signature: "signature" - public_key_id: "public_key_id" - create_time: "2000-01-23T04:56:07.000+00:00" - resource: - name: "name" - content_hash: - type: {} - value: "value" - uri: "uri" - kind: {} - vulnerability: - severity: {} - short_description: "short_description" - cvss_score: 0.8008282 - long_description: "long_description" - related_urls: - - label: "label" - url: "url" - - label: "label" - url: "url" - type: "type" - package_issue: - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - affected_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - affected_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - remediation: "remediation" - update_time: "2000-01-23T04:56:07.000+00:00" - build: - provenance: - creator: "creator" - create_time: "2000-01-23T04:56:07.000+00:00" - trigger_id: "trigger_id" - end_time: "2000-01-23T04:56:07.000+00:00" - built_artifacts: - - names: - - "names" - - "names" - checksum: "checksum" - id: "id" - - names: - - "names" - - "names" - checksum: "checksum" - id: "id" - logs_uri: "logs_uri" - builder_version: "builder_version" - source_provenance: - artifact_storage_source_uri: "artifact_storage_source_uri" - additional_contexts: - - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - file_hashes: - key: - file_hash: - - type: {} - value: "value" - - type: {} - value: "value" - context: - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - start_time: "2000-01-23T04:56:07.000+00:00" - project_id: "project_id" - id: "id" - commands: - - args: - - "args" - - "args" - name: "name" - id: "id" - wait_for: - - "wait_for" - - "wait_for" - env: - - "env" - - "env" - dir: "dir" - - args: - - "args" - - "args" - name: "name" - id: "id" - wait_for: - - "wait_for" - - "wait_for" - env: - - "env" - - "env" - dir: "dir" - build_options: - key: "build_options" - provenance_bytes: "provenance_bytes" - installation: - installation: - name: "name" - location: - - path: "path" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - - path: "path" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - name: "name" - derived_image: - derived_image: - distance: 6 - base_resource_url: "base_resource_url" - fingerprint: - v2_name: "v2_name" - v1_name: "v1_name" - v2_blob: - - "v2_blob" - - "v2_blob" - layer_info: - - arguments: "arguments" - directive: {} - - arguments: "arguments" - directive: {} - note_name: "note_name" - deployment: - deployment: - user_email: "user_email" - address: "address" - resource_uri: - - "resource_uri" - - "resource_uri" - undeploy_time: "2000-01-23T04:56:07.000+00:00" - deploy_time: "2000-01-23T04:56:07.000+00:00" - config: "config" - platform: {} - - discovered: - discovered: - last_analysis_time: "2000-01-23T04:56:07.000+00:00" - analysis_status: {} - continuous_analysis: {} - analysis_status_error: - code: 1 - details: - - value: "value" - type_url: "type_url" - - value: "value" - type_url: "type_url" - message: "message" - attestation: - attestation: - pgp_signed_attestation: - content_type: {} - signature: "signature" - pgp_key_id: "pgp_key_id" - generic_signed_attestation: - content_type: {} - serialized_payload: "serialized_payload" - signatures: - - signature: "signature" - public_key_id: "public_key_id" - - signature: "signature" - public_key_id: "public_key_id" - create_time: "2000-01-23T04:56:07.000+00:00" - resource: - name: "name" - content_hash: - type: {} - value: "value" - uri: "uri" - kind: {} - vulnerability: - severity: {} - short_description: "short_description" - cvss_score: 0.8008282 - long_description: "long_description" - related_urls: - - label: "label" - url: "url" - - label: "label" - url: "url" - type: "type" - package_issue: - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - affected_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - affected_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - remediation: "remediation" - update_time: "2000-01-23T04:56:07.000+00:00" - build: - provenance: - creator: "creator" - create_time: "2000-01-23T04:56:07.000+00:00" - trigger_id: "trigger_id" - end_time: "2000-01-23T04:56:07.000+00:00" - built_artifacts: - - names: - - "names" - - "names" - checksum: "checksum" - id: "id" - - names: - - "names" - - "names" - checksum: "checksum" - id: "id" - logs_uri: "logs_uri" - builder_version: "builder_version" - source_provenance: - artifact_storage_source_uri: "artifact_storage_source_uri" - additional_contexts: - - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - file_hashes: - key: - file_hash: - - type: {} - value: "value" - - type: {} - value: "value" - context: - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - start_time: "2000-01-23T04:56:07.000+00:00" - project_id: "project_id" - id: "id" - commands: - - args: - - "args" - - "args" - name: "name" - id: "id" - wait_for: - - "wait_for" - - "wait_for" - env: - - "env" - - "env" - dir: "dir" - - args: - - "args" - - "args" - name: "name" - id: "id" - wait_for: - - "wait_for" - - "wait_for" - env: - - "env" - - "env" - dir: "dir" - build_options: - key: "build_options" - provenance_bytes: "provenance_bytes" - installation: - installation: - name: "name" - location: - - path: "path" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - - path: "path" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - name: "name" - derived_image: - derived_image: - distance: 6 - base_resource_url: "base_resource_url" - fingerprint: - v2_name: "v2_name" - v1_name: "v1_name" - v2_blob: - - "v2_blob" - - "v2_blob" - layer_info: - - arguments: "arguments" - directive: {} - - arguments: "arguments" - directive: {} - note_name: "note_name" - deployment: - deployment: - user_email: "user_email" - address: "address" - resource_uri: - - "resource_uri" - - "resource_uri" - undeploy_time: "2000-01-23T04:56:07.000+00:00" - deploy_time: "2000-01-23T04:56:07.000+00:00" - config: "config" - platform: {} - next_page_token: "next_page_token" - v1beta1Note: - type: "object" - properties: - name: - type: "string" - description: "Output only. The name of the note in the form of\n`projects/[PROVIDER_ID]/notes/[NOTE_ID]`." - readOnly: true - short_description: - type: "string" - description: "A one sentence description of this note." - long_description: - type: "string" - description: "A detailed description of this note." - kind: - description: "Output only. The type of analysis. This field can be used as\ - \ a filter in\nlist requests." - readOnly: true - $ref: "#/definitions/v1beta1NoteKind" - related_url: - type: "array" - description: "URLs associated with this note." - items: - $ref: "#/definitions/v1beta1RelatedUrl" - expiration_time: - type: "string" - format: "date-time" - description: "Time of expiration for this note. Empty if note does not expire." - create_time: - type: "string" - format: "date-time" - description: "Output only. The time this note was created. This field can\ - \ be used as a\nfilter in list requests." - readOnly: true - update_time: - type: "string" - format: "date-time" - description: "Output only. The time this note was last updated. This field\ - \ can be used as\na filter in list requests." - readOnly: true - related_note_names: - type: "array" - description: "Other notes related to this note." - items: - type: "string" - vulnerability: - description: "A note describing a package vulnerability." - $ref: "#/definitions/vulnerabilityVulnerability" - build: - description: "A note describing build provenance for a verifiable build." - $ref: "#/definitions/buildBuild" - base_image: - description: "A note describing a base image." - $ref: "#/definitions/imageBasis" - package: - description: "A note describing a package hosted by various package managers." - $ref: "#/definitions/packagePackage" - deployable: - description: "A note describing something that can be deployed." - $ref: "#/definitions/deploymentDeployable" - discovery: - description: "A note describing the initial analysis of a resource." - $ref: "#/definitions/discoveryDiscovery" - attestation_authority: - description: "A note describing an attestation role." - $ref: "#/definitions/attestationAuthority" - description: "A type of analysis that can be done for a resource." - example: - attestation_authority: - hint: - human_readable_name: "human_readable_name" - short_description: "short_description" - related_note_names: - - "related_note_names" - - "related_note_names" - package: - name: "name" - distribution: - - latest_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - cpe_uri: "cpe_uri" - description: "description" - maintainer: "maintainer" - url: "url" - architecture: {} - - latest_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - cpe_uri: "cpe_uri" - description: "description" - maintainer: "maintainer" - url: "url" - architecture: {} - create_time: "2000-01-23T04:56:07.000+00:00" - kind: {} - related_url: - - label: "label" - url: "url" - - label: "label" - url: "url" - expiration_time: "2000-01-23T04:56:07.000+00:00" - long_description: "long_description" - vulnerability: - severity: {} - cvss_score: 0.8008282 - cvss_v3: - attack_complexity: {} - base_score: 1.4658129 - user_interaction: {} - scope: {} - impact_score: 5.637377 - confidentiality_impact: {} - attack_vector: {} - exploitability_score: 5.962134 - privileges_required: {} - details: - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - package: "package" - cpe_uri: "cpe_uri" - max_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - description: "description" - min_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - package_type: "package_type" - is_obsolete: true - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - package: "package" - cpe_uri: "cpe_uri" - max_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - description: "description" - min_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - package_type: "package_type" - is_obsolete: true - windows_details: - - cpe_uri: "cpe_uri" - fixing_kbs: - - name: "name" - url: "url" - - name: "name" - url: "url" - name: "name" - description: "description" - - cpe_uri: "cpe_uri" - fixing_kbs: - - name: "name" - url: "url" - - name: "name" - url: "url" - name: "name" - description: "description" - update_time: "2000-01-23T04:56:07.000+00:00" - base_image: - resource_url: "resource_url" - fingerprint: - v2_name: "v2_name" - v1_name: "v1_name" - v2_blob: - - "v2_blob" - - "v2_blob" - deployable: - resource_uri: - - "resource_uri" - - "resource_uri" - build: - signature: - public_key: "public_key" - key_type: {} - signature: "signature" - key_id: "key_id" - builder_version: "builder_version" - discovery: {} - name: "name" - v1beta1NoteKind: - type: "string" - description: "Kind represents the kinds of notes supported.\n\n - NOTE_KIND_UNSPECIFIED:\ - \ Unknown.\n - VULNERABILITY: The note and occurrence represent a package vulnerability.\n\ - \ - BUILD: The note and occurrence assert build provenance.\n - IMAGE: This\ - \ represents an image basis relationship.\n - PACKAGE: This represents a package\ - \ installed via a package manager.\n - DEPLOYMENT: The note and occurrence track\ - \ deployment events.\n - DISCOVERY: The note and occurrence track the initial\ - \ discovery status of a resource.\n - ATTESTATION: This represents a logical\ - \ \"role\" that can attest to artifacts." - enum: - - "NOTE_KIND_UNSPECIFIED" - - "VULNERABILITY" - - "BUILD" - - "IMAGE" - - "PACKAGE" - - "DEPLOYMENT" - - "DISCOVERY" - - "ATTESTATION" - default: "NOTE_KIND_UNSPECIFIED" - v1beta1Occurrence: - type: "object" - properties: - name: - type: "string" - description: "Output only. The name of the occurrence in the form of\n`projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`." - readOnly: true - resource: - description: "Required. Immutable. The resource for which the occurrence applies." - $ref: "#/definitions/v1beta1Resource" - note_name: - type: "string" - description: "Required. Immutable. The analysis note associated with this\ - \ occurrence, in\nthe form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.\ - \ This field can be\nused as a filter in list requests." - kind: - description: "Output only. This explicitly denotes which of the occurrence\ - \ details are\nspecified. This field can be used as a filter in list requests." - readOnly: true - $ref: "#/definitions/v1beta1NoteKind" - remediation: - type: "string" - description: "A description of actions that can be taken to remedy the note." - create_time: - type: "string" - format: "date-time" - description: "Output only. The time this occurrence was created." - readOnly: true - update_time: - type: "string" - format: "date-time" - description: "Output only. The time this occurrence was last updated." - readOnly: true - vulnerability: - description: "Describes a security vulnerability." - $ref: "#/definitions/v1beta1vulnerabilityDetails" - build: - description: "Describes a verifiable build." - $ref: "#/definitions/v1beta1buildDetails" - derived_image: - description: "Describes how this resource derives from the basis in the associated\n\ - note." - $ref: "#/definitions/v1beta1imageDetails" - installation: - description: "Describes the installation of a package on the linked resource." - $ref: "#/definitions/v1beta1packageDetails" - deployment: - description: "Describes the deployment of an artifact on a runtime." - $ref: "#/definitions/v1beta1deploymentDetails" - discovered: - description: "Describes when a resource was discovered." - $ref: "#/definitions/v1beta1discoveryDetails" - attestation: - description: "Describes an attestation of an artifact." - $ref: "#/definitions/v1beta1attestationDetails" - description: "An instance of an analysis type that has been found on a resource." - example: - discovered: - discovered: - last_analysis_time: "2000-01-23T04:56:07.000+00:00" - analysis_status: {} - continuous_analysis: {} - analysis_status_error: - code: 1 - details: - - value: "value" - type_url: "type_url" - - value: "value" - type_url: "type_url" - message: "message" - attestation: - attestation: - pgp_signed_attestation: - content_type: {} - signature: "signature" - pgp_key_id: "pgp_key_id" - generic_signed_attestation: - content_type: {} - serialized_payload: "serialized_payload" - signatures: - - signature: "signature" - public_key_id: "public_key_id" - - signature: "signature" - public_key_id: "public_key_id" - create_time: "2000-01-23T04:56:07.000+00:00" - resource: - name: "name" - content_hash: - type: {} - value: "value" - uri: "uri" - kind: {} - vulnerability: - severity: {} - short_description: "short_description" - cvss_score: 0.8008282 - long_description: "long_description" - related_urls: - - label: "label" - url: "url" - - label: "label" - url: "url" - type: "type" - package_issue: - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - affected_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - affected_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - remediation: "remediation" - update_time: "2000-01-23T04:56:07.000+00:00" - build: - provenance: - creator: "creator" - create_time: "2000-01-23T04:56:07.000+00:00" - trigger_id: "trigger_id" - end_time: "2000-01-23T04:56:07.000+00:00" - built_artifacts: - - names: - - "names" - - "names" - checksum: "checksum" - id: "id" - - names: - - "names" - - "names" - checksum: "checksum" - id: "id" - logs_uri: "logs_uri" - builder_version: "builder_version" - source_provenance: - artifact_storage_source_uri: "artifact_storage_source_uri" - additional_contexts: - - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - file_hashes: - key: - file_hash: - - type: {} - value: "value" - - type: {} - value: "value" - context: - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - start_time: "2000-01-23T04:56:07.000+00:00" - project_id: "project_id" - id: "id" - commands: - - args: - - "args" - - "args" - name: "name" - id: "id" - wait_for: - - "wait_for" - - "wait_for" - env: - - "env" - - "env" - dir: "dir" - - args: - - "args" - - "args" - name: "name" - id: "id" - wait_for: - - "wait_for" - - "wait_for" - env: - - "env" - - "env" - dir: "dir" - build_options: - key: "build_options" - provenance_bytes: "provenance_bytes" - installation: - installation: - name: "name" - location: - - path: "path" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - - path: "path" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - name: "name" - derived_image: - derived_image: - distance: 6 - base_resource_url: "base_resource_url" - fingerprint: - v2_name: "v2_name" - v1_name: "v1_name" - v2_blob: - - "v2_blob" - - "v2_blob" - layer_info: - - arguments: "arguments" - directive: {} - - arguments: "arguments" - directive: {} - note_name: "note_name" - deployment: - deployment: - user_email: "user_email" - address: "address" - resource_uri: - - "resource_uri" - - "resource_uri" - undeploy_time: "2000-01-23T04:56:07.000+00:00" - deploy_time: "2000-01-23T04:56:07.000+00:00" - config: "config" - platform: {} - v1beta1RelatedUrl: - type: "object" - properties: - url: - type: "string" - description: "Specific URL associated with the resource." - label: - type: "string" - description: "Label to describe usage of the URL." - description: "Metadata for any related URL information." - example: - label: "label" - url: "url" - v1beta1Resource: - type: "object" - properties: - name: - type: "string" - description: "Deprecated, do not use. Use uri instead.\n\nThe name of the\ - \ resource. For example, the name of a Docker image -\n\"Debian\"." - uri: - type: "string" - description: "Required. The unique URI of the resource. For example,\n`https://gcr.io/project/image@sha256:foo`\ - \ for a Docker image." - content_hash: - description: "Deprecated, do not use. Use uri instead.\n\nThe hash of the\ - \ resource content. For example, the Docker digest." - $ref: "#/definitions/provenanceHash" - description: "An entity that can have metadata. For example, a Docker image." - example: - name: "name" - content_hash: - type: {} - value: "value" - uri: "uri" - v1beta1Signature: - type: "object" - properties: - signature: - type: "string" - format: "byte" - description: "The content of the signature, an opaque bytestring.\nThe payload\ - \ that this signature verifies MUST be unambiguously provided\nwith the\ - \ Signature during verification. A wrapper message might provide\nthe payload\ - \ explicitly. Alternatively, a message might have a canonical\nserialization\ - \ that can always be unambiguously computed to derive the\npayload." - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" - public_key_id: - type: "string" - description: "The identifier for the public key that verifies this signature.\n\ - \ * The `public_key_id` is required.\n * The `public_key_id` MUST be an\ - \ RFC3986 conformant URI.\n * When possible, the `public_key_id` SHOULD\ - \ be an immutable reference,\n such as a cryptographic digest.\n\nExamples\ - \ of valid `public_key_id`s:\n\nOpenPGP V4 public key fingerprint:\n *\ - \ \"openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA\"\nSee https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr\ - \ for more\ndetails on this scheme.\n\nRFC6920 digest-named SubjectPublicKeyInfo\ - \ (digest of the DER\nserialization):\n * \"ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU\"\ - \n * \"nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5\"" - description: "Verifiers (e.g. Kritis implementations) MUST verify signatures\n\ - with respect to the trust anchors defined in policy (e.g. a Kritis policy).\n\ - Typically this means that the verifier has been configured with a map from\n\ - `public_key_id` to public key material (and any required parameters, e.g.\n\ - signing algorithm).\n\nIn particular, verification implementations MUST NOT\ - \ treat the signature\n`public_key_id` as anything more than a key lookup hint.\ - \ The `public_key_id`\nDOES NOT validate or authenticate a public key; it only\ - \ provides a mechanism\nfor quickly selecting a public key ALREADY CONFIGURED\ - \ on the verifier through\na trusted channel. Verification implementations MUST\ - \ reject signatures in any\nof the following circumstances:\n * The `public_key_id`\ - \ is not recognized by the verifier.\n * The public key that `public_key_id`\ - \ refers to does not verify the\n signature with respect to the payload.\n\ - \nThe `signature` contents SHOULD NOT be \"attached\" (where the payload is\n\ - included with the serialized `signature` bytes). Verifiers MUST ignore any\n\ - \"attached\" payload and only verify signatures with respect to explicitly\n\ - provided payload (e.g. a `payload` field on the proto message that holds\nthis\ - \ Signature, or the canonical serialization of the proto message that\nholds\ - \ this signature)." - example: - signature: "signature" - public_key_id: "public_key_id" - v1beta1VulnerabilityOccurrencesSummary: - type: "object" - properties: - counts: - type: "array" - description: "A listing by resource of the number of fixable and total vulnerabilities." - items: - $ref: "#/definitions/VulnerabilityOccurrencesSummaryFixableTotalByDigest" - description: "A summary of how many vulnerability occurrences there are per resource\ - \ and\nseverity type." - example: - counts: - - severity: {} - resource: - name: "name" - content_hash: - type: {} - value: "value" - uri: "uri" - total_count: "total_count" - fixable_count: "fixable_count" - - severity: {} - resource: - name: "name" - content_hash: - type: {} - value: "value" - uri: "uri" - total_count: "total_count" - fixable_count: "fixable_count" - v1beta1attestationDetails: - type: "object" - properties: - attestation: - description: "Required. Attestation for the resource." - $ref: "#/definitions/attestationAttestation" - description: "Details of an attestation occurrence." - example: - attestation: - pgp_signed_attestation: - content_type: {} - signature: "signature" - pgp_key_id: "pgp_key_id" - generic_signed_attestation: - content_type: {} - serialized_payload: "serialized_payload" - signatures: - - signature: "signature" - public_key_id: "public_key_id" - - signature: "signature" - public_key_id: "public_key_id" - v1beta1buildDetails: - type: "object" - properties: - provenance: - description: "Required. The actual provenance for the build." - $ref: "#/definitions/provenanceBuildProvenance" - provenance_bytes: - type: "string" - description: "Serialized JSON representation of the provenance, used in generating\ - \ the\nbuild signature in the corresponding build note. After verifying\ - \ the\nsignature, `provenance_bytes` can be unmarshalled and compared to\ - \ the\nprovenance to confirm that it is unchanged. A base64-encoded string\n\ - representation of the provenance bytes is used for the signature in order\n\ - to interoperate with openssl which expects this format for signature\nverification.\n\ - \nThe serialized form is captured both to avoid ambiguity in how the\nprovenance\ - \ is marshalled to json as well to prevent incompatibilities with\nfuture\ - \ changes." - description: "Details of a build occurrence." - example: - provenance: - creator: "creator" - create_time: "2000-01-23T04:56:07.000+00:00" - trigger_id: "trigger_id" - end_time: "2000-01-23T04:56:07.000+00:00" - built_artifacts: - - names: - - "names" - - "names" - checksum: "checksum" - id: "id" - - names: - - "names" - - "names" - checksum: "checksum" - id: "id" - logs_uri: "logs_uri" - builder_version: "builder_version" - source_provenance: - artifact_storage_source_uri: "artifact_storage_source_uri" - additional_contexts: - - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - file_hashes: - key: - file_hash: - - type: {} - value: "value" - - type: {} - value: "value" - context: - git: - url: "url" - revision_id: "revision_id" - cloud_repo: - repo_id: - uid: "uid" - project_repo_id: - project_id: "project_id" - repo_name: "repo_name" - alias_context: - kind: {} - name: "name" - revision_id: "revision_id" - gerrit: - gerrit_project: "gerrit_project" - alias_context: - kind: {} - name: "name" - host_uri: "host_uri" - revision_id: "revision_id" - labels: - key: "labels" - start_time: "2000-01-23T04:56:07.000+00:00" - project_id: "project_id" - id: "id" - commands: - - args: - - "args" - - "args" - name: "name" - id: "id" - wait_for: - - "wait_for" - - "wait_for" - env: - - "env" - - "env" - dir: "dir" - - args: - - "args" - - "args" - name: "name" - id: "id" - wait_for: - - "wait_for" - - "wait_for" - env: - - "env" - - "env" - dir: "dir" - build_options: - key: "build_options" - provenance_bytes: "provenance_bytes" - v1beta1deploymentDetails: - type: "object" - properties: - deployment: - description: "Required. Deployment history for the resource." - $ref: "#/definitions/deploymentDeployment" - description: "Details of a deployment occurrence." - example: - deployment: - user_email: "user_email" - address: "address" - resource_uri: - - "resource_uri" - - "resource_uri" - undeploy_time: "2000-01-23T04:56:07.000+00:00" - deploy_time: "2000-01-23T04:56:07.000+00:00" - config: "config" - platform: {} - v1beta1discoveryDetails: - type: "object" - properties: - discovered: - description: "Required. Analysis status for the discovered resource." - $ref: "#/definitions/discoveryDiscovered" - description: "Details of a discovery occurrence." - example: - discovered: - last_analysis_time: "2000-01-23T04:56:07.000+00:00" - analysis_status: {} - continuous_analysis: {} - analysis_status_error: - code: 1 - details: - - value: "value" - type_url: "type_url" - - value: "value" - type_url: "type_url" - message: "message" - v1beta1imageDetails: - type: "object" - properties: - derived_image: - description: "Required. Immutable. The child image derived from the base image." - $ref: "#/definitions/imageDerived" - description: "Details of an image occurrence." - example: - derived_image: - distance: 6 - base_resource_url: "base_resource_url" - fingerprint: - v2_name: "v2_name" - v1_name: "v1_name" - v2_blob: - - "v2_blob" - - "v2_blob" - layer_info: - - arguments: "arguments" - directive: {} - - arguments: "arguments" - directive: {} - v1beta1packageDetails: - type: "object" - properties: - installation: - description: "Required. Where the package was installed." - $ref: "#/definitions/packageInstallation" - description: "Details of a package occurrence." - example: - installation: - name: "name" - location: - - path: "path" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - - path: "path" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - v1beta1packageLocation: - type: "object" - properties: - cpe_uri: - type: "string" - description: "Required. The CPE URI in [CPE format](https://cpe.mitre.org/specification/)\n\ - denoting the package manager version distributing a package." - version: - description: "The version installed at this location." - $ref: "#/definitions/packageVersion" - path: - type: "string" - description: "The path from which we gathered that this package/version is\ - \ installed." - description: "An occurrence of a particular package installation found within\ - \ a system's\nfilesystem. E.g., glibc was found in `/var/lib/dpkg/status`." - example: - path: "path" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - v1beta1vulnerabilityDetails: - type: "object" - properties: - type: - type: "string" - title: "The type of package; whether native or non native(ruby gems, node.js\n\ - packages etc)" - severity: - description: "Output only. The note provider assigned Severity of the vulnerability." - readOnly: true - $ref: "#/definitions/vulnerabilitySeverity" - cvss_score: - type: "number" - format: "float" - description: "Output only. The CVSS score of this vulnerability. CVSS score\ - \ is on a\nscale of 0-10 where 0 indicates low severity and 10 indicates\ - \ high\nseverity." - readOnly: true - package_issue: - type: "array" - description: "Required. The set of affected locations and their fixes (if\ - \ available)\nwithin the associated resource." - items: - $ref: "#/definitions/vulnerabilityPackageIssue" - short_description: - type: "string" - description: "Output only. A one sentence description of this vulnerability." - readOnly: true - long_description: - type: "string" - description: "Output only. A detailed description of this vulnerability." - readOnly: true - related_urls: - type: "array" - description: "Output only. URLs related to this vulnerability." - readOnly: true - items: - $ref: "#/definitions/v1beta1RelatedUrl" - effective_severity: - description: "The distro assigned severity for this vulnerability when it\ - \ is\navailable, and note provider assigned severity when distro has not\ - \ yet\nassigned a severity for this vulnerability." - $ref: "#/definitions/vulnerabilitySeverity" - description: "Details of a vulnerability Occurrence." - example: - severity: {} - short_description: "short_description" - cvss_score: 0.8008282 - long_description: "long_description" - related_urls: - - label: "label" - url: "url" - - label: "label" - url: "url" - type: "type" - package_issue: - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - affected_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - affected_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - vulnerabilityCVSSv3: - type: "object" - properties: - base_score: - type: "number" - format: "float" - description: "The base score is a function of the base metric scores." - exploitability_score: - type: "number" - format: "float" - impact_score: - type: "number" - format: "float" - attack_vector: - description: "Base Metrics\nRepresents the intrinsic characteristics of a\ - \ vulnerability that are\nconstant over time and across user environments." - $ref: "#/definitions/CVSSv3AttackVector" - attack_complexity: - $ref: "#/definitions/CVSSv3AttackComplexity" - privileges_required: - $ref: "#/definitions/CVSSv3PrivilegesRequired" - user_interaction: - $ref: "#/definitions/CVSSv3UserInteraction" - scope: - $ref: "#/definitions/CVSSv3Scope" - confidentiality_impact: - $ref: "#/definitions/CVSSv3Impact" - integrity_impact: - $ref: "#/definitions/CVSSv3Impact" - availability_impact: - $ref: "#/definitions/CVSSv3Impact" - title: "Common Vulnerability Scoring System version 3.\nFor details, see https://www.first.org/cvss/specification-document" - example: - attack_complexity: {} - base_score: 1.4658129 - user_interaction: {} - scope: {} - impact_score: 5.637377 - confidentiality_impact: {} - attack_vector: {} - exploitability_score: 5.962134 - privileges_required: {} - vulnerabilityPackageIssue: - type: "object" - properties: - affected_location: - description: "Required. The location of the vulnerability." - $ref: "#/definitions/vulnerabilityVulnerabilityLocation" - fixed_location: - description: "The location of the available fix for vulnerability." - $ref: "#/definitions/vulnerabilityVulnerabilityLocation" - severity_name: - type: "string" - description: "Deprecated, use Details.effective_severity instead\nThe severity\ - \ (e.g., distro assigned severity) for this vulnerability." - description: "This message wraps a location affected by a vulnerability and its\n\ - associated fix (if one is available)." - example: - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - affected_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - vulnerabilitySeverity: - type: "string" - description: "Note provider-assigned severity/impact ranking.\n\n - SEVERITY_UNSPECIFIED:\ - \ Unknown.\n - MINIMAL: Minimal severity.\n - LOW: Low severity.\n - MEDIUM:\ - \ Medium severity.\n - HIGH: High severity.\n - CRITICAL: Critical severity." - enum: - - "SEVERITY_UNSPECIFIED" - - "MINIMAL" - - "LOW" - - "MEDIUM" - - "HIGH" - - "CRITICAL" - default: "SEVERITY_UNSPECIFIED" - vulnerabilityVulnerability: - type: "object" - properties: - cvss_score: - type: "number" - format: "float" - description: "The CVSS score for this vulnerability." - severity: - description: "Note provider assigned impact of the vulnerability." - $ref: "#/definitions/vulnerabilitySeverity" - details: - type: "array" - description: "All information about the package to specifically identify this\n\ - vulnerability. One entry per (version range and cpe_uri) the package\nvulnerability\ - \ has manifested in." - items: - $ref: "#/definitions/VulnerabilityDetail" - cvss_v3: - description: "The full description of the CVSSv3." - $ref: "#/definitions/vulnerabilityCVSSv3" - windows_details: - type: "array" - description: "Windows details get their own format because the information\ - \ format and\nmodel don't match a normal detail. Specifically Windows updates\ - \ are done as\npatches, thus Windows vulnerabilities really are a missing\ - \ package, rather\nthan a package being at an incorrect version." - items: - $ref: "#/definitions/VulnerabilityWindowsDetail" - description: "Vulnerability provides metadata about a security vulnerability in\ - \ a Note." - example: - severity: {} - cvss_score: 0.8008282 - cvss_v3: - attack_complexity: {} - base_score: 1.4658129 - user_interaction: {} - scope: {} - impact_score: 5.637377 - confidentiality_impact: {} - attack_vector: {} - exploitability_score: 5.962134 - privileges_required: {} - details: - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - package: "package" - cpe_uri: "cpe_uri" - max_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - description: "description" - min_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - package_type: "package_type" - is_obsolete: true - - fixed_location: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - package: "package" - cpe_uri: "cpe_uri" - max_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - description: "description" - min_affected_version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" - severity_name: "severity_name" - package_type: "package_type" - is_obsolete: true - windows_details: - - cpe_uri: "cpe_uri" - fixing_kbs: - - name: "name" - url: "url" - - name: "name" - url: "url" - name: "name" - description: "description" - - cpe_uri: "cpe_uri" - fixing_kbs: - - name: "name" - url: "url" - - name: "name" - url: "url" - name: "name" - description: "description" - vulnerabilityVulnerabilityLocation: - type: "object" - properties: - cpe_uri: - type: "string" - description: "Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/)\n\ - format. Examples include distro or storage location for vulnerable jar." - package: - type: "string" - description: "Required. The package being described." - version: - description: "Required. The version of the package being described." - $ref: "#/definitions/packageVersion" - description: "The location of the vulnerability." - example: - package: "package" - cpe_uri: "cpe_uri" - version: - kind: {} - name: "name" - epoch: 6 - revision: "revision" diff --git a/0.1.0/docs/PackageInstallation.md b/0.1.0/docs/PackageInstallation.md deleted file mode 100644 index 0589f78..0000000 --- a/0.1.0/docs/PackageInstallation.md +++ /dev/null @@ -1,11 +0,0 @@ -# PackageInstallation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Output only. The name of the installed package. | [optional] [default to null] -**Location** | [**[]V1beta1packageLocation**](v1beta1packageLocation.md) | Required. All of the places within the filesystem versions of this package have been found. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/0.1.0/docs/PackagePackage.md b/0.1.0/docs/PackagePackage.md deleted file mode 100644 index c250883..0000000 --- a/0.1.0/docs/PackagePackage.md +++ /dev/null @@ -1,11 +0,0 @@ -# PackagePackage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Required. Immutable. The name of the package. | [optional] [default to null] -**Distribution** | [**[]PackageDistribution**](packageDistribution.md) | The various channels by which a package is distributed. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/0.1.0/docs/ProtobufAny.md b/0.1.0/docs/ProtobufAny.md deleted file mode 100644 index b4b1a82..0000000 --- a/0.1.0/docs/ProtobufAny.md +++ /dev/null @@ -1,11 +0,0 @@ -# ProtobufAny - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**TypeUrl** | **string** | A URL/resource name whose content describes the type of the serialized protocol buffer message. For URLs which use the scheme `http`, `https`, or no scheme, the following restrictions and interpretations apply: * If no scheme is provided, `https` is assumed. * The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. | [optional] [default to null] -**Value** | **string** | Must be a valid serialized protocol buffer of the above specified type. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/0.1.0/docs/ProtobufFieldMask.md b/0.1.0/docs/ProtobufFieldMask.md deleted file mode 100644 index abf911d..0000000 --- a/0.1.0/docs/ProtobufFieldMask.md +++ /dev/null @@ -1,10 +0,0 @@ -# ProtobufFieldMask - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Paths** | **[]string** | The set of field mask paths. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/0.1.0/docs/V1beta1BatchCreateNotesRequest.md b/0.1.0/docs/V1beta1BatchCreateNotesRequest.md deleted file mode 100644 index e336062..0000000 --- a/0.1.0/docs/V1beta1BatchCreateNotesRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# V1beta1BatchCreateNotesRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Parent** | **string** | The name of the project in the form of `projects/[PROJECT_ID]`, under which the notes are to be created. | [optional] [default to null] -**Notes** | [**map[string]V1beta1Note**](v1beta1Note.md) | The notes to create. Max allowed length is 1000. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/0.1.0/docs/V1beta1BatchCreateOccurrencesRequest.md b/0.1.0/docs/V1beta1BatchCreateOccurrencesRequest.md deleted file mode 100644 index e772586..0000000 --- a/0.1.0/docs/V1beta1BatchCreateOccurrencesRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# V1beta1BatchCreateOccurrencesRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Parent** | **string** | The name of the project in the form of `projects/[PROJECT_ID]`, under which the occurrences are to be created. | [optional] [default to null] -**Occurrences** | [**[]V1beta1Occurrence**](v1beta1Occurrence.md) | The occurrences to create. Max allowed length is 1000. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/0.1.0/docs/VulnerabilityCvsSv3.md b/0.1.0/docs/VulnerabilityCvsSv3.md deleted file mode 100644 index eaf3297..0000000 --- a/0.1.0/docs/VulnerabilityCvsSv3.md +++ /dev/null @@ -1,20 +0,0 @@ -# VulnerabilityCvsSv3 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**BaseScore** | **float32** | The base score is a function of the base metric scores. | [optional] [default to null] -**ExploitabilityScore** | **float32** | | [optional] [default to null] -**ImpactScore** | **float32** | | [optional] [default to null] -**AttackVector** | [***CvsSv3AttackVector**](CVSSv3AttackVector.md) | Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments. | [optional] [default to null] -**AttackComplexity** | [***CvsSv3AttackComplexity**](CVSSv3AttackComplexity.md) | | [optional] [default to null] -**PrivilegesRequired** | [***CvsSv3PrivilegesRequired**](CVSSv3PrivilegesRequired.md) | | [optional] [default to null] -**UserInteraction** | [***CvsSv3UserInteraction**](CVSSv3UserInteraction.md) | | [optional] [default to null] -**Scope** | [***CvsSv3Scope**](CVSSv3Scope.md) | | [optional] [default to null] -**ConfidentialityImpact** | [***CvsSv3Impact**](CVSSv3Impact.md) | | [optional] [default to null] -**IntegrityImpact** | [***CvsSv3Impact**](CVSSv3Impact.md) | | [optional] [default to null] -**AvailabilityImpact** | [***CvsSv3Impact**](CVSSv3Impact.md) | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/0.1.0/model_cvs_sv3_attack_complexity.go b/0.1.0/model_cvs_sv3_attack_complexity.go deleted file mode 100644 index 63a8c37..0000000 --- a/0.1.0/model_cvs_sv3_attack_complexity.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * proto/v1beta1/grafeas.proto - * - * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) - * - * API version: version not set - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ - -package grafeas - -type CvsSv3AttackComplexity string - -// List of CVSSv3AttackComplexity -const ( - UNSPECIFIED_CvsSv3AttackComplexity CvsSv3AttackComplexity = "ATTACK_COMPLEXITY_UNSPECIFIED" - LOW_CvsSv3AttackComplexity CvsSv3AttackComplexity = "ATTACK_COMPLEXITY_LOW" - HIGH_CvsSv3AttackComplexity CvsSv3AttackComplexity = "ATTACK_COMPLEXITY_HIGH" -) diff --git a/0.1.0/model_cvs_sv3_attack_vector.go b/0.1.0/model_cvs_sv3_attack_vector.go deleted file mode 100644 index 94853cb..0000000 --- a/0.1.0/model_cvs_sv3_attack_vector.go +++ /dev/null @@ -1,21 +0,0 @@ -/* - * proto/v1beta1/grafeas.proto - * - * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) - * - * API version: version not set - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ - -package grafeas - -type CvsSv3AttackVector string - -// List of CVSSv3AttackVector -const ( - UNSPECIFIED_CvsSv3AttackVector CvsSv3AttackVector = "ATTACK_VECTOR_UNSPECIFIED" - NETWORK_CvsSv3AttackVector CvsSv3AttackVector = "ATTACK_VECTOR_NETWORK" - ADJACENT_CvsSv3AttackVector CvsSv3AttackVector = "ATTACK_VECTOR_ADJACENT" - LOCAL_CvsSv3AttackVector CvsSv3AttackVector = "ATTACK_VECTOR_LOCAL" - PHYSICAL_CvsSv3AttackVector CvsSv3AttackVector = "ATTACK_VECTOR_PHYSICAL" -) diff --git a/0.1.0/model_cvs_sv3_impact.go b/0.1.0/model_cvs_sv3_impact.go deleted file mode 100644 index 73e49f9..0000000 --- a/0.1.0/model_cvs_sv3_impact.go +++ /dev/null @@ -1,20 +0,0 @@ -/* - * proto/v1beta1/grafeas.proto - * - * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) - * - * API version: version not set - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ - -package grafeas - -type CvsSv3Impact string - -// List of CVSSv3Impact -const ( - UNSPECIFIED_CvsSv3Impact CvsSv3Impact = "IMPACT_UNSPECIFIED" - HIGH_CvsSv3Impact CvsSv3Impact = "IMPACT_HIGH" - LOW_CvsSv3Impact CvsSv3Impact = "IMPACT_LOW" - NONE_CvsSv3Impact CvsSv3Impact = "IMPACT_NONE" -) diff --git a/0.1.0/model_cvs_sv3_privileges_required.go b/0.1.0/model_cvs_sv3_privileges_required.go deleted file mode 100644 index 726c05a..0000000 --- a/0.1.0/model_cvs_sv3_privileges_required.go +++ /dev/null @@ -1,20 +0,0 @@ -/* - * proto/v1beta1/grafeas.proto - * - * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) - * - * API version: version not set - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ - -package grafeas - -type CvsSv3PrivilegesRequired string - -// List of CVSSv3PrivilegesRequired -const ( - UNSPECIFIED_CvsSv3PrivilegesRequired CvsSv3PrivilegesRequired = "PRIVILEGES_REQUIRED_UNSPECIFIED" - NONE_CvsSv3PrivilegesRequired CvsSv3PrivilegesRequired = "PRIVILEGES_REQUIRED_NONE" - LOW_CvsSv3PrivilegesRequired CvsSv3PrivilegesRequired = "PRIVILEGES_REQUIRED_LOW" - HIGH_CvsSv3PrivilegesRequired CvsSv3PrivilegesRequired = "PRIVILEGES_REQUIRED_HIGH" -) diff --git a/0.1.0/model_cvs_sv3_user_interaction.go b/0.1.0/model_cvs_sv3_user_interaction.go deleted file mode 100644 index ff81298..0000000 --- a/0.1.0/model_cvs_sv3_user_interaction.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * proto/v1beta1/grafeas.proto - * - * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) - * - * API version: version not set - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ - -package grafeas - -type CvsSv3UserInteraction string - -// List of CVSSv3UserInteraction -const ( - UNSPECIFIED_CvsSv3UserInteraction CvsSv3UserInteraction = "USER_INTERACTION_UNSPECIFIED" - NONE_CvsSv3UserInteraction CvsSv3UserInteraction = "USER_INTERACTION_NONE" - REQUIRED_CvsSv3UserInteraction CvsSv3UserInteraction = "USER_INTERACTION_REQUIRED" -) diff --git a/0.1.0/model_package_installation.go b/0.1.0/model_package_installation.go deleted file mode 100644 index afe12d4..0000000 --- a/0.1.0/model_package_installation.go +++ /dev/null @@ -1,18 +0,0 @@ -/* - * proto/v1beta1/grafeas.proto - * - * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) - * - * API version: version not set - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ - -package grafeas - -// This represents how a particular software package may be installed on a system. -type PackageInstallation struct { - // Output only. The name of the installed package. - Name string `json:"name,omitempty"` - // Required. All of the places within the filesystem versions of this package have been found. - Location []V1beta1packageLocation `json:"location,omitempty"` -} diff --git a/0.1.0/model_package_package.go b/0.1.0/model_package_package.go deleted file mode 100644 index 17f8b67..0000000 --- a/0.1.0/model_package_package.go +++ /dev/null @@ -1,18 +0,0 @@ -/* - * proto/v1beta1/grafeas.proto - * - * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) - * - * API version: version not set - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ - -package grafeas - -// This represents a particular package that is distributed over various channels. E.g., glibc (aka libc6) is distributed by many, at various versions. -type PackagePackage struct { - // Required. Immutable. The name of the package. - Name string `json:"name,omitempty"` - // The various channels by which a package is distributed. - Distribution []PackageDistribution `json:"distribution,omitempty"` -} diff --git a/0.1.0/model_protobuf_any.go b/0.1.0/model_protobuf_any.go deleted file mode 100644 index 123a196..0000000 --- a/0.1.0/model_protobuf_any.go +++ /dev/null @@ -1,18 +0,0 @@ -/* - * proto/v1beta1/grafeas.proto - * - * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) - * - * API version: version not set - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ - -package grafeas - -// `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": , \"lastName\": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" } -type ProtobufAny struct { - // A URL/resource name whose content describes the type of the serialized protocol buffer message. For URLs which use the scheme `http`, `https`, or no scheme, the following restrictions and interpretations apply: * If no scheme is provided, `https` is assumed. * The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. - TypeUrl string `json:"type_url,omitempty"` - // Must be a valid serialized protocol buffer of the above specified type. - Value string `json:"value,omitempty"` -} diff --git a/0.1.0/model_protobuf_field_mask.go b/0.1.0/model_protobuf_field_mask.go deleted file mode 100644 index 7d06e5b..0000000 --- a/0.1.0/model_protobuf_field_mask.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * proto/v1beta1/grafeas.proto - * - * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) - * - * API version: version not set - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ - -package grafeas - -// paths: \"f.a\" paths: \"f.b.d\" Here `f` represents a field in some root message, `a` and `b` fields in the message found in `f`, and `d` a field found in the message in `f.b`. Field masks are used to specify a subset of fields that should be returned by a get operation or modified by an update operation. Field masks also have a custom JSON encoding (see below). # Field Masks in Projections When used in the context of a projection, a response message or sub-message is filtered by the API to only contain those fields as specified in the mask. For example, if the mask in the previous example is applied to a response message as follows: f { a : 22 b { d : 1 x : 2 } y : 13 } z: 8 The result will not contain specific values for fields x,y and z (their value will be set to the default, and omitted in proto text output): f { a : 22 b { d : 1 } } A repeated field is not allowed except at the last position of a paths string. If a FieldMask object is not present in a get operation, the operation applies to all fields (as if a FieldMask of all fields had been specified). Note that a field mask does not necessarily apply to the top-level response message. In case of a REST get operation, the field mask applies directly to the response, but in case of a REST list operation, the mask instead applies to each individual message in the returned resource list. In case of a REST custom method, other definitions may be used. Where the mask applies will be clearly documented together with its declaration in the API. In any case, the effect on the returned resource/resources is required behavior for APIs. # Field Masks in Update Operations A field mask in update operations specifies which fields of the targeted resource are going to be updated. The API is required to only change the values of the fields as specified in the mask and leave the others untouched. If a resource is passed in to describe the updated values, the API ignores the values of all fields not covered by the mask. If a repeated field is specified for an update operation, the existing repeated values in the target resource will be overwritten by the new values. Note that a repeated field is only allowed in the last position of a `paths` string. If a sub-message is specified in the last position of the field mask for an update operation, then the existing sub-message in the target resource is overwritten. Given the target message: f { b { d : 1 x : 2 } c : 1 } And an update message: f { b { d : 10 } } then if the field mask is: paths: \"f.b\" then the result will be: f { b { d : 10 } c : 1 } However, if the update mask was: paths: \"f.b.d\" then the result would be: f { b { d : 10 x : 2 } c : 1 } In order to reset a field's value to the default, the field must be in the mask and set to the default value in the provided resource. Hence, in order to reset all fields of a resource, provide a default instance of the resource and set all fields in the mask, or do not provide a mask as described below. If a field mask is not present on update, the operation applies to all fields (as if a field mask of all fields has been specified). Note that in the presence of schema evolution, this may mean that fields the client does not know and has therefore not filled into the request will be reset to their default. If this is unwanted behavior, a specific service may require a client to always specify a field mask, producing an error if not. As with get operations, the location of the resource which describes the updated values in the request message depends on the operation kind. In any case, the effect of the field mask is required to be honored by the API. ## Considerations for HTTP REST The HTTP kind of an update operation which uses a field mask must be set to PATCH instead of PUT in order to satisfy HTTP semantics (PUT must only be used for full updates). # JSON Encoding of Field Masks In JSON, a field mask is encoded as a single string where paths are separated by a comma. Fields name in each path are converted to/from lower-camel naming conventions. As an example, consider the following message declarations: message Profile { User user = 1; Photo photo = 2; } message User { string display_name = 1; string address = 2; } In proto a field mask for `Profile` may look as such: mask { paths: \"user.display_name\" paths: \"photo\" } In JSON, the same mask is represented as below: { mask: \"user.displayName,photo\" } # Field Masks and Oneof Fields Field masks treat fields in oneofs just as regular fields. Consider the following message: message SampleMessage { oneof test_oneof { string name = 4; SubMessage sub_message = 9; } } The field mask can be: mask { paths: \"name\" } Or: mask { paths: \"sub_message\" } Note that oneof type names (\"test_oneof\" in this case) cannot be used in paths. -type ProtobufFieldMask struct { - // The set of field mask paths. - Paths []string `json:"paths,omitempty"` -} diff --git a/0.1.0/model_v1beta1_batch_create_notes_request.go b/0.1.0/model_v1beta1_batch_create_notes_request.go deleted file mode 100644 index 35f447f..0000000 --- a/0.1.0/model_v1beta1_batch_create_notes_request.go +++ /dev/null @@ -1,18 +0,0 @@ -/* - * proto/v1beta1/grafeas.proto - * - * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) - * - * API version: version not set - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ - -package grafeas - -// Request to create notes in batch. -type V1beta1BatchCreateNotesRequest struct { - // The name of the project in the form of `projects/[PROJECT_ID]`, under which the notes are to be created. - Parent string `json:"parent,omitempty"` - // The notes to create. Max allowed length is 1000. - Notes map[string]V1beta1Note `json:"notes,omitempty"` -} diff --git a/0.1.0/model_v1beta1_note_kind.go b/0.1.0/model_v1beta1_note_kind.go deleted file mode 100644 index f353084..0000000 --- a/0.1.0/model_v1beta1_note_kind.go +++ /dev/null @@ -1,24 +0,0 @@ -/* - * proto/v1beta1/grafeas.proto - * - * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) - * - * API version: version not set - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ - -package grafeas -// V1beta1NoteKind : Kind represents the kinds of notes supported. - NOTE_KIND_UNSPECIFIED: Unknown. - VULNERABILITY: The note and occurrence represent a package vulnerability. - BUILD: The note and occurrence assert build provenance. - IMAGE: This represents an image basis relationship. - PACKAGE: This represents a package installed via a package manager. - DEPLOYMENT: The note and occurrence track deployment events. - DISCOVERY: The note and occurrence track the initial discovery status of a resource. - ATTESTATION: This represents a logical \"role\" that can attest to artifacts. -type V1beta1NoteKind string - -// List of v1beta1NoteKind -const ( - NOTE_KIND_UNSPECIFIED_V1beta1NoteKind V1beta1NoteKind = "NOTE_KIND_UNSPECIFIED" - VULNERABILITY_V1beta1NoteKind V1beta1NoteKind = "VULNERABILITY" - BUILD_V1beta1NoteKind V1beta1NoteKind = "BUILD" - IMAGE_V1beta1NoteKind V1beta1NoteKind = "IMAGE" - PACKAGE__V1beta1NoteKind V1beta1NoteKind = "PACKAGE" - DEPLOYMENT_V1beta1NoteKind V1beta1NoteKind = "DEPLOYMENT" - DISCOVERY_V1beta1NoteKind V1beta1NoteKind = "DISCOVERY" - ATTESTATION_V1beta1NoteKind V1beta1NoteKind = "ATTESTATION" -) diff --git a/0.1.0/model_v1beta1vulnerability_details.go b/0.1.0/model_v1beta1vulnerability_details.go deleted file mode 100644 index 12b2f52..0000000 --- a/0.1.0/model_v1beta1vulnerability_details.go +++ /dev/null @@ -1,29 +0,0 @@ -/* - * proto/v1beta1/grafeas.proto - * - * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) - * - * API version: version not set - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ - -package grafeas - -// Details of a vulnerability Occurrence. -type V1beta1vulnerabilityDetails struct { - Type_ string `json:"type,omitempty"` - // Output only. The note provider assigned Severity of the vulnerability. - Severity *VulnerabilitySeverity `json:"severity,omitempty"` - // Output only. The CVSS score of this vulnerability. CVSS score is on a scale of 0-10 where 0 indicates low severity and 10 indicates high severity. - CvssScore float32 `json:"cvss_score,omitempty"` - // Required. The set of affected locations and their fixes (if available) within the associated resource. - PackageIssue []VulnerabilityPackageIssue `json:"package_issue,omitempty"` - // Output only. A one sentence description of this vulnerability. - ShortDescription string `json:"short_description,omitempty"` - // Output only. A detailed description of this vulnerability. - LongDescription string `json:"long_description,omitempty"` - // Output only. URLs related to this vulnerability. - RelatedUrls []V1beta1RelatedUrl `json:"related_urls,omitempty"` - // The distro assigned severity for this vulnerability when it is available, and note provider assigned severity when distro has not yet assigned a severity for this vulnerability. - EffectiveSeverity *VulnerabilitySeverity `json:"effective_severity,omitempty"` -} diff --git a/0.1.0/model_vulnerability_cvs_sv3.go b/0.1.0/model_vulnerability_cvs_sv3.go deleted file mode 100644 index c28a200..0000000 --- a/0.1.0/model_vulnerability_cvs_sv3.go +++ /dev/null @@ -1,26 +0,0 @@ -/* - * proto/v1beta1/grafeas.proto - * - * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) - * - * API version: version not set - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ - -package grafeas - -type VulnerabilityCvsSv3 struct { - // The base score is a function of the base metric scores. - BaseScore float32 `json:"base_score,omitempty"` - ExploitabilityScore float32 `json:"exploitability_score,omitempty"` - ImpactScore float32 `json:"impact_score,omitempty"` - // Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments. - AttackVector *CvsSv3AttackVector `json:"attack_vector,omitempty"` - AttackComplexity *CvsSv3AttackComplexity `json:"attack_complexity,omitempty"` - PrivilegesRequired *CvsSv3PrivilegesRequired `json:"privileges_required,omitempty"` - UserInteraction *CvsSv3UserInteraction `json:"user_interaction,omitempty"` - Scope *CvsSv3Scope `json:"scope,omitempty"` - ConfidentialityImpact *CvsSv3Impact `json:"confidentiality_impact,omitempty"` - IntegrityImpact *CvsSv3Impact `json:"integrity_impact,omitempty"` - AvailabilityImpact *CvsSv3Impact `json:"availability_impact,omitempty"` -} diff --git a/config.go.json b/config.go.json index 4b316b5..c602db6 100644 --- a/config.go.json +++ b/config.go.json @@ -1,4 +1,3 @@ { - "packageVersion":"0.1.0", "packageName":"grafeas" } diff --git a/generate/main.go b/generate/main.go new file mode 100644 index 0000000..003bcbb --- /dev/null +++ b/generate/main.go @@ -0,0 +1,180 @@ +package main + +import ( + "bufio" + "bytes" + "encoding/json" + "fmt" + "io" + "io/ioutil" + "log" + "net/http" + "os" + "os/exec" + "path" + "strings" +) + +// GrafeasRepository : the repository of the Grafeas server to use for downloading Swagger files +var GrafeasRepository = "https://github.com/grafeas/grafeas" + +// Reference : the commit, branch, or tag to use for downloading Swagger files from the defined Grafeas repo +var Reference = "master" + +// APIVersion : the version of the Grafeas API per the Google Cloud scheme - https://github.com/grafeas/grafeas/blob/master/docs/versioning.md#api +var APIVersion = "v1beta1" + +// SwaggerCodegenVersion : the version of the Swagger CodeGen CLI to download +var SwaggerCodegenVersion = "2.4.5" + +// trimVersionTag : remove the "v" prefix from the version tag string +func trimVersionTag(tag string) string { + if strings.HasPrefix(tag, "v") { + return strings.TrimPrefix(tag, "v") + } + return tag +} + +func getDefaultVersion() string { + version := os.Getenv("VERSION") + if version == "" { + tag := getMostRecentTag() + trimmedVersion := trimVersionTag(tag) + version = trimmedVersion + } + return version +} + +func getMostRecentTag() string { + tagsBytes, _ := get("https://api.github.com/repos/grafeas/grafeas/tags") + var tags []map[string]interface{} + json.Unmarshal(tagsBytes, &tags) + return tags[0]["name"].(string) +} + +func get(url string) ([]byte, error) { + var responseData []byte + resp, err := http.Get(url) + if err != nil { + return responseData, err + } + defer resp.Body.Close() + + responseData, err = ioutil.ReadAll(resp.Body) + if err != nil { + return responseData, err + } + return responseData, err +} + +func downloadCompatibleSwaggerSpec(url string, filename string) error { + if filename == "" { + filename = path.Base(url) + } + responseBytes, err := get(url) + if err != nil { + return err + } + + f, err := os.Create(filename) + if err != nil { + return err + } + defer f.Close() + responseReader := bytes.NewReader(responseBytes) + + _, err = io.Copy(f, responseReader) + return err +} + +func downloadFile(url string, filename string) error { + if filename == "" { + filename = path.Base(url) + } + responseBytes, err := get(url) + if err != nil { + return err + } + + f, err := os.Create(filename) + if err != nil { + return err + } + defer f.Close() + responseReader := bytes.NewReader(responseBytes) + + _, err = io.Copy(f, responseReader) + return err +} + +type swaggerCodegenConfig struct { + language string + inputSpec string + outputDirectory string + configFile string + jar string +} + +func stringOrDefault(currentValue string, defaultValue string) string { + if currentValue == "" { + return defaultValue + } + return currentValue +} + +func (c *swaggerCodegenConfig) generate() { + c.language = stringOrDefault(c.language, "go") + c.jar = stringOrDefault(c.jar, "./swagger-codegen-cli.jar") + c.configFile = stringOrDefault(c.configFile, "./config.go.json") + //c.outputDirectory = stringOrDefault(c.outputDirectory, ServerVersion) + args := []string{"-jar", c.jar, "generate", "-i", c.inputSpec, "-l", c.language, "-o", c.outputDirectory, "-c", c.configFile} + log.Println("[CMD] java " + strings.Join(args, " ")) + cmd := exec.Command("java", args...) + + stderr, _ := cmd.StderrPipe() + cmd.Start() + + scanner := bufio.NewScanner(stderr) + scanner.Split(bufio.ScanLines) + for scanner.Scan() { + m := scanner.Text() + fmt.Println(m) + } + cmd.Wait() +} + +func downloadSwaggerCodegenCli(version string) { + downloadURL := fmt.Sprintf("https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/%s/swagger-codegen-cli-%s.jar", version, version) + downloadFile(downloadURL, "swagger-codegen-cli.jar") +} + +func getSwaggerNames() []string { + return []string{"grafeas.swagger.json", "project.swagger.json"} +} + +func swaggerGenerate() { + swaggerSpecNames := getSwaggerNames() + for _, swaggerSpecName := range swaggerSpecNames { + swaggerSpecURL := strings.Join([]string{GrafeasRepository, "/raw/", Reference, "/proto/", APIVersion, "/swagger/", swaggerSpecName}, "") + log.Printf("[DOWNLOAD] %s\n", swaggerSpecURL) + downloadCompatibleSwaggerSpec(swaggerSpecURL, "") + fileBasename := strings.Split(swaggerSpecName, ".")[0] + swaggerCodeGen := swaggerCodegenConfig{ + inputSpec: swaggerSpecName, + outputDirectory: fileBasename, + } + swaggerCodeGen.generate() + } +} + +func main() { + log.Printf( + ` +Grafeas Repository: %s +Reference: %s +API Version: %s +Swagger Codegen Version: %s +`, GrafeasRepository, Reference, APIVersion, SwaggerCodegenVersion) + downloadSwaggerCodegenCli(SwaggerCodegenVersion) + swaggerGenerate() +} diff --git a/generate_client.go b/generate_client.go index 58b36c2..389ee68 100755 --- a/generate_client.go +++ b/generate_client.go @@ -1,8 +1,6 @@ // Downloads v1beta1 grafeas.swagger.json, swagger-codegen CLI tool, // and generates Go client library from the downloaded Swagger spec. -//go:generate wget https://github.com/grafeas/grafeas/raw/master/proto/v1beta1/swagger/grafeas.swagger.json -//go:generate wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.5/swagger-codegen-cli-2.4.5.jar -O swagger-codegen-cli.jar -//go:generate java -jar ./swagger-codegen-cli.jar generate -i ./grafeas.swagger.json -l go -o 0.1.0 -c ./config.go.json +//go:generate go run generate/main.go package generate_client diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..db46fa2 --- /dev/null +++ b/go.mod @@ -0,0 +1,15 @@ +module github.com/grafeas/client-go + +go 1.19 + +require ( + github.com/antihax/optional v1.0.0 + golang.org/x/oauth2 v0.5.0 +) + +require ( + github.com/golang/protobuf v1.5.2 // indirect + golang.org/x/net v0.6.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/protobuf v1.28.0 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..b0e1524 --- /dev/null +++ b/go.sum @@ -0,0 +1,25 @@ +github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= +golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= diff --git a/0.1.0/.gitignore b/grafeas/.gitignore similarity index 100% rename from 0.1.0/.gitignore rename to grafeas/.gitignore diff --git a/0.1.0/.swagger-codegen-ignore b/grafeas/.swagger-codegen-ignore similarity index 98% rename from 0.1.0/.swagger-codegen-ignore rename to grafeas/.swagger-codegen-ignore index 8721107..c5fa491 100644 --- a/0.1.0/.swagger-codegen-ignore +++ b/grafeas/.swagger-codegen-ignore @@ -21,5 +21,3 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md - -README.md diff --git a/0.1.0/.swagger-codegen/VERSION b/grafeas/.swagger-codegen/VERSION similarity index 100% rename from 0.1.0/.swagger-codegen/VERSION rename to grafeas/.swagger-codegen/VERSION diff --git a/0.1.0/.travis.yml b/grafeas/.travis.yml similarity index 100% rename from 0.1.0/.travis.yml rename to grafeas/.travis.yml diff --git a/grafeas/README.md b/grafeas/README.md new file mode 100644 index 0000000..8d208e6 --- /dev/null +++ b/grafeas/README.md @@ -0,0 +1,173 @@ +# Go API client for grafeas + +No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + +## Overview +This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client. + +- API version: version not set +- Package version: 1.0.0 +- Build package: io.swagger.codegen.languages.GoClientCodegen + +## Installation +Put the package under your project folder and add the following in import: +```golang +import "./grafeas" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*GrafeasV1Beta1Api* | [**GrafeasV1Beta1BatchCreateNotes**](docs/GrafeasV1Beta1Api.md#grafeasv1beta1batchcreatenotes) | **Post** /v1beta1/{parent}/notes:batchCreate | Creates new notes in batch. +*GrafeasV1Beta1Api* | [**GrafeasV1Beta1BatchCreateOccurrences**](docs/GrafeasV1Beta1Api.md#grafeasv1beta1batchcreateoccurrences) | **Post** /v1beta1/{parent}/occurrences:batchCreate | Creates new occurrences in batch. +*GrafeasV1Beta1Api* | [**GrafeasV1Beta1CreateNote**](docs/GrafeasV1Beta1Api.md#grafeasv1beta1createnote) | **Post** /v1beta1/{parent}/notes | Creates a new note. +*GrafeasV1Beta1Api* | [**GrafeasV1Beta1CreateOccurrence**](docs/GrafeasV1Beta1Api.md#grafeasv1beta1createoccurrence) | **Post** /v1beta1/{parent}/occurrences | Creates a new occurrence. +*GrafeasV1Beta1Api* | [**GrafeasV1Beta1DeleteNote**](docs/GrafeasV1Beta1Api.md#grafeasv1beta1deletenote) | **Delete** /v1beta1/{name_1} | Deletes the specified note. +*GrafeasV1Beta1Api* | [**GrafeasV1Beta1DeleteOccurrence**](docs/GrafeasV1Beta1Api.md#grafeasv1beta1deleteoccurrence) | **Delete** /v1beta1/{name} | Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource. +*GrafeasV1Beta1Api* | [**GrafeasV1Beta1GetNote**](docs/GrafeasV1Beta1Api.md#grafeasv1beta1getnote) | **Get** /v1beta1/{name_1} | Gets the specified note. +*GrafeasV1Beta1Api* | [**GrafeasV1Beta1GetOccurrence**](docs/GrafeasV1Beta1Api.md#grafeasv1beta1getoccurrence) | **Get** /v1beta1/{name} | Gets the specified occurrence. +*GrafeasV1Beta1Api* | [**GrafeasV1Beta1GetOccurrenceNote**](docs/GrafeasV1Beta1Api.md#grafeasv1beta1getoccurrencenote) | **Get** /v1beta1/{name}/notes | Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project. +*GrafeasV1Beta1Api* | [**GrafeasV1Beta1GetVulnerabilityOccurrencesSummary**](docs/GrafeasV1Beta1Api.md#grafeasv1beta1getvulnerabilityoccurrencessummary) | **Get** /v1beta1/{parent}/occurrences:vulnerabilitySummary | Gets a summary of the number and severity of occurrences. +*GrafeasV1Beta1Api* | [**GrafeasV1Beta1ListNoteOccurrences**](docs/GrafeasV1Beta1Api.md#grafeasv1beta1listnoteoccurrences) | **Get** /v1beta1/{name}/occurrences | Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note. +*GrafeasV1Beta1Api* | [**GrafeasV1Beta1ListNotes**](docs/GrafeasV1Beta1Api.md#grafeasv1beta1listnotes) | **Get** /v1beta1/{parent}/notes | Lists notes for the specified project. +*GrafeasV1Beta1Api* | [**GrafeasV1Beta1ListOccurrences**](docs/GrafeasV1Beta1Api.md#grafeasv1beta1listoccurrences) | **Get** /v1beta1/{parent}/occurrences | Lists occurrences for the specified project. +*GrafeasV1Beta1Api* | [**GrafeasV1Beta1UpdateNote**](docs/GrafeasV1Beta1Api.md#grafeasv1beta1updatenote) | **Patch** /v1beta1/{name_1} | Updates the specified note. +*GrafeasV1Beta1Api* | [**GrafeasV1Beta1UpdateOccurrence**](docs/GrafeasV1Beta1Api.md#grafeasv1beta1updateoccurrence) | **Patch** /v1beta1/{name} | Updates the specified occurrence. + + +## Documentation For Models + + - [AliasContextKind](docs/AliasContextKind.md) + - [AssessmentJustification](docs/AssessmentJustification.md) + - [AssessmentRemediation](docs/AssessmentRemediation.md) + - [AssessmentState](docs/AssessmentState.md) + - [AttestationAttestation](docs/AttestationAttestation.md) + - [AttestationAuthority](docs/AttestationAuthority.md) + - [AttestationGenericSignedAttestation](docs/AttestationGenericSignedAttestation.md) + - [AttestationGenericSignedAttestationContentType](docs/AttestationGenericSignedAttestationContentType.md) + - [AttestationPgpSignedAttestation](docs/AttestationPgpSignedAttestation.md) + - [AttestationPgpSignedAttestationContentType](docs/AttestationPgpSignedAttestationContentType.md) + - [AuthorityHint](docs/AuthorityHint.md) + - [Body](docs/Body.md) + - [Body1](docs/Body1.md) + - [BuildBuild](docs/BuildBuild.md) + - [BuildBuildSignature](docs/BuildBuildSignature.md) + - [BuildSignatureKeyType](docs/BuildSignatureKeyType.md) + - [CvssAttackComplexity](docs/CvssAttackComplexity.md) + - [CvssAttackVector](docs/CvssAttackVector.md) + - [CvssAuthentication](docs/CvssAuthentication.md) + - [CvssImpact](docs/CvssImpact.md) + - [CvssPrivilegesRequired](docs/CvssPrivilegesRequired.md) + - [CvssScope](docs/CvssScope.md) + - [CvssUserInteraction](docs/CvssUserInteraction.md) + - [DeploymentDeployable](docs/DeploymentDeployable.md) + - [DeploymentDeployment](docs/DeploymentDeployment.md) + - [DeploymentPlatform](docs/DeploymentPlatform.md) + - [DetailsVexAssessment](docs/DetailsVexAssessment.md) + - [DiscoveredAnalysisCompleted](docs/DiscoveredAnalysisCompleted.md) + - [DiscoveredAnalysisStatus](docs/DiscoveredAnalysisStatus.md) + - [DiscoveredContinuousAnalysis](docs/DiscoveredContinuousAnalysis.md) + - [DiscoveryDiscovered](docs/DiscoveryDiscovered.md) + - [DiscoveryDiscovery](docs/DiscoveryDiscovery.md) + - [ExternalRefCategory](docs/ExternalRefCategory.md) + - [FileNoteFileType](docs/FileNoteFileType.md) + - [Grafeasv1beta1Signature](docs/Grafeasv1beta1Signature.md) + - [HashHashType](docs/HashHashType.md) + - [ImageBasis](docs/ImageBasis.md) + - [ImageDerived](docs/ImageDerived.md) + - [ImageFingerprint](docs/ImageFingerprint.md) + - [ImageLayer](docs/ImageLayer.md) + - [InTotoArtifactRule](docs/InTotoArtifactRule.md) + - [IntotoInToto](docs/IntotoInToto.md) + - [IntotoLink](docs/IntotoLink.md) + - [IntotoLinkArtifact](docs/IntotoLinkArtifact.md) + - [IntotoSigningKey](docs/IntotoSigningKey.md) + - [JustificationJustificationType](docs/JustificationJustificationType.md) + - [LayerDirective](docs/LayerDirective.md) + - [LinkArtifactHashes](docs/LinkArtifactHashes.md) + - [LinkByProducts](docs/LinkByProducts.md) + - [LinkEnvironment](docs/LinkEnvironment.md) + - [PackageArchitecture](docs/PackageArchitecture.md) + - [PackageDistribution](docs/PackageDistribution.md) + - [PackageInfoNoteExternalRef](docs/PackageInfoNoteExternalRef.md) + - [PackageInstallation](docs/PackageInstallation.md) + - [PackagePackage](docs/PackagePackage.md) + - [PackageVersion](docs/PackageVersion.md) + - [ProtobufAny](docs/ProtobufAny.md) + - [ProvenanceBuildProvenance](docs/ProvenanceBuildProvenance.md) + - [ProvenanceCommand](docs/ProvenanceCommand.md) + - [ProvenanceFileHashes](docs/ProvenanceFileHashes.md) + - [ProvenanceHash](docs/ProvenanceHash.md) + - [ProvenanceSource](docs/ProvenanceSource.md) + - [RemediationRemediationType](docs/RemediationRemediationType.md) + - [RpcStatus](docs/RpcStatus.md) + - [SourceAliasContext](docs/SourceAliasContext.md) + - [SourceCloudRepoSourceContext](docs/SourceCloudRepoSourceContext.md) + - [SourceGerritSourceContext](docs/SourceGerritSourceContext.md) + - [SourceGitSourceContext](docs/SourceGitSourceContext.md) + - [SourceProjectRepoId](docs/SourceProjectRepoId.md) + - [SourceRepoId](docs/SourceRepoId.md) + - [SourceSourceContext](docs/SourceSourceContext.md) + - [SpdxDocumentNote](docs/SpdxDocumentNote.md) + - [SpdxDocumentOccurrence](docs/SpdxDocumentOccurrence.md) + - [SpdxFileNote](docs/SpdxFileNote.md) + - [SpdxFileOccurrence](docs/SpdxFileOccurrence.md) + - [SpdxPackageInfoNote](docs/SpdxPackageInfoNote.md) + - [SpdxPackageInfoOccurrence](docs/SpdxPackageInfoOccurrence.md) + - [SpdxRelationshipNote](docs/SpdxRelationshipNote.md) + - [SpdxRelationshipOccurrence](docs/SpdxRelationshipOccurrence.md) + - [SpdxRelationshipType](docs/SpdxRelationshipType.md) + - [V1beta1BatchCreateNotesResponse](docs/V1beta1BatchCreateNotesResponse.md) + - [V1beta1BatchCreateOccurrencesResponse](docs/V1beta1BatchCreateOccurrencesResponse.md) + - [V1beta1Digest](docs/V1beta1Digest.md) + - [V1beta1Envelope](docs/V1beta1Envelope.md) + - [V1beta1EnvelopeSignature](docs/V1beta1EnvelopeSignature.md) + - [V1beta1License](docs/V1beta1License.md) + - [V1beta1ListNoteOccurrencesResponse](docs/V1beta1ListNoteOccurrencesResponse.md) + - [V1beta1ListNotesResponse](docs/V1beta1ListNotesResponse.md) + - [V1beta1ListOccurrencesResponse](docs/V1beta1ListOccurrencesResponse.md) + - [V1beta1Note](docs/V1beta1Note.md) + - [V1beta1NoteKind](docs/V1beta1NoteKind.md) + - [V1beta1Occurrence](docs/V1beta1Occurrence.md) + - [V1beta1RelatedUrl](docs/V1beta1RelatedUrl.md) + - [V1beta1Resource](docs/V1beta1Resource.md) + - [V1beta1VulnerabilityOccurrencesSummary](docs/V1beta1VulnerabilityOccurrencesSummary.md) + - [V1beta1attestationDetails](docs/V1beta1attestationDetails.md) + - [V1beta1buildDetails](docs/V1beta1buildDetails.md) + - [V1beta1deploymentDetails](docs/V1beta1deploymentDetails.md) + - [V1beta1discoveryDetails](docs/V1beta1discoveryDetails.md) + - [V1beta1imageDetails](docs/V1beta1imageDetails.md) + - [V1beta1intotoDetails](docs/V1beta1intotoDetails.md) + - [V1beta1intotoSignature](docs/V1beta1intotoSignature.md) + - [V1beta1packageDetails](docs/V1beta1packageDetails.md) + - [V1beta1packageLocation](docs/V1beta1packageLocation.md) + - [V1beta1provenanceArtifact](docs/V1beta1provenanceArtifact.md) + - [V1beta1vulnerabilityDetails](docs/V1beta1vulnerabilityDetails.md) + - [VersionVersionKind](docs/VersionVersionKind.md) + - [VexVulnerabilityAssessmentNote](docs/VexVulnerabilityAssessmentNote.md) + - [VulnerabilityAssessmentNoteAssessment](docs/VulnerabilityAssessmentNoteAssessment.md) + - [VulnerabilityAssessmentNoteProduct](docs/VulnerabilityAssessmentNoteProduct.md) + - [VulnerabilityAssessmentNotePublisher](docs/VulnerabilityAssessmentNotePublisher.md) + - [VulnerabilityCvss](docs/VulnerabilityCvss.md) + - [VulnerabilityCvssVersion](docs/VulnerabilityCvssVersion.md) + - [VulnerabilityDetail](docs/VulnerabilityDetail.md) + - [VulnerabilityOccurrencesSummaryFixableTotalByDigest](docs/VulnerabilityOccurrencesSummaryFixableTotalByDigest.md) + - [VulnerabilityPackageIssue](docs/VulnerabilityPackageIssue.md) + - [VulnerabilitySeverity](docs/VulnerabilitySeverity.md) + - [VulnerabilityVulnerability](docs/VulnerabilityVulnerability.md) + - [VulnerabilityVulnerabilityLocation](docs/VulnerabilityVulnerabilityLocation.md) + - [VulnerabilityWindowsDetail](docs/VulnerabilityWindowsDetail.md) + - [WindowsDetailKnowledgeBase](docs/WindowsDetailKnowledgeBase.md) + + +## Documentation For Authorization + Endpoints do not require authorization. + + +## Author + + + diff --git a/grafeas/api/swagger.yaml b/grafeas/api/swagger.yaml new file mode 100644 index 0000000..69b98a1 --- /dev/null +++ b/grafeas/api/swagger.yaml @@ -0,0 +1,9038 @@ +--- +swagger: "2.0" +info: + version: "version not set" + title: "grafeas.proto" +tags: +- name: "GrafeasV1Beta1" +consumes: +- "application/json" +produces: +- "application/json" +paths: + /v1beta1/{name_1}: + get: + tags: + - "GrafeasV1Beta1" + summary: "Gets the specified note." + operationId: "GrafeasV1Beta1_GetNote" + parameters: + - name: "name_1" + in: "path" + description: "The name of the note in the form of\n`projects/[PROVIDER_ID]/notes/[NOTE_ID]`." + required: true + type: "string" + pattern: "projects/[^/]+/notes/[^/]+" + x-exportParamName: "Name1" + responses: + 200: + description: "A successful response." + schema: + $ref: "#/definitions/v1beta1Note" + default: + description: "An unexpected error response." + schema: + $ref: "#/definitions/rpcStatus" + delete: + tags: + - "GrafeasV1Beta1" + summary: "Deletes the specified note." + operationId: "GrafeasV1Beta1_DeleteNote" + parameters: + - name: "name_1" + in: "path" + description: "The name of the note in the form of\n`projects/[PROVIDER_ID]/notes/[NOTE_ID]`." + required: true + type: "string" + pattern: "projects/[^/]+/notes/[^/]+" + x-exportParamName: "Name1" + responses: + 200: + description: "A successful response." + schema: {} + default: + description: "An unexpected error response." + schema: + $ref: "#/definitions/rpcStatus" + patch: + tags: + - "GrafeasV1Beta1" + summary: "Updates the specified note." + operationId: "GrafeasV1Beta1_UpdateNote" + parameters: + - name: "name_1" + in: "path" + description: "The name of the note in the form of\n`projects/[PROVIDER_ID]/notes/[NOTE_ID]`." + required: true + type: "string" + pattern: "projects/[^/]+/notes/[^/]+" + x-exportParamName: "Name1" + - in: "body" + name: "body" + description: "The updated note." + required: true + schema: + $ref: "#/definitions/v1beta1Note" + x-exportParamName: "Body" + - name: "updateMask" + in: "query" + description: "The fields to update." + required: false + type: "string" + x-exportParamName: "UpdateMask" + x-optionalDataType: "String" + responses: + 200: + description: "A successful response." + schema: + $ref: "#/definitions/v1beta1Note" + default: + description: "An unexpected error response." + schema: + $ref: "#/definitions/rpcStatus" + /v1beta1/{name}: + get: + tags: + - "GrafeasV1Beta1" + summary: "Gets the specified occurrence." + operationId: "GrafeasV1Beta1_GetOccurrence" + parameters: + - name: "name" + in: "path" + description: "The name of the occurrence in the form of\n`projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`." + required: true + type: "string" + pattern: "projects/[^/]+/occurrences/[^/]+" + x-exportParamName: "Name" + responses: + 200: + description: "A successful response." + schema: + $ref: "#/definitions/v1beta1Occurrence" + default: + description: "An unexpected error response." + schema: + $ref: "#/definitions/rpcStatus" + delete: + tags: + - "GrafeasV1Beta1" + summary: "Deletes the specified occurrence. For example, use this method to\ + \ delete an\noccurrence when the occurrence is no longer applicable for the\ + \ given\nresource." + operationId: "GrafeasV1Beta1_DeleteOccurrence" + parameters: + - name: "name" + in: "path" + description: "The name of the occurrence in the form of\n`projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`." + required: true + type: "string" + pattern: "projects/[^/]+/occurrences/[^/]+" + x-exportParamName: "Name" + responses: + 200: + description: "A successful response." + schema: {} + default: + description: "An unexpected error response." + schema: + $ref: "#/definitions/rpcStatus" + patch: + tags: + - "GrafeasV1Beta1" + summary: "Updates the specified occurrence." + operationId: "GrafeasV1Beta1_UpdateOccurrence" + parameters: + - name: "name" + in: "path" + description: "The name of the occurrence in the form of\n`projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`." + required: true + type: "string" + pattern: "projects/[^/]+/occurrences/[^/]+" + x-exportParamName: "Name" + - in: "body" + name: "body" + description: "The updated occurrence." + required: true + schema: + $ref: "#/definitions/v1beta1Occurrence" + x-exportParamName: "Body" + - name: "updateMask" + in: "query" + description: "The fields to update." + required: false + type: "string" + x-exportParamName: "UpdateMask" + x-optionalDataType: "String" + responses: + 200: + description: "A successful response." + schema: + $ref: "#/definitions/v1beta1Occurrence" + default: + description: "An unexpected error response." + schema: + $ref: "#/definitions/rpcStatus" + /v1beta1/{name}/notes: + get: + tags: + - "GrafeasV1Beta1" + summary: "Gets the note attached to the specified occurrence. Consumer projects\ + \ can\nuse this method to get a note that belongs to a provider project." + operationId: "GrafeasV1Beta1_GetOccurrenceNote" + parameters: + - name: "name" + in: "path" + description: "The name of the occurrence in the form of\n`projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`." + required: true + type: "string" + pattern: "projects/[^/]+/occurrences/[^/]+" + x-exportParamName: "Name" + responses: + 200: + description: "A successful response." + schema: + $ref: "#/definitions/v1beta1Note" + default: + description: "An unexpected error response." + schema: + $ref: "#/definitions/rpcStatus" + /v1beta1/{name}/occurrences: + get: + tags: + - "GrafeasV1Beta1" + summary: "Lists occurrences referencing the specified note. Provider projects\ + \ can use\nthis method to get all occurrences across consumer projects referencing\ + \ the\nspecified note." + operationId: "GrafeasV1Beta1_ListNoteOccurrences" + parameters: + - name: "name" + in: "path" + description: "The name of the note to list occurrences for in the form of\n\ + `projects/[PROVIDER_ID]/notes/[NOTE_ID]`." + required: true + type: "string" + pattern: "projects/[^/]+/notes/[^/]+" + x-exportParamName: "Name" + - name: "filter" + in: "query" + description: "The filter expression." + required: false + type: "string" + x-exportParamName: "Filter" + x-optionalDataType: "String" + - name: "pageSize" + in: "query" + description: "Number of occurrences to return in the list." + required: false + type: "integer" + format: "int32" + x-exportParamName: "PageSize" + x-optionalDataType: "Int32" + - name: "pageToken" + in: "query" + description: "Token to provide to skip to a particular spot in the list." + required: false + type: "string" + x-exportParamName: "PageToken" + x-optionalDataType: "String" + responses: + 200: + description: "A successful response." + schema: + $ref: "#/definitions/v1beta1ListNoteOccurrencesResponse" + default: + description: "An unexpected error response." + schema: + $ref: "#/definitions/rpcStatus" + /v1beta1/{parent}/notes: + get: + tags: + - "GrafeasV1Beta1" + summary: "Lists notes for the specified project." + operationId: "GrafeasV1Beta1_ListNotes" + parameters: + - name: "parent" + in: "path" + description: "The name of the project to list notes for in the form of\n`projects/[PROJECT_ID]`." + required: true + type: "string" + pattern: "projects/[^/]+" + x-exportParamName: "Parent" + - name: "filter" + in: "query" + description: "The filter expression." + required: false + type: "string" + x-exportParamName: "Filter" + x-optionalDataType: "String" + - name: "pageSize" + in: "query" + description: "Number of notes to return in the list. Must be positive. Max\ + \ allowed page\nsize is 1000. If not specified, page size defaults to 20." + required: false + type: "integer" + format: "int32" + x-exportParamName: "PageSize" + x-optionalDataType: "Int32" + - name: "pageToken" + in: "query" + description: "Token to provide to skip to a particular spot in the list." + required: false + type: "string" + x-exportParamName: "PageToken" + x-optionalDataType: "String" + responses: + 200: + description: "A successful response." + schema: + $ref: "#/definitions/v1beta1ListNotesResponse" + default: + description: "An unexpected error response." + schema: + $ref: "#/definitions/rpcStatus" + post: + tags: + - "GrafeasV1Beta1" + summary: "Creates a new note." + operationId: "GrafeasV1Beta1_CreateNote" + parameters: + - name: "parent" + in: "path" + description: "The name of the project in the form of `projects/[PROJECT_ID]`,\ + \ under which\nthe note is to be created." + required: true + type: "string" + pattern: "projects/[^/]+" + x-exportParamName: "Parent" + - in: "body" + name: "body" + description: "The note to create." + required: true + schema: + $ref: "#/definitions/v1beta1Note" + x-exportParamName: "Body" + - name: "noteId" + in: "query" + description: "The ID to use for this note." + required: true + type: "string" + x-exportParamName: "NoteId" + responses: + 200: + description: "A successful response." + schema: + $ref: "#/definitions/v1beta1Note" + default: + description: "An unexpected error response." + schema: + $ref: "#/definitions/rpcStatus" + /v1beta1/{parent}/notes:batchCreate: + post: + tags: + - "GrafeasV1Beta1" + summary: "Creates new notes in batch." + operationId: "GrafeasV1Beta1_BatchCreateNotes" + parameters: + - name: "parent" + in: "path" + description: "The name of the project in the form of `projects/[PROJECT_ID]`,\ + \ under which\nthe notes are to be created." + required: true + type: "string" + pattern: "projects/[^/]+" + x-exportParamName: "Parent" + - in: "body" + name: "body" + required: true + schema: + $ref: "#/definitions/body" + x-exportParamName: "Body" + responses: + 200: + description: "A successful response." + schema: + $ref: "#/definitions/v1beta1BatchCreateNotesResponse" + default: + description: "An unexpected error response." + schema: + $ref: "#/definitions/rpcStatus" + /v1beta1/{parent}/occurrences: + get: + tags: + - "GrafeasV1Beta1" + summary: "Lists occurrences for the specified project." + operationId: "GrafeasV1Beta1_ListOccurrences" + parameters: + - name: "parent" + in: "path" + description: "The name of the project to list occurrences for in the form\ + \ of\n`projects/[PROJECT_ID]`." + required: true + type: "string" + pattern: "projects/[^/]+" + x-exportParamName: "Parent" + - name: "filter" + in: "query" + description: "The filter expression." + required: false + type: "string" + x-exportParamName: "Filter" + x-optionalDataType: "String" + - name: "pageSize" + in: "query" + description: "Number of occurrences to return in the list. Must be positive.\ + \ Max allowed\npage size is 1000. If not specified, page size defaults to\ + \ 20." + required: false + type: "integer" + format: "int32" + x-exportParamName: "PageSize" + x-optionalDataType: "Int32" + - name: "pageToken" + in: "query" + description: "Token to provide to skip to a particular spot in the list." + required: false + type: "string" + x-exportParamName: "PageToken" + x-optionalDataType: "String" + responses: + 200: + description: "A successful response." + schema: + $ref: "#/definitions/v1beta1ListOccurrencesResponse" + default: + description: "An unexpected error response." + schema: + $ref: "#/definitions/rpcStatus" + post: + tags: + - "GrafeasV1Beta1" + summary: "Creates a new occurrence." + operationId: "GrafeasV1Beta1_CreateOccurrence" + parameters: + - name: "parent" + in: "path" + description: "The name of the project in the form of `projects/[PROJECT_ID]`,\ + \ under which\nthe occurrence is to be created." + required: true + type: "string" + pattern: "projects/[^/]+" + x-exportParamName: "Parent" + - in: "body" + name: "body" + description: "The occurrence to create." + required: true + schema: + $ref: "#/definitions/v1beta1Occurrence" + x-exportParamName: "Body" + responses: + 200: + description: "A successful response." + schema: + $ref: "#/definitions/v1beta1Occurrence" + default: + description: "An unexpected error response." + schema: + $ref: "#/definitions/rpcStatus" + /v1beta1/{parent}/occurrences:batchCreate: + post: + tags: + - "GrafeasV1Beta1" + summary: "Creates new occurrences in batch." + operationId: "GrafeasV1Beta1_BatchCreateOccurrences" + parameters: + - name: "parent" + in: "path" + description: "The name of the project in the form of `projects/[PROJECT_ID]`,\ + \ under which\nthe occurrences are to be created." + required: true + type: "string" + pattern: "projects/[^/]+" + x-exportParamName: "Parent" + - in: "body" + name: "body" + required: true + schema: + $ref: "#/definitions/body_1" + x-exportParamName: "Body" + responses: + 200: + description: "A successful response." + schema: + $ref: "#/definitions/v1beta1BatchCreateOccurrencesResponse" + default: + description: "An unexpected error response." + schema: + $ref: "#/definitions/rpcStatus" + /v1beta1/{parent}/occurrences:vulnerabilitySummary: + get: + tags: + - "GrafeasV1Beta1" + summary: "Gets a summary of the number and severity of occurrences." + operationId: "GrafeasV1Beta1_GetVulnerabilityOccurrencesSummary" + parameters: + - name: "parent" + in: "path" + description: "The name of the project to get a vulnerability summary for in\ + \ the form of\n`projects/[PROJECT_ID]`." + required: true + type: "string" + pattern: "projects/[^/]+" + x-exportParamName: "Parent" + - name: "filter" + in: "query" + description: "The filter expression." + required: false + type: "string" + x-exportParamName: "Filter" + x-optionalDataType: "String" + responses: + 200: + description: "A successful response." + schema: + $ref: "#/definitions/v1beta1VulnerabilityOccurrencesSummary" + default: + description: "An unexpected error response." + schema: + $ref: "#/definitions/rpcStatus" +definitions: + AliasContextKind: + type: "string" + description: "The type of an alias.\n\n - KIND_UNSPECIFIED: Unknown.\n - FIXED:\ + \ Git tag.\n - MOVABLE: Git branch.\n - OTHER: Used to specify non-standard\ + \ aliases. For example, if a Git repo has a\nref named \"refs/foo/bar\"." + enum: + - "KIND_UNSPECIFIED" + - "FIXED" + - "MOVABLE" + - "OTHER" + default: "KIND_UNSPECIFIED" + AssessmentJustification: + type: "object" + properties: + justificationType: + description: "The justification type for this vulnerability." + $ref: "#/definitions/JustificationJustificationType" + details: + type: "string" + description: "Additional details on why this justification was chosen." + description: "Justification provides the justification when the state of the\n\ + assessment if NOT_AFFECTED." + example: + justificationType: {} + details: "details" + AssessmentRemediation: + type: "object" + properties: + remediationType: + description: "The type of remediation that can be applied." + $ref: "#/definitions/RemediationRemediationType" + remediationTime: + type: "string" + format: "date-time" + description: "Contains the date from which the remediation is available." + details: + type: "string" + description: "Contains a comprehensive human-readable discussion of the remediation." + remediationUri: + description: "Contains the URL where to obtain the remediation." + $ref: "#/definitions/v1beta1RelatedUrl" + description: "Specifies details on how to handle (and presumably, fix) a vulnerability." + example: + remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + AssessmentState: + type: "string" + description: "Provides the state of this Vulnerability assessment.\n\n - STATE_UNSPECIFIED:\ + \ No state is specified.\n - AFFECTED: This product is known to be affected\ + \ by this vulnerability.\n - NOT_AFFECTED: This product is known to be not affected\ + \ by this vulnerability.\n - FIXED: This product contains a fix for this vulnerability.\n\ + \ - UNDER_INVESTIGATION: It is not known yet whether these versions are or are\ + \ not affected\nby the vulnerability. However, it is still under investigation." + enum: + - "STATE_UNSPECIFIED" + - "AFFECTED" + - "NOT_AFFECTED" + - "FIXED" + - "UNDER_INVESTIGATION" + default: "STATE_UNSPECIFIED" + AuthorityHint: + type: "object" + properties: + humanReadableName: + type: "string" + description: "Required. The human readable name of this attestation authority,\ + \ for\nexample \"qa\"." + description: "This submessage provides human-readable hints about the purpose\ + \ of the\nauthority. Because the name of a note acts as its resource reference,\ + \ it is\nimportant to disambiguate the canonical name of the Note (which might\ + \ be a\nUUID for security purposes) from \"readable\" names more suitable for\ + \ debug\noutput. Note that these hints should not be used to look up authorities\ + \ in\nsecurity sensitive contexts, such as when looking up attestations to\n\ + verify." + example: + humanReadableName: "humanReadableName" + BuildSignatureKeyType: + type: "string" + description: "Public key formats.\n\n - KEY_TYPE_UNSPECIFIED: `KeyType` is not\ + \ set.\n - PGP_ASCII_ARMORED: `PGP ASCII Armored` public key.\n - PKIX_PEM:\ + \ `PKIX PEM` public key." + enum: + - "KEY_TYPE_UNSPECIFIED" + - "PGP_ASCII_ARMORED" + - "PKIX_PEM" + default: "KEY_TYPE_UNSPECIFIED" + CVSSAttackComplexity: + type: "string" + enum: + - "ATTACK_COMPLEXITY_UNSPECIFIED" + - "ATTACK_COMPLEXITY_LOW" + - "ATTACK_COMPLEXITY_HIGH" + - "ATTACK_COMPLEXITY_MEDIUM" + default: "ATTACK_COMPLEXITY_UNSPECIFIED" + CVSSAttackVector: + type: "string" + enum: + - "ATTACK_VECTOR_UNSPECIFIED" + - "ATTACK_VECTOR_NETWORK" + - "ATTACK_VECTOR_ADJACENT" + - "ATTACK_VECTOR_LOCAL" + - "ATTACK_VECTOR_PHYSICAL" + default: "ATTACK_VECTOR_UNSPECIFIED" + CVSSAuthentication: + type: "string" + enum: + - "AUTHENTICATION_UNSPECIFIED" + - "AUTHENTICATION_MULTIPLE" + - "AUTHENTICATION_SINGLE" + - "AUTHENTICATION_NONE" + default: "AUTHENTICATION_UNSPECIFIED" + CVSSImpact: + type: "string" + enum: + - "IMPACT_UNSPECIFIED" + - "IMPACT_HIGH" + - "IMPACT_LOW" + - "IMPACT_NONE" + - "IMPACT_PARTIAL" + - "IMPACT_COMPLETE" + default: "IMPACT_UNSPECIFIED" + CVSSPrivilegesRequired: + type: "string" + enum: + - "PRIVILEGES_REQUIRED_UNSPECIFIED" + - "PRIVILEGES_REQUIRED_NONE" + - "PRIVILEGES_REQUIRED_LOW" + - "PRIVILEGES_REQUIRED_HIGH" + default: "PRIVILEGES_REQUIRED_UNSPECIFIED" + CVSSScope: + type: "string" + enum: + - "SCOPE_UNSPECIFIED" + - "SCOPE_UNCHANGED" + - "SCOPE_CHANGED" + default: "SCOPE_UNSPECIFIED" + CVSSUserInteraction: + type: "string" + enum: + - "USER_INTERACTION_UNSPECIFIED" + - "USER_INTERACTION_NONE" + - "USER_INTERACTION_REQUIRED" + default: "USER_INTERACTION_UNSPECIFIED" + DeploymentPlatform: + type: "string" + description: "Types of platforms.\n\n - PLATFORM_UNSPECIFIED: Unknown.\n - GKE:\ + \ Google Container Engine.\n - FLEX: Google App Engine: Flexible Environment.\n\ + \ - CUSTOM: Custom user-defined platform." + enum: + - "PLATFORM_UNSPECIFIED" + - "GKE" + - "FLEX" + - "CUSTOM" + default: "PLATFORM_UNSPECIFIED" + DetailsVexAssessment: + type: "object" + properties: + cve: + type: "string" + description: "Holds the MITRE standard Common Vulnerabilities and Exposures\ + \ (CVE)\ntracking number for the vulnerability." + relatedUris: + type: "array" + description: "Holds a list of references associated with this vulnerability\ + \ item and\nassessment." + items: + $ref: "#/definitions/v1beta1RelatedUrl" + noteName: + type: "string" + title: "The VulnerabilityAssessment note from which this VexAssessment was\n\ + generated.\nThis will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.\n\ + (-- api-linter: core::0122::name-suffix=disabled\n aip.dev/not-precedent:\ + \ The suffix is kept for consistency. --)" + state: + description: "Provides the state of this Vulnerability assessment." + $ref: "#/definitions/AssessmentState" + impacts: + type: "array" + description: "Contains information about the impact of this vulnerability,\n\ + this will change with time." + items: + type: "string" + remediations: + type: "array" + description: "Specifies details on how to handle (and presumably, fix) a vulnerability." + items: + $ref: "#/definitions/AssessmentRemediation" + justification: + description: "Justification provides the justification when the state of the\n\ + assessment if NOT_AFFECTED." + $ref: "#/definitions/AssessmentJustification" + description: "VexAssessment provides all publisher provided Vex information that\ + \ is\nrelated to this vulnerability." + example: + cve: "cve" + relatedUris: + - label: "label" + url: "url" + - label: "label" + url: "url" + noteName: "noteName" + remediations: + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + state: {} + impacts: + - "impacts" + - "impacts" + justification: + justificationType: {} + details: "details" + DiscoveredAnalysisCompleted: + type: "object" + properties: + analysisType: + type: "array" + items: + type: "string" + description: "Indicates which analysis completed successfully. Multiple types\ + \ of analysis\ncan be performed on a single resource." + example: + analysisType: + - "analysisType" + - "analysisType" + DiscoveredAnalysisStatus: + type: "string" + description: "Analysis status for a resource. Currently for initial analysis only\ + \ (not\nupdated in continuous analysis).\n\n - ANALYSIS_STATUS_UNSPECIFIED:\ + \ Unknown.\n - PENDING: Resource is known but no action has been taken yet.\n\ + \ - SCANNING: Resource is being analyzed.\n - FINISHED_SUCCESS: Analysis has\ + \ finished successfully.\n - COMPLETE: Analysis has completed.\n - FINISHED_FAILED:\ + \ Analysis has finished unsuccessfully, the analysis itself is in a bad\nstate.\n\ + \ - FINISHED_UNSUPPORTED: The resource is known not to be supported" + enum: + - "ANALYSIS_STATUS_UNSPECIFIED" + - "PENDING" + - "SCANNING" + - "FINISHED_SUCCESS" + - "COMPLETE" + - "FINISHED_FAILED" + - "FINISHED_UNSUPPORTED" + default: "ANALYSIS_STATUS_UNSPECIFIED" + DiscoveredContinuousAnalysis: + type: "string" + description: "Whether the resource is continuously analyzed.\n\n - CONTINUOUS_ANALYSIS_UNSPECIFIED:\ + \ Unknown.\n - ACTIVE: The resource is continuously analyzed.\n - INACTIVE:\ + \ The resource is ignored for continuous analysis." + enum: + - "CONTINUOUS_ANALYSIS_UNSPECIFIED" + - "ACTIVE" + - "INACTIVE" + default: "CONTINUOUS_ANALYSIS_UNSPECIFIED" + ExternalRefCategory: + type: "string" + title: "The category of the external reference" + description: "- CATEGORY_UNSPECIFIED: Unspecified\n - SECURITY: Security (e.g.\ + \ cpe22Type, cpe23Type)\n - PACKAGE_MANAGER: Package Manager (e.g. maven-central,\ + \ npm, nuget, bower, purl)\n - PERSISTENT_ID: Persistent-Id (e.g. swh)\n - OTHER:\ + \ Other" + enum: + - "CATEGORY_UNSPECIFIED" + - "SECURITY" + - "PACKAGE_MANAGER" + - "PERSISTENT_ID" + - "OTHER" + default: "CATEGORY_UNSPECIFIED" + FileNoteFileType: + type: "string" + title: "File Type is intrinsic to the file, independent of how the file is being\n\ + used" + description: "- FILE_TYPE_UNSPECIFIED: Unspecified\n - SOURCE: The file is human\ + \ readable source code (.c, .html, etc.)\n - BINARY: The file is a compiled\ + \ object, target image or binary executable (.o, .a,\netc.)\n - ARCHIVE: The\ + \ file represents an archive (.tar, .jar, etc.)\n - APPLICATION: The file is\ + \ associated with a specific application type (MIME type of\napplication/*)\n\ + \ - AUDIO: The file is associated with an audio file (MIME type of audio/* ,\ + \ e.g.\n.mp3)\n - IMAGE: The file is associated with an picture image file (MIME\ + \ type of image/*,\ne.g., .jpg, .gif)\n - TEXT: The file is human readable text\ + \ file (MIME type of text/*)\n - VIDEO: The file is associated with a video\ + \ file type (MIME type of video/*)\n - DOCUMENTATION: The file serves as documentation\n\ + \ - SPDX: The file is an SPDX document\n - OTHER: The file doesn't fit into\ + \ the above categories (generated artifacts, data\nfiles, etc.)" + enum: + - "FILE_TYPE_UNSPECIFIED" + - "SOURCE" + - "BINARY" + - "ARCHIVE" + - "APPLICATION" + - "AUDIO" + - "IMAGE" + - "TEXT" + - "VIDEO" + - "DOCUMENTATION" + - "SPDX" + - "OTHER" + default: "FILE_TYPE_UNSPECIFIED" + HashHashType: + type: "string" + description: "Specifies the hash algorithm.\n\n - HASH_TYPE_UNSPECIFIED: Unknown.\n\ + \ - SHA256: A SHA-256 hash." + enum: + - "HASH_TYPE_UNSPECIFIED" + - "SHA256" + default: "HASH_TYPE_UNSPECIFIED" + InTotoArtifactRule: + type: "object" + properties: + artifactRule: + type: "array" + items: + type: "string" + title: "Defines an object to declare an in-toto artifact rule" + example: + artifactRule: + - "artifactRule" + - "artifactRule" + JustificationJustificationType: + type: "string" + description: "Provides the type of justification.\n\n - JUSTIFICATION_TYPE_UNSPECIFIED:\ + \ JUSTIFICATION_TYPE_UNSPECIFIED.\n - COMPONENT_NOT_PRESENT: The vulnerable\ + \ component is not present in the product.\n - VULNERABLE_CODE_NOT_PRESENT:\ + \ The vulnerable code is not present. Typically this case\noccurs when source\ + \ code is configured or built in a way that excludes\nthe vulnerable code.\n\ + \ - VULNERABLE_CODE_NOT_IN_EXECUTE_PATH: The vulnerable code can not be executed.\n\ + Typically this case occurs when the product includes the vulnerable\ncode but\ + \ does not call or use the vulnerable code.\n - VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY:\ + \ The vulnerable code cannot be controlled by an attacker to exploit\nthe vulnerability.\n\ + \ - INLINE_MITIGATIONS_ALREADY_EXIST: The product includes built-in protections\ + \ or features that prevent\nexploitation of the vulnerability. These built-in\ + \ protections cannot\nbe subverted by the attacker and cannot be configured\ + \ or disabled by\nthe user. These mitigations completely prevent exploitation\ + \ based on\nknown attack vectors." + enum: + - "JUSTIFICATION_TYPE_UNSPECIFIED" + - "COMPONENT_NOT_PRESENT" + - "VULNERABLE_CODE_NOT_PRESENT" + - "VULNERABLE_CODE_NOT_IN_EXECUTE_PATH" + - "VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY" + - "INLINE_MITIGATIONS_ALREADY_EXIST" + default: "JUSTIFICATION_TYPE_UNSPECIFIED" + LayerDirective: + type: "string" + description: "Instructions from Dockerfile.\n\n - DIRECTIVE_UNSPECIFIED: Default\ + \ value for unsupported/missing directive.\n - MAINTAINER: https://docs.docker.com/engine/reference/builder/\n\ + \ - RUN: https://docs.docker.com/engine/reference/builder/\n - CMD: https://docs.docker.com/engine/reference/builder/\n\ + \ - LABEL: https://docs.docker.com/engine/reference/builder/\n - EXPOSE: https://docs.docker.com/engine/reference/builder/\n\ + \ - ENV: https://docs.docker.com/engine/reference/builder/\n - ADD: https://docs.docker.com/engine/reference/builder/\n\ + \ - COPY: https://docs.docker.com/engine/reference/builder/\n - ENTRYPOINT:\ + \ https://docs.docker.com/engine/reference/builder/\n - VOLUME: https://docs.docker.com/engine/reference/builder/\n\ + \ - USER: https://docs.docker.com/engine/reference/builder/\n - WORKDIR: https://docs.docker.com/engine/reference/builder/\n\ + \ - ARG: https://docs.docker.com/engine/reference/builder/\n - ONBUILD: https://docs.docker.com/engine/reference/builder/\n\ + \ - STOPSIGNAL: https://docs.docker.com/engine/reference/builder/\n - HEALTHCHECK:\ + \ https://docs.docker.com/engine/reference/builder/\n - SHELL: https://docs.docker.com/engine/reference/builder/" + enum: + - "DIRECTIVE_UNSPECIFIED" + - "MAINTAINER" + - "RUN" + - "CMD" + - "LABEL" + - "EXPOSE" + - "ENV" + - "ADD" + - "COPY" + - "ENTRYPOINT" + - "VOLUME" + - "USER" + - "WORKDIR" + - "ARG" + - "ONBUILD" + - "STOPSIGNAL" + - "HEALTHCHECK" + - "SHELL" + default: "DIRECTIVE_UNSPECIFIED" + LinkArtifactHashes: + type: "object" + properties: + sha256: + type: "string" + description: "Defines a hash object for use in Materials and Products." + example: + sha256: "sha256" + LinkByProducts: + type: "object" + properties: + customValues: + type: "object" + additionalProperties: + type: "string" + description: "Defines an object for the byproducts field in in-toto links. The\ + \ suggested\nfields are \"stderr\", \"stdout\", and \"return-value\"." + example: + customValues: + key: "customValues" + LinkEnvironment: + type: "object" + properties: + customValues: + type: "object" + additionalProperties: + type: "string" + description: "Defines an object for the environment field in in-toto links. The\ + \ suggested\nfields are \"variables\", \"filesystem\", and \"workdir\"." + example: + customValues: + key: "customValues" + PackageInfoNoteExternalRef: + type: "object" + properties: + category: + title: "An External Reference allows a Package to reference an external source\ + \ of\nadditional information, metadata, enumerations, asset identifiers,\ + \ or\ndownloadable content believed to be relevant to the Package" + $ref: "#/definitions/ExternalRefCategory" + type: + type: "string" + title: "Type of category (e.g. 'npm' for the PACKAGE_MANAGER category)" + locator: + type: "string" + title: "The unique string with no spaces necessary to access the package-specific\n\ + information, metadata, or content within the target location" + comment: + type: "string" + title: "Human-readable information about the purpose and target of the reference" + title: "An External Reference allows a Package to reference an external source\ + \ of\nadditional information, metadata, enumerations, asset identifiers, or\n\ + downloadable content believed to be relevant to the Package" + example: + comment: "comment" + category: {} + type: "type" + locator: "locator" + RemediationRemediationType: + type: "string" + description: "The type of remediation that can be applied.\n\n - REMEDIATION_TYPE_UNSPECIFIED:\ + \ No remediation type specified.\n - MITIGATION: A MITIGATION is available.\n\ + \ - NO_FIX_PLANNED: No fix is planned.\n - NONE_AVAILABLE: Not available.\n\ + \ - VENDOR_FIX: A vendor fix is available.\n - WORKAROUND: A workaround is available." + enum: + - "REMEDIATION_TYPE_UNSPECIFIED" + - "MITIGATION" + - "NO_FIX_PLANNED" + - "NONE_AVAILABLE" + - "VENDOR_FIX" + - "WORKAROUND" + default: "REMEDIATION_TYPE_UNSPECIFIED" + VersionVersionKind: + type: "string" + description: "Whether this is an ordinary package version or a sentinel MIN/MAX\ + \ version.\n\n - VERSION_KIND_UNSPECIFIED: Unknown.\n - NORMAL: A standard package\ + \ version.\n - MINIMUM: A special version representing negative infinity.\n\ + \ - MAXIMUM: A special version representing positive infinity." + enum: + - "VERSION_KIND_UNSPECIFIED" + - "NORMAL" + - "MINIMUM" + - "MAXIMUM" + default: "VERSION_KIND_UNSPECIFIED" + VulnerabilityAssessmentNoteAssessment: + type: "object" + properties: + cve: + type: "string" + description: "Holds the MITRE standard Common Vulnerabilities and Exposures\ + \ (CVE)\ntracking number for the vulnerability." + shortDescription: + type: "string" + description: "A one sentence description of this Vex." + longDescription: + type: "string" + description: "A detailed description of this Vex." + relatedUris: + type: "array" + description: "Holds a list of references associated with this vulnerability\ + \ item and\nassessment. These uris have additional information about the\n\ + vulnerability and the assessment itself. E.g. Link to a document which\n\ + details how this assessment concluded the state of this vulnerability." + items: + $ref: "#/definitions/v1beta1RelatedUrl" + state: + description: "Provides the state of this Vulnerability assessment." + $ref: "#/definitions/AssessmentState" + impacts: + type: "array" + description: "Contains information about the impact of this vulnerability,\n\ + this will change with time." + items: + type: "string" + justification: + description: "Justification provides the justification when the state of the\n\ + assessment if NOT_AFFECTED." + $ref: "#/definitions/AssessmentJustification" + remediations: + type: "array" + description: "Specifies details on how to handle (and presumably, fix) a vulnerability." + items: + $ref: "#/definitions/AssessmentRemediation" + description: "Assessment provides all information that is related to a single\n\ + vulnerability for this product." + example: + longDescription: "longDescription" + cve: "cve" + relatedUris: + - label: "label" + url: "url" + - label: "label" + url: "url" + remediations: + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + shortDescription: "shortDescription" + state: {} + impacts: + - "impacts" + - "impacts" + justification: + justificationType: {} + details: "details" + VulnerabilityAssessmentNoteProduct: + type: "object" + properties: + name: + type: "string" + description: "Name of the product." + id: + type: "string" + description: "Token that identifies a product so that it can be referred to\ + \ from other\nparts in the document. There is no predefined format as long\ + \ as it\nuniquely identifies a group in the context of the current document." + genericUri: + type: "string" + description: "Contains a URI which is vendor-specific.\nExample: The artifact\ + \ repository URL of an image." + title: "Product contains information about a product and how to uniquely identify\n\ + it.\n(-- api-linter: core::0123::resource-annotation=disabled\n aip.dev/not-precedent:\ + \ Product is not a separate resource. --)" + example: + genericUri: "genericUri" + name: "name" + id: "id" + VulnerabilityAssessmentNotePublisher: + type: "object" + properties: + name: + type: "string" + description: "Name of the publisher.\nExamples: 'Google', 'Google Cloud Platform'." + issuingAuthority: + type: "string" + description: "Provides information about the authority of the issuing party\ + \ to\nrelease the document, in particular, the party's constituency and\n\ + responsibilities or other obligations." + context: + type: "string" + title: "The context or namespace.\nContains a URL which is under control of\ + \ the issuing party and can\nbe used as a globally unique identifier for\ + \ that issuing party.\nExample: https://csaf.io" + title: "Publisher contains information about the publisher of\nthis Note.\n(--\ + \ api-linter: core::0123::resource-annotation=disabled\n aip.dev/not-precedent:\ + \ Publisher is not a separate resource. --)" + example: + issuingAuthority: "issuingAuthority" + name: "name" + context: "context" + VulnerabilityDetail: + type: "object" + properties: + cpeUri: + type: "string" + description: "Required. The CPE URI in\n[cpe format](https://cpe.mitre.org/specification/)\ + \ in which the\nvulnerability manifests. Examples include distro or storage\ + \ location for\nvulnerable jar." + package: + type: "string" + description: "Required. The name of the package where the vulnerability was\ + \ found." + minAffectedVersion: + description: "The min version of the package in which the vulnerability exists." + $ref: "#/definitions/packageVersion" + maxAffectedVersion: + description: "The max version of the package in which the vulnerability exists." + $ref: "#/definitions/packageVersion" + severityName: + type: "string" + description: "The severity (eg: distro assigned severity) for this vulnerability." + description: + type: "string" + description: "A vendor-specific description of this note." + fixedLocation: + description: "The fix for this specific package version." + $ref: "#/definitions/vulnerabilityVulnerabilityLocation" + packageType: + type: "string" + description: "The type of package; whether native or non native(ruby gems,\ + \ node.js\npackages etc)." + isObsolete: + type: "boolean" + description: "Whether this detail is obsolete. Occurrences are expected not\ + \ to point to\nobsolete details." + sourceUpdateTime: + type: "string" + format: "date-time" + description: "The time this information was last changed at the source. This\ + \ is an\nupstream timestamp from the underlying information source - e.g.\ + \ Ubuntu\nsecurity tracker." + source: + type: "string" + description: "The source from which the information in this Detail was obtained." + vendor: + type: "string" + description: "The name of the vendor of the product." + title: "Identifies all appearances of this vulnerability in the package for a\n\ + specific distro/location. For example: glibc in\ncpe:/o:debian:debian_linux:8\ + \ for versions 2.1 - 2.2" + example: + package: "package" + minAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + maxAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + vendor: "vendor" + description: "description" + sourceUpdateTime: "2000-01-23T04:56:07.000+00:00" + isObsolete: true + source: "source" + cpeUri: "cpeUri" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + VulnerabilityOccurrencesSummaryFixableTotalByDigest: + type: "object" + properties: + resource: + description: "The affected resource." + $ref: "#/definitions/v1beta1Resource" + severity: + description: "The severity for this count. SEVERITY_UNSPECIFIED indicates\ + \ total across\nall severities." + $ref: "#/definitions/vulnerabilitySeverity" + fixableCount: + type: "string" + format: "int64" + description: "The number of fixable vulnerabilities associated with this resource." + totalCount: + type: "string" + format: "int64" + description: "The total number of vulnerabilities associated with this resource." + description: "Per resource and severity counts of fixable and total vulnerabilities." + example: + severity: {} + fixableCount: "fixableCount" + resource: + name: "name" + uri: "uri" + contentHash: + type: {} + value: "value" + totalCount: "totalCount" + VulnerabilityWindowsDetail: + type: "object" + properties: + cpeUri: + type: "string" + description: "Required. The CPE URI in\n[cpe format](https://cpe.mitre.org/specification/)\ + \ in which the\nvulnerability manifests. Examples include distro or storage\ + \ location for\nvulnerable jar." + name: + type: "string" + description: "Required. The name of the vulnerability." + description: + type: "string" + description: "The description of the vulnerability." + fixingKbs: + type: "array" + description: "Required. The names of the KBs which have hotfixes to mitigate\ + \ this\nvulnerability. Note that there may be multiple hotfixes (and thus\n\ + multiple KBs) that mitigate a given vulnerability. Currently any listed\n\ + kb's presence is considered a fix." + items: + $ref: "#/definitions/WindowsDetailKnowledgeBase" + example: + name: "name" + description: "description" + fixingKbs: + - name: "name" + url: "url" + - name: "name" + url: "url" + cpeUri: "cpeUri" + WindowsDetailKnowledgeBase: + type: "object" + properties: + name: + type: "string" + description: "The KB name (generally of the form KB[0-9]+ i.e. KB123456)." + url: + type: "string" + title: "A link to the KB in the Windows update catalog -\nhttps://www.catalog.update.microsoft.com/" + example: + name: "name" + url: "url" + attestationAttestation: + type: "object" + properties: + pgpSignedAttestation: + description: "A PGP signed attestation." + $ref: "#/definitions/attestationPgpSignedAttestation" + genericSignedAttestation: + description: "An attestation that supports multiple `Signature`s\nover the\ + \ same attestation payload. The signatures\n(defined in common.proto) support\ + \ a superset of\npublic key types and IDs compared to PgpSignedAttestation." + $ref: "#/definitions/attestationGenericSignedAttestation" + description: "Occurrence that represents a single \"attestation\". The authenticity\ + \ of an\nattestation can be verified using the attached signature. If the verifier\n\ + trusts the public key of the signer, then verifying the signature is\nsufficient\ + \ to establish trust. In this circumstance, the authority to which\nthis attestation\ + \ is attached is primarily useful for look-up (how to find\nthis attestation\ + \ if you already know the authority and artifact to be\nverified) and intent\ + \ (which authority was this attestation intended to sign\nfor)." + example: + genericSignedAttestation: + serializedPayload: "serializedPayload" + contentType: {} + signatures: + - signature: "signature" + publicKeyId: "publicKeyId" + - signature: "signature" + publicKeyId: "publicKeyId" + pgpSignedAttestation: + signature: "signature" + pgpKeyId: "pgpKeyId" + contentType: {} + attestationAuthority: + type: "object" + properties: + hint: + description: "Hint hints at the purpose of the attestation authority." + $ref: "#/definitions/AuthorityHint" + description: "Note kind that represents a logical attestation \"role\" or \"authority\"\ + . For\nexample, an organization might have one `Authority` for \"QA\" and one\ + \ for\n\"build\". This note is intended to act strictly as a grouping mechanism\ + \ for\nthe attached occurrences (Attestations). This grouping mechanism also\n\ + provides a security boundary, since IAM ACLs gate the ability for a principle\n\ + to attach an occurrence to a given note. It also provides a single point of\n\ + lookup to find all attached attestation occurrences, even if they don't all\n\ + live in the same project." + example: + hint: + humanReadableName: "humanReadableName" + attestationGenericSignedAttestation: + type: "object" + properties: + contentType: + description: "Type (for example schema) of the attestation payload that was\ + \ signed.\nThe verifier must ensure that the provided type is one that the\ + \ verifier\nsupports, and that the attestation payload is a valid instantiation\ + \ of that\ntype (for example by validating a JSON schema)." + $ref: "#/definitions/attestationGenericSignedAttestationContentType" + serializedPayload: + type: "string" + format: "byte" + description: "The serialized payload that is verified by one or more `signatures`.\n\ + The encoding and semantic meaning of this payload must match what is set\ + \ in\n`content_type`." + pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" + signatures: + type: "array" + description: "One or more signatures over `serialized_payload`. Verifier\ + \ implementations\nshould consider this attestation message verified if\ + \ at least one\n`signature` verifies `serialized_payload`. See `Signature`\ + \ in common.proto\nfor more details on signature structure and verification." + items: + $ref: "#/definitions/grafeasv1beta1Signature" + description: "An attestation wrapper that uses the Grafeas `Signature` message.\n\ + This attestation must define the `serialized_payload` that the `signatures`\ + \ verify\nand any metadata necessary to interpret that plaintext. The signatures\n\ + should always be over the `serialized_payload` bytestring." + example: + serializedPayload: "serializedPayload" + contentType: {} + signatures: + - signature: "signature" + publicKeyId: "publicKeyId" + - signature: "signature" + publicKeyId: "publicKeyId" + attestationGenericSignedAttestationContentType: + type: "string" + description: "Type of the attestation plaintext that was signed.\n\n - CONTENT_TYPE_UNSPECIFIED:\ + \ `ContentType` is not set.\n - SIMPLE_SIGNING_JSON: Atomic format attestation\ + \ signature. See\nhttps://github.com/containers/image/blob/8a5d2f82a6e3263290c8e0276c3e0f64e77723e7/docs/atomic-signature.md\n\ + The payload extracted in `plaintext` is a JSON blob conforming to the\nlinked\ + \ schema." + enum: + - "CONTENT_TYPE_UNSPECIFIED" + - "SIMPLE_SIGNING_JSON" + default: "CONTENT_TYPE_UNSPECIFIED" + attestationPgpSignedAttestation: + type: "object" + properties: + signature: + type: "string" + description: "Required. The raw content of the signature, as output by GNU\ + \ Privacy Guard\n(GPG) or equivalent. Since this message only supports attached\ + \ signatures,\nthe payload that was signed must be attached. While the signature\ + \ format\nsupported is dependent on the verification implementation, currently\ + \ only\nASCII-armored (`--armor` to gpg), non-clearsigned (`--sign` rather\ + \ than\n`--clearsign` to gpg) are supported. Concretely, `gpg --sign --armor\n\ + --output=signature.gpg payload.json` will create the signature content\n\ + expected in this field in `signature.gpg` for the `payload.json`\nattestation\ + \ payload." + contentType: + description: "Type (for example schema) of the attestation payload that was\ + \ signed.\nThe verifier must ensure that the provided type is one that the\ + \ verifier\nsupports, and that the attestation payload is a valid instantiation\ + \ of that\ntype (for example by validating a JSON schema)." + $ref: "#/definitions/attestationPgpSignedAttestationContentType" + pgpKeyId: + type: "string" + description: "The cryptographic fingerprint of the key used to generate the\ + \ signature,\nas output by, e.g. `gpg --list-keys`. This should be the version\ + \ 4, full\n160-bit fingerprint, expressed as a 40 character hexadecimal\ + \ string. See\nhttps://tools.ietf.org/html/rfc4880#section-12.2 for details.\n\ + Implementations may choose to acknowledge \"LONG\", \"SHORT\", or other\n\ + abbreviated key IDs, but only the full fingerprint is guaranteed to work.\n\ + In gpg, the full fingerprint can be retrieved from the `fpr` field\nreturned\ + \ when calling --list-keys with --with-colons. For example:\n```\ngpg --with-colons\ + \ --with-fingerprint --force-v4-certs \\\n --list-keys attester@example.com\n\ + tru::1:1513631572:0:3:1:5\npub:......\nfpr:::::::::24FF6481B76AC91E66A00AC657A93A81EF3AE6FB:\n\ + ```\nAbove, the fingerprint is `24FF6481B76AC91E66A00AC657A93A81EF3AE6FB`." + description: "An attestation wrapper with a PGP-compatible signature. This message\ + \ only\nsupports `ATTACHED` signatures, where the payload that is signed is\ + \ included\nalongside the signature itself in the same file." + example: + signature: "signature" + pgpKeyId: "pgpKeyId" + contentType: {} + attestationPgpSignedAttestationContentType: + type: "string" + description: "Type (for example schema) of the attestation payload that was signed.\n\ + \n - CONTENT_TYPE_UNSPECIFIED: `ContentType` is not set.\n - SIMPLE_SIGNING_JSON:\ + \ Atomic format attestation signature. See\nhttps://github.com/containers/image/blob/8a5d2f82a6e3263290c8e0276c3e0f64e77723e7/docs/atomic-signature.md\n\ + The payload extracted from `signature` is a JSON blob conforming to the\nlinked\ + \ schema." + enum: + - "CONTENT_TYPE_UNSPECIFIED" + - "SIMPLE_SIGNING_JSON" + default: "CONTENT_TYPE_UNSPECIFIED" + buildBuild: + type: "object" + properties: + builderVersion: + type: "string" + description: "Required. Immutable. Version of the builder which produced this\ + \ build." + signature: + description: "Signature of the build in occurrences pointing to this build\ + \ note\ncontaining build details." + $ref: "#/definitions/buildBuildSignature" + description: "Note holding the version of the provider's builder and the signature\ + \ of the\nprovenance message in the build details occurrence." + example: + signature: + signature: "signature" + keyId: "keyId" + publicKey: "publicKey" + keyType: {} + builderVersion: "builderVersion" + buildBuildSignature: + type: "object" + properties: + publicKey: + type: "string" + description: "Public key of the builder which can be used to verify that the\ + \ related\nfindings are valid and unchanged. If `key_type` is empty, this\ + \ defaults\nto PEM encoded public keys.\n\nThis field may be empty if `key_id`\ + \ references an external key.\n\nFor Cloud Build based signatures, this\ + \ is a PEM encoded public\nkey. To verify the Cloud Build signature, place\ + \ the contents of\nthis field into a file (public.pem). The signature field\ + \ is base64-decoded\ninto its binary representation in signature.bin, and\ + \ the provenance bytes\nfrom `BuildDetails` are base64-decoded into a binary\ + \ representation in\nsigned.bin. OpenSSL can then verify the signature:\n\ + `openssl sha256 -verify public.pem -signature signature.bin signed.bin`" + signature: + type: "string" + format: "byte" + description: "Required. Signature of the related `BuildProvenance`. In JSON,\ + \ this is\nbase-64 encoded." + pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" + keyId: + type: "string" + description: "An ID for the key used to sign. This could be either an ID for\ + \ the key\nstored in `public_key` (such as the ID or fingerprint for a PGP\ + \ key, or the\nCN for a cert), or a reference to an external key (such as\ + \ a reference to a\nkey in Cloud Key Management Service)." + keyType: + description: "The type of the key, either stored in `public_key` or referenced\ + \ in\n`key_id`." + $ref: "#/definitions/BuildSignatureKeyType" + description: "Message encapsulating the signature of the verified build." + example: + signature: "signature" + keyId: "keyId" + publicKey: "publicKey" + keyType: {} + deploymentDeployable: + type: "object" + properties: + resourceUri: + type: "array" + description: "Required. Resource URI for the artifact being deployed." + items: + type: "string" + description: "An artifact that can be deployed in some runtime." + example: + resourceUri: + - "resourceUri" + - "resourceUri" + deploymentDeployment: + type: "object" + properties: + userEmail: + type: "string" + description: "Identity of the user that triggered this deployment." + deployTime: + type: "string" + format: "date-time" + description: "Required. Beginning of the lifetime of this deployment." + undeployTime: + type: "string" + format: "date-time" + description: "End of the lifetime of this deployment." + config: + type: "string" + description: "Configuration used to create this deployment." + address: + type: "string" + description: "Address of the runtime element hosting this deployment." + resourceUri: + type: "array" + description: "Output only. Resource URI for the artifact being deployed taken\ + \ from\nthe deployable field with the same name." + readOnly: true + items: + type: "string" + platform: + description: "Platform hosting this deployment." + $ref: "#/definitions/DeploymentPlatform" + description: "The period during which some deployable was active in a runtime." + example: + address: "address" + undeployTime: "2000-01-23T04:56:07.000+00:00" + userEmail: "userEmail" + deployTime: "2000-01-23T04:56:07.000+00:00" + resourceUri: + - "resourceUri" + - "resourceUri" + config: "config" + platform: {} + discoveryDiscovered: + type: "object" + properties: + continuousAnalysis: + description: "Whether the resource is continuously analyzed." + $ref: "#/definitions/DiscoveredContinuousAnalysis" + lastAnalysisTime: + type: "string" + format: "date-time" + description: "The last time continuous analysis was done for this resource.\n\ + Deprecated, do not use." + analysisStatus: + description: "The status of discovery for the resource." + $ref: "#/definitions/DiscoveredAnalysisStatus" + analysisCompleted: + $ref: "#/definitions/DiscoveredAnalysisCompleted" + analysisError: + type: "array" + description: "Indicates any errors encountered during analysis of a resource.\ + \ There\ncould be 0 or more of these errors." + items: + $ref: "#/definitions/rpcStatus" + analysisStatusError: + description: "When an error is encountered this will contain a LocalizedMessage\ + \ under\ndetails to show to the user. The LocalizedMessage is output only\ + \ and\npopulated by the API." + $ref: "#/definitions/rpcStatus" + description: "Provides information about the analysis status of a discovered resource." + example: + analysisCompleted: + analysisType: + - "analysisType" + - "analysisType" + analysisError: + - code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + - code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + analysisStatusError: + code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + continuousAnalysis: {} + lastAnalysisTime: "2000-01-23T04:56:07.000+00:00" + analysisStatus: {} + discoveryDiscovery: + type: "object" + properties: + analysisKind: + description: "Required. Immutable. The kind of analysis that is handled by\ + \ this\ndiscovery." + $ref: "#/definitions/v1beta1NoteKind" + description: "A note that indicates a type of analysis a provider would perform.\ + \ This note\nexists in a provider's project. A `Discovery` occurrence is created\ + \ in a\nconsumer's project at the start of analysis." + example: {} + grafeasv1beta1Signature: + type: "object" + properties: + signature: + type: "string" + format: "byte" + description: "The content of the signature, an opaque bytestring.\nThe payload\ + \ that this signature verifies MUST be unambiguously provided\nwith the\ + \ Signature during verification. A wrapper message might provide\nthe payload\ + \ explicitly. Alternatively, a message might have a canonical\nserialization\ + \ that can always be unambiguously computed to derive the\npayload." + pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" + publicKeyId: + type: "string" + description: "The identifier for the public key that verifies this signature.\n\ + \ * The `public_key_id` is required.\n * The `public_key_id` SHOULD be\ + \ an RFC3986 conformant URI.\n * When possible, the `public_key_id` SHOULD\ + \ be an immutable reference,\n such as a cryptographic digest.\n\nExamples\ + \ of valid `public_key_id`s:\n\nOpenPGP V4 public key fingerprint:\n *\ + \ \"openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA\"\nSee https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr\ + \ for more\ndetails on this scheme.\n\nRFC6920 digest-named SubjectPublicKeyInfo\ + \ (digest of the DER\nserialization):\n * \"ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU\"\ + \n * \"nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5\"" + description: "Verifiers (e.g. Kritis implementations) MUST verify signatures\n\ + with respect to the trust anchors defined in policy (e.g. a Kritis policy).\n\ + Typically this means that the verifier has been configured with a map from\n\ + `public_key_id` to public key material (and any required parameters, e.g.\n\ + signing algorithm).\n\nIn particular, verification implementations MUST NOT\ + \ treat the signature\n`public_key_id` as anything more than a key lookup hint.\ + \ The `public_key_id`\nDOES NOT validate or authenticate a public key; it only\ + \ provides a mechanism\nfor quickly selecting a public key ALREADY CONFIGURED\ + \ on the verifier through\na trusted channel. Verification implementations MUST\ + \ reject signatures in any\nof the following circumstances:\n * The `public_key_id`\ + \ is not recognized by the verifier.\n * The public key that `public_key_id`\ + \ refers to does not verify the\n signature with respect to the payload.\n\ + \nThe `signature` contents SHOULD NOT be \"attached\" (where the payload is\n\ + included with the serialized `signature` bytes). Verifiers MUST ignore any\n\ + \"attached\" payload and only verify signatures with respect to explicitly\n\ + provided payload (e.g. a `payload` field on the proto message that holds\nthis\ + \ Signature, or the canonical serialization of the proto message that\nholds\ + \ this signature)." + example: + signature: "signature" + publicKeyId: "publicKeyId" + imageBasis: + type: "object" + properties: + resourceUrl: + type: "string" + description: "Required. Immutable. The resource_url for the resource representing\ + \ the\nbasis of associated occurrence images." + fingerprint: + description: "Required. Immutable. The fingerprint of the base image." + $ref: "#/definitions/imageFingerprint" + description: "Basis describes the base image portion (Note) of the DockerImage\n\ + relationship. Linked occurrences are derived from this or an\nequivalent image\ + \ via:\n FROM \nOr an equivalent reference, e.g. a tag\ + \ of the resource_url." + example: + resourceUrl: "resourceUrl" + fingerprint: + v1Name: "v1Name" + v2Blob: + - "v2Blob" + - "v2Blob" + v2Name: "v2Name" + imageDerived: + type: "object" + properties: + fingerprint: + description: "Required. The fingerprint of the derived image." + $ref: "#/definitions/imageFingerprint" + distance: + type: "integer" + format: "int32" + description: "Output only. The number of layers by which this image differs\ + \ from the\nassociated image basis." + readOnly: true + layerInfo: + type: "array" + description: "This contains layer-specific metadata, if populated it has length\n\ + \"distance\" and is ordered with [distance] being the layer immediately\n\ + following the base image and [1] being the final layer." + items: + $ref: "#/definitions/imageLayer" + baseResourceUrl: + type: "string" + description: "Output only. This contains the base image URL for the derived\ + \ image\noccurrence." + readOnly: true + description: "Derived describes the derived image portion (Occurrence) of the\ + \ DockerImage\nrelationship. This image would be produced from a Dockerfile\ + \ with FROM\n." + example: + distance: 6 + fingerprint: + v1Name: "v1Name" + v2Blob: + - "v2Blob" + - "v2Blob" + v2Name: "v2Name" + baseResourceUrl: "baseResourceUrl" + layerInfo: + - arguments: "arguments" + directive: {} + - arguments: "arguments" + directive: {} + imageFingerprint: + type: "object" + properties: + v1Name: + type: "string" + description: "Required. The layer ID of the final layer in the Docker image's\ + \ v1\nrepresentation." + v2Blob: + type: "array" + description: "Required. The ordered list of v2 blobs that represent a given\ + \ image." + items: + type: "string" + v2Name: + type: "string" + description: "Output only. The name of the image's v2 blobs computed via:\n\ + \ [bottom] := v2_blob[bottom]\n [N] := sha256(v2_blob[N] + \" \" + v2_name[N+1])\n\ + Only the name of the final blob is kept." + readOnly: true + description: "A set of properties that uniquely identify a given Docker image." + example: + v1Name: "v1Name" + v2Blob: + - "v2Blob" + - "v2Blob" + v2Name: "v2Name" + imageLayer: + type: "object" + properties: + directive: + description: "Required. The recovered Dockerfile directive used to construct\ + \ this layer." + $ref: "#/definitions/LayerDirective" + arguments: + type: "string" + description: "The recovered arguments to the Dockerfile directive." + description: "Layer holds metadata specific to a layer of a Docker image." + example: + arguments: "arguments" + directive: {} + intotoInToto: + type: "object" + properties: + stepName: + type: "string" + description: "This field identifies the name of the step in the supply chain." + signingKeys: + type: "array" + description: "This field contains the public keys that can be used to verify\ + \ the\nsignatures on the step metadata." + items: + $ref: "#/definitions/intotoSigningKey" + expectedMaterials: + type: "array" + description: "The following fields contain in-toto artifact rules identifying\ + \ the\nartifacts that enter this supply chain step, and exit the supply\ + \ chain\nstep, i.e. materials and products of the step." + items: + $ref: "#/definitions/InTotoArtifactRule" + expectedProducts: + type: "array" + items: + $ref: "#/definitions/InTotoArtifactRule" + expectedCommand: + type: "array" + description: "This field contains the expected command used to perform the\ + \ step." + items: + type: "string" + threshold: + type: "string" + format: "int64" + description: "This field contains a value that indicates the minimum number\ + \ of keys that\nneed to be used to sign the step's in-toto link." + description: "This contains the fields corresponding to the definition of a software\ + \ supply\nchain step in an in-toto layout. This information goes into a Grafeas\ + \ note." + example: + expectedMaterials: + - artifactRule: + - "artifactRule" + - "artifactRule" + - artifactRule: + - "artifactRule" + - "artifactRule" + signingKeys: + - publicKeyValue: "publicKeyValue" + keyId: "keyId" + keyType: "keyType" + keyScheme: "keyScheme" + - publicKeyValue: "publicKeyValue" + keyId: "keyId" + keyType: "keyType" + keyScheme: "keyScheme" + expectedProducts: + - artifactRule: + - "artifactRule" + - "artifactRule" + - artifactRule: + - "artifactRule" + - "artifactRule" + stepName: "stepName" + threshold: "threshold" + expectedCommand: + - "expectedCommand" + - "expectedCommand" + intotoLink: + type: "object" + properties: + command: + type: "array" + title: "This field contains the full command executed for the step. This can\ + \ also\nbe empty if links are generated for operations that aren't directly\ + \ mapped\nto a specific command. Each term in the command is an independent\ + \ string\nin the list. An example of a command in the in-toto metadata field\ + \ is:\n\"command\": [\"git\", \"clone\", \"https://github.com/in-toto/demo-project.git\"\ + ]" + items: + type: "string" + materials: + type: "array" + title: "Materials are the supply chain artifacts that go into the step and\ + \ are used\nfor the operation performed. The key of the map is the path\ + \ of the artifact\nand the structure contains the recorded hash information.\ + \ An example is:\n\"materials\": [\n {\n \"resource_uri\": \"foo/bar\"\ + ,\n \"hashes\": {\n \"sha256\": \"ebebf...\",\n : \n }\n }\n]" + items: + $ref: "#/definitions/intotoLinkArtifact" + products: + type: "array" + description: "Products are the supply chain artifacts generated as a result\ + \ of the step.\nThe structure is identical to that of materials." + items: + $ref: "#/definitions/intotoLinkArtifact" + byproducts: + description: "ByProducts are data generated as part of a software supply chain\ + \ step, but\nare not the actual result of the step." + $ref: "#/definitions/LinkByProducts" + environment: + title: "This is a field that can be used to capture information about the\n\ + environment. It is suggested for this field to contain information that\n\ + details environment variables, filesystem information, and the present\n\ + working directory. The recommended structure of this field is:\n\"environment\"\ + : {\n \"custom_values\": {\n \"variables\": \"\",\n \"filesystem\"\ + : \"\",\n \"workdir\": \"\",\n \"\"\ + : \"...\"\n }\n}" + $ref: "#/definitions/LinkEnvironment" + description: "This corresponds to an in-toto link." + example: + environment: + customValues: + key: "customValues" + materials: + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + byproducts: + customValues: + key: "customValues" + command: + - "command" + - "command" + products: + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + intotoLinkArtifact: + type: "object" + properties: + resourceUri: + type: "string" + hashes: + $ref: "#/definitions/LinkArtifactHashes" + example: + hashes: + sha256: "sha256" + resourceUri: "resourceUri" + intotoSigningKey: + type: "object" + properties: + keyId: + type: "string" + description: "key_id is an identifier for the signing key." + keyType: + type: "string" + description: "This field identifies the specific signing method. Eg: \"rsa\"\ + , \"ed25519\",\nand \"ecdsa\"." + publicKeyValue: + type: "string" + description: "This field contains the actual public key." + keyScheme: + type: "string" + description: "This field contains the corresponding signature scheme.\nEg:\ + \ \"rsassa-pss-sha256\"." + description: "This defines the format used to record keys used in the software\ + \ supply\nchain. An in-toto link is attested using one or more keys defined\ + \ in the\nin-toto layout. An example of this is:\n{\n \"key_id\": \"776a00e29f3559e0141b3b096f696abc6cfb0c657ab40f441132b345b0...\"\ + ,\n \"key_type\": \"rsa\",\n \"public_key_value\": \"-----BEGIN PUBLIC KEY-----\\\ + nMIIBojANBgkqhkiG9w0B...\",\n \"key_scheme\": \"rsassa-pss-sha256\"\n}\nThe\ + \ format for in-toto's key definition can be found in section 4.2 of the\nin-toto\ + \ specification." + example: + publicKeyValue: "publicKeyValue" + keyId: "keyId" + keyType: "keyType" + keyScheme: "keyScheme" + packageArchitecture: + type: "string" + description: "Instruction set architectures supported by various package managers.\n\ + \n - ARCHITECTURE_UNSPECIFIED: Unknown architecture.\n - X86: X86 architecture.\n\ + \ - X64: X64 architecture." + enum: + - "ARCHITECTURE_UNSPECIFIED" + - "X86" + - "X64" + default: "ARCHITECTURE_UNSPECIFIED" + packageDistribution: + type: "object" + required: + - "cpeUri" + properties: + cpeUri: + type: "string" + description: "The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)\n\ + denoting the package manager version distributing a package." + architecture: + description: "The CPU architecture for which packages in this distribution\ + \ channel were\nbuilt." + $ref: "#/definitions/packageArchitecture" + latestVersion: + description: "The latest available version of this package in this distribution\ + \ channel." + $ref: "#/definitions/packageVersion" + maintainer: + type: "string" + description: "A freeform string denoting the maintainer of this package." + url: + type: "string" + description: "The distribution channel-specific homepage for this package." + description: + type: "string" + description: "The distribution channel-specific description of this package." + description: "This represents a particular channel of distribution for a given\ + \ package.\nE.g., Debian's jessie-backports dpkg mirror." + example: + latestVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + description: "description" + cpeUri: "cpeUri" + maintainer: "maintainer" + url: "url" + architecture: {} + packageInstallation: + type: "object" + required: + - "name" + properties: + name: + type: "string" + description: "The name of the installed package." + readOnly: true + location: + type: "array" + description: "All of the places within the filesystem versions of this package\n\ + have been found." + items: + $ref: "#/definitions/v1beta1packageLocation" + packageType: + type: "string" + description: "The type of package; whether native or non native (e.g., ruby\ + \ gems,\nnode.js packages, etc.)." + readOnly: true + cpeUri: + type: "string" + description: "The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)\n\ + denoting the package manager version distributing a package.\nThe cpe_uri\ + \ will be blank for language packages." + readOnly: true + architecture: + description: "The CPU architecture for which packages in this distribution\ + \ channel were\nbuilt. Architecture will be blank for language packages." + $ref: "#/definitions/packageArchitecture" + license: + description: "Licenses that have been declared by the authors of the package." + $ref: "#/definitions/v1beta1License" + version: + description: "The version of the package." + $ref: "#/definitions/packageVersion" + description: "This represents how a particular software package may be installed\ + \ on a\nsystem." + example: + license: + expression: "expression" + comments: "comments" + name: "name" + location: + - path: "path" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + - path: "path" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + architecture: {} + packagePackage: + type: "object" + required: + - "name" + properties: + name: + type: "string" + description: "The name of the package." + distribution: + type: "array" + description: "The various channels by which a package is distributed." + items: + $ref: "#/definitions/packageDistribution" + packageType: + type: "string" + description: "The type of package; whether native or non native (e.g., ruby\ + \ gems,\nnode.js packages, etc.)." + cpeUri: + type: "string" + description: "The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)\n\ + denoting the package manager version distributing a package.\nThe cpe_uri\ + \ will be blank for language packages." + architecture: + description: "The CPU architecture for which packages in this distribution\ + \ channel were\nbuilt. Architecture will be blank for language packages." + $ref: "#/definitions/packageArchitecture" + version: + description: "The version of the package." + $ref: "#/definitions/packageVersion" + maintainer: + type: "string" + description: "A freeform text denoting the maintainer of this package." + url: + type: "string" + description: "The homepage for this package." + description: + type: "string" + description: "The description of this package." + license: + description: "Licenses that have been declared by the authors of the package." + $ref: "#/definitions/v1beta1License" + digest: + type: "array" + description: "Hash value, typically a file digest, that allows unique\nidentification\ + \ a specific package." + items: + $ref: "#/definitions/v1beta1Digest" + description: "Package represents a particular package version." + example: + license: + expression: "expression" + comments: "comments" + name: "name" + digest: + - digestBytes: "digestBytes" + algo: "algo" + - digestBytes: "digestBytes" + algo: "algo" + description: "description" + distribution: + - latestVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + description: "description" + cpeUri: "cpeUri" + maintainer: "maintainer" + url: "url" + architecture: {} + - latestVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + description: "description" + cpeUri: "cpeUri" + maintainer: "maintainer" + url: "url" + architecture: {} + packageType: "packageType" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + maintainer: "maintainer" + url: "url" + packageVersion: + type: "object" + properties: + epoch: + type: "integer" + format: "int32" + description: "Used to correct mistakes in the version numbering scheme." + name: + type: "string" + description: "Required only when version kind is NORMAL. The main part of\ + \ the version\nname." + revision: + type: "string" + description: "The iteration of the package build from the above version." + inclusive: + type: "boolean" + description: "Whether this version is specifying part of an inclusive range.\ + \ Grafeas\ndoes not have the capability to specify version ranges; instead\ + \ we have\nfields that specify start version and end versions. At times\ + \ this is\ninsufficient - we also need to specify whether the version is\ + \ included in\nthe range or is excluded from the range. This boolean is\ + \ expected to be set\nto true when the version is included in a range." + kind: + description: "Required. Distinguishes between sentinel MIN/MAX versions and\ + \ normal\nversions." + $ref: "#/definitions/VersionVersionKind" + description: "Version contains structured information about the version of a package." + example: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + protobufAny: + type: "object" + properties: + '@type': + type: "string" + description: "A URL/resource name that uniquely identifies the type of the\ + \ serialized\nprotocol buffer message. This string must contain at least\n\ + one \"/\" character. The last segment of the URL's path must represent\n\ + the fully qualified name of the type (as in\n`path/google.protobuf.Duration`).\ + \ The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\ + \nIn practice, teams usually precompile into the binary all types that they\n\ + expect it to use in the context of Any. However, for URLs which use the\n\ + scheme `http`, `https`, or no scheme, one can optionally set up a type\n\ + server that maps type URLs to message definitions as follows:\n\n* If no\ + \ scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must\ + \ yield a [google.protobuf.Type][]\n value in binary format, or produce\ + \ an error.\n* Applications are allowed to cache lookup results based on\ + \ the\n URL, or have them precompiled into a binary to avoid any\n lookup.\ + \ Therefore, binary compatibility needs to be preserved\n on changes to\ + \ types. (Use versioned type names to manage\n breaking changes.)\n\nNote:\ + \ this functionality is not currently available in the official\nprotobuf\ + \ release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\ + \nSchemes other than `http`, `https` (or the empty scheme) might be\nused\ + \ with implementation specific semantics." + description: "`Any` contains an arbitrary serialized protocol buffer message along\ + \ with a\nURL that describes the type of the serialized message.\n\nProtobuf\ + \ library provides support to pack/unpack Any values in the form\nof utility\ + \ functions or additional generated methods of the Any type.\n\nExample 1: Pack\ + \ and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n\ + \ ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack\ + \ and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n\ + \ ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n\ + \ }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n\ + \ any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n\ + \ any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in\ + \ Go\n\n foo := &pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n\ + \ ...\n foo := &pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo);\ + \ err != nil {\n ...\n }\n\nThe pack methods provided by protobuf\ + \ library will by default use\n'type.googleapis.com/full.type.name' as the type\ + \ URL and the unpack\nmethods only use the fully qualified type name after the\ + \ last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\n\ + name \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses\ + \ the regular\nrepresentation of the deserialized, embedded message, with an\n\ + additional field `@type` which contains the type URL. Example:\n\n package\ + \ google.profile;\n message Person {\n string first_name = 1;\n \ + \ string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\"\ + ,\n \"firstName\": ,\n \"lastName\": \n }\n\nIf\ + \ the embedded message type is well-known and has a custom JSON\nrepresentation,\ + \ that representation will be embedded adding a field\n`value` which holds the\ + \ custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\ + \n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n\ + \ \"value\": \"1.212s\"\n }" + example: + '@type': "@type" + additionalProperties: {} + provenanceBuildProvenance: + type: "object" + properties: + id: + type: "string" + description: "Required. Unique identifier of the build." + projectId: + type: "string" + description: "ID of the project." + commands: + type: "array" + description: "Commands requested by the build." + items: + $ref: "#/definitions/provenanceCommand" + builtArtifacts: + type: "array" + description: "Output of the build." + items: + $ref: "#/definitions/v1beta1provenanceArtifact" + createTime: + type: "string" + format: "date-time" + description: "Time at which the build was created." + startTime: + type: "string" + format: "date-time" + description: "Time at which execution of the build was started." + endTime: + type: "string" + format: "date-time" + description: "Time at which execution of the build was finished." + creator: + type: "string" + description: "E-mail address of the user who initiated this build. Note that\ + \ this was the\nuser's e-mail address at the time the build was initiated;\ + \ this address may\nnot represent the same end-user for all time." + logsUri: + type: "string" + description: "URI where any logs for this provenance were written." + sourceProvenance: + description: "Details of the Source input to the build." + $ref: "#/definitions/provenanceSource" + triggerId: + type: "string" + description: "Trigger identifier if the build was triggered automatically;\ + \ empty if not." + buildOptions: + type: "object" + description: "Special options applied to this build. This is a catch-all field\ + \ where\nbuild providers can enter any desired additional details." + additionalProperties: + type: "string" + builderVersion: + type: "string" + description: "Version string of the builder at the time this build was executed." + description: "Provenance of a build. Contains all information needed to verify\ + \ the full\ndetails about the build from source to completion." + example: + creator: "creator" + triggerId: "triggerId" + buildOptions: + key: "buildOptions" + sourceProvenance: + additionalContexts: + - git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + - git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + artifactStorageSourceUri: "artifactStorageSourceUri" + context: + git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + fileHashes: + key: + fileHash: + - type: {} + value: "value" + - type: {} + value: "value" + createTime: "2000-01-23T04:56:07.000+00:00" + logsUri: "logsUri" + builderVersion: "builderVersion" + builtArtifacts: + - names: + - "names" + - "names" + checksum: "checksum" + id: "id" + - names: + - "names" + - "names" + checksum: "checksum" + id: "id" + startTime: "2000-01-23T04:56:07.000+00:00" + id: "id" + endTime: "2000-01-23T04:56:07.000+00:00" + projectId: "projectId" + commands: + - args: + - "args" + - "args" + name: "name" + id: "id" + env: + - "env" + - "env" + dir: "dir" + waitFor: + - "waitFor" + - "waitFor" + - args: + - "args" + - "args" + name: "name" + id: "id" + env: + - "env" + - "env" + dir: "dir" + waitFor: + - "waitFor" + - "waitFor" + provenanceCommand: + type: "object" + properties: + name: + type: "string" + description: "Required. Name of the command, as presented on the command line,\ + \ or if the\ncommand is packaged as a Docker container, as presented to\ + \ `docker pull`." + env: + type: "array" + description: "Environment variables set before running this command." + items: + type: "string" + args: + type: "array" + description: "Command-line arguments used when executing this command." + items: + type: "string" + dir: + type: "string" + description: "Working directory (relative to project source root) used when\ + \ running this\ncommand." + id: + type: "string" + description: "Optional unique identifier for this command, used in wait_for\ + \ to reference\nthis command as a dependency." + waitFor: + type: "array" + description: "The ID(s) of the command(s) that this command depends on." + items: + type: "string" + description: "Command describes a step performed as part of the build pipeline." + example: + args: + - "args" + - "args" + name: "name" + id: "id" + env: + - "env" + - "env" + dir: "dir" + waitFor: + - "waitFor" + - "waitFor" + provenanceFileHashes: + type: "object" + properties: + fileHash: + type: "array" + description: "Required. Collection of file hashes." + items: + $ref: "#/definitions/provenanceHash" + description: "Container message for hashes of byte content of files, used in source\n\ + messages to verify integrity of source input to the build." + example: + fileHash: + - type: {} + value: "value" + - type: {} + value: "value" + provenanceHash: + type: "object" + properties: + type: + description: "Required. The type of hash that was performed." + $ref: "#/definitions/HashHashType" + value: + type: "string" + format: "byte" + description: "Required. The hash value." + pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" + description: "Container message for hash values." + example: + type: {} + value: "value" + provenanceSource: + type: "object" + properties: + artifactStorageSourceUri: + type: "string" + description: "If provided, the input binary artifacts for the build came from\ + \ this\nlocation." + fileHashes: + type: "object" + description: "Hash(es) of the build source, which can be used to verify that\ + \ the original\nsource integrity was maintained in the build.\n\nThe keys\ + \ to this map are file paths used as build source and the values\ncontain\ + \ the hash values for those files.\n\nIf the build source came in a single\ + \ package such as a gzipped tarfile\n(.tar.gz), the FileHash will be for\ + \ the single path to that file." + additionalProperties: + $ref: "#/definitions/provenanceFileHashes" + context: + description: "If provided, the source code used for the build came from this\ + \ location." + $ref: "#/definitions/sourceSourceContext" + additionalContexts: + type: "array" + description: "If provided, some of the source code used for the build may\ + \ be found in\nthese locations, in the case where the source repository\ + \ had multiple\nremotes or submodules. This list will not include the context\ + \ specified in\nthe context field." + items: + $ref: "#/definitions/sourceSourceContext" + description: "Source describes the location of the source used for the build." + example: + additionalContexts: + - git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + - git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + artifactStorageSourceUri: "artifactStorageSourceUri" + context: + git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + fileHashes: + key: + fileHash: + - type: {} + value: "value" + - type: {} + value: "value" + rpcStatus: + type: "object" + properties: + code: + type: "integer" + format: "int32" + description: "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]." + message: + type: "string" + description: "A developer-facing error message, which should be in English.\ + \ Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details]\ + \ field, or localized by the client." + details: + type: "array" + description: "A list of messages that carry the error details. There is a\ + \ common set of\nmessage types for APIs to use." + items: + $ref: "#/definitions/protobufAny" + title: "The `Status` type defines a logical error model that is suitable for different\n\ + programming environments, including REST APIs and RPC APIs. It is used by\n\ + [gRPC](https://github.com/grpc). The error model is designed to be:" + description: "- Simple to use and understand for most users\n- Flexible enough\ + \ to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three\ + \ pieces of data: error code, error message,\nand error details. The error code\ + \ should be an enum value of\n[google.rpc.Code][google.rpc.Code], but it may\ + \ accept additional error codes if needed. The\nerror message should be a developer-facing\ + \ English message that helps\ndevelopers *understand* and *resolve* the error.\ + \ If a localized user-facing\nerror message is needed, put the localized message\ + \ in the error details or\nlocalize it in the client. The optional error details\ + \ may contain arbitrary\ninformation about the error. There is a predefined\ + \ set of error detail types\nin the package `google.rpc` that can be used for\ + \ common error conditions.\n\n# Language mapping\n\nThe `Status` message is\ + \ the logical representation of the error model, but it\nis not necessarily\ + \ the actual wire format. When the `Status` message is\nexposed in different\ + \ client libraries and different wire protocols, it can be\nmapped differently.\ + \ For example, it will likely be mapped to some exceptions\nin Java, but more\ + \ likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model\ + \ and the `Status` message can be used in a variety of\nenvironments, either\ + \ with or without APIs, to provide a\nconsistent developer experience across\ + \ different environments.\n\nExample uses of this error model include:\n\n-\ + \ Partial errors. If a service needs to return partial errors to the client,\n\ + \ it may embed the `Status` in the normal response to indicate the partial\n\ + \ errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each\ + \ step may\n have a `Status` message for error reporting.\n\n- Batch operations.\ + \ If a client uses batch request and batch response, the\n `Status` message\ + \ should be used directly inside batch response, one for\n each error sub-response.\n\ + \n- Asynchronous operations. If an API call embeds asynchronous operation\n\ + \ results in its response, the status of those operations should be\n \ + \ represented directly using the `Status` message.\n\n- Logging. If some API\ + \ errors are stored in logs, the message `Status` could\n be used directly\ + \ after any stripping needed for security/privacy reasons." + example: + code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + sourceAliasContext: + type: "object" + properties: + kind: + description: "The alias kind." + $ref: "#/definitions/AliasContextKind" + name: + type: "string" + description: "The alias name." + description: "An alias to a repo revision." + example: + kind: {} + name: "name" + sourceCloudRepoSourceContext: + type: "object" + properties: + repoId: + description: "The ID of the repo." + $ref: "#/definitions/sourceRepoId" + revisionId: + type: "string" + description: "A revision ID." + aliasContext: + description: "An alias, which may be a branch or tag." + $ref: "#/definitions/sourceAliasContext" + description: "A CloudRepoSourceContext denotes a particular revision in a Google\ + \ Cloud\nSource Repo." + example: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + sourceGerritSourceContext: + type: "object" + properties: + hostUri: + type: "string" + description: "The URI of a running Gerrit instance." + gerritProject: + type: "string" + description: "The full project name within the host. Projects may be nested,\ + \ so\n\"project/subproject\" is a valid project name. The \"repo name\"\ + \ is the\nhostURI/project." + revisionId: + type: "string" + description: "A revision (commit) ID." + aliasContext: + description: "An alias, which may be a branch or tag." + $ref: "#/definitions/sourceAliasContext" + description: "A SourceContext referring to a Gerrit project." + example: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + sourceGitSourceContext: + type: "object" + properties: + url: + type: "string" + description: "Git repository URL." + revisionId: + type: "string" + description: "Git commit hash." + description: "A GitSourceContext denotes a particular revision in a third party\ + \ Git\nrepository (e.g., GitHub)." + example: + revisionId: "revisionId" + url: "url" + sourceProjectRepoId: + type: "object" + properties: + projectId: + type: "string" + description: "The ID of the project." + repoName: + type: "string" + description: "The name of the repo. Leave empty for the default repo." + description: "Selects a repo using a Google Cloud Platform project ID (e.g.,\n\ + winged-cargo-31) and a repo name within that project." + example: + repoName: "repoName" + projectId: "projectId" + sourceRepoId: + type: "object" + properties: + projectRepoId: + description: "A combination of a project ID and a repo name." + $ref: "#/definitions/sourceProjectRepoId" + uid: + type: "string" + description: "A server-assigned, globally unique identifier." + description: "A unique identifier for a Cloud Repo." + example: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + sourceSourceContext: + type: "object" + properties: + cloudRepo: + description: "A SourceContext referring to a revision in a Google Cloud Source\ + \ Repo." + $ref: "#/definitions/sourceCloudRepoSourceContext" + gerrit: + description: "A SourceContext referring to a Gerrit project." + $ref: "#/definitions/sourceGerritSourceContext" + git: + description: "A SourceContext referring to any third party Git repo (e.g.,\ + \ GitHub)." + $ref: "#/definitions/sourceGitSourceContext" + labels: + type: "object" + description: "Labels with user defined metadata." + additionalProperties: + type: "string" + description: "A SourceContext is a reference to a tree of files. A SourceContext\ + \ together\nwith a path point to a unique revision of a single file or directory." + example: + git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + spdxDocumentNote: + type: "object" + properties: + spdxVersion: + type: "string" + title: "Provide a reference number that can be used to understand how to parse\ + \ and\ninterpret the rest of the file" + dataLicence: + type: "string" + title: "Compliance with the SPDX specification includes populating the SPDX\ + \ fields\ntherein with data related to such fields (\"SPDX-Metadata\")" + title: "DocumentNote represents an SPDX Document Creation Information section:\n\ + https://spdx.github.io/spdx-spec/2-document-creation-information/" + example: + dataLicence: "dataLicence" + spdxVersion: "spdxVersion" + spdxDocumentOccurrence: + type: "object" + properties: + id: + type: "string" + title: "Identify the current SPDX document which may be referenced in relationships\n\ + by other files, packages internally and documents externally" + title: + type: "string" + title: "Identify name of this document as designated by creator" + namespace: + type: "string" + title: "Provide an SPDX document specific namespace as a unique absolute Uniform\n\ + Resource Identifier (URI) as specified in RFC-3986, with the exception of\n\ + the ‘#’ delimiter" + externalDocumentRefs: + type: "array" + title: "Identify any external SPDX documents referenced within this SPDX document" + items: + type: "string" + licenseListVersion: + type: "string" + title: "A field for creators of the SPDX file to provide the version of\n\ + the SPDX License List used when the SPDX file was created" + creators: + type: "array" + title: "Identify who (or what, in the case of a tool) created the SPDX file.\ + \ If the\nSPDX file was created by an individual, indicate the person's\ + \ name" + items: + type: "string" + createTime: + type: "string" + format: "date-time" + title: "Identify when the SPDX file was originally created. The date is to\ + \ be\nspecified according to combined date and time in UTC format as specified\ + \ in\nISO 8601 standard" + creatorComment: + type: "string" + title: "A field for creators of the SPDX file to provide general comments\n\ + about the creation of the SPDX file or any other relevant comment not\n\ + included in the other fields" + documentComment: + type: "string" + title: "A field for creators of the SPDX file content to provide comments\n\ + to the consumers of the SPDX document" + title: "DocumentOccurrence represents an SPDX Document Creation Information\n\ + section: https://spdx.github.io/spdx-spec/2-document-creation-information/" + example: + creatorComment: "creatorComment" + documentComment: "documentComment" + licenseListVersion: "licenseListVersion" + createTime: "2000-01-23T04:56:07.000+00:00" + creators: + - "creators" + - "creators" + namespace: "namespace" + id: "id" + externalDocumentRefs: + - "externalDocumentRefs" + - "externalDocumentRefs" + title: "title" + spdxFileNote: + type: "object" + properties: + title: + type: "string" + title: "Identify the full path and filename that corresponds to the file\n\ + information in this section" + fileType: + title: "This field provides information about the type of file identified" + $ref: "#/definitions/FileNoteFileType" + checksum: + type: "array" + title: "Provide a unique identifier to match analysis information on each\ + \ specific\nfile in a package" + items: + type: "string" + title: "FileNote represents an SPDX File Information\nsection: https://spdx.github.io/spdx-spec/4-file-information/" + example: + checksum: + - "checksum" + - "checksum" + title: "title" + fileType: {} + spdxFileOccurrence: + type: "object" + properties: + id: + type: "string" + title: "Uniquely identify any element in an SPDX document which may be referenced\n\ + by other elements" + licenseConcluded: + title: "This field contains the license the SPDX file creator has concluded\ + \ as\ngoverning the file or alternative values if the governing license\ + \ cannot be\ndetermined" + $ref: "#/definitions/v1beta1License" + filesLicenseInfo: + type: "array" + title: "This field contains the license information actually found in the\ + \ file, if\nany" + items: + type: "string" + copyright: + type: "string" + title: "Identify the copyright holder of the file, as well as any dates present" + comment: + type: "string" + title: "This field provides a place for the SPDX file creator to record any\ + \ general\ncomments about the file" + notice: + type: "string" + title: "This field provides a place for the SPDX file creator to record license\n\ + notices or other such related notices found in the file" + contributors: + type: "array" + title: "This field provides a place for the SPDX file creator to record file\n\ + contributors" + items: + type: "string" + attributions: + type: "array" + title: "This field provides a place for the SPDX data creator to record, at\ + \ the\nfile level, acknowledgements that may be needed to be communicated\ + \ in\nsome contexts" + items: + type: "string" + title: "FileOccurrence represents an SPDX File Information\nsection: https://spdx.github.io/spdx-spec/4-file-information/" + example: + copyright: "copyright" + licenseConcluded: + expression: "expression" + comments: "comments" + filesLicenseInfo: + - "filesLicenseInfo" + - "filesLicenseInfo" + comment: "comment" + id: "id" + contributors: + - "contributors" + - "contributors" + attributions: + - "attributions" + - "attributions" + notice: "notice" + spdxPackageInfoNote: + type: "object" + properties: + title: + type: "string" + title: "Identify the full name of the package as given by the Package Originator" + version: + type: "string" + title: "Identify the version of the package" + supplier: + type: "string" + title: "Identify the actual distribution source for the package/directory\n\ + identified in the SPDX file" + originator: + type: "string" + title: "If the package identified in the SPDX file originated from a different\n\ + person or organization than identified as Package Supplier, this field\n\ + identifies from where or whom the package originally came" + downloadLocation: + type: "string" + title: "This section identifies the download Universal Resource Locator (URL),\ + \ or\n a specific location within a version control system (VCS) for the\ + \ package\n at the time that the SPDX file was created" + analyzed: + type: "boolean" + title: "Indicates whether the file content of this package has been available\ + \ for\nor subjected to analysis when creating the SPDX document" + verificationCode: + type: "string" + title: "This field provides an independently reproducible mechanism identifying\n\ + specific contents of a package based on the actual files (except the SPDX\n\ + file itself, if it is included in the package) that make up each package\n\ + and that correlates to the data in this SPDX file" + checksum: + type: "string" + title: "Provide an independently reproducible mechanism that permits unique\n\ + identification of a specific package that correlates to the data in this\n\ + SPDX file" + homePage: + type: "string" + title: "Provide a place for the SPDX file creator to record a web site that\ + \ serves\nas the package's home page" + filesLicenseInfo: + type: "array" + title: "Contain the license the SPDX file creator has concluded as governing\ + \ the\nThis field is to contain a list of all licenses found in the package.\ + \ The\nrelationship between licenses (i.e., conjunctive, disjunctive) is\ + \ not\nspecified in this field – it is simply a listing of all licenses\ + \ found" + items: + type: "string" + licenseDeclared: + title: "List the licenses that have been declared by the authors of the package" + $ref: "#/definitions/v1beta1License" + copyright: + type: "string" + title: "Identify the copyright holders of the package, as well as any dates\ + \ present" + summaryDescription: + type: "string" + title: "A short description of the package" + detailedDescription: + type: "string" + title: "A more detailed description of the package" + externalRefs: + type: "array" + title: "ExternalRef" + items: + $ref: "#/definitions/PackageInfoNoteExternalRef" + attribution: + type: "string" + title: "A place for the SPDX data creator to record, at the package level,\n\ + acknowledgements that may be needed to be communicated in some contexts" + packageType: + type: "string" + description: "The type of package: OS, MAVEN, GO, GO_STDLIB, etc." + title: "PackageInfoNote represents an SPDX Package Information\nsection: https://spdx.github.io/spdx-spec/3-package-information/" + example: + copyright: "copyright" + filesLicenseInfo: + - "filesLicenseInfo" + - "filesLicenseInfo" + analyzed: true + externalRefs: + - comment: "comment" + category: {} + type: "type" + locator: "locator" + - comment: "comment" + category: {} + type: "type" + locator: "locator" + downloadLocation: "downloadLocation" + originator: "originator" + title: "title" + version: "version" + homePage: "homePage" + packageType: "packageType" + verificationCode: "verificationCode" + detailedDescription: "detailedDescription" + supplier: "supplier" + checksum: "checksum" + attribution: "attribution" + licenseDeclared: + expression: "expression" + comments: "comments" + summaryDescription: "summaryDescription" + spdxPackageInfoOccurrence: + type: "object" + properties: + id: + type: "string" + title: "Uniquely identify any element in an SPDX document which may be referenced\n\ + by other elements" + filename: + type: "string" + title: "Provide the actual file name of the package, or path of the directory\ + \ being\ntreated as a package" + sourceInfo: + type: "string" + title: "Provide a place for the SPDX file creator to record any relevant background\n\ + information or additional comments about the origin of the package" + licenseConcluded: + title: "package or alternative values, if the governing license cannot be\n\ + determined" + $ref: "#/definitions/v1beta1License" + comment: + type: "string" + title: "A place for the SPDX file creator to record any general\ncomments\ + \ about the package being described" + packageType: + type: "string" + description: "The type of package: OS, MAVEN, GO, GO_STDLIB, etc." + readOnly: true + title: + type: "string" + title: "Identify the full name of the package as given by the Package Originator" + readOnly: true + version: + type: "string" + title: "Identify the version of the package" + readOnly: true + homePage: + type: "string" + title: "Provide a place for the SPDX file creator to record a web site that\ + \ serves\nas the package's home page" + readOnly: true + summaryDescription: + type: "string" + title: "A short description of the package" + readOnly: true + title: "PackageInfoOccurrence represents an SPDX Package Information\nsection:\ + \ https://spdx.github.io/spdx-spec/3-package-information/" + example: + sourceInfo: "sourceInfo" + filename: "filename" + licenseConcluded: + expression: "expression" + comments: "comments" + comment: "comment" + id: "id" + title: "title" + packageType: "packageType" + version: "version" + homePage: "homePage" + summaryDescription: "summaryDescription" + spdxRelationshipNote: + type: "object" + properties: + type: + title: "The type of relationship between the source and target SPDX elements" + $ref: "#/definitions/spdxRelationshipType" + title: "RelationshipNote represents an SPDX Relationship\nsection:\nhttps://spdx.github.io/spdx-spec/7-relationships-between-SPDX-elements/" + example: + type: {} + spdxRelationshipOccurrence: + type: "object" + properties: + source: + type: "string" + title: "Also referred to as SPDXRef-A\nThe source SPDX element (file, package,\ + \ etc)" + target: + type: "string" + title: "Also referred to as SPDXRef-B\nThe target SPDC element (file, package,\ + \ etc)\nIn cases where there are \"known unknowns\", the use of the keyword\n\ + NOASSERTION can be used The keywords NONE can be used to indicate that an\n\ + SPDX element (package/file/snippet) has no other elements connected by\n\ + some relationship to it" + type: + title: "The type of relationship between the source and target SPDX elements" + $ref: "#/definitions/spdxRelationshipType" + comment: + type: "string" + title: "A place for the SPDX file creator to record any general comments about\n\ + the relationship" + title: "RelationshipOccurrence represents an SPDX Relationship\nsection:\nhttps://spdx.github.io/spdx-spec/7-relationships-between-SPDX-elements/" + example: + comment: "comment" + source: "source" + type: {} + target: "target" + spdxRelationshipType: + type: "string" + title: "The type of relationship between the source and target SPDX elements\n\ + RelationshipOccurrence represents an SPDX Relationship section:\nhttps://spdx.github.io/spdx-spec/7-relationships-between-SPDX-elements/" + description: "- RELATIONSHIP_TYPE_UNSPECIFIED: Unspecified\n - DESCRIBES: Is to\ + \ be used when SPDXRef-DOCUMENT describes SPDXRef-A\n - DESCRIBED_BY: Is to\ + \ be used when SPDXRef-A is described by SPDXREF-Document\n - CONTAINS: Is to\ + \ be used when SPDXRef-A contains SPDXRef-B\n - CONTAINED_BY: Is to be used\ + \ when SPDXRef-A is contained by SPDXRef-B\n - DEPENDS_ON: Is to be used when\ + \ SPDXRef-A depends on SPDXRef-B\n - DEPENDENCY_OF: Is to be used when SPDXRef-A\ + \ is dependency of SPDXRef-B\n - DEPENDENCY_MANIFEST_OF: Is to be used when\ + \ SPDXRef-A is a manifest file that lists a set of\ndependencies for SPDXRef-B\n\ + \ - BUILD_DEPENDENCY_OF: Is to be used when SPDXRef-A is a build dependency\ + \ of SPDXRef-B\n - DEV_DEPENDENCY_OF: Is to be used when SPDXRef-A is a development\ + \ dependency of SPDXRef-B\n - OPTIONAL_DEPENDENCY_OF: Is to be used when SPDXRef-A\ + \ is an optional dependency of SPDXRef-B\n - PROVIDED_DEPENDENCY_OF: Is to be\ + \ used when SPDXRef-A is a to be provided dependency of\nSPDXRef-B\n - TEST_DEPENDENCY_OF:\ + \ Is to be used when SPDXRef-A is a test dependency of SPDXRef-B\n - RUNTIME_DEPENDENCY_OF:\ + \ Is to be used when SPDXRef-A is a dependency required for the execution\n\ + of SPDXRef-B\n - EXAMPLE_OF: Is to be used when SPDXRef-A is an example of SPDXRef-B\n\ + \ - GENERATES: Is to be used when SPDXRef-A generates SPDXRef-B\n - GENERATED_FROM:\ + \ Is to be used when SPDXRef-A was generated from SPDXRef-B\n - ANCESTOR_OF:\ + \ Is to be used when SPDXRef-A is an ancestor (same lineage but\npre-dates)\ + \ SPDXRef-B\n - DESCENDANT_OF: Is to be used when SPDXRef-A is a descendant\ + \ of (same lineage but\npostdates) SPDXRef-B\n - VARIANT_OF: Is to be used when\ + \ SPDXRef-A is a variant of (same lineage but not\nclear which came first) SPDXRef-B\n\ + \ - DISTRIBUTION_ARTIFACT: Is to be used when distributing SPDXRef-A requires\ + \ that SPDXRef-B also\nbe distributed\n - PATCH_FOR: Is to be used when SPDXRef-A\ + \ is a patch file for (to be applied to)\nSPDXRef-B\n - PATCH_APPLIED: Is to\ + \ be used when SPDXRef-A is a patch file that has been applied to\nSPDXRef-B\n\ + \ - COPY_OF: Is to be used when SPDXRef-A is an exact copy of SPDXRef-B\n -\ + \ FILE_ADDED: Is to be used when SPDXRef-A is a file that was added to SPDXRef-B\n\ + \ - FILE_DELETED: Is to be used when SPDXRef-A is a file that was deleted from\ + \ SPDXRef-B\n - FILE_MODIFIED: Is to be used when SPDXRef-A is a file that was\ + \ modified from SPDXRef-B\n - EXPANDED_FROM_ARCHIVE: Is to be used when SPDXRef-A\ + \ is expanded from the archive SPDXRef-B\n - DYNAMIC_LINK: Is to be used when\ + \ SPDXRef-A dynamically links to SPDXRef-B\n - STATIC_LINK: Is to be used when\ + \ SPDXRef-A statically links to SPDXRef-B\n - DATA_FILE_OF: Is to be used when\ + \ SPDXRef-A is a data file used in SPDXRef-B\n - TEST_CASE_OF: Is to be used\ + \ when SPDXRef-A is a test case used in testing SPDXRef-B\n - BUILD_TOOL_OF:\ + \ Is to be used when SPDXRef-A is used to build SPDXRef-B\n - DEV_TOOL_OF: Is\ + \ to be used when SPDXRef-A is used as a development tool for\nSPDXRef-B\n -\ + \ TEST_OF: Is to be used when SPDXRef-A is used for testing SPDXRef-B\n - TEST_TOOL_OF:\ + \ Is to be used when SPDXRef-A is used as a test tool for SPDXRef-B\n - DOCUMENTATION_OF:\ + \ Is to be used when SPDXRef-A provides documentation of SPDXRef-B\n - OPTIONAL_COMPONENT_OF:\ + \ Is to be used when SPDXRef-A is an optional component of SPDXRef-B\n - METAFILE_OF:\ + \ Is to be used when SPDXRef-A is a metafile of SPDXRef-B\n - PACKAGE_OF: Is\ + \ to be used when SPDXRef-A is used as a package as part of SPDXRef-B\n - AMENDS:\ + \ Is to be used when (current) SPDXRef-DOCUMENT amends the SPDX\ninformation\ + \ in SPDXRef-B\n - PREREQUISITE_FOR: Is to be used when SPDXRef-A is a prerequisite\ + \ for SPDXRef-B\n - HAS_PREREQUISITE: Is to be used when SPDXRef-A has as a\ + \ prerequisite SPDXRef-B\n - OTHER: Is to be used for a relationship which has\ + \ not been defined in the\nformal SPDX specification. A description of the relationship\ + \ should be\nincluded in the Relationship comments field" + enum: + - "RELATIONSHIP_TYPE_UNSPECIFIED" + - "DESCRIBES" + - "DESCRIBED_BY" + - "CONTAINS" + - "CONTAINED_BY" + - "DEPENDS_ON" + - "DEPENDENCY_OF" + - "DEPENDENCY_MANIFEST_OF" + - "BUILD_DEPENDENCY_OF" + - "DEV_DEPENDENCY_OF" + - "OPTIONAL_DEPENDENCY_OF" + - "PROVIDED_DEPENDENCY_OF" + - "TEST_DEPENDENCY_OF" + - "RUNTIME_DEPENDENCY_OF" + - "EXAMPLE_OF" + - "GENERATES" + - "GENERATED_FROM" + - "ANCESTOR_OF" + - "DESCENDANT_OF" + - "VARIANT_OF" + - "DISTRIBUTION_ARTIFACT" + - "PATCH_FOR" + - "PATCH_APPLIED" + - "COPY_OF" + - "FILE_ADDED" + - "FILE_DELETED" + - "FILE_MODIFIED" + - "EXPANDED_FROM_ARCHIVE" + - "DYNAMIC_LINK" + - "STATIC_LINK" + - "DATA_FILE_OF" + - "TEST_CASE_OF" + - "BUILD_TOOL_OF" + - "DEV_TOOL_OF" + - "TEST_OF" + - "TEST_TOOL_OF" + - "DOCUMENTATION_OF" + - "OPTIONAL_COMPONENT_OF" + - "METAFILE_OF" + - "PACKAGE_OF" + - "AMENDS" + - "PREREQUISITE_FOR" + - "HAS_PREREQUISITE" + - "OTHER" + default: "RELATIONSHIP_TYPE_UNSPECIFIED" + v1beta1BatchCreateNotesResponse: + type: "object" + properties: + notes: + type: "array" + description: "The notes that were created." + items: + $ref: "#/definitions/v1beta1Note" + description: "Response for creating notes in batch." + example: + notes: + - longDescription: "longDescription" + package: + license: + expression: "expression" + comments: "comments" + name: "name" + digest: + - digestBytes: "digestBytes" + algo: "algo" + - digestBytes: "digestBytes" + algo: "algo" + description: "description" + distribution: + - latestVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + description: "description" + cpeUri: "cpeUri" + maintainer: "maintainer" + url: "url" + architecture: {} + - latestVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + description: "description" + cpeUri: "cpeUri" + maintainer: "maintainer" + url: "url" + architecture: {} + packageType: "packageType" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + maintainer: "maintainer" + url: "url" + kind: {} + vulnerabilityAssessment: + longDescription: "longDescription" + assessment: + longDescription: "longDescription" + cve: "cve" + relatedUris: + - label: "label" + url: "url" + - label: "label" + url: "url" + remediations: + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + shortDescription: "shortDescription" + state: {} + impacts: + - "impacts" + - "impacts" + justification: + justificationType: {} + details: "details" + product: + genericUri: "genericUri" + name: "name" + id: "id" + publisher: + issuingAuthority: "issuingAuthority" + name: "name" + context: "context" + shortDescription: "shortDescription" + title: "title" + languageCode: "languageCode" + baseImage: + resourceUrl: "resourceUrl" + fingerprint: + v1Name: "v1Name" + v2Blob: + - "v2Blob" + - "v2Blob" + v2Name: "v2Name" + attestationAuthority: + hint: + humanReadableName: "humanReadableName" + updateTime: "2000-01-23T04:56:07.000+00:00" + intoto: + expectedMaterials: + - artifactRule: + - "artifactRule" + - "artifactRule" + - artifactRule: + - "artifactRule" + - "artifactRule" + signingKeys: + - publicKeyValue: "publicKeyValue" + keyId: "keyId" + keyType: "keyType" + keyScheme: "keyScheme" + - publicKeyValue: "publicKeyValue" + keyId: "keyId" + keyType: "keyType" + keyScheme: "keyScheme" + expectedProducts: + - artifactRule: + - "artifactRule" + - "artifactRule" + - artifactRule: + - "artifactRule" + - "artifactRule" + stepName: "stepName" + threshold: "threshold" + expectedCommand: + - "expectedCommand" + - "expectedCommand" + shortDescription: "shortDescription" + vulnerability: + severity: {} + cwe: + - "cwe" + - "cwe" + cvssScore: 0.8008282 + cvssV3: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + cvssVersion: {} + details: + - package: "package" + minAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + maxAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + vendor: "vendor" + description: "description" + sourceUpdateTime: "2000-01-23T04:56:07.000+00:00" + isObsolete: true + source: "source" + cpeUri: "cpeUri" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + - package: "package" + minAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + maxAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + vendor: "vendor" + description: "description" + sourceUpdateTime: "2000-01-23T04:56:07.000+00:00" + isObsolete: true + source: "source" + cpeUri: "cpeUri" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + sourceUpdateTime: "2000-01-23T04:56:07.000+00:00" + cvssV2: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + windowsDetails: + - name: "name" + description: "description" + fixingKbs: + - name: "name" + url: "url" + - name: "name" + url: "url" + cpeUri: "cpeUri" + - name: "name" + description: "description" + fixingKbs: + - name: "name" + url: "url" + - name: "name" + url: "url" + cpeUri: "cpeUri" + spdxRelationship: + type: {} + relatedNoteNames: + - "relatedNoteNames" + - "relatedNoteNames" + spdxFile: + checksum: + - "checksum" + - "checksum" + title: "title" + fileType: {} + deployable: + resourceUri: + - "resourceUri" + - "resourceUri" + createTime: "2000-01-23T04:56:07.000+00:00" + build: + signature: + signature: "signature" + keyId: "keyId" + publicKey: "publicKey" + keyType: {} + builderVersion: "builderVersion" + expirationTime: "2000-01-23T04:56:07.000+00:00" + discovery: {} + spdxPackage: + copyright: "copyright" + filesLicenseInfo: + - "filesLicenseInfo" + - "filesLicenseInfo" + analyzed: true + externalRefs: + - comment: "comment" + category: {} + type: "type" + locator: "locator" + - comment: "comment" + category: {} + type: "type" + locator: "locator" + downloadLocation: "downloadLocation" + originator: "originator" + title: "title" + version: "version" + homePage: "homePage" + packageType: "packageType" + verificationCode: "verificationCode" + detailedDescription: "detailedDescription" + supplier: "supplier" + checksum: "checksum" + attribution: "attribution" + licenseDeclared: + expression: "expression" + comments: "comments" + summaryDescription: "summaryDescription" + name: "name" + sbom: + dataLicence: "dataLicence" + spdxVersion: "spdxVersion" + relatedUrl: + - label: "label" + url: "url" + - label: "label" + url: "url" + - longDescription: "longDescription" + package: + license: + expression: "expression" + comments: "comments" + name: "name" + digest: + - digestBytes: "digestBytes" + algo: "algo" + - digestBytes: "digestBytes" + algo: "algo" + description: "description" + distribution: + - latestVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + description: "description" + cpeUri: "cpeUri" + maintainer: "maintainer" + url: "url" + architecture: {} + - latestVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + description: "description" + cpeUri: "cpeUri" + maintainer: "maintainer" + url: "url" + architecture: {} + packageType: "packageType" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + maintainer: "maintainer" + url: "url" + kind: {} + vulnerabilityAssessment: + longDescription: "longDescription" + assessment: + longDescription: "longDescription" + cve: "cve" + relatedUris: + - label: "label" + url: "url" + - label: "label" + url: "url" + remediations: + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + shortDescription: "shortDescription" + state: {} + impacts: + - "impacts" + - "impacts" + justification: + justificationType: {} + details: "details" + product: + genericUri: "genericUri" + name: "name" + id: "id" + publisher: + issuingAuthority: "issuingAuthority" + name: "name" + context: "context" + shortDescription: "shortDescription" + title: "title" + languageCode: "languageCode" + baseImage: + resourceUrl: "resourceUrl" + fingerprint: + v1Name: "v1Name" + v2Blob: + - "v2Blob" + - "v2Blob" + v2Name: "v2Name" + attestationAuthority: + hint: + humanReadableName: "humanReadableName" + updateTime: "2000-01-23T04:56:07.000+00:00" + intoto: + expectedMaterials: + - artifactRule: + - "artifactRule" + - "artifactRule" + - artifactRule: + - "artifactRule" + - "artifactRule" + signingKeys: + - publicKeyValue: "publicKeyValue" + keyId: "keyId" + keyType: "keyType" + keyScheme: "keyScheme" + - publicKeyValue: "publicKeyValue" + keyId: "keyId" + keyType: "keyType" + keyScheme: "keyScheme" + expectedProducts: + - artifactRule: + - "artifactRule" + - "artifactRule" + - artifactRule: + - "artifactRule" + - "artifactRule" + stepName: "stepName" + threshold: "threshold" + expectedCommand: + - "expectedCommand" + - "expectedCommand" + shortDescription: "shortDescription" + vulnerability: + severity: {} + cwe: + - "cwe" + - "cwe" + cvssScore: 0.8008282 + cvssV3: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + cvssVersion: {} + details: + - package: "package" + minAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + maxAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + vendor: "vendor" + description: "description" + sourceUpdateTime: "2000-01-23T04:56:07.000+00:00" + isObsolete: true + source: "source" + cpeUri: "cpeUri" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + - package: "package" + minAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + maxAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + vendor: "vendor" + description: "description" + sourceUpdateTime: "2000-01-23T04:56:07.000+00:00" + isObsolete: true + source: "source" + cpeUri: "cpeUri" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + sourceUpdateTime: "2000-01-23T04:56:07.000+00:00" + cvssV2: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + windowsDetails: + - name: "name" + description: "description" + fixingKbs: + - name: "name" + url: "url" + - name: "name" + url: "url" + cpeUri: "cpeUri" + - name: "name" + description: "description" + fixingKbs: + - name: "name" + url: "url" + - name: "name" + url: "url" + cpeUri: "cpeUri" + spdxRelationship: + type: {} + relatedNoteNames: + - "relatedNoteNames" + - "relatedNoteNames" + spdxFile: + checksum: + - "checksum" + - "checksum" + title: "title" + fileType: {} + deployable: + resourceUri: + - "resourceUri" + - "resourceUri" + createTime: "2000-01-23T04:56:07.000+00:00" + build: + signature: + signature: "signature" + keyId: "keyId" + publicKey: "publicKey" + keyType: {} + builderVersion: "builderVersion" + expirationTime: "2000-01-23T04:56:07.000+00:00" + discovery: {} + spdxPackage: + copyright: "copyright" + filesLicenseInfo: + - "filesLicenseInfo" + - "filesLicenseInfo" + analyzed: true + externalRefs: + - comment: "comment" + category: {} + type: "type" + locator: "locator" + - comment: "comment" + category: {} + type: "type" + locator: "locator" + downloadLocation: "downloadLocation" + originator: "originator" + title: "title" + version: "version" + homePage: "homePage" + packageType: "packageType" + verificationCode: "verificationCode" + detailedDescription: "detailedDescription" + supplier: "supplier" + checksum: "checksum" + attribution: "attribution" + licenseDeclared: + expression: "expression" + comments: "comments" + summaryDescription: "summaryDescription" + name: "name" + sbom: + dataLicence: "dataLicence" + spdxVersion: "spdxVersion" + relatedUrl: + - label: "label" + url: "url" + - label: "label" + url: "url" + v1beta1BatchCreateOccurrencesResponse: + type: "object" + properties: + occurrences: + type: "array" + description: "The occurrences that were created." + items: + $ref: "#/definitions/v1beta1Occurrence" + description: "Response for creating occurrences in batch." + example: + occurrences: + - discovered: + discovered: + analysisCompleted: + analysisType: + - "analysisType" + - "analysisType" + analysisError: + - code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + - code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + analysisStatusError: + code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + continuousAnalysis: {} + lastAnalysisTime: "2000-01-23T04:56:07.000+00:00" + analysisStatus: {} + attestation: + attestation: + genericSignedAttestation: + serializedPayload: "serializedPayload" + contentType: {} + signatures: + - signature: "signature" + publicKeyId: "publicKeyId" + - signature: "signature" + publicKeyId: "publicKeyId" + pgpSignedAttestation: + signature: "signature" + pgpKeyId: "pgpKeyId" + contentType: {} + resource: + name: "name" + uri: "uri" + contentHash: + type: {} + value: "value" + noteName: "noteName" + kind: {} + updateTime: "2000-01-23T04:56:07.000+00:00" + intoto: + signed: + environment: + customValues: + key: "customValues" + materials: + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + byproducts: + customValues: + key: "customValues" + command: + - "command" + - "command" + products: + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + signatures: + - sig: "sig" + keyid: "keyid" + - sig: "sig" + keyid: "keyid" + vulnerability: + severity: {} + longDescription: "longDescription" + cvssScore: 0.8008282 + cvssV3: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + relatedUrls: + - label: "label" + url: "url" + - label: "label" + url: "url" + cvssVersion: {} + packageIssue: + - affectedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + - affectedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + shortDescription: "shortDescription" + cvssV2: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + type: "type" + vexAssessment: + cve: "cve" + relatedUris: + - label: "label" + url: "url" + - label: "label" + url: "url" + noteName: "noteName" + remediations: + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + state: {} + impacts: + - "impacts" + - "impacts" + justification: + justificationType: {} + details: "details" + spdxRelationship: + comment: "comment" + source: "source" + type: {} + target: "target" + spdxFile: + copyright: "copyright" + licenseConcluded: + expression: "expression" + comments: "comments" + filesLicenseInfo: + - "filesLicenseInfo" + - "filesLicenseInfo" + comment: "comment" + id: "id" + contributors: + - "contributors" + - "contributors" + attributions: + - "attributions" + - "attributions" + notice: "notice" + remediation: "remediation" + envelope: + payloadType: "payloadType" + payload: "payload" + signatures: + - sig: "sig" + keyid: "keyid" + - sig: "sig" + keyid: "keyid" + createTime: "2000-01-23T04:56:07.000+00:00" + build: + provenance: + creator: "creator" + triggerId: "triggerId" + buildOptions: + key: "buildOptions" + sourceProvenance: + additionalContexts: + - git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + - git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + artifactStorageSourceUri: "artifactStorageSourceUri" + context: + git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + fileHashes: + key: + fileHash: + - type: {} + value: "value" + - type: {} + value: "value" + createTime: "2000-01-23T04:56:07.000+00:00" + logsUri: "logsUri" + builderVersion: "builderVersion" + builtArtifacts: + - names: + - "names" + - "names" + checksum: "checksum" + id: "id" + - names: + - "names" + - "names" + checksum: "checksum" + id: "id" + startTime: "2000-01-23T04:56:07.000+00:00" + id: "id" + endTime: "2000-01-23T04:56:07.000+00:00" + projectId: "projectId" + commands: + - args: + - "args" + - "args" + name: "name" + id: "id" + env: + - "env" + - "env" + dir: "dir" + waitFor: + - "waitFor" + - "waitFor" + - args: + - "args" + - "args" + name: "name" + id: "id" + env: + - "env" + - "env" + dir: "dir" + waitFor: + - "waitFor" + - "waitFor" + provenanceBytes: "provenanceBytes" + spdxPackage: + sourceInfo: "sourceInfo" + filename: "filename" + licenseConcluded: + expression: "expression" + comments: "comments" + comment: "comment" + id: "id" + title: "title" + packageType: "packageType" + version: "version" + homePage: "homePage" + summaryDescription: "summaryDescription" + installation: + installation: + license: + expression: "expression" + comments: "comments" + name: "name" + location: + - path: "path" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + - path: "path" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + architecture: {} + name: "name" + sbom: + creatorComment: "creatorComment" + documentComment: "documentComment" + licenseListVersion: "licenseListVersion" + createTime: "2000-01-23T04:56:07.000+00:00" + creators: + - "creators" + - "creators" + namespace: "namespace" + id: "id" + externalDocumentRefs: + - "externalDocumentRefs" + - "externalDocumentRefs" + title: "title" + derivedImage: + derivedImage: + distance: 6 + fingerprint: + v1Name: "v1Name" + v2Blob: + - "v2Blob" + - "v2Blob" + v2Name: "v2Name" + baseResourceUrl: "baseResourceUrl" + layerInfo: + - arguments: "arguments" + directive: {} + - arguments: "arguments" + directive: {} + deployment: + deployment: + address: "address" + undeployTime: "2000-01-23T04:56:07.000+00:00" + userEmail: "userEmail" + deployTime: "2000-01-23T04:56:07.000+00:00" + resourceUri: + - "resourceUri" + - "resourceUri" + config: "config" + platform: {} + - discovered: + discovered: + analysisCompleted: + analysisType: + - "analysisType" + - "analysisType" + analysisError: + - code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + - code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + analysisStatusError: + code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + continuousAnalysis: {} + lastAnalysisTime: "2000-01-23T04:56:07.000+00:00" + analysisStatus: {} + attestation: + attestation: + genericSignedAttestation: + serializedPayload: "serializedPayload" + contentType: {} + signatures: + - signature: "signature" + publicKeyId: "publicKeyId" + - signature: "signature" + publicKeyId: "publicKeyId" + pgpSignedAttestation: + signature: "signature" + pgpKeyId: "pgpKeyId" + contentType: {} + resource: + name: "name" + uri: "uri" + contentHash: + type: {} + value: "value" + noteName: "noteName" + kind: {} + updateTime: "2000-01-23T04:56:07.000+00:00" + intoto: + signed: + environment: + customValues: + key: "customValues" + materials: + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + byproducts: + customValues: + key: "customValues" + command: + - "command" + - "command" + products: + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + signatures: + - sig: "sig" + keyid: "keyid" + - sig: "sig" + keyid: "keyid" + vulnerability: + severity: {} + longDescription: "longDescription" + cvssScore: 0.8008282 + cvssV3: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + relatedUrls: + - label: "label" + url: "url" + - label: "label" + url: "url" + cvssVersion: {} + packageIssue: + - affectedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + - affectedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + shortDescription: "shortDescription" + cvssV2: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + type: "type" + vexAssessment: + cve: "cve" + relatedUris: + - label: "label" + url: "url" + - label: "label" + url: "url" + noteName: "noteName" + remediations: + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + state: {} + impacts: + - "impacts" + - "impacts" + justification: + justificationType: {} + details: "details" + spdxRelationship: + comment: "comment" + source: "source" + type: {} + target: "target" + spdxFile: + copyright: "copyright" + licenseConcluded: + expression: "expression" + comments: "comments" + filesLicenseInfo: + - "filesLicenseInfo" + - "filesLicenseInfo" + comment: "comment" + id: "id" + contributors: + - "contributors" + - "contributors" + attributions: + - "attributions" + - "attributions" + notice: "notice" + remediation: "remediation" + envelope: + payloadType: "payloadType" + payload: "payload" + signatures: + - sig: "sig" + keyid: "keyid" + - sig: "sig" + keyid: "keyid" + createTime: "2000-01-23T04:56:07.000+00:00" + build: + provenance: + creator: "creator" + triggerId: "triggerId" + buildOptions: + key: "buildOptions" + sourceProvenance: + additionalContexts: + - git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + - git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + artifactStorageSourceUri: "artifactStorageSourceUri" + context: + git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + fileHashes: + key: + fileHash: + - type: {} + value: "value" + - type: {} + value: "value" + createTime: "2000-01-23T04:56:07.000+00:00" + logsUri: "logsUri" + builderVersion: "builderVersion" + builtArtifacts: + - names: + - "names" + - "names" + checksum: "checksum" + id: "id" + - names: + - "names" + - "names" + checksum: "checksum" + id: "id" + startTime: "2000-01-23T04:56:07.000+00:00" + id: "id" + endTime: "2000-01-23T04:56:07.000+00:00" + projectId: "projectId" + commands: + - args: + - "args" + - "args" + name: "name" + id: "id" + env: + - "env" + - "env" + dir: "dir" + waitFor: + - "waitFor" + - "waitFor" + - args: + - "args" + - "args" + name: "name" + id: "id" + env: + - "env" + - "env" + dir: "dir" + waitFor: + - "waitFor" + - "waitFor" + provenanceBytes: "provenanceBytes" + spdxPackage: + sourceInfo: "sourceInfo" + filename: "filename" + licenseConcluded: + expression: "expression" + comments: "comments" + comment: "comment" + id: "id" + title: "title" + packageType: "packageType" + version: "version" + homePage: "homePage" + summaryDescription: "summaryDescription" + installation: + installation: + license: + expression: "expression" + comments: "comments" + name: "name" + location: + - path: "path" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + - path: "path" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + architecture: {} + name: "name" + sbom: + creatorComment: "creatorComment" + documentComment: "documentComment" + licenseListVersion: "licenseListVersion" + createTime: "2000-01-23T04:56:07.000+00:00" + creators: + - "creators" + - "creators" + namespace: "namespace" + id: "id" + externalDocumentRefs: + - "externalDocumentRefs" + - "externalDocumentRefs" + title: "title" + derivedImage: + derivedImage: + distance: 6 + fingerprint: + v1Name: "v1Name" + v2Blob: + - "v2Blob" + - "v2Blob" + v2Name: "v2Name" + baseResourceUrl: "baseResourceUrl" + layerInfo: + - arguments: "arguments" + directive: {} + - arguments: "arguments" + directive: {} + deployment: + deployment: + address: "address" + undeployTime: "2000-01-23T04:56:07.000+00:00" + userEmail: "userEmail" + deployTime: "2000-01-23T04:56:07.000+00:00" + resourceUri: + - "resourceUri" + - "resourceUri" + config: "config" + platform: {} + v1beta1Digest: + type: "object" + properties: + algo: + type: "string" + description: "`SHA1`, `SHA512` etc." + digestBytes: + type: "string" + format: "byte" + description: "Value of the digest." + pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" + description: "Digest information." + example: + digestBytes: "digestBytes" + algo: "algo" + v1beta1Envelope: + type: "object" + properties: + payload: + type: "string" + format: "byte" + pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" + payloadType: + type: "string" + signatures: + type: "array" + items: + $ref: "#/definitions/v1beta1EnvelopeSignature" + description: "MUST match https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto.\n\ + An authenticated message of arbitrary type." + example: + payloadType: "payloadType" + payload: "payload" + signatures: + - sig: "sig" + keyid: "keyid" + - sig: "sig" + keyid: "keyid" + v1beta1EnvelopeSignature: + type: "object" + properties: + sig: + type: "string" + format: "byte" + pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" + keyid: + type: "string" + example: + sig: "sig" + keyid: "keyid" + v1beta1License: + type: "object" + properties: + expression: + type: "string" + description: "Often a single license can be used to represent the licensing\ + \ terms.\nSometimes it is necessary to include a choice of one or more licenses\n\ + or some combination of license identifiers.\nExamples: \"LGPL-2.1-only OR\ + \ MIT\", \"LGPL-2.1-only AND MIT\",\n\"GPL-2.0-or-later WITH Bison-exception-2.2\"\ + ." + comments: + type: "string" + title: "Comments" + description: "License information." + example: + expression: "expression" + comments: "comments" + v1beta1ListNoteOccurrencesResponse: + type: "object" + properties: + occurrences: + type: "array" + description: "The occurrences attached to the specified note." + items: + $ref: "#/definitions/v1beta1Occurrence" + nextPageToken: + type: "string" + description: "Token to provide to skip to a particular spot in the list." + description: "Response for listing occurrences for a note." + example: + occurrences: + - discovered: + discovered: + analysisCompleted: + analysisType: + - "analysisType" + - "analysisType" + analysisError: + - code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + - code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + analysisStatusError: + code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + continuousAnalysis: {} + lastAnalysisTime: "2000-01-23T04:56:07.000+00:00" + analysisStatus: {} + attestation: + attestation: + genericSignedAttestation: + serializedPayload: "serializedPayload" + contentType: {} + signatures: + - signature: "signature" + publicKeyId: "publicKeyId" + - signature: "signature" + publicKeyId: "publicKeyId" + pgpSignedAttestation: + signature: "signature" + pgpKeyId: "pgpKeyId" + contentType: {} + resource: + name: "name" + uri: "uri" + contentHash: + type: {} + value: "value" + noteName: "noteName" + kind: {} + updateTime: "2000-01-23T04:56:07.000+00:00" + intoto: + signed: + environment: + customValues: + key: "customValues" + materials: + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + byproducts: + customValues: + key: "customValues" + command: + - "command" + - "command" + products: + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + signatures: + - sig: "sig" + keyid: "keyid" + - sig: "sig" + keyid: "keyid" + vulnerability: + severity: {} + longDescription: "longDescription" + cvssScore: 0.8008282 + cvssV3: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + relatedUrls: + - label: "label" + url: "url" + - label: "label" + url: "url" + cvssVersion: {} + packageIssue: + - affectedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + - affectedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + shortDescription: "shortDescription" + cvssV2: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + type: "type" + vexAssessment: + cve: "cve" + relatedUris: + - label: "label" + url: "url" + - label: "label" + url: "url" + noteName: "noteName" + remediations: + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + state: {} + impacts: + - "impacts" + - "impacts" + justification: + justificationType: {} + details: "details" + spdxRelationship: + comment: "comment" + source: "source" + type: {} + target: "target" + spdxFile: + copyright: "copyright" + licenseConcluded: + expression: "expression" + comments: "comments" + filesLicenseInfo: + - "filesLicenseInfo" + - "filesLicenseInfo" + comment: "comment" + id: "id" + contributors: + - "contributors" + - "contributors" + attributions: + - "attributions" + - "attributions" + notice: "notice" + remediation: "remediation" + envelope: + payloadType: "payloadType" + payload: "payload" + signatures: + - sig: "sig" + keyid: "keyid" + - sig: "sig" + keyid: "keyid" + createTime: "2000-01-23T04:56:07.000+00:00" + build: + provenance: + creator: "creator" + triggerId: "triggerId" + buildOptions: + key: "buildOptions" + sourceProvenance: + additionalContexts: + - git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + - git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + artifactStorageSourceUri: "artifactStorageSourceUri" + context: + git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + fileHashes: + key: + fileHash: + - type: {} + value: "value" + - type: {} + value: "value" + createTime: "2000-01-23T04:56:07.000+00:00" + logsUri: "logsUri" + builderVersion: "builderVersion" + builtArtifacts: + - names: + - "names" + - "names" + checksum: "checksum" + id: "id" + - names: + - "names" + - "names" + checksum: "checksum" + id: "id" + startTime: "2000-01-23T04:56:07.000+00:00" + id: "id" + endTime: "2000-01-23T04:56:07.000+00:00" + projectId: "projectId" + commands: + - args: + - "args" + - "args" + name: "name" + id: "id" + env: + - "env" + - "env" + dir: "dir" + waitFor: + - "waitFor" + - "waitFor" + - args: + - "args" + - "args" + name: "name" + id: "id" + env: + - "env" + - "env" + dir: "dir" + waitFor: + - "waitFor" + - "waitFor" + provenanceBytes: "provenanceBytes" + spdxPackage: + sourceInfo: "sourceInfo" + filename: "filename" + licenseConcluded: + expression: "expression" + comments: "comments" + comment: "comment" + id: "id" + title: "title" + packageType: "packageType" + version: "version" + homePage: "homePage" + summaryDescription: "summaryDescription" + installation: + installation: + license: + expression: "expression" + comments: "comments" + name: "name" + location: + - path: "path" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + - path: "path" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + architecture: {} + name: "name" + sbom: + creatorComment: "creatorComment" + documentComment: "documentComment" + licenseListVersion: "licenseListVersion" + createTime: "2000-01-23T04:56:07.000+00:00" + creators: + - "creators" + - "creators" + namespace: "namespace" + id: "id" + externalDocumentRefs: + - "externalDocumentRefs" + - "externalDocumentRefs" + title: "title" + derivedImage: + derivedImage: + distance: 6 + fingerprint: + v1Name: "v1Name" + v2Blob: + - "v2Blob" + - "v2Blob" + v2Name: "v2Name" + baseResourceUrl: "baseResourceUrl" + layerInfo: + - arguments: "arguments" + directive: {} + - arguments: "arguments" + directive: {} + deployment: + deployment: + address: "address" + undeployTime: "2000-01-23T04:56:07.000+00:00" + userEmail: "userEmail" + deployTime: "2000-01-23T04:56:07.000+00:00" + resourceUri: + - "resourceUri" + - "resourceUri" + config: "config" + platform: {} + - discovered: + discovered: + analysisCompleted: + analysisType: + - "analysisType" + - "analysisType" + analysisError: + - code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + - code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + analysisStatusError: + code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + continuousAnalysis: {} + lastAnalysisTime: "2000-01-23T04:56:07.000+00:00" + analysisStatus: {} + attestation: + attestation: + genericSignedAttestation: + serializedPayload: "serializedPayload" + contentType: {} + signatures: + - signature: "signature" + publicKeyId: "publicKeyId" + - signature: "signature" + publicKeyId: "publicKeyId" + pgpSignedAttestation: + signature: "signature" + pgpKeyId: "pgpKeyId" + contentType: {} + resource: + name: "name" + uri: "uri" + contentHash: + type: {} + value: "value" + noteName: "noteName" + kind: {} + updateTime: "2000-01-23T04:56:07.000+00:00" + intoto: + signed: + environment: + customValues: + key: "customValues" + materials: + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + byproducts: + customValues: + key: "customValues" + command: + - "command" + - "command" + products: + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + signatures: + - sig: "sig" + keyid: "keyid" + - sig: "sig" + keyid: "keyid" + vulnerability: + severity: {} + longDescription: "longDescription" + cvssScore: 0.8008282 + cvssV3: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + relatedUrls: + - label: "label" + url: "url" + - label: "label" + url: "url" + cvssVersion: {} + packageIssue: + - affectedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + - affectedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + shortDescription: "shortDescription" + cvssV2: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + type: "type" + vexAssessment: + cve: "cve" + relatedUris: + - label: "label" + url: "url" + - label: "label" + url: "url" + noteName: "noteName" + remediations: + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + state: {} + impacts: + - "impacts" + - "impacts" + justification: + justificationType: {} + details: "details" + spdxRelationship: + comment: "comment" + source: "source" + type: {} + target: "target" + spdxFile: + copyright: "copyright" + licenseConcluded: + expression: "expression" + comments: "comments" + filesLicenseInfo: + - "filesLicenseInfo" + - "filesLicenseInfo" + comment: "comment" + id: "id" + contributors: + - "contributors" + - "contributors" + attributions: + - "attributions" + - "attributions" + notice: "notice" + remediation: "remediation" + envelope: + payloadType: "payloadType" + payload: "payload" + signatures: + - sig: "sig" + keyid: "keyid" + - sig: "sig" + keyid: "keyid" + createTime: "2000-01-23T04:56:07.000+00:00" + build: + provenance: + creator: "creator" + triggerId: "triggerId" + buildOptions: + key: "buildOptions" + sourceProvenance: + additionalContexts: + - git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + - git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + artifactStorageSourceUri: "artifactStorageSourceUri" + context: + git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + fileHashes: + key: + fileHash: + - type: {} + value: "value" + - type: {} + value: "value" + createTime: "2000-01-23T04:56:07.000+00:00" + logsUri: "logsUri" + builderVersion: "builderVersion" + builtArtifacts: + - names: + - "names" + - "names" + checksum: "checksum" + id: "id" + - names: + - "names" + - "names" + checksum: "checksum" + id: "id" + startTime: "2000-01-23T04:56:07.000+00:00" + id: "id" + endTime: "2000-01-23T04:56:07.000+00:00" + projectId: "projectId" + commands: + - args: + - "args" + - "args" + name: "name" + id: "id" + env: + - "env" + - "env" + dir: "dir" + waitFor: + - "waitFor" + - "waitFor" + - args: + - "args" + - "args" + name: "name" + id: "id" + env: + - "env" + - "env" + dir: "dir" + waitFor: + - "waitFor" + - "waitFor" + provenanceBytes: "provenanceBytes" + spdxPackage: + sourceInfo: "sourceInfo" + filename: "filename" + licenseConcluded: + expression: "expression" + comments: "comments" + comment: "comment" + id: "id" + title: "title" + packageType: "packageType" + version: "version" + homePage: "homePage" + summaryDescription: "summaryDescription" + installation: + installation: + license: + expression: "expression" + comments: "comments" + name: "name" + location: + - path: "path" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + - path: "path" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + architecture: {} + name: "name" + sbom: + creatorComment: "creatorComment" + documentComment: "documentComment" + licenseListVersion: "licenseListVersion" + createTime: "2000-01-23T04:56:07.000+00:00" + creators: + - "creators" + - "creators" + namespace: "namespace" + id: "id" + externalDocumentRefs: + - "externalDocumentRefs" + - "externalDocumentRefs" + title: "title" + derivedImage: + derivedImage: + distance: 6 + fingerprint: + v1Name: "v1Name" + v2Blob: + - "v2Blob" + - "v2Blob" + v2Name: "v2Name" + baseResourceUrl: "baseResourceUrl" + layerInfo: + - arguments: "arguments" + directive: {} + - arguments: "arguments" + directive: {} + deployment: + deployment: + address: "address" + undeployTime: "2000-01-23T04:56:07.000+00:00" + userEmail: "userEmail" + deployTime: "2000-01-23T04:56:07.000+00:00" + resourceUri: + - "resourceUri" + - "resourceUri" + config: "config" + platform: {} + nextPageToken: "nextPageToken" + v1beta1ListNotesResponse: + type: "object" + properties: + notes: + type: "array" + description: "The notes requested." + items: + $ref: "#/definitions/v1beta1Note" + nextPageToken: + type: "string" + description: "The next pagination token in the list response. It should be\ + \ used as\n`page_token` for the following request. An empty value means\ + \ no more\nresults." + description: "Response for listing notes." + example: + notes: + - longDescription: "longDescription" + package: + license: + expression: "expression" + comments: "comments" + name: "name" + digest: + - digestBytes: "digestBytes" + algo: "algo" + - digestBytes: "digestBytes" + algo: "algo" + description: "description" + distribution: + - latestVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + description: "description" + cpeUri: "cpeUri" + maintainer: "maintainer" + url: "url" + architecture: {} + - latestVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + description: "description" + cpeUri: "cpeUri" + maintainer: "maintainer" + url: "url" + architecture: {} + packageType: "packageType" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + maintainer: "maintainer" + url: "url" + kind: {} + vulnerabilityAssessment: + longDescription: "longDescription" + assessment: + longDescription: "longDescription" + cve: "cve" + relatedUris: + - label: "label" + url: "url" + - label: "label" + url: "url" + remediations: + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + shortDescription: "shortDescription" + state: {} + impacts: + - "impacts" + - "impacts" + justification: + justificationType: {} + details: "details" + product: + genericUri: "genericUri" + name: "name" + id: "id" + publisher: + issuingAuthority: "issuingAuthority" + name: "name" + context: "context" + shortDescription: "shortDescription" + title: "title" + languageCode: "languageCode" + baseImage: + resourceUrl: "resourceUrl" + fingerprint: + v1Name: "v1Name" + v2Blob: + - "v2Blob" + - "v2Blob" + v2Name: "v2Name" + attestationAuthority: + hint: + humanReadableName: "humanReadableName" + updateTime: "2000-01-23T04:56:07.000+00:00" + intoto: + expectedMaterials: + - artifactRule: + - "artifactRule" + - "artifactRule" + - artifactRule: + - "artifactRule" + - "artifactRule" + signingKeys: + - publicKeyValue: "publicKeyValue" + keyId: "keyId" + keyType: "keyType" + keyScheme: "keyScheme" + - publicKeyValue: "publicKeyValue" + keyId: "keyId" + keyType: "keyType" + keyScheme: "keyScheme" + expectedProducts: + - artifactRule: + - "artifactRule" + - "artifactRule" + - artifactRule: + - "artifactRule" + - "artifactRule" + stepName: "stepName" + threshold: "threshold" + expectedCommand: + - "expectedCommand" + - "expectedCommand" + shortDescription: "shortDescription" + vulnerability: + severity: {} + cwe: + - "cwe" + - "cwe" + cvssScore: 0.8008282 + cvssV3: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + cvssVersion: {} + details: + - package: "package" + minAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + maxAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + vendor: "vendor" + description: "description" + sourceUpdateTime: "2000-01-23T04:56:07.000+00:00" + isObsolete: true + source: "source" + cpeUri: "cpeUri" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + - package: "package" + minAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + maxAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + vendor: "vendor" + description: "description" + sourceUpdateTime: "2000-01-23T04:56:07.000+00:00" + isObsolete: true + source: "source" + cpeUri: "cpeUri" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + sourceUpdateTime: "2000-01-23T04:56:07.000+00:00" + cvssV2: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + windowsDetails: + - name: "name" + description: "description" + fixingKbs: + - name: "name" + url: "url" + - name: "name" + url: "url" + cpeUri: "cpeUri" + - name: "name" + description: "description" + fixingKbs: + - name: "name" + url: "url" + - name: "name" + url: "url" + cpeUri: "cpeUri" + spdxRelationship: + type: {} + relatedNoteNames: + - "relatedNoteNames" + - "relatedNoteNames" + spdxFile: + checksum: + - "checksum" + - "checksum" + title: "title" + fileType: {} + deployable: + resourceUri: + - "resourceUri" + - "resourceUri" + createTime: "2000-01-23T04:56:07.000+00:00" + build: + signature: + signature: "signature" + keyId: "keyId" + publicKey: "publicKey" + keyType: {} + builderVersion: "builderVersion" + expirationTime: "2000-01-23T04:56:07.000+00:00" + discovery: {} + spdxPackage: + copyright: "copyright" + filesLicenseInfo: + - "filesLicenseInfo" + - "filesLicenseInfo" + analyzed: true + externalRefs: + - comment: "comment" + category: {} + type: "type" + locator: "locator" + - comment: "comment" + category: {} + type: "type" + locator: "locator" + downloadLocation: "downloadLocation" + originator: "originator" + title: "title" + version: "version" + homePage: "homePage" + packageType: "packageType" + verificationCode: "verificationCode" + detailedDescription: "detailedDescription" + supplier: "supplier" + checksum: "checksum" + attribution: "attribution" + licenseDeclared: + expression: "expression" + comments: "comments" + summaryDescription: "summaryDescription" + name: "name" + sbom: + dataLicence: "dataLicence" + spdxVersion: "spdxVersion" + relatedUrl: + - label: "label" + url: "url" + - label: "label" + url: "url" + - longDescription: "longDescription" + package: + license: + expression: "expression" + comments: "comments" + name: "name" + digest: + - digestBytes: "digestBytes" + algo: "algo" + - digestBytes: "digestBytes" + algo: "algo" + description: "description" + distribution: + - latestVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + description: "description" + cpeUri: "cpeUri" + maintainer: "maintainer" + url: "url" + architecture: {} + - latestVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + description: "description" + cpeUri: "cpeUri" + maintainer: "maintainer" + url: "url" + architecture: {} + packageType: "packageType" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + maintainer: "maintainer" + url: "url" + kind: {} + vulnerabilityAssessment: + longDescription: "longDescription" + assessment: + longDescription: "longDescription" + cve: "cve" + relatedUris: + - label: "label" + url: "url" + - label: "label" + url: "url" + remediations: + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + shortDescription: "shortDescription" + state: {} + impacts: + - "impacts" + - "impacts" + justification: + justificationType: {} + details: "details" + product: + genericUri: "genericUri" + name: "name" + id: "id" + publisher: + issuingAuthority: "issuingAuthority" + name: "name" + context: "context" + shortDescription: "shortDescription" + title: "title" + languageCode: "languageCode" + baseImage: + resourceUrl: "resourceUrl" + fingerprint: + v1Name: "v1Name" + v2Blob: + - "v2Blob" + - "v2Blob" + v2Name: "v2Name" + attestationAuthority: + hint: + humanReadableName: "humanReadableName" + updateTime: "2000-01-23T04:56:07.000+00:00" + intoto: + expectedMaterials: + - artifactRule: + - "artifactRule" + - "artifactRule" + - artifactRule: + - "artifactRule" + - "artifactRule" + signingKeys: + - publicKeyValue: "publicKeyValue" + keyId: "keyId" + keyType: "keyType" + keyScheme: "keyScheme" + - publicKeyValue: "publicKeyValue" + keyId: "keyId" + keyType: "keyType" + keyScheme: "keyScheme" + expectedProducts: + - artifactRule: + - "artifactRule" + - "artifactRule" + - artifactRule: + - "artifactRule" + - "artifactRule" + stepName: "stepName" + threshold: "threshold" + expectedCommand: + - "expectedCommand" + - "expectedCommand" + shortDescription: "shortDescription" + vulnerability: + severity: {} + cwe: + - "cwe" + - "cwe" + cvssScore: 0.8008282 + cvssV3: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + cvssVersion: {} + details: + - package: "package" + minAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + maxAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + vendor: "vendor" + description: "description" + sourceUpdateTime: "2000-01-23T04:56:07.000+00:00" + isObsolete: true + source: "source" + cpeUri: "cpeUri" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + - package: "package" + minAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + maxAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + vendor: "vendor" + description: "description" + sourceUpdateTime: "2000-01-23T04:56:07.000+00:00" + isObsolete: true + source: "source" + cpeUri: "cpeUri" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + sourceUpdateTime: "2000-01-23T04:56:07.000+00:00" + cvssV2: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + windowsDetails: + - name: "name" + description: "description" + fixingKbs: + - name: "name" + url: "url" + - name: "name" + url: "url" + cpeUri: "cpeUri" + - name: "name" + description: "description" + fixingKbs: + - name: "name" + url: "url" + - name: "name" + url: "url" + cpeUri: "cpeUri" + spdxRelationship: + type: {} + relatedNoteNames: + - "relatedNoteNames" + - "relatedNoteNames" + spdxFile: + checksum: + - "checksum" + - "checksum" + title: "title" + fileType: {} + deployable: + resourceUri: + - "resourceUri" + - "resourceUri" + createTime: "2000-01-23T04:56:07.000+00:00" + build: + signature: + signature: "signature" + keyId: "keyId" + publicKey: "publicKey" + keyType: {} + builderVersion: "builderVersion" + expirationTime: "2000-01-23T04:56:07.000+00:00" + discovery: {} + spdxPackage: + copyright: "copyright" + filesLicenseInfo: + - "filesLicenseInfo" + - "filesLicenseInfo" + analyzed: true + externalRefs: + - comment: "comment" + category: {} + type: "type" + locator: "locator" + - comment: "comment" + category: {} + type: "type" + locator: "locator" + downloadLocation: "downloadLocation" + originator: "originator" + title: "title" + version: "version" + homePage: "homePage" + packageType: "packageType" + verificationCode: "verificationCode" + detailedDescription: "detailedDescription" + supplier: "supplier" + checksum: "checksum" + attribution: "attribution" + licenseDeclared: + expression: "expression" + comments: "comments" + summaryDescription: "summaryDescription" + name: "name" + sbom: + dataLicence: "dataLicence" + spdxVersion: "spdxVersion" + relatedUrl: + - label: "label" + url: "url" + - label: "label" + url: "url" + nextPageToken: "nextPageToken" + v1beta1ListOccurrencesResponse: + type: "object" + properties: + occurrences: + type: "array" + description: "The occurrences requested." + items: + $ref: "#/definitions/v1beta1Occurrence" + nextPageToken: + type: "string" + description: "The next pagination token in the list response. It should be\ + \ used as\n`page_token` for the following request. An empty value means\ + \ no more\nresults." + description: "Response for listing occurrences." + example: + occurrences: + - discovered: + discovered: + analysisCompleted: + analysisType: + - "analysisType" + - "analysisType" + analysisError: + - code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + - code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + analysisStatusError: + code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + continuousAnalysis: {} + lastAnalysisTime: "2000-01-23T04:56:07.000+00:00" + analysisStatus: {} + attestation: + attestation: + genericSignedAttestation: + serializedPayload: "serializedPayload" + contentType: {} + signatures: + - signature: "signature" + publicKeyId: "publicKeyId" + - signature: "signature" + publicKeyId: "publicKeyId" + pgpSignedAttestation: + signature: "signature" + pgpKeyId: "pgpKeyId" + contentType: {} + resource: + name: "name" + uri: "uri" + contentHash: + type: {} + value: "value" + noteName: "noteName" + kind: {} + updateTime: "2000-01-23T04:56:07.000+00:00" + intoto: + signed: + environment: + customValues: + key: "customValues" + materials: + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + byproducts: + customValues: + key: "customValues" + command: + - "command" + - "command" + products: + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + signatures: + - sig: "sig" + keyid: "keyid" + - sig: "sig" + keyid: "keyid" + vulnerability: + severity: {} + longDescription: "longDescription" + cvssScore: 0.8008282 + cvssV3: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + relatedUrls: + - label: "label" + url: "url" + - label: "label" + url: "url" + cvssVersion: {} + packageIssue: + - affectedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + - affectedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + shortDescription: "shortDescription" + cvssV2: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + type: "type" + vexAssessment: + cve: "cve" + relatedUris: + - label: "label" + url: "url" + - label: "label" + url: "url" + noteName: "noteName" + remediations: + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + state: {} + impacts: + - "impacts" + - "impacts" + justification: + justificationType: {} + details: "details" + spdxRelationship: + comment: "comment" + source: "source" + type: {} + target: "target" + spdxFile: + copyright: "copyright" + licenseConcluded: + expression: "expression" + comments: "comments" + filesLicenseInfo: + - "filesLicenseInfo" + - "filesLicenseInfo" + comment: "comment" + id: "id" + contributors: + - "contributors" + - "contributors" + attributions: + - "attributions" + - "attributions" + notice: "notice" + remediation: "remediation" + envelope: + payloadType: "payloadType" + payload: "payload" + signatures: + - sig: "sig" + keyid: "keyid" + - sig: "sig" + keyid: "keyid" + createTime: "2000-01-23T04:56:07.000+00:00" + build: + provenance: + creator: "creator" + triggerId: "triggerId" + buildOptions: + key: "buildOptions" + sourceProvenance: + additionalContexts: + - git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + - git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + artifactStorageSourceUri: "artifactStorageSourceUri" + context: + git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + fileHashes: + key: + fileHash: + - type: {} + value: "value" + - type: {} + value: "value" + createTime: "2000-01-23T04:56:07.000+00:00" + logsUri: "logsUri" + builderVersion: "builderVersion" + builtArtifacts: + - names: + - "names" + - "names" + checksum: "checksum" + id: "id" + - names: + - "names" + - "names" + checksum: "checksum" + id: "id" + startTime: "2000-01-23T04:56:07.000+00:00" + id: "id" + endTime: "2000-01-23T04:56:07.000+00:00" + projectId: "projectId" + commands: + - args: + - "args" + - "args" + name: "name" + id: "id" + env: + - "env" + - "env" + dir: "dir" + waitFor: + - "waitFor" + - "waitFor" + - args: + - "args" + - "args" + name: "name" + id: "id" + env: + - "env" + - "env" + dir: "dir" + waitFor: + - "waitFor" + - "waitFor" + provenanceBytes: "provenanceBytes" + spdxPackage: + sourceInfo: "sourceInfo" + filename: "filename" + licenseConcluded: + expression: "expression" + comments: "comments" + comment: "comment" + id: "id" + title: "title" + packageType: "packageType" + version: "version" + homePage: "homePage" + summaryDescription: "summaryDescription" + installation: + installation: + license: + expression: "expression" + comments: "comments" + name: "name" + location: + - path: "path" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + - path: "path" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + architecture: {} + name: "name" + sbom: + creatorComment: "creatorComment" + documentComment: "documentComment" + licenseListVersion: "licenseListVersion" + createTime: "2000-01-23T04:56:07.000+00:00" + creators: + - "creators" + - "creators" + namespace: "namespace" + id: "id" + externalDocumentRefs: + - "externalDocumentRefs" + - "externalDocumentRefs" + title: "title" + derivedImage: + derivedImage: + distance: 6 + fingerprint: + v1Name: "v1Name" + v2Blob: + - "v2Blob" + - "v2Blob" + v2Name: "v2Name" + baseResourceUrl: "baseResourceUrl" + layerInfo: + - arguments: "arguments" + directive: {} + - arguments: "arguments" + directive: {} + deployment: + deployment: + address: "address" + undeployTime: "2000-01-23T04:56:07.000+00:00" + userEmail: "userEmail" + deployTime: "2000-01-23T04:56:07.000+00:00" + resourceUri: + - "resourceUri" + - "resourceUri" + config: "config" + platform: {} + - discovered: + discovered: + analysisCompleted: + analysisType: + - "analysisType" + - "analysisType" + analysisError: + - code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + - code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + analysisStatusError: + code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + continuousAnalysis: {} + lastAnalysisTime: "2000-01-23T04:56:07.000+00:00" + analysisStatus: {} + attestation: + attestation: + genericSignedAttestation: + serializedPayload: "serializedPayload" + contentType: {} + signatures: + - signature: "signature" + publicKeyId: "publicKeyId" + - signature: "signature" + publicKeyId: "publicKeyId" + pgpSignedAttestation: + signature: "signature" + pgpKeyId: "pgpKeyId" + contentType: {} + resource: + name: "name" + uri: "uri" + contentHash: + type: {} + value: "value" + noteName: "noteName" + kind: {} + updateTime: "2000-01-23T04:56:07.000+00:00" + intoto: + signed: + environment: + customValues: + key: "customValues" + materials: + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + byproducts: + customValues: + key: "customValues" + command: + - "command" + - "command" + products: + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + signatures: + - sig: "sig" + keyid: "keyid" + - sig: "sig" + keyid: "keyid" + vulnerability: + severity: {} + longDescription: "longDescription" + cvssScore: 0.8008282 + cvssV3: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + relatedUrls: + - label: "label" + url: "url" + - label: "label" + url: "url" + cvssVersion: {} + packageIssue: + - affectedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + - affectedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + shortDescription: "shortDescription" + cvssV2: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + type: "type" + vexAssessment: + cve: "cve" + relatedUris: + - label: "label" + url: "url" + - label: "label" + url: "url" + noteName: "noteName" + remediations: + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + state: {} + impacts: + - "impacts" + - "impacts" + justification: + justificationType: {} + details: "details" + spdxRelationship: + comment: "comment" + source: "source" + type: {} + target: "target" + spdxFile: + copyright: "copyright" + licenseConcluded: + expression: "expression" + comments: "comments" + filesLicenseInfo: + - "filesLicenseInfo" + - "filesLicenseInfo" + comment: "comment" + id: "id" + contributors: + - "contributors" + - "contributors" + attributions: + - "attributions" + - "attributions" + notice: "notice" + remediation: "remediation" + envelope: + payloadType: "payloadType" + payload: "payload" + signatures: + - sig: "sig" + keyid: "keyid" + - sig: "sig" + keyid: "keyid" + createTime: "2000-01-23T04:56:07.000+00:00" + build: + provenance: + creator: "creator" + triggerId: "triggerId" + buildOptions: + key: "buildOptions" + sourceProvenance: + additionalContexts: + - git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + - git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + artifactStorageSourceUri: "artifactStorageSourceUri" + context: + git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + fileHashes: + key: + fileHash: + - type: {} + value: "value" + - type: {} + value: "value" + createTime: "2000-01-23T04:56:07.000+00:00" + logsUri: "logsUri" + builderVersion: "builderVersion" + builtArtifacts: + - names: + - "names" + - "names" + checksum: "checksum" + id: "id" + - names: + - "names" + - "names" + checksum: "checksum" + id: "id" + startTime: "2000-01-23T04:56:07.000+00:00" + id: "id" + endTime: "2000-01-23T04:56:07.000+00:00" + projectId: "projectId" + commands: + - args: + - "args" + - "args" + name: "name" + id: "id" + env: + - "env" + - "env" + dir: "dir" + waitFor: + - "waitFor" + - "waitFor" + - args: + - "args" + - "args" + name: "name" + id: "id" + env: + - "env" + - "env" + dir: "dir" + waitFor: + - "waitFor" + - "waitFor" + provenanceBytes: "provenanceBytes" + spdxPackage: + sourceInfo: "sourceInfo" + filename: "filename" + licenseConcluded: + expression: "expression" + comments: "comments" + comment: "comment" + id: "id" + title: "title" + packageType: "packageType" + version: "version" + homePage: "homePage" + summaryDescription: "summaryDescription" + installation: + installation: + license: + expression: "expression" + comments: "comments" + name: "name" + location: + - path: "path" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + - path: "path" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + architecture: {} + name: "name" + sbom: + creatorComment: "creatorComment" + documentComment: "documentComment" + licenseListVersion: "licenseListVersion" + createTime: "2000-01-23T04:56:07.000+00:00" + creators: + - "creators" + - "creators" + namespace: "namespace" + id: "id" + externalDocumentRefs: + - "externalDocumentRefs" + - "externalDocumentRefs" + title: "title" + derivedImage: + derivedImage: + distance: 6 + fingerprint: + v1Name: "v1Name" + v2Blob: + - "v2Blob" + - "v2Blob" + v2Name: "v2Name" + baseResourceUrl: "baseResourceUrl" + layerInfo: + - arguments: "arguments" + directive: {} + - arguments: "arguments" + directive: {} + deployment: + deployment: + address: "address" + undeployTime: "2000-01-23T04:56:07.000+00:00" + userEmail: "userEmail" + deployTime: "2000-01-23T04:56:07.000+00:00" + resourceUri: + - "resourceUri" + - "resourceUri" + config: "config" + platform: {} + nextPageToken: "nextPageToken" + v1beta1Note: + type: "object" + properties: + name: + type: "string" + description: "Output only. The name of the note in the form of\n`projects/[PROVIDER_ID]/notes/[NOTE_ID]`." + readOnly: true + shortDescription: + type: "string" + description: "A one sentence description of this note." + longDescription: + type: "string" + description: "A detailed description of this note." + kind: + description: "Output only. The type of analysis. This field can be used as\ + \ a filter in\nlist requests." + readOnly: true + $ref: "#/definitions/v1beta1NoteKind" + relatedUrl: + type: "array" + description: "URLs associated with this note." + items: + $ref: "#/definitions/v1beta1RelatedUrl" + expirationTime: + type: "string" + format: "date-time" + description: "Time of expiration for this note. Empty if note does not expire." + createTime: + type: "string" + format: "date-time" + description: "Output only. The time this note was created. This field can\ + \ be used as a\nfilter in list requests." + readOnly: true + updateTime: + type: "string" + format: "date-time" + description: "Output only. The time this note was last updated. This field\ + \ can be used as\na filter in list requests." + readOnly: true + relatedNoteNames: + type: "array" + description: "Other notes related to this note." + items: + type: "string" + vulnerability: + description: "A note describing a package vulnerability." + $ref: "#/definitions/vulnerabilityVulnerability" + build: + description: "A note describing build provenance for a verifiable build." + $ref: "#/definitions/buildBuild" + baseImage: + description: "A note describing a base image." + $ref: "#/definitions/imageBasis" + package: + description: "A note describing a package hosted by various package managers." + $ref: "#/definitions/packagePackage" + deployable: + description: "A note describing something that can be deployed." + $ref: "#/definitions/deploymentDeployable" + discovery: + description: "A note describing the initial analysis of a resource." + $ref: "#/definitions/discoveryDiscovery" + attestationAuthority: + description: "A note describing an attestation role." + $ref: "#/definitions/attestationAuthority" + intoto: + description: "A note describing an in-toto link." + $ref: "#/definitions/intotoInToto" + sbom: + description: "A note describing a software bill of materials." + $ref: "#/definitions/spdxDocumentNote" + spdxPackage: + description: "A note describing an SPDX Package." + $ref: "#/definitions/spdxPackageInfoNote" + spdxFile: + description: "A note describing an SPDX File." + $ref: "#/definitions/spdxFileNote" + spdxRelationship: + description: "A note describing an SPDX File." + $ref: "#/definitions/spdxRelationshipNote" + vulnerabilityAssessment: + description: "A note describing a vulnerability assessment." + $ref: "#/definitions/vexVulnerabilityAssessmentNote" + description: "A type of analysis that can be done for a resource." + example: + longDescription: "longDescription" + package: + license: + expression: "expression" + comments: "comments" + name: "name" + digest: + - digestBytes: "digestBytes" + algo: "algo" + - digestBytes: "digestBytes" + algo: "algo" + description: "description" + distribution: + - latestVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + description: "description" + cpeUri: "cpeUri" + maintainer: "maintainer" + url: "url" + architecture: {} + - latestVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + description: "description" + cpeUri: "cpeUri" + maintainer: "maintainer" + url: "url" + architecture: {} + packageType: "packageType" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + maintainer: "maintainer" + url: "url" + kind: {} + vulnerabilityAssessment: + longDescription: "longDescription" + assessment: + longDescription: "longDescription" + cve: "cve" + relatedUris: + - label: "label" + url: "url" + - label: "label" + url: "url" + remediations: + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + shortDescription: "shortDescription" + state: {} + impacts: + - "impacts" + - "impacts" + justification: + justificationType: {} + details: "details" + product: + genericUri: "genericUri" + name: "name" + id: "id" + publisher: + issuingAuthority: "issuingAuthority" + name: "name" + context: "context" + shortDescription: "shortDescription" + title: "title" + languageCode: "languageCode" + baseImage: + resourceUrl: "resourceUrl" + fingerprint: + v1Name: "v1Name" + v2Blob: + - "v2Blob" + - "v2Blob" + v2Name: "v2Name" + attestationAuthority: + hint: + humanReadableName: "humanReadableName" + updateTime: "2000-01-23T04:56:07.000+00:00" + intoto: + expectedMaterials: + - artifactRule: + - "artifactRule" + - "artifactRule" + - artifactRule: + - "artifactRule" + - "artifactRule" + signingKeys: + - publicKeyValue: "publicKeyValue" + keyId: "keyId" + keyType: "keyType" + keyScheme: "keyScheme" + - publicKeyValue: "publicKeyValue" + keyId: "keyId" + keyType: "keyType" + keyScheme: "keyScheme" + expectedProducts: + - artifactRule: + - "artifactRule" + - "artifactRule" + - artifactRule: + - "artifactRule" + - "artifactRule" + stepName: "stepName" + threshold: "threshold" + expectedCommand: + - "expectedCommand" + - "expectedCommand" + shortDescription: "shortDescription" + vulnerability: + severity: {} + cwe: + - "cwe" + - "cwe" + cvssScore: 0.8008282 + cvssV3: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + cvssVersion: {} + details: + - package: "package" + minAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + maxAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + vendor: "vendor" + description: "description" + sourceUpdateTime: "2000-01-23T04:56:07.000+00:00" + isObsolete: true + source: "source" + cpeUri: "cpeUri" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + - package: "package" + minAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + maxAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + vendor: "vendor" + description: "description" + sourceUpdateTime: "2000-01-23T04:56:07.000+00:00" + isObsolete: true + source: "source" + cpeUri: "cpeUri" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + sourceUpdateTime: "2000-01-23T04:56:07.000+00:00" + cvssV2: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + windowsDetails: + - name: "name" + description: "description" + fixingKbs: + - name: "name" + url: "url" + - name: "name" + url: "url" + cpeUri: "cpeUri" + - name: "name" + description: "description" + fixingKbs: + - name: "name" + url: "url" + - name: "name" + url: "url" + cpeUri: "cpeUri" + spdxRelationship: + type: {} + relatedNoteNames: + - "relatedNoteNames" + - "relatedNoteNames" + spdxFile: + checksum: + - "checksum" + - "checksum" + title: "title" + fileType: {} + deployable: + resourceUri: + - "resourceUri" + - "resourceUri" + createTime: "2000-01-23T04:56:07.000+00:00" + build: + signature: + signature: "signature" + keyId: "keyId" + publicKey: "publicKey" + keyType: {} + builderVersion: "builderVersion" + expirationTime: "2000-01-23T04:56:07.000+00:00" + discovery: {} + spdxPackage: + copyright: "copyright" + filesLicenseInfo: + - "filesLicenseInfo" + - "filesLicenseInfo" + analyzed: true + externalRefs: + - comment: "comment" + category: {} + type: "type" + locator: "locator" + - comment: "comment" + category: {} + type: "type" + locator: "locator" + downloadLocation: "downloadLocation" + originator: "originator" + title: "title" + version: "version" + homePage: "homePage" + packageType: "packageType" + verificationCode: "verificationCode" + detailedDescription: "detailedDescription" + supplier: "supplier" + checksum: "checksum" + attribution: "attribution" + licenseDeclared: + expression: "expression" + comments: "comments" + summaryDescription: "summaryDescription" + name: "name" + sbom: + dataLicence: "dataLicence" + spdxVersion: "spdxVersion" + relatedUrl: + - label: "label" + url: "url" + - label: "label" + url: "url" + v1beta1NoteKind: + type: "string" + description: "Kind represents the kinds of notes supported.\n\n - NOTE_KIND_UNSPECIFIED:\ + \ Default value. This value is unused.\n - VULNERABILITY: The note and occurrence\ + \ represent a package vulnerability.\n - BUILD: The note and occurrence assert\ + \ build provenance.\n - IMAGE: This represents an image basis relationship.\n\ + \ - PACKAGE: This represents a package installed via a package manager.\n -\ + \ DEPLOYMENT: The note and occurrence track deployment events.\n - DISCOVERY:\ + \ The note and occurrence track the initial discovery status of a resource.\n\ + \ - ATTESTATION: This represents a logical \"role\" that can attest to artifacts.\n\ + \ - INTOTO: This represents an in-toto link.\n - SBOM: This represents a software\ + \ bill of materials.\n - SPDX_PACKAGE: This represents an SPDX Package.\n -\ + \ SPDX_FILE: This represents an SPDX File.\n - SPDX_RELATIONSHIP: This represents\ + \ an SPDX Relationship.\n - VULNERABILITY_ASSESSMENT: This represents a Vulnerability\ + \ Assessment." + enum: + - "NOTE_KIND_UNSPECIFIED" + - "VULNERABILITY" + - "BUILD" + - "IMAGE" + - "PACKAGE" + - "DEPLOYMENT" + - "DISCOVERY" + - "ATTESTATION" + - "INTOTO" + - "SBOM" + - "SPDX_PACKAGE" + - "SPDX_FILE" + - "SPDX_RELATIONSHIP" + - "VULNERABILITY_ASSESSMENT" + default: "NOTE_KIND_UNSPECIFIED" + v1beta1Occurrence: + type: "object" + properties: + name: + type: "string" + description: "Output only. The name of the occurrence in the form of\n`projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`." + readOnly: true + resource: + description: "Required. Immutable. The resource for which the occurrence applies." + $ref: "#/definitions/v1beta1Resource" + noteName: + type: "string" + description: "Required. Immutable. The analysis note associated with this\ + \ occurrence, in\nthe form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.\ + \ This field can be\nused as a filter in list requests." + kind: + description: "Output only. This explicitly denotes which of the occurrence\ + \ details are\nspecified. This field can be used as a filter in list requests." + readOnly: true + $ref: "#/definitions/v1beta1NoteKind" + remediation: + type: "string" + description: "A description of actions that can be taken to remedy the note." + createTime: + type: "string" + format: "date-time" + description: "Output only. The time this occurrence was created." + readOnly: true + updateTime: + type: "string" + format: "date-time" + description: "Output only. The time this occurrence was last updated." + readOnly: true + vulnerability: + description: "Describes a security vulnerability." + $ref: "#/definitions/v1beta1vulnerabilityDetails" + build: + description: "Describes a verifiable build." + $ref: "#/definitions/v1beta1buildDetails" + derivedImage: + description: "Describes how this resource derives from the basis in the associated\n\ + note." + $ref: "#/definitions/v1beta1imageDetails" + installation: + description: "Describes the installation of a package on the linked resource." + $ref: "#/definitions/v1beta1packageDetails" + deployment: + description: "Describes the deployment of an artifact on a runtime." + $ref: "#/definitions/v1beta1deploymentDetails" + discovered: + description: "Describes when a resource was discovered." + $ref: "#/definitions/v1beta1discoveryDetails" + attestation: + description: "Describes an attestation of an artifact." + $ref: "#/definitions/v1beta1attestationDetails" + intoto: + description: "Describes a specific in-toto link." + $ref: "#/definitions/v1beta1intotoDetails" + sbom: + description: "Describes a specific software bill of materials document." + $ref: "#/definitions/spdxDocumentOccurrence" + spdxPackage: + description: "Describes a specific SPDX Package." + $ref: "#/definitions/spdxPackageInfoOccurrence" + spdxFile: + description: "Describes a specific SPDX File." + $ref: "#/definitions/spdxFileOccurrence" + spdxRelationship: + description: "Describes a specific SPDX Relationship." + $ref: "#/definitions/spdxRelationshipOccurrence" + envelope: + title: "https://github.com/secure-systems-lab/dsse" + $ref: "#/definitions/v1beta1Envelope" + description: "An instance of an analysis type that has been found on a resource." + example: + discovered: + discovered: + analysisCompleted: + analysisType: + - "analysisType" + - "analysisType" + analysisError: + - code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + - code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + analysisStatusError: + code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + continuousAnalysis: {} + lastAnalysisTime: "2000-01-23T04:56:07.000+00:00" + analysisStatus: {} + attestation: + attestation: + genericSignedAttestation: + serializedPayload: "serializedPayload" + contentType: {} + signatures: + - signature: "signature" + publicKeyId: "publicKeyId" + - signature: "signature" + publicKeyId: "publicKeyId" + pgpSignedAttestation: + signature: "signature" + pgpKeyId: "pgpKeyId" + contentType: {} + resource: + name: "name" + uri: "uri" + contentHash: + type: {} + value: "value" + noteName: "noteName" + kind: {} + updateTime: "2000-01-23T04:56:07.000+00:00" + intoto: + signed: + environment: + customValues: + key: "customValues" + materials: + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + byproducts: + customValues: + key: "customValues" + command: + - "command" + - "command" + products: + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + signatures: + - sig: "sig" + keyid: "keyid" + - sig: "sig" + keyid: "keyid" + vulnerability: + severity: {} + longDescription: "longDescription" + cvssScore: 0.8008282 + cvssV3: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + relatedUrls: + - label: "label" + url: "url" + - label: "label" + url: "url" + cvssVersion: {} + packageIssue: + - affectedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + - affectedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + shortDescription: "shortDescription" + cvssV2: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + type: "type" + vexAssessment: + cve: "cve" + relatedUris: + - label: "label" + url: "url" + - label: "label" + url: "url" + noteName: "noteName" + remediations: + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + state: {} + impacts: + - "impacts" + - "impacts" + justification: + justificationType: {} + details: "details" + spdxRelationship: + comment: "comment" + source: "source" + type: {} + target: "target" + spdxFile: + copyright: "copyright" + licenseConcluded: + expression: "expression" + comments: "comments" + filesLicenseInfo: + - "filesLicenseInfo" + - "filesLicenseInfo" + comment: "comment" + id: "id" + contributors: + - "contributors" + - "contributors" + attributions: + - "attributions" + - "attributions" + notice: "notice" + remediation: "remediation" + envelope: + payloadType: "payloadType" + payload: "payload" + signatures: + - sig: "sig" + keyid: "keyid" + - sig: "sig" + keyid: "keyid" + createTime: "2000-01-23T04:56:07.000+00:00" + build: + provenance: + creator: "creator" + triggerId: "triggerId" + buildOptions: + key: "buildOptions" + sourceProvenance: + additionalContexts: + - git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + - git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + artifactStorageSourceUri: "artifactStorageSourceUri" + context: + git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + fileHashes: + key: + fileHash: + - type: {} + value: "value" + - type: {} + value: "value" + createTime: "2000-01-23T04:56:07.000+00:00" + logsUri: "logsUri" + builderVersion: "builderVersion" + builtArtifacts: + - names: + - "names" + - "names" + checksum: "checksum" + id: "id" + - names: + - "names" + - "names" + checksum: "checksum" + id: "id" + startTime: "2000-01-23T04:56:07.000+00:00" + id: "id" + endTime: "2000-01-23T04:56:07.000+00:00" + projectId: "projectId" + commands: + - args: + - "args" + - "args" + name: "name" + id: "id" + env: + - "env" + - "env" + dir: "dir" + waitFor: + - "waitFor" + - "waitFor" + - args: + - "args" + - "args" + name: "name" + id: "id" + env: + - "env" + - "env" + dir: "dir" + waitFor: + - "waitFor" + - "waitFor" + provenanceBytes: "provenanceBytes" + spdxPackage: + sourceInfo: "sourceInfo" + filename: "filename" + licenseConcluded: + expression: "expression" + comments: "comments" + comment: "comment" + id: "id" + title: "title" + packageType: "packageType" + version: "version" + homePage: "homePage" + summaryDescription: "summaryDescription" + installation: + installation: + license: + expression: "expression" + comments: "comments" + name: "name" + location: + - path: "path" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + - path: "path" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + architecture: {} + name: "name" + sbom: + creatorComment: "creatorComment" + documentComment: "documentComment" + licenseListVersion: "licenseListVersion" + createTime: "2000-01-23T04:56:07.000+00:00" + creators: + - "creators" + - "creators" + namespace: "namespace" + id: "id" + externalDocumentRefs: + - "externalDocumentRefs" + - "externalDocumentRefs" + title: "title" + derivedImage: + derivedImage: + distance: 6 + fingerprint: + v1Name: "v1Name" + v2Blob: + - "v2Blob" + - "v2Blob" + v2Name: "v2Name" + baseResourceUrl: "baseResourceUrl" + layerInfo: + - arguments: "arguments" + directive: {} + - arguments: "arguments" + directive: {} + deployment: + deployment: + address: "address" + undeployTime: "2000-01-23T04:56:07.000+00:00" + userEmail: "userEmail" + deployTime: "2000-01-23T04:56:07.000+00:00" + resourceUri: + - "resourceUri" + - "resourceUri" + config: "config" + platform: {} + v1beta1RelatedUrl: + type: "object" + properties: + url: + type: "string" + description: "Specific URL associated with the resource." + label: + type: "string" + description: "Label to describe usage of the URL." + description: "Metadata for any related URL information." + example: + label: "label" + url: "url" + v1beta1Resource: + type: "object" + properties: + name: + type: "string" + description: "Deprecated, do not use. Use uri instead.\n\nThe name of the\ + \ resource. For example, the name of a Docker image -\n\"Debian\"." + uri: + type: "string" + description: "Required. The unique URI of the resource. For example,\n`https://gcr.io/project/image@sha256:foo`\ + \ for a Docker image." + contentHash: + description: "Deprecated, do not use. Use uri instead.\n\nThe hash of the\ + \ resource content. For example, the Docker digest." + $ref: "#/definitions/provenanceHash" + description: "An entity that can have metadata. For example, a Docker image." + example: + name: "name" + uri: "uri" + contentHash: + type: {} + value: "value" + v1beta1VulnerabilityOccurrencesSummary: + type: "object" + properties: + counts: + type: "array" + description: "A listing by resource of the number of fixable and total vulnerabilities." + items: + $ref: "#/definitions/VulnerabilityOccurrencesSummaryFixableTotalByDigest" + description: "A summary of how many vulnerability occurrences there are per resource\ + \ and\nseverity type." + example: + counts: + - severity: {} + fixableCount: "fixableCount" + resource: + name: "name" + uri: "uri" + contentHash: + type: {} + value: "value" + totalCount: "totalCount" + - severity: {} + fixableCount: "fixableCount" + resource: + name: "name" + uri: "uri" + contentHash: + type: {} + value: "value" + totalCount: "totalCount" + v1beta1attestationDetails: + type: "object" + properties: + attestation: + description: "Required. Attestation for the resource." + $ref: "#/definitions/attestationAttestation" + description: "Details of an attestation occurrence." + example: + attestation: + genericSignedAttestation: + serializedPayload: "serializedPayload" + contentType: {} + signatures: + - signature: "signature" + publicKeyId: "publicKeyId" + - signature: "signature" + publicKeyId: "publicKeyId" + pgpSignedAttestation: + signature: "signature" + pgpKeyId: "pgpKeyId" + contentType: {} + v1beta1buildDetails: + type: "object" + properties: + provenance: + description: "Required. The actual provenance for the build." + $ref: "#/definitions/provenanceBuildProvenance" + provenanceBytes: + type: "string" + description: "Serialized JSON representation of the provenance, used in generating\ + \ the\nbuild signature in the corresponding build note. After verifying\ + \ the\nsignature, `provenance_bytes` can be unmarshalled and compared to\ + \ the\nprovenance to confirm that it is unchanged. A base64-encoded string\n\ + representation of the provenance bytes is used for the signature in order\n\ + to interoperate with openssl which expects this format for signature\nverification.\n\ + \nThe serialized form is captured both to avoid ambiguity in how the\nprovenance\ + \ is marshalled to json as well to prevent incompatibilities with\nfuture\ + \ changes." + description: "Details of a build occurrence." + example: + provenance: + creator: "creator" + triggerId: "triggerId" + buildOptions: + key: "buildOptions" + sourceProvenance: + additionalContexts: + - git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + - git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + artifactStorageSourceUri: "artifactStorageSourceUri" + context: + git: + revisionId: "revisionId" + url: "url" + gerrit: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + hostUri: "hostUri" + gerritProject: "gerritProject" + cloudRepo: + revisionId: "revisionId" + aliasContext: + kind: {} + name: "name" + repoId: + uid: "uid" + projectRepoId: + repoName: "repoName" + projectId: "projectId" + labels: + key: "labels" + fileHashes: + key: + fileHash: + - type: {} + value: "value" + - type: {} + value: "value" + createTime: "2000-01-23T04:56:07.000+00:00" + logsUri: "logsUri" + builderVersion: "builderVersion" + builtArtifacts: + - names: + - "names" + - "names" + checksum: "checksum" + id: "id" + - names: + - "names" + - "names" + checksum: "checksum" + id: "id" + startTime: "2000-01-23T04:56:07.000+00:00" + id: "id" + endTime: "2000-01-23T04:56:07.000+00:00" + projectId: "projectId" + commands: + - args: + - "args" + - "args" + name: "name" + id: "id" + env: + - "env" + - "env" + dir: "dir" + waitFor: + - "waitFor" + - "waitFor" + - args: + - "args" + - "args" + name: "name" + id: "id" + env: + - "env" + - "env" + dir: "dir" + waitFor: + - "waitFor" + - "waitFor" + provenanceBytes: "provenanceBytes" + v1beta1deploymentDetails: + type: "object" + properties: + deployment: + description: "Required. Deployment history for the resource." + $ref: "#/definitions/deploymentDeployment" + description: "Details of a deployment occurrence." + example: + deployment: + address: "address" + undeployTime: "2000-01-23T04:56:07.000+00:00" + userEmail: "userEmail" + deployTime: "2000-01-23T04:56:07.000+00:00" + resourceUri: + - "resourceUri" + - "resourceUri" + config: "config" + platform: {} + v1beta1discoveryDetails: + type: "object" + properties: + discovered: + description: "Required. Analysis status for the discovered resource." + $ref: "#/definitions/discoveryDiscovered" + description: "Details of a discovery occurrence." + example: + discovered: + analysisCompleted: + analysisType: + - "analysisType" + - "analysisType" + analysisError: + - code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + - code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + analysisStatusError: + code: 1 + details: + - '@type': "@type" + - '@type': "@type" + message: "message" + continuousAnalysis: {} + lastAnalysisTime: "2000-01-23T04:56:07.000+00:00" + analysisStatus: {} + v1beta1imageDetails: + type: "object" + properties: + derivedImage: + description: "Required. Immutable. The child image derived from the base image." + $ref: "#/definitions/imageDerived" + description: "Details of an image occurrence." + example: + derivedImage: + distance: 6 + fingerprint: + v1Name: "v1Name" + v2Blob: + - "v2Blob" + - "v2Blob" + v2Name: "v2Name" + baseResourceUrl: "baseResourceUrl" + layerInfo: + - arguments: "arguments" + directive: {} + - arguments: "arguments" + directive: {} + v1beta1intotoDetails: + type: "object" + properties: + signatures: + type: "array" + items: + $ref: "#/definitions/v1beta1intotoSignature" + signed: + $ref: "#/definitions/intotoLink" + description: "This corresponds to a signed in-toto link - it is made up of one\ + \ or more\nsignatures and the in-toto link itself. This is used for occurrences\ + \ of a\nGrafeas in-toto note." + example: + signed: + environment: + customValues: + key: "customValues" + materials: + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + byproducts: + customValues: + key: "customValues" + command: + - "command" + - "command" + products: + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + - hashes: + sha256: "sha256" + resourceUri: "resourceUri" + signatures: + - sig: "sig" + keyid: "keyid" + - sig: "sig" + keyid: "keyid" + v1beta1intotoSignature: + type: "object" + properties: + keyid: + type: "string" + sig: + type: "string" + description: "A signature object consists of the KeyID used and the signature\ + \ itself." + example: + sig: "sig" + keyid: "keyid" + v1beta1packageDetails: + type: "object" + properties: + installation: + description: "Required. Where the package was installed." + $ref: "#/definitions/packageInstallation" + description: "Details of a package occurrence." + example: + installation: + license: + expression: "expression" + comments: "comments" + name: "name" + location: + - path: "path" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + - path: "path" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + architecture: {} + v1beta1packageLocation: + type: "object" + properties: + cpeUri: + type: "string" + description: "Deprecated.\nThe CPE URI in [CPE format](https://cpe.mitre.org/specification/)\n\ + denoting the package manager version distributing a package." + version: + description: "Deprecated.\nThe version installed at this location." + $ref: "#/definitions/packageVersion" + path: + type: "string" + description: "The path from which we gathered that this package/version is\ + \ installed." + description: "An occurrence of a particular package installation found within\ + \ a system's\nfilesystem. E.g., glibc was found in `/var/lib/dpkg/status`." + example: + path: "path" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + v1beta1provenanceArtifact: + type: "object" + properties: + checksum: + type: "string" + description: "Hash or checksum value of a binary, or Docker Registry 2.0 digest\ + \ of a\ncontainer." + id: + type: "string" + description: "Artifact ID, if any; for container images, this will be a URL\ + \ by digest\nlike `gcr.io/projectID/imagename@sha256:123456`." + names: + type: "array" + description: "Related artifact names. This may be the path to a binary or\ + \ jar file, or in\nthe case of a container build, the name used to push\ + \ the container image to\nGoogle Container Registry, as presented to `docker\ + \ push`. Note that a\nsingle Artifact ID can have multiple names, for example\ + \ if two tags are\napplied to one image." + items: + type: "string" + description: "Artifact describes a build product." + example: + names: + - "names" + - "names" + checksum: "checksum" + id: "id" + v1beta1vulnerabilityDetails: + type: "object" + properties: + type: + type: "string" + title: "The type of package; whether native or non native(ruby gems, node.js\n\ + packages etc)" + severity: + description: "Output only. The note provider assigned Severity of the vulnerability." + readOnly: true + $ref: "#/definitions/vulnerabilitySeverity" + cvssScore: + type: "number" + format: "float" + description: "Output only. The CVSS score of this vulnerability. CVSS score\ + \ is on a\nscale of 0-10 where 0 indicates low severity and 10 indicates\ + \ high\nseverity." + readOnly: true + packageIssue: + type: "array" + description: "Required. The set of affected locations and their fixes (if\ + \ available)\nwithin the associated resource." + items: + $ref: "#/definitions/vulnerabilityPackageIssue" + shortDescription: + type: "string" + description: "Output only. A one sentence description of this vulnerability." + readOnly: true + longDescription: + type: "string" + description: "Output only. A detailed description of this vulnerability." + readOnly: true + relatedUrls: + type: "array" + description: "Output only. URLs related to this vulnerability." + readOnly: true + items: + $ref: "#/definitions/v1beta1RelatedUrl" + effectiveSeverity: + description: "The distro assigned severity for this vulnerability when it\ + \ is\navailable, and note provider assigned severity when distro has not\ + \ yet\nassigned a severity for this vulnerability.\n\nWhen there are multiple\ + \ PackageIssues for this vulnerability, they can have\ndifferent effective\ + \ severities because some might be provided by the distro\nwhile others\ + \ are provided by the language ecosystem for a language pack.\nFor this\ + \ reason, it is advised to use the effective severity on the\nPackageIssue\ + \ level. In the case where multiple PackageIssues have differing\neffective\ + \ severities, this field should be the highest severity for any of\nthe\ + \ PackageIssues." + $ref: "#/definitions/vulnerabilitySeverity" + cvssVersion: + description: "Output only. CVSS version used to populate cvss_score and severity." + readOnly: true + $ref: "#/definitions/vulnerabilityCVSSVersion" + vexAssessment: + $ref: "#/definitions/DetailsVexAssessment" + cvssV2: + description: "The cvss v2 score for the vulnerability." + $ref: "#/definitions/vulnerabilityCVSS" + cvssV3: + description: "The cvss v3 score for the vulnerability." + $ref: "#/definitions/vulnerabilityCVSS" + description: "Details of a vulnerability Occurrence." + example: + severity: {} + longDescription: "longDescription" + cvssScore: 0.8008282 + cvssV3: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + relatedUrls: + - label: "label" + url: "url" + - label: "label" + url: "url" + cvssVersion: {} + packageIssue: + - affectedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + - affectedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + shortDescription: "shortDescription" + cvssV2: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + type: "type" + vexAssessment: + cve: "cve" + relatedUris: + - label: "label" + url: "url" + - label: "label" + url: "url" + noteName: "noteName" + remediations: + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + state: {} + impacts: + - "impacts" + - "impacts" + justification: + justificationType: {} + details: "details" + vexVulnerabilityAssessmentNote: + type: "object" + properties: + title: + type: "string" + title: "The title of the note. E.g. `Vex-Debian-11.4`" + shortDescription: + type: "string" + description: "A one sentence description of this Vex." + longDescription: + type: "string" + description: "A detailed description of this Vex." + languageCode: + type: "string" + description: "Identifies the language used by this document,\ncorresponding\ + \ to IETF BCP 47 / RFC 5646." + publisher: + description: "Publisher details of this Note." + $ref: "#/definitions/VulnerabilityAssessmentNotePublisher" + product: + description: "The product affected by this vex." + $ref: "#/definitions/VulnerabilityAssessmentNoteProduct" + assessment: + description: "Represents a vulnerability assessment for the product." + $ref: "#/definitions/VulnerabilityAssessmentNoteAssessment" + description: "A single VulnerabilityAssessmentNote represents\none particular\ + \ product's vulnerability assessment for one CVE." + example: + longDescription: "longDescription" + assessment: + longDescription: "longDescription" + cve: "cve" + relatedUris: + - label: "label" + url: "url" + - label: "label" + url: "url" + remediations: + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + - remediationType: {} + remediationUri: + label: "label" + url: "url" + details: "details" + remediationTime: "2000-01-23T04:56:07.000+00:00" + shortDescription: "shortDescription" + state: {} + impacts: + - "impacts" + - "impacts" + justification: + justificationType: {} + details: "details" + product: + genericUri: "genericUri" + name: "name" + id: "id" + publisher: + issuingAuthority: "issuingAuthority" + name: "name" + context: "context" + shortDescription: "shortDescription" + title: "title" + languageCode: "languageCode" + vulnerabilityCVSS: + type: "object" + properties: + baseScore: + type: "number" + format: "float" + description: "The base score is a function of the base metric scores." + exploitabilityScore: + type: "number" + format: "float" + impactScore: + type: "number" + format: "float" + attackVector: + description: "Base Metrics\nRepresents the intrinsic characteristics of a\ + \ vulnerability that are\nconstant over time and across user environments." + $ref: "#/definitions/CVSSAttackVector" + attackComplexity: + $ref: "#/definitions/CVSSAttackComplexity" + authentication: + $ref: "#/definitions/CVSSAuthentication" + privilegesRequired: + $ref: "#/definitions/CVSSPrivilegesRequired" + userInteraction: + $ref: "#/definitions/CVSSUserInteraction" + scope: + $ref: "#/definitions/CVSSScope" + confidentialityImpact: + $ref: "#/definitions/CVSSImpact" + integrityImpact: + $ref: "#/definitions/CVSSImpact" + availabilityImpact: + $ref: "#/definitions/CVSSImpact" + title: "Common Vulnerability Scoring System.\nThis message is compatible with\ + \ CVSS v2 and v3.\nFor CVSS v2 details, see https://www.first.org/cvss/v2/guide\n\ + CVSS v2 calculator: https://nvd.nist.gov/vuln-metrics/cvss/v2-calculator\nFor\ + \ CVSS v3 details, see https://www.first.org/cvss/specification-document\nCVSS\ + \ v3 calculator: https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator" + example: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + vulnerabilityCVSSVersion: + type: "string" + description: "CVSS Version." + enum: + - "CVSS_VERSION_UNSPECIFIED" + - "CVSS_VERSION_2" + - "CVSS_VERSION_3" + default: "CVSS_VERSION_UNSPECIFIED" + vulnerabilityPackageIssue: + type: "object" + properties: + affectedLocation: + description: "Required. The location of the vulnerability." + $ref: "#/definitions/vulnerabilityVulnerabilityLocation" + fixedLocation: + description: "The location of the available fix for vulnerability." + $ref: "#/definitions/vulnerabilityVulnerabilityLocation" + severityName: + type: "string" + description: "Deprecated, use Details.effective_severity instead\nThe severity\ + \ (e.g., distro assigned severity) for this vulnerability." + packageType: + type: "string" + description: "The type of package (e.g. OS, MAVEN, GO)." + effectiveSeverity: + description: "The distro or language system assigned severity for this vulnerability\n\ + when that is available and note provider assigned severity when it is not\n\ + available." + $ref: "#/definitions/vulnerabilitySeverity" + description: "This message wraps a location affected by a vulnerability and its\n\ + associated fix (if one is available)." + example: + affectedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + vulnerabilitySeverity: + type: "string" + description: "Note provider-assigned severity/impact ranking.\n\n - SEVERITY_UNSPECIFIED:\ + \ Unknown.\n - MINIMAL: Minimal severity.\n - LOW: Low severity.\n - MEDIUM:\ + \ Medium severity.\n - HIGH: High severity.\n - CRITICAL: Critical severity." + enum: + - "SEVERITY_UNSPECIFIED" + - "MINIMAL" + - "LOW" + - "MEDIUM" + - "HIGH" + - "CRITICAL" + default: "SEVERITY_UNSPECIFIED" + vulnerabilityVulnerability: + type: "object" + properties: + cvssScore: + type: "number" + format: "float" + description: "The CVSS score for this vulnerability." + severity: + description: "Note provider assigned impact of the vulnerability." + $ref: "#/definitions/vulnerabilitySeverity" + details: + type: "array" + description: "All information about the package to specifically identify this\n\ + vulnerability. One entry per (version range and cpe_uri) the package\nvulnerability\ + \ has manifested in." + items: + $ref: "#/definitions/VulnerabilityDetail" + cvssV3: + description: "The full description of the CVSS for version 3." + $ref: "#/definitions/vulnerabilityCVSS" + windowsDetails: + type: "array" + description: "Windows details get their own format because the information\ + \ format and\nmodel don't match a normal detail. Specifically Windows updates\ + \ are done as\npatches, thus Windows vulnerabilities really are a missing\ + \ package, rather\nthan a package being at an incorrect version." + items: + $ref: "#/definitions/VulnerabilityWindowsDetail" + sourceUpdateTime: + type: "string" + format: "date-time" + description: "The time this information was last changed at the source. This\ + \ is an\nupstream timestamp from the underlying information source - e.g.\ + \ Ubuntu\nsecurity tracker." + cvssV2: + description: "The full description of the CVSS for version 2." + $ref: "#/definitions/vulnerabilityCVSS" + cwe: + type: "array" + title: "A list of CWE for this vulnerability.\nFor details, see: https://cwe.mitre.org/index.html" + items: + type: "string" + cvssVersion: + description: "CVSS version used to populate cvss_score and severity." + $ref: "#/definitions/vulnerabilityCVSSVersion" + description: "Vulnerability provides metadata about a security vulnerability in\ + \ a Note." + example: + severity: {} + cwe: + - "cwe" + - "cwe" + cvssScore: 0.8008282 + cvssV3: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + cvssVersion: {} + details: + - package: "package" + minAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + maxAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + vendor: "vendor" + description: "description" + sourceUpdateTime: "2000-01-23T04:56:07.000+00:00" + isObsolete: true + source: "source" + cpeUri: "cpeUri" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + - package: "package" + minAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + maxAffectedVersion: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + vendor: "vendor" + description: "description" + sourceUpdateTime: "2000-01-23T04:56:07.000+00:00" + isObsolete: true + source: "source" + cpeUri: "cpeUri" + fixedLocation: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + packageType: "packageType" + severityName: "severityName" + sourceUpdateTime: "2000-01-23T04:56:07.000+00:00" + cvssV2: + exploitabilityScore: 5.962134 + confidentialityImpact: {} + attackComplexity: {} + scope: {} + attackVector: {} + baseScore: 1.4658129 + privilegesRequired: {} + impactScore: 5.637377 + userInteraction: {} + authentication: {} + windowsDetails: + - name: "name" + description: "description" + fixingKbs: + - name: "name" + url: "url" + - name: "name" + url: "url" + cpeUri: "cpeUri" + - name: "name" + description: "description" + fixingKbs: + - name: "name" + url: "url" + - name: "name" + url: "url" + cpeUri: "cpeUri" + vulnerabilityVulnerabilityLocation: + type: "object" + properties: + cpeUri: + type: "string" + description: "Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/)\n\ + format. Examples include distro or storage location for vulnerable jar." + package: + type: "string" + description: "Required. The package being described." + version: + description: "Required. The version of the package being described." + $ref: "#/definitions/packageVersion" + description: "The location of the vulnerability." + example: + package: "package" + cpeUri: "cpeUri" + version: + inclusive: true + kind: {} + name: "name" + epoch: 6 + revision: "revision" + body: + type: "object" + required: + - "notes" + properties: + notes: + type: "object" + description: "The notes to create, the key is expected to be the note ID.\ + \ Max allowed length is 1000." + additionalProperties: + $ref: "#/definitions/v1beta1Note" + description: "Request to create notes in batch." + body_1: + type: "object" + required: + - "occurrences" + properties: + occurrences: + type: "array" + description: "The occurrences to create. Max allowed length is 1000." + items: + $ref: "#/definitions/v1beta1Occurrence" + description: "Request to create occurrences in batch." diff --git a/0.1.0/api_grafeas_v1_beta1.go b/grafeas/api_grafeas_v1_beta1.go similarity index 79% rename from 0.1.0/api_grafeas_v1_beta1.go rename to grafeas/api_grafeas_v1_beta1.go index 1febcf6..ee69aae 100644 --- a/0.1.0/api_grafeas_v1_beta1.go +++ b/grafeas/api_grafeas_v1_beta1.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -34,7 +34,7 @@ GrafeasV1Beta1ApiService Creates new notes in batch. @return V1beta1BatchCreateNotesResponse */ -func (a *GrafeasV1Beta1ApiService) BatchCreateNotes(ctx context.Context, parent string, body V1beta1BatchCreateNotesRequest) (V1beta1BatchCreateNotesResponse, *http.Response, error) { +func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1BatchCreateNotes(ctx context.Context, parent string, body Body) (V1beta1BatchCreateNotesResponse, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} @@ -44,7 +44,7 @@ func (a *GrafeasV1Beta1ApiService) BatchCreateNotes(ctx context.Context, parent ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/v1beta1/{parent=projects/*}/notes:batchCreate" + localVarPath := a.client.cfg.BasePath + "/v1beta1/{parent}/notes:batchCreate" localVarPath = strings.Replace(localVarPath, "{"+"parent"+"}", fmt.Sprintf("%v", parent), -1) localVarHeaderParams := make(map[string]string) @@ -111,6 +111,17 @@ func (a *GrafeasV1Beta1ApiService) BatchCreateNotes(ctx context.Context, parent return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 0 { + var v RpcStatus + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -125,7 +136,7 @@ GrafeasV1Beta1ApiService Creates new occurrences in batch. @return V1beta1BatchCreateOccurrencesResponse */ -func (a *GrafeasV1Beta1ApiService) BatchCreateOccurrences(ctx context.Context, parent string, body V1beta1BatchCreateOccurrencesRequest) (V1beta1BatchCreateOccurrencesResponse, *http.Response, error) { +func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1BatchCreateOccurrences(ctx context.Context, parent string, body Body1) (V1beta1BatchCreateOccurrencesResponse, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} @@ -135,7 +146,7 @@ func (a *GrafeasV1Beta1ApiService) BatchCreateOccurrences(ctx context.Context, p ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/v1beta1/{parent=projects/*}/occurrences:batchCreate" + localVarPath := a.client.cfg.BasePath + "/v1beta1/{parent}/occurrences:batchCreate" localVarPath = strings.Replace(localVarPath, "{"+"parent"+"}", fmt.Sprintf("%v", parent), -1) localVarHeaderParams := make(map[string]string) @@ -202,6 +213,17 @@ func (a *GrafeasV1Beta1ApiService) BatchCreateOccurrences(ctx context.Context, p return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 0 { + var v RpcStatus + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -213,10 +235,11 @@ GrafeasV1Beta1ApiService Creates a new note. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the note is to be created. * @param body The note to create. + * @param noteId The ID to use for this note. @return V1beta1Note */ -func (a *GrafeasV1Beta1ApiService) CreateNote(ctx context.Context, parent string, body V1beta1Note) (V1beta1Note, *http.Response, error) { +func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1CreateNote(ctx context.Context, parent string, body V1beta1Note, noteId string) (V1beta1Note, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} @@ -226,13 +249,14 @@ func (a *GrafeasV1Beta1ApiService) CreateNote(ctx context.Context, parent string ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/v1beta1/{parent=projects/*}/notes" + localVarPath := a.client.cfg.BasePath + "/v1beta1/{parent}/notes" localVarPath = strings.Replace(localVarPath, "{"+"parent"+"}", fmt.Sprintf("%v", parent), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + localVarQueryParams.Add("noteId", parameterToString(noteId, "")) // to determine the Content-Type header localVarHttpContentTypes := []string{"application/json"} @@ -293,6 +317,17 @@ func (a *GrafeasV1Beta1ApiService) CreateNote(ctx context.Context, parent string return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 0 { + var v RpcStatus + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -307,7 +342,7 @@ GrafeasV1Beta1ApiService Creates a new occurrence. @return V1beta1Occurrence */ -func (a *GrafeasV1Beta1ApiService) CreateOccurrence(ctx context.Context, parent string, body V1beta1Occurrence) (V1beta1Occurrence, *http.Response, error) { +func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1CreateOccurrence(ctx context.Context, parent string, body V1beta1Occurrence) (V1beta1Occurrence, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} @@ -317,7 +352,7 @@ func (a *GrafeasV1Beta1ApiService) CreateOccurrence(ctx context.Context, parent ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/v1beta1/{parent=projects/*}/occurrences" + localVarPath := a.client.cfg.BasePath + "/v1beta1/{parent}/occurrences" localVarPath = strings.Replace(localVarPath, "{"+"parent"+"}", fmt.Sprintf("%v", parent), -1) localVarHeaderParams := make(map[string]string) @@ -384,6 +419,17 @@ func (a *GrafeasV1Beta1ApiService) CreateOccurrence(ctx context.Context, parent return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 0 { + var v RpcStatus + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -393,11 +439,11 @@ func (a *GrafeasV1Beta1ApiService) CreateOccurrence(ctx context.Context, parent /* GrafeasV1Beta1ApiService Deletes the specified note. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @param name1 The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. @return interface{} */ -func (a *GrafeasV1Beta1ApiService) DeleteNote(ctx context.Context, name string) (interface{}, *http.Response, error) { +func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1DeleteNote(ctx context.Context, name1 string) (interface{}, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Delete") localVarPostBody interface{} @@ -407,8 +453,8 @@ func (a *GrafeasV1Beta1ApiService) DeleteNote(ctx context.Context, name string) ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/v1beta1/{name=projects/*/notes/*}" - localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", fmt.Sprintf("%v", name), -1) + localVarPath := a.client.cfg.BasePath + "/v1beta1/{name_1}" + localVarPath = strings.Replace(localVarPath, "{"+"name_1"+"}", fmt.Sprintf("%v", name1), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -472,6 +518,17 @@ func (a *GrafeasV1Beta1ApiService) DeleteNote(ctx context.Context, name string) return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 0 { + var v RpcStatus + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -485,7 +542,7 @@ GrafeasV1Beta1ApiService Deletes the specified occurrence. For example, use this @return interface{} */ -func (a *GrafeasV1Beta1ApiService) DeleteOccurrence(ctx context.Context, name string) (interface{}, *http.Response, error) { +func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1DeleteOccurrence(ctx context.Context, name string) (interface{}, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Delete") localVarPostBody interface{} @@ -495,7 +552,7 @@ func (a *GrafeasV1Beta1ApiService) DeleteOccurrence(ctx context.Context, name st ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/v1beta1/{name=projects/*/occurrences/*}" + localVarPath := a.client.cfg.BasePath + "/v1beta1/{name}" localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", fmt.Sprintf("%v", name), -1) localVarHeaderParams := make(map[string]string) @@ -560,6 +617,17 @@ func (a *GrafeasV1Beta1ApiService) DeleteOccurrence(ctx context.Context, name st return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 0 { + var v RpcStatus + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -569,11 +637,11 @@ func (a *GrafeasV1Beta1ApiService) DeleteOccurrence(ctx context.Context, name st /* GrafeasV1Beta1ApiService Gets the specified note. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @param name1 The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. @return V1beta1Note */ -func (a *GrafeasV1Beta1ApiService) GetNote(ctx context.Context, name string) (V1beta1Note, *http.Response, error) { +func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1GetNote(ctx context.Context, name1 string) (V1beta1Note, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -583,8 +651,8 @@ func (a *GrafeasV1Beta1ApiService) GetNote(ctx context.Context, name string) (V1 ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/v1beta1/{name=projects/*/notes/*}" - localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", fmt.Sprintf("%v", name), -1) + localVarPath := a.client.cfg.BasePath + "/v1beta1/{name_1}" + localVarPath = strings.Replace(localVarPath, "{"+"name_1"+"}", fmt.Sprintf("%v", name1), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -648,6 +716,17 @@ func (a *GrafeasV1Beta1ApiService) GetNote(ctx context.Context, name string) (V1 return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 0 { + var v RpcStatus + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -661,7 +740,7 @@ GrafeasV1Beta1ApiService Gets the specified occurrence. @return V1beta1Occurrence */ -func (a *GrafeasV1Beta1ApiService) GetOccurrence(ctx context.Context, name string) (V1beta1Occurrence, *http.Response, error) { +func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1GetOccurrence(ctx context.Context, name string) (V1beta1Occurrence, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -671,7 +750,7 @@ func (a *GrafeasV1Beta1ApiService) GetOccurrence(ctx context.Context, name strin ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/v1beta1/{name=projects/*/occurrences/*}" + localVarPath := a.client.cfg.BasePath + "/v1beta1/{name}" localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", fmt.Sprintf("%v", name), -1) localVarHeaderParams := make(map[string]string) @@ -736,6 +815,17 @@ func (a *GrafeasV1Beta1ApiService) GetOccurrence(ctx context.Context, name strin return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 0 { + var v RpcStatus + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -749,7 +839,7 @@ GrafeasV1Beta1ApiService Gets the note attached to the specified occurrence. Con @return V1beta1Note */ -func (a *GrafeasV1Beta1ApiService) GetOccurrenceNote(ctx context.Context, name string) (V1beta1Note, *http.Response, error) { +func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1GetOccurrenceNote(ctx context.Context, name string) (V1beta1Note, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -759,7 +849,7 @@ func (a *GrafeasV1Beta1ApiService) GetOccurrenceNote(ctx context.Context, name s ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/v1beta1/{name=projects/*/occurrences/*}/notes" + localVarPath := a.client.cfg.BasePath + "/v1beta1/{name}/notes" localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", fmt.Sprintf("%v", name), -1) localVarHeaderParams := make(map[string]string) @@ -824,6 +914,17 @@ func (a *GrafeasV1Beta1ApiService) GetOccurrenceNote(ctx context.Context, name s return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 0 { + var v RpcStatus + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -834,17 +935,17 @@ func (a *GrafeasV1Beta1ApiService) GetOccurrenceNote(ctx context.Context, name s GrafeasV1Beta1ApiService Gets a summary of the number and severity of occurrences. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param parent The name of the project to get a vulnerability summary for in the form of `projects/[PROJECT_ID]`. - * @param optional nil or *GetVulnerabilityOccurrencesSummaryOpts - Optional Parameters: + * @param optional nil or *GrafeasV1Beta1GetVulnerabilityOccurrencesSummaryOpts - Optional Parameters: * @param "Filter" (optional.String) - The filter expression. @return V1beta1VulnerabilityOccurrencesSummary */ -type GetVulnerabilityOccurrencesSummaryOpts struct { +type GrafeasV1Beta1GetVulnerabilityOccurrencesSummaryOpts struct { Filter optional.String } -func (a *GrafeasV1Beta1ApiService) GetVulnerabilityOccurrencesSummary(ctx context.Context, parent string, localVarOptionals *GetVulnerabilityOccurrencesSummaryOpts) (V1beta1VulnerabilityOccurrencesSummary, *http.Response, error) { +func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1GetVulnerabilityOccurrencesSummary(ctx context.Context, parent string, localVarOptionals *GrafeasV1Beta1GetVulnerabilityOccurrencesSummaryOpts) (V1beta1VulnerabilityOccurrencesSummary, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -854,7 +955,7 @@ func (a *GrafeasV1Beta1ApiService) GetVulnerabilityOccurrencesSummary(ctx contex ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/v1beta1/{parent=projects/*}/occurrences:vulnerabilitySummary" + localVarPath := a.client.cfg.BasePath + "/v1beta1/{parent}/occurrences:vulnerabilitySummary" localVarPath = strings.Replace(localVarPath, "{"+"parent"+"}", fmt.Sprintf("%v", parent), -1) localVarHeaderParams := make(map[string]string) @@ -922,6 +1023,17 @@ func (a *GrafeasV1Beta1ApiService) GetVulnerabilityOccurrencesSummary(ctx contex return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 0 { + var v RpcStatus + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -932,7 +1044,7 @@ func (a *GrafeasV1Beta1ApiService) GetVulnerabilityOccurrencesSummary(ctx contex GrafeasV1Beta1ApiService Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param name The name of the note to list occurrences for in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @param optional nil or *ListNoteOccurrencesOpts - Optional Parameters: + * @param optional nil or *GrafeasV1Beta1ListNoteOccurrencesOpts - Optional Parameters: * @param "Filter" (optional.String) - The filter expression. * @param "PageSize" (optional.Int32) - Number of occurrences to return in the list. * @param "PageToken" (optional.String) - Token to provide to skip to a particular spot in the list. @@ -940,13 +1052,13 @@ GrafeasV1Beta1ApiService Lists occurrences referencing the specified note. Provi @return V1beta1ListNoteOccurrencesResponse */ -type ListNoteOccurrencesOpts struct { +type GrafeasV1Beta1ListNoteOccurrencesOpts struct { Filter optional.String PageSize optional.Int32 PageToken optional.String } -func (a *GrafeasV1Beta1ApiService) ListNoteOccurrences(ctx context.Context, name string, localVarOptionals *ListNoteOccurrencesOpts) (V1beta1ListNoteOccurrencesResponse, *http.Response, error) { +func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1ListNoteOccurrences(ctx context.Context, name string, localVarOptionals *GrafeasV1Beta1ListNoteOccurrencesOpts) (V1beta1ListNoteOccurrencesResponse, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -956,7 +1068,7 @@ func (a *GrafeasV1Beta1ApiService) ListNoteOccurrences(ctx context.Context, name ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/v1beta1/{name=projects/*/notes/*}/occurrences" + localVarPath := a.client.cfg.BasePath + "/v1beta1/{name}/occurrences" localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", fmt.Sprintf("%v", name), -1) localVarHeaderParams := make(map[string]string) @@ -967,10 +1079,10 @@ func (a *GrafeasV1Beta1ApiService) ListNoteOccurrences(ctx context.Context, name localVarQueryParams.Add("filter", parameterToString(localVarOptionals.Filter.Value(), "")) } if localVarOptionals != nil && localVarOptionals.PageSize.IsSet() { - localVarQueryParams.Add("page_size", parameterToString(localVarOptionals.PageSize.Value(), "")) + localVarQueryParams.Add("pageSize", parameterToString(localVarOptionals.PageSize.Value(), "")) } if localVarOptionals != nil && localVarOptionals.PageToken.IsSet() { - localVarQueryParams.Add("page_token", parameterToString(localVarOptionals.PageToken.Value(), "")) + localVarQueryParams.Add("pageToken", parameterToString(localVarOptionals.PageToken.Value(), "")) } // to determine the Content-Type header localVarHttpContentTypes := []string{"application/json"} @@ -1030,6 +1142,17 @@ func (a *GrafeasV1Beta1ApiService) ListNoteOccurrences(ctx context.Context, name return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 0 { + var v RpcStatus + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -1040,7 +1163,7 @@ func (a *GrafeasV1Beta1ApiService) ListNoteOccurrences(ctx context.Context, name GrafeasV1Beta1ApiService Lists notes for the specified project. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param parent The name of the project to list notes for in the form of `projects/[PROJECT_ID]`. - * @param optional nil or *ListNotesOpts - Optional Parameters: + * @param optional nil or *GrafeasV1Beta1ListNotesOpts - Optional Parameters: * @param "Filter" (optional.String) - The filter expression. * @param "PageSize" (optional.Int32) - Number of notes to return in the list. Must be positive. Max allowed page size is 1000. If not specified, page size defaults to 20. * @param "PageToken" (optional.String) - Token to provide to skip to a particular spot in the list. @@ -1048,13 +1171,13 @@ GrafeasV1Beta1ApiService Lists notes for the specified project. @return V1beta1ListNotesResponse */ -type ListNotesOpts struct { +type GrafeasV1Beta1ListNotesOpts struct { Filter optional.String PageSize optional.Int32 PageToken optional.String } -func (a *GrafeasV1Beta1ApiService) ListNotes(ctx context.Context, parent string, localVarOptionals *ListNotesOpts) (V1beta1ListNotesResponse, *http.Response, error) { +func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1ListNotes(ctx context.Context, parent string, localVarOptionals *GrafeasV1Beta1ListNotesOpts) (V1beta1ListNotesResponse, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -1064,7 +1187,7 @@ func (a *GrafeasV1Beta1ApiService) ListNotes(ctx context.Context, parent string, ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/v1beta1/{parent=projects/*}/notes" + localVarPath := a.client.cfg.BasePath + "/v1beta1/{parent}/notes" localVarPath = strings.Replace(localVarPath, "{"+"parent"+"}", fmt.Sprintf("%v", parent), -1) localVarHeaderParams := make(map[string]string) @@ -1075,10 +1198,10 @@ func (a *GrafeasV1Beta1ApiService) ListNotes(ctx context.Context, parent string, localVarQueryParams.Add("filter", parameterToString(localVarOptionals.Filter.Value(), "")) } if localVarOptionals != nil && localVarOptionals.PageSize.IsSet() { - localVarQueryParams.Add("page_size", parameterToString(localVarOptionals.PageSize.Value(), "")) + localVarQueryParams.Add("pageSize", parameterToString(localVarOptionals.PageSize.Value(), "")) } if localVarOptionals != nil && localVarOptionals.PageToken.IsSet() { - localVarQueryParams.Add("page_token", parameterToString(localVarOptionals.PageToken.Value(), "")) + localVarQueryParams.Add("pageToken", parameterToString(localVarOptionals.PageToken.Value(), "")) } // to determine the Content-Type header localVarHttpContentTypes := []string{"application/json"} @@ -1138,6 +1261,17 @@ func (a *GrafeasV1Beta1ApiService) ListNotes(ctx context.Context, parent string, return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 0 { + var v RpcStatus + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -1148,7 +1282,7 @@ func (a *GrafeasV1Beta1ApiService) ListNotes(ctx context.Context, parent string, GrafeasV1Beta1ApiService Lists occurrences for the specified project. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param parent The name of the project to list occurrences for in the form of `projects/[PROJECT_ID]`. - * @param optional nil or *ListOccurrencesOpts - Optional Parameters: + * @param optional nil or *GrafeasV1Beta1ListOccurrencesOpts - Optional Parameters: * @param "Filter" (optional.String) - The filter expression. * @param "PageSize" (optional.Int32) - Number of occurrences to return in the list. Must be positive. Max allowed page size is 1000. If not specified, page size defaults to 20. * @param "PageToken" (optional.String) - Token to provide to skip to a particular spot in the list. @@ -1156,13 +1290,13 @@ GrafeasV1Beta1ApiService Lists occurrences for the specified project. @return V1beta1ListOccurrencesResponse */ -type ListOccurrencesOpts struct { +type GrafeasV1Beta1ListOccurrencesOpts struct { Filter optional.String PageSize optional.Int32 PageToken optional.String } -func (a *GrafeasV1Beta1ApiService) ListOccurrences(ctx context.Context, parent string, localVarOptionals *ListOccurrencesOpts) (V1beta1ListOccurrencesResponse, *http.Response, error) { +func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1ListOccurrences(ctx context.Context, parent string, localVarOptionals *GrafeasV1Beta1ListOccurrencesOpts) (V1beta1ListOccurrencesResponse, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -1172,7 +1306,7 @@ func (a *GrafeasV1Beta1ApiService) ListOccurrences(ctx context.Context, parent s ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/v1beta1/{parent=projects/*}/occurrences" + localVarPath := a.client.cfg.BasePath + "/v1beta1/{parent}/occurrences" localVarPath = strings.Replace(localVarPath, "{"+"parent"+"}", fmt.Sprintf("%v", parent), -1) localVarHeaderParams := make(map[string]string) @@ -1183,10 +1317,10 @@ func (a *GrafeasV1Beta1ApiService) ListOccurrences(ctx context.Context, parent s localVarQueryParams.Add("filter", parameterToString(localVarOptionals.Filter.Value(), "")) } if localVarOptionals != nil && localVarOptionals.PageSize.IsSet() { - localVarQueryParams.Add("page_size", parameterToString(localVarOptionals.PageSize.Value(), "")) + localVarQueryParams.Add("pageSize", parameterToString(localVarOptionals.PageSize.Value(), "")) } if localVarOptionals != nil && localVarOptionals.PageToken.IsSet() { - localVarQueryParams.Add("page_token", parameterToString(localVarOptionals.PageToken.Value(), "")) + localVarQueryParams.Add("pageToken", parameterToString(localVarOptionals.PageToken.Value(), "")) } // to determine the Content-Type header localVarHttpContentTypes := []string{"application/json"} @@ -1246,6 +1380,17 @@ func (a *GrafeasV1Beta1ApiService) ListOccurrences(ctx context.Context, parent s return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 0 { + var v RpcStatus + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -1255,12 +1400,19 @@ func (a *GrafeasV1Beta1ApiService) ListOccurrences(ctx context.Context, parent s /* GrafeasV1Beta1ApiService Updates the specified note. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @param name1 The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * @param body The updated note. + * @param optional nil or *GrafeasV1Beta1UpdateNoteOpts - Optional Parameters: + * @param "UpdateMask" (optional.String) - The fields to update. @return V1beta1Note */ -func (a *GrafeasV1Beta1ApiService) UpdateNote(ctx context.Context, name string, body V1beta1Note) (V1beta1Note, *http.Response, error) { + +type GrafeasV1Beta1UpdateNoteOpts struct { + UpdateMask optional.String +} + +func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1UpdateNote(ctx context.Context, name1 string, body V1beta1Note, localVarOptionals *GrafeasV1Beta1UpdateNoteOpts) (V1beta1Note, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Patch") localVarPostBody interface{} @@ -1270,13 +1422,16 @@ func (a *GrafeasV1Beta1ApiService) UpdateNote(ctx context.Context, name string, ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/v1beta1/{name=projects/*/notes/*}" - localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", fmt.Sprintf("%v", name), -1) + localVarPath := a.client.cfg.BasePath + "/v1beta1/{name_1}" + localVarPath = strings.Replace(localVarPath, "{"+"name_1"+"}", fmt.Sprintf("%v", name1), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if localVarOptionals != nil && localVarOptionals.UpdateMask.IsSet() { + localVarQueryParams.Add("updateMask", parameterToString(localVarOptionals.UpdateMask.Value(), "")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{"application/json"} @@ -1337,6 +1492,17 @@ func (a *GrafeasV1Beta1ApiService) UpdateNote(ctx context.Context, name string, return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 0 { + var v RpcStatus + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -1348,10 +1514,17 @@ GrafeasV1Beta1ApiService Updates the specified occurrence. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param name The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * @param body The updated occurrence. + * @param optional nil or *GrafeasV1Beta1UpdateOccurrenceOpts - Optional Parameters: + * @param "UpdateMask" (optional.String) - The fields to update. @return V1beta1Occurrence */ -func (a *GrafeasV1Beta1ApiService) UpdateOccurrence(ctx context.Context, name string, body V1beta1Occurrence) (V1beta1Occurrence, *http.Response, error) { + +type GrafeasV1Beta1UpdateOccurrenceOpts struct { + UpdateMask optional.String +} + +func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1UpdateOccurrence(ctx context.Context, name string, body V1beta1Occurrence, localVarOptionals *GrafeasV1Beta1UpdateOccurrenceOpts) (V1beta1Occurrence, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Patch") localVarPostBody interface{} @@ -1361,13 +1534,16 @@ func (a *GrafeasV1Beta1ApiService) UpdateOccurrence(ctx context.Context, name st ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/v1beta1/{name=projects/*/occurrences/*}" + localVarPath := a.client.cfg.BasePath + "/v1beta1/{name}" localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", fmt.Sprintf("%v", name), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if localVarOptionals != nil && localVarOptionals.UpdateMask.IsSet() { + localVarQueryParams.Add("updateMask", parameterToString(localVarOptionals.UpdateMask.Value(), "")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{"application/json"} @@ -1428,6 +1604,17 @@ func (a *GrafeasV1Beta1ApiService) UpdateOccurrence(ctx context.Context, name st return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 0 { + var v RpcStatus + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/0.1.0/client.go b/grafeas/client.go similarity index 98% rename from 0.1.0/client.go rename to grafeas/client.go index 9039abf..fa81d90 100644 --- a/0.1.0/client.go +++ b/grafeas/client.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -37,7 +37,7 @@ var ( xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)") ) -// APIClient manages communication with the proto/v1beta1/grafeas.proto API vversion not set +// APIClient manages communication with the grafeas.proto API vversion not set // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration diff --git a/0.1.0/configuration.go b/grafeas/configuration.go similarity index 94% rename from 0.1.0/configuration.go rename to grafeas/configuration.go index b529438..e74263c 100644 --- a/0.1.0/configuration.go +++ b/grafeas/configuration.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -60,9 +60,9 @@ type Configuration struct { func NewConfiguration() *Configuration { cfg := &Configuration{ - BasePath: "http://localhost", + BasePath: "https://localhost", DefaultHeader: make(map[string]string), - UserAgent: "Swagger-Codegen/0.1.0/go", + UserAgent: "Swagger-Codegen/1.0.0/go", } return cfg } diff --git a/0.1.0/docs/AliasContextKind.md b/grafeas/docs/AliasContextKind.md similarity index 100% rename from 0.1.0/docs/AliasContextKind.md rename to grafeas/docs/AliasContextKind.md diff --git a/grafeas/docs/AssessmentJustification.md b/grafeas/docs/AssessmentJustification.md new file mode 100644 index 0000000..6c2cb64 --- /dev/null +++ b/grafeas/docs/AssessmentJustification.md @@ -0,0 +1,11 @@ +# AssessmentJustification + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JustificationType** | [***JustificationJustificationType**](JustificationJustificationType.md) | The justification type for this vulnerability. | [optional] [default to null] +**Details** | **string** | Additional details on why this justification was chosen. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/AssessmentRemediation.md b/grafeas/docs/AssessmentRemediation.md new file mode 100644 index 0000000..e5cc6c1 --- /dev/null +++ b/grafeas/docs/AssessmentRemediation.md @@ -0,0 +1,13 @@ +# AssessmentRemediation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RemediationType** | [***RemediationRemediationType**](RemediationRemediationType.md) | The type of remediation that can be applied. | [optional] [default to null] +**RemediationTime** | [**time.Time**](time.Time.md) | Contains the date from which the remediation is available. | [optional] [default to null] +**Details** | **string** | Contains a comprehensive human-readable discussion of the remediation. | [optional] [default to null] +**RemediationUri** | [***V1beta1RelatedUrl**](v1beta1RelatedUrl.md) | Contains the URL where to obtain the remediation. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/0.1.0/docs/CvsSv3AttackVector.md b/grafeas/docs/AssessmentState.md similarity index 92% rename from 0.1.0/docs/CvsSv3AttackVector.md rename to grafeas/docs/AssessmentState.md index 907e3db..c4aa3b2 100644 --- a/0.1.0/docs/CvsSv3AttackVector.md +++ b/grafeas/docs/AssessmentState.md @@ -1,4 +1,4 @@ -# CvsSv3AttackVector +# AssessmentState ## Properties Name | Type | Description | Notes diff --git a/0.1.0/docs/AttestationAttestation.md b/grafeas/docs/AttestationAttestation.md similarity index 100% rename from 0.1.0/docs/AttestationAttestation.md rename to grafeas/docs/AttestationAttestation.md diff --git a/0.1.0/docs/AttestationAuthority.md b/grafeas/docs/AttestationAuthority.md similarity index 100% rename from 0.1.0/docs/AttestationAuthority.md rename to grafeas/docs/AttestationAuthority.md diff --git a/0.1.0/docs/AttestationGenericSignedAttestation.md b/grafeas/docs/AttestationGenericSignedAttestation.md similarity index 69% rename from 0.1.0/docs/AttestationGenericSignedAttestation.md rename to grafeas/docs/AttestationGenericSignedAttestation.md index e359d81..a833299 100644 --- a/0.1.0/docs/AttestationGenericSignedAttestation.md +++ b/grafeas/docs/AttestationGenericSignedAttestation.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ContentType** | [***AttestationGenericSignedAttestationContentType**](attestationGenericSignedAttestationContentType.md) | Type (for example schema) of the attestation payload that was signed. The verifier must ensure that the provided type is one that the verifier supports, and that the attestation payload is a valid instantiation of that type (for example by validating a JSON schema). | [optional] [default to null] **SerializedPayload** | **string** | The serialized payload that is verified by one or more `signatures`. The encoding and semantic meaning of this payload must match what is set in `content_type`. | [optional] [default to null] -**Signatures** | [**[]V1beta1Signature**](v1beta1Signature.md) | One or more signatures over `serialized_payload`. Verifier implementations should consider this attestation message verified if at least one `signature` verifies `serialized_payload`. See `Signature` in common.proto for more details on signature structure and verification. | [optional] [default to null] +**Signatures** | [**[]Grafeasv1beta1Signature**](grafeasv1beta1Signature.md) | One or more signatures over `serialized_payload`. Verifier implementations should consider this attestation message verified if at least one `signature` verifies `serialized_payload`. See `Signature` in common.proto for more details on signature structure and verification. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/0.1.0/docs/AttestationGenericSignedAttestationContentType.md b/grafeas/docs/AttestationGenericSignedAttestationContentType.md similarity index 100% rename from 0.1.0/docs/AttestationGenericSignedAttestationContentType.md rename to grafeas/docs/AttestationGenericSignedAttestationContentType.md diff --git a/0.1.0/docs/AttestationPgpSignedAttestation.md b/grafeas/docs/AttestationPgpSignedAttestation.md similarity index 97% rename from 0.1.0/docs/AttestationPgpSignedAttestation.md rename to grafeas/docs/AttestationPgpSignedAttestation.md index 6d270e5..04d5227 100644 --- a/0.1.0/docs/AttestationPgpSignedAttestation.md +++ b/grafeas/docs/AttestationPgpSignedAttestation.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Signature** | **string** | Required. The raw content of the signature, as output by GNU Privacy Guard (GPG) or equivalent. Since this message only supports attached signatures, the payload that was signed must be attached. While the signature format supported is dependent on the verification implementation, currently only ASCII-armored (`--armor` to gpg), non-clearsigned (`--sign` rather than `--clearsign` to gpg) are supported. Concretely, `gpg --sign --armor --output=signature.gpg payload.json` will create the signature content expected in this field in `signature.gpg` for the `payload.json` attestation payload. | [optional] [default to null] **ContentType** | [***AttestationPgpSignedAttestationContentType**](attestationPgpSignedAttestationContentType.md) | Type (for example schema) of the attestation payload that was signed. The verifier must ensure that the provided type is one that the verifier supports, and that the attestation payload is a valid instantiation of that type (for example by validating a JSON schema). | [optional] [default to null] -**PgpKeyId** | **string** | The cryptographic fingerprint of the key used to generate the signature, as output by, e.g. `gpg --list-keys`. This should be the version 4, full 160-bit fingerprint, expressed as a 40 character hexidecimal string. See https://tools.ietf.org/html/rfc4880#section-12.2 for details. Implementations may choose to acknowledge \"LONG\", \"SHORT\", or other abbreviated key IDs, but only the full fingerprint is guaranteed to work. In gpg, the full fingerprint can be retrieved from the `fpr` field returned when calling --list-keys with --with-colons. For example: ``` gpg --with-colons --with-fingerprint --force-v4-certs \\ --list-keys attester@example.com tru::1:1513631572:0:3:1:5 pub:...<SNIP>... fpr:::::::::24FF6481B76AC91E66A00AC657A93A81EF3AE6FB: ``` Above, the fingerprint is `24FF6481B76AC91E66A00AC657A93A81EF3AE6FB`. | [optional] [default to null] +**PgpKeyId** | **string** | The cryptographic fingerprint of the key used to generate the signature, as output by, e.g. `gpg --list-keys`. This should be the version 4, full 160-bit fingerprint, expressed as a 40 character hexadecimal string. See https://tools.ietf.org/html/rfc4880#section-12.2 for details. Implementations may choose to acknowledge \"LONG\", \"SHORT\", or other abbreviated key IDs, but only the full fingerprint is guaranteed to work. In gpg, the full fingerprint can be retrieved from the `fpr` field returned when calling --list-keys with --with-colons. For example: ``` gpg --with-colons --with-fingerprint --force-v4-certs \\ --list-keys attester@example.com tru::1:1513631572:0:3:1:5 pub:...<SNIP>... fpr:::::::::24FF6481B76AC91E66A00AC657A93A81EF3AE6FB: ``` Above, the fingerprint is `24FF6481B76AC91E66A00AC657A93A81EF3AE6FB`. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/0.1.0/docs/AttestationPgpSignedAttestationContentType.md b/grafeas/docs/AttestationPgpSignedAttestationContentType.md similarity index 100% rename from 0.1.0/docs/AttestationPgpSignedAttestationContentType.md rename to grafeas/docs/AttestationPgpSignedAttestationContentType.md diff --git a/0.1.0/docs/AuthorityHint.md b/grafeas/docs/AuthorityHint.md similarity index 100% rename from 0.1.0/docs/AuthorityHint.md rename to grafeas/docs/AuthorityHint.md diff --git a/grafeas/docs/Body.md b/grafeas/docs/Body.md new file mode 100644 index 0000000..e4c9f99 --- /dev/null +++ b/grafeas/docs/Body.md @@ -0,0 +1,10 @@ +# Body + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Notes** | [**map[string]V1beta1Note**](v1beta1Note.md) | The notes to create, the key is expected to be the note ID. Max allowed length is 1000. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/Body1.md b/grafeas/docs/Body1.md new file mode 100644 index 0000000..5f56e15 --- /dev/null +++ b/grafeas/docs/Body1.md @@ -0,0 +1,10 @@ +# Body1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Occurrences** | [**[]V1beta1Occurrence**](v1beta1Occurrence.md) | The occurrences to create. Max allowed length is 1000. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/0.1.0/docs/BuildBuild.md b/grafeas/docs/BuildBuild.md similarity index 100% rename from 0.1.0/docs/BuildBuild.md rename to grafeas/docs/BuildBuild.md diff --git a/0.1.0/docs/BuildBuildSignature.md b/grafeas/docs/BuildBuildSignature.md similarity index 100% rename from 0.1.0/docs/BuildBuildSignature.md rename to grafeas/docs/BuildBuildSignature.md diff --git a/0.1.0/docs/BuildSignatureKeyType.md b/grafeas/docs/BuildSignatureKeyType.md similarity index 100% rename from 0.1.0/docs/BuildSignatureKeyType.md rename to grafeas/docs/BuildSignatureKeyType.md diff --git a/0.1.0/docs/CvsSv3UserInteraction.md b/grafeas/docs/CvssAttackComplexity.md similarity index 91% rename from 0.1.0/docs/CvsSv3UserInteraction.md rename to grafeas/docs/CvssAttackComplexity.md index a10c781..179da4e 100644 --- a/0.1.0/docs/CvsSv3UserInteraction.md +++ b/grafeas/docs/CvssAttackComplexity.md @@ -1,4 +1,4 @@ -# CvsSv3UserInteraction +# CvssAttackComplexity ## Properties Name | Type | Description | Notes diff --git a/grafeas/docs/CvssAttackVector.md b/grafeas/docs/CvssAttackVector.md new file mode 100644 index 0000000..e345649 --- /dev/null +++ b/grafeas/docs/CvssAttackVector.md @@ -0,0 +1,9 @@ +# CvssAttackVector + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/CvssAuthentication.md b/grafeas/docs/CvssAuthentication.md new file mode 100644 index 0000000..78f1b80 --- /dev/null +++ b/grafeas/docs/CvssAuthentication.md @@ -0,0 +1,9 @@ +# CvssAuthentication + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/0.1.0/docs/CvsSv3Scope.md b/grafeas/docs/CvssImpact.md similarity index 95% rename from 0.1.0/docs/CvsSv3Scope.md rename to grafeas/docs/CvssImpact.md index df2990d..8bd3437 100644 --- a/0.1.0/docs/CvsSv3Scope.md +++ b/grafeas/docs/CvssImpact.md @@ -1,4 +1,4 @@ -# CvsSv3Scope +# CvssImpact ## Properties Name | Type | Description | Notes diff --git a/0.1.0/docs/CvsSv3AttackComplexity.md b/grafeas/docs/CvssPrivilegesRequired.md similarity index 91% rename from 0.1.0/docs/CvsSv3AttackComplexity.md rename to grafeas/docs/CvssPrivilegesRequired.md index 7855c5e..3c3450f 100644 --- a/0.1.0/docs/CvsSv3AttackComplexity.md +++ b/grafeas/docs/CvssPrivilegesRequired.md @@ -1,4 +1,4 @@ -# CvsSv3AttackComplexity +# CvssPrivilegesRequired ## Properties Name | Type | Description | Notes diff --git a/0.1.0/docs/CvsSv3Impact.md b/grafeas/docs/CvssScope.md similarity index 94% rename from 0.1.0/docs/CvsSv3Impact.md rename to grafeas/docs/CvssScope.md index 8575bee..b0b761e 100644 --- a/0.1.0/docs/CvsSv3Impact.md +++ b/grafeas/docs/CvssScope.md @@ -1,4 +1,4 @@ -# CvsSv3Impact +# CvssScope ## Properties Name | Type | Description | Notes diff --git a/grafeas/docs/CvssUserInteraction.md b/grafeas/docs/CvssUserInteraction.md new file mode 100644 index 0000000..cc519e9 --- /dev/null +++ b/grafeas/docs/CvssUserInteraction.md @@ -0,0 +1,9 @@ +# CvssUserInteraction + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/0.1.0/docs/DeploymentDeployable.md b/grafeas/docs/DeploymentDeployable.md similarity index 100% rename from 0.1.0/docs/DeploymentDeployable.md rename to grafeas/docs/DeploymentDeployable.md diff --git a/0.1.0/docs/DeploymentDeployment.md b/grafeas/docs/DeploymentDeployment.md similarity index 100% rename from 0.1.0/docs/DeploymentDeployment.md rename to grafeas/docs/DeploymentDeployment.md diff --git a/0.1.0/docs/DeploymentPlatform.md b/grafeas/docs/DeploymentPlatform.md similarity index 100% rename from 0.1.0/docs/DeploymentPlatform.md rename to grafeas/docs/DeploymentPlatform.md diff --git a/grafeas/docs/DetailsVexAssessment.md b/grafeas/docs/DetailsVexAssessment.md new file mode 100644 index 0000000..ca63b45 --- /dev/null +++ b/grafeas/docs/DetailsVexAssessment.md @@ -0,0 +1,16 @@ +# DetailsVexAssessment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Cve** | **string** | Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability. | [optional] [default to null] +**RelatedUris** | [**[]V1beta1RelatedUrl**](v1beta1RelatedUrl.md) | Holds a list of references associated with this vulnerability item and assessment. | [optional] [default to null] +**NoteName** | **string** | | [optional] [default to null] +**State** | [***AssessmentState**](AssessmentState.md) | Provides the state of this Vulnerability assessment. | [optional] [default to null] +**Impacts** | **[]string** | Contains information about the impact of this vulnerability, this will change with time. | [optional] [default to null] +**Remediations** | [**[]AssessmentRemediation**](AssessmentRemediation.md) | Specifies details on how to handle (and presumably, fix) a vulnerability. | [optional] [default to null] +**Justification** | [***AssessmentJustification**](AssessmentJustification.md) | Justification provides the justification when the state of the assessment if NOT_AFFECTED. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/DiscoveredAnalysisCompleted.md b/grafeas/docs/DiscoveredAnalysisCompleted.md new file mode 100644 index 0000000..5664926 --- /dev/null +++ b/grafeas/docs/DiscoveredAnalysisCompleted.md @@ -0,0 +1,10 @@ +# DiscoveredAnalysisCompleted + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AnalysisType** | **[]string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/0.1.0/docs/DiscoveredAnalysisStatus.md b/grafeas/docs/DiscoveredAnalysisStatus.md similarity index 100% rename from 0.1.0/docs/DiscoveredAnalysisStatus.md rename to grafeas/docs/DiscoveredAnalysisStatus.md diff --git a/0.1.0/docs/DiscoveredContinuousAnalysis.md b/grafeas/docs/DiscoveredContinuousAnalysis.md similarity index 100% rename from 0.1.0/docs/DiscoveredContinuousAnalysis.md rename to grafeas/docs/DiscoveredContinuousAnalysis.md diff --git a/0.1.0/docs/DiscoveryDiscovered.md b/grafeas/docs/DiscoveryDiscovered.md similarity index 76% rename from 0.1.0/docs/DiscoveryDiscovered.md rename to grafeas/docs/DiscoveryDiscovered.md index b15ab2f..5eaaf03 100644 --- a/0.1.0/docs/DiscoveryDiscovered.md +++ b/grafeas/docs/DiscoveryDiscovered.md @@ -6,6 +6,8 @@ Name | Type | Description | Notes **ContinuousAnalysis** | [***DiscoveredContinuousAnalysis**](DiscoveredContinuousAnalysis.md) | Whether the resource is continuously analyzed. | [optional] [default to null] **LastAnalysisTime** | [**time.Time**](time.Time.md) | The last time continuous analysis was done for this resource. Deprecated, do not use. | [optional] [default to null] **AnalysisStatus** | [***DiscoveredAnalysisStatus**](DiscoveredAnalysisStatus.md) | The status of discovery for the resource. | [optional] [default to null] +**AnalysisCompleted** | [***DiscoveredAnalysisCompleted**](DiscoveredAnalysisCompleted.md) | | [optional] [default to null] +**AnalysisError** | [**[]RpcStatus**](rpcStatus.md) | Indicates any errors encountered during analysis of a resource. There could be 0 or more of these errors. | [optional] [default to null] **AnalysisStatusError** | [***RpcStatus**](rpcStatus.md) | When an error is encountered this will contain a LocalizedMessage under details to show to the user. The LocalizedMessage is output only and populated by the API. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/0.1.0/docs/DiscoveryDiscovery.md b/grafeas/docs/DiscoveryDiscovery.md similarity index 100% rename from 0.1.0/docs/DiscoveryDiscovery.md rename to grafeas/docs/DiscoveryDiscovery.md diff --git a/grafeas/docs/ExternalRefCategory.md b/grafeas/docs/ExternalRefCategory.md new file mode 100644 index 0000000..441552f --- /dev/null +++ b/grafeas/docs/ExternalRefCategory.md @@ -0,0 +1,9 @@ +# ExternalRefCategory + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/FileNoteFileType.md b/grafeas/docs/FileNoteFileType.md new file mode 100644 index 0000000..3b2e059 --- /dev/null +++ b/grafeas/docs/FileNoteFileType.md @@ -0,0 +1,9 @@ +# FileNoteFileType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/0.1.0/docs/GrafeasV1Beta1Api.md b/grafeas/docs/GrafeasV1Beta1Api.md similarity index 68% rename from 0.1.0/docs/GrafeasV1Beta1Api.md rename to grafeas/docs/GrafeasV1Beta1Api.md index b9bc0bb..19a1fa5 100644 --- a/0.1.0/docs/GrafeasV1Beta1Api.md +++ b/grafeas/docs/GrafeasV1Beta1Api.md @@ -1,28 +1,28 @@ # \GrafeasV1Beta1Api -All URIs are relative to *http://localhost* +All URIs are relative to *https://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**BatchCreateNotes**](GrafeasV1Beta1Api.md#BatchCreateNotes) | **Post** /v1beta1/{parent=projects/*}/notes:batchCreate | Creates new notes in batch. -[**BatchCreateOccurrences**](GrafeasV1Beta1Api.md#BatchCreateOccurrences) | **Post** /v1beta1/{parent=projects/*}/occurrences:batchCreate | Creates new occurrences in batch. -[**CreateNote**](GrafeasV1Beta1Api.md#CreateNote) | **Post** /v1beta1/{parent=projects/*}/notes | Creates a new note. -[**CreateOccurrence**](GrafeasV1Beta1Api.md#CreateOccurrence) | **Post** /v1beta1/{parent=projects/*}/occurrences | Creates a new occurrence. -[**DeleteNote**](GrafeasV1Beta1Api.md#DeleteNote) | **Delete** /v1beta1/{name=projects/*/notes/*} | Deletes the specified note. -[**DeleteOccurrence**](GrafeasV1Beta1Api.md#DeleteOccurrence) | **Delete** /v1beta1/{name=projects/*/occurrences/*} | Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource. -[**GetNote**](GrafeasV1Beta1Api.md#GetNote) | **Get** /v1beta1/{name=projects/*/notes/*} | Gets the specified note. -[**GetOccurrence**](GrafeasV1Beta1Api.md#GetOccurrence) | **Get** /v1beta1/{name=projects/*/occurrences/*} | Gets the specified occurrence. -[**GetOccurrenceNote**](GrafeasV1Beta1Api.md#GetOccurrenceNote) | **Get** /v1beta1/{name=projects/*/occurrences/*}/notes | Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project. -[**GetVulnerabilityOccurrencesSummary**](GrafeasV1Beta1Api.md#GetVulnerabilityOccurrencesSummary) | **Get** /v1beta1/{parent=projects/*}/occurrences:vulnerabilitySummary | Gets a summary of the number and severity of occurrences. -[**ListNoteOccurrences**](GrafeasV1Beta1Api.md#ListNoteOccurrences) | **Get** /v1beta1/{name=projects/*/notes/*}/occurrences | Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note. -[**ListNotes**](GrafeasV1Beta1Api.md#ListNotes) | **Get** /v1beta1/{parent=projects/*}/notes | Lists notes for the specified project. -[**ListOccurrences**](GrafeasV1Beta1Api.md#ListOccurrences) | **Get** /v1beta1/{parent=projects/*}/occurrences | Lists occurrences for the specified project. -[**UpdateNote**](GrafeasV1Beta1Api.md#UpdateNote) | **Patch** /v1beta1/{name=projects/*/notes/*} | Updates the specified note. -[**UpdateOccurrence**](GrafeasV1Beta1Api.md#UpdateOccurrence) | **Patch** /v1beta1/{name=projects/*/occurrences/*} | Updates the specified occurrence. - - -# **BatchCreateNotes** -> V1beta1BatchCreateNotesResponse BatchCreateNotes(ctx, parent, body) +[**GrafeasV1Beta1BatchCreateNotes**](GrafeasV1Beta1Api.md#GrafeasV1Beta1BatchCreateNotes) | **Post** /v1beta1/{parent}/notes:batchCreate | Creates new notes in batch. +[**GrafeasV1Beta1BatchCreateOccurrences**](GrafeasV1Beta1Api.md#GrafeasV1Beta1BatchCreateOccurrences) | **Post** /v1beta1/{parent}/occurrences:batchCreate | Creates new occurrences in batch. +[**GrafeasV1Beta1CreateNote**](GrafeasV1Beta1Api.md#GrafeasV1Beta1CreateNote) | **Post** /v1beta1/{parent}/notes | Creates a new note. +[**GrafeasV1Beta1CreateOccurrence**](GrafeasV1Beta1Api.md#GrafeasV1Beta1CreateOccurrence) | **Post** /v1beta1/{parent}/occurrences | Creates a new occurrence. +[**GrafeasV1Beta1DeleteNote**](GrafeasV1Beta1Api.md#GrafeasV1Beta1DeleteNote) | **Delete** /v1beta1/{name_1} | Deletes the specified note. +[**GrafeasV1Beta1DeleteOccurrence**](GrafeasV1Beta1Api.md#GrafeasV1Beta1DeleteOccurrence) | **Delete** /v1beta1/{name} | Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource. +[**GrafeasV1Beta1GetNote**](GrafeasV1Beta1Api.md#GrafeasV1Beta1GetNote) | **Get** /v1beta1/{name_1} | Gets the specified note. +[**GrafeasV1Beta1GetOccurrence**](GrafeasV1Beta1Api.md#GrafeasV1Beta1GetOccurrence) | **Get** /v1beta1/{name} | Gets the specified occurrence. +[**GrafeasV1Beta1GetOccurrenceNote**](GrafeasV1Beta1Api.md#GrafeasV1Beta1GetOccurrenceNote) | **Get** /v1beta1/{name}/notes | Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project. +[**GrafeasV1Beta1GetVulnerabilityOccurrencesSummary**](GrafeasV1Beta1Api.md#GrafeasV1Beta1GetVulnerabilityOccurrencesSummary) | **Get** /v1beta1/{parent}/occurrences:vulnerabilitySummary | Gets a summary of the number and severity of occurrences. +[**GrafeasV1Beta1ListNoteOccurrences**](GrafeasV1Beta1Api.md#GrafeasV1Beta1ListNoteOccurrences) | **Get** /v1beta1/{name}/occurrences | Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note. +[**GrafeasV1Beta1ListNotes**](GrafeasV1Beta1Api.md#GrafeasV1Beta1ListNotes) | **Get** /v1beta1/{parent}/notes | Lists notes for the specified project. +[**GrafeasV1Beta1ListOccurrences**](GrafeasV1Beta1Api.md#GrafeasV1Beta1ListOccurrences) | **Get** /v1beta1/{parent}/occurrences | Lists occurrences for the specified project. +[**GrafeasV1Beta1UpdateNote**](GrafeasV1Beta1Api.md#GrafeasV1Beta1UpdateNote) | **Patch** /v1beta1/{name_1} | Updates the specified note. +[**GrafeasV1Beta1UpdateOccurrence**](GrafeasV1Beta1Api.md#GrafeasV1Beta1UpdateOccurrence) | **Patch** /v1beta1/{name} | Updates the specified occurrence. + + +# **GrafeasV1Beta1BatchCreateNotes** +> V1beta1BatchCreateNotesResponse GrafeasV1Beta1BatchCreateNotes(ctx, parent, body) Creates new notes in batch. ### Required Parameters @@ -31,7 +31,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **parent** | **string**| The name of the project in the form of `projects/[PROJECT_ID]`, under which the notes are to be created. | - **body** | [**V1beta1BatchCreateNotesRequest**](V1beta1BatchCreateNotesRequest.md)| | + **body** | [**Body**](Body.md)| | ### Return type @@ -48,8 +48,8 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **BatchCreateOccurrences** -> V1beta1BatchCreateOccurrencesResponse BatchCreateOccurrences(ctx, parent, body) +# **GrafeasV1Beta1BatchCreateOccurrences** +> V1beta1BatchCreateOccurrencesResponse GrafeasV1Beta1BatchCreateOccurrences(ctx, parent, body) Creates new occurrences in batch. ### Required Parameters @@ -58,7 +58,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **parent** | **string**| The name of the project in the form of `projects/[PROJECT_ID]`, under which the occurrences are to be created. | - **body** | [**V1beta1BatchCreateOccurrencesRequest**](V1beta1BatchCreateOccurrencesRequest.md)| | + **body** | [**Body1**](Body1.md)| | ### Return type @@ -75,8 +75,8 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **CreateNote** -> V1beta1Note CreateNote(ctx, parent, body) +# **GrafeasV1Beta1CreateNote** +> V1beta1Note GrafeasV1Beta1CreateNote(ctx, parent, body, noteId) Creates a new note. ### Required Parameters @@ -86,6 +86,7 @@ Name | Type | Description | Notes **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **parent** | **string**| The name of the project in the form of `projects/[PROJECT_ID]`, under which the note is to be created. | **body** | [**V1beta1Note**](V1beta1Note.md)| The note to create. | + **noteId** | **string**| The ID to use for this note. | ### Return type @@ -102,8 +103,8 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **CreateOccurrence** -> V1beta1Occurrence CreateOccurrence(ctx, parent, body) +# **GrafeasV1Beta1CreateOccurrence** +> V1beta1Occurrence GrafeasV1Beta1CreateOccurrence(ctx, parent, body) Creates a new occurrence. ### Required Parameters @@ -129,8 +130,8 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **DeleteNote** -> interface{} DeleteNote(ctx, name) +# **GrafeasV1Beta1DeleteNote** +> interface{} GrafeasV1Beta1DeleteNote(ctx, name1) Deletes the specified note. ### Required Parameters @@ -138,7 +139,7 @@ Deletes the specified note. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **name** | **string**| The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. | + **name1** | **string**| The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. | ### Return type @@ -155,8 +156,8 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **DeleteOccurrence** -> interface{} DeleteOccurrence(ctx, name) +# **GrafeasV1Beta1DeleteOccurrence** +> interface{} GrafeasV1Beta1DeleteOccurrence(ctx, name) Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource. ### Required Parameters @@ -181,8 +182,8 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **GetNote** -> V1beta1Note GetNote(ctx, name) +# **GrafeasV1Beta1GetNote** +> V1beta1Note GrafeasV1Beta1GetNote(ctx, name1) Gets the specified note. ### Required Parameters @@ -190,7 +191,7 @@ Gets the specified note. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **name** | **string**| The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. | + **name1** | **string**| The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. | ### Return type @@ -207,8 +208,8 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **GetOccurrence** -> V1beta1Occurrence GetOccurrence(ctx, name) +# **GrafeasV1Beta1GetOccurrence** +> V1beta1Occurrence GrafeasV1Beta1GetOccurrence(ctx, name) Gets the specified occurrence. ### Required Parameters @@ -233,8 +234,8 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **GetOccurrenceNote** -> V1beta1Note GetOccurrenceNote(ctx, name) +# **GrafeasV1Beta1GetOccurrenceNote** +> V1beta1Note GrafeasV1Beta1GetOccurrenceNote(ctx, name) Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project. ### Required Parameters @@ -259,8 +260,8 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **GetVulnerabilityOccurrencesSummary** -> V1beta1VulnerabilityOccurrencesSummary GetVulnerabilityOccurrencesSummary(ctx, parent, optional) +# **GrafeasV1Beta1GetVulnerabilityOccurrencesSummary** +> V1beta1VulnerabilityOccurrencesSummary GrafeasV1Beta1GetVulnerabilityOccurrencesSummary(ctx, parent, optional) Gets a summary of the number and severity of occurrences. ### Required Parameters @@ -269,10 +270,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **parent** | **string**| The name of the project to get a vulnerability summary for in the form of `projects/[PROJECT_ID]`. | - **optional** | ***GetVulnerabilityOccurrencesSummaryOpts** | optional parameters | nil if no parameters + **optional** | ***GrafeasV1Beta1GetVulnerabilityOccurrencesSummaryOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a GetVulnerabilityOccurrencesSummaryOpts struct +Optional parameters are passed through a pointer to a GrafeasV1Beta1GetVulnerabilityOccurrencesSummaryOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -294,8 +295,8 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **ListNoteOccurrences** -> V1beta1ListNoteOccurrencesResponse ListNoteOccurrences(ctx, name, optional) +# **GrafeasV1Beta1ListNoteOccurrences** +> V1beta1ListNoteOccurrencesResponse GrafeasV1Beta1ListNoteOccurrences(ctx, name, optional) Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note. ### Required Parameters @@ -304,10 +305,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **name** | **string**| The name of the note to list occurrences for in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. | - **optional** | ***ListNoteOccurrencesOpts** | optional parameters | nil if no parameters + **optional** | ***GrafeasV1Beta1ListNoteOccurrencesOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a ListNoteOccurrencesOpts struct +Optional parameters are passed through a pointer to a GrafeasV1Beta1ListNoteOccurrencesOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -331,8 +332,8 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **ListNotes** -> V1beta1ListNotesResponse ListNotes(ctx, parent, optional) +# **GrafeasV1Beta1ListNotes** +> V1beta1ListNotesResponse GrafeasV1Beta1ListNotes(ctx, parent, optional) Lists notes for the specified project. ### Required Parameters @@ -341,10 +342,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **parent** | **string**| The name of the project to list notes for in the form of `projects/[PROJECT_ID]`. | - **optional** | ***ListNotesOpts** | optional parameters | nil if no parameters + **optional** | ***GrafeasV1Beta1ListNotesOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a ListNotesOpts struct +Optional parameters are passed through a pointer to a GrafeasV1Beta1ListNotesOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -368,8 +369,8 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **ListOccurrences** -> V1beta1ListOccurrencesResponse ListOccurrences(ctx, parent, optional) +# **GrafeasV1Beta1ListOccurrences** +> V1beta1ListOccurrencesResponse GrafeasV1Beta1ListOccurrences(ctx, parent, optional) Lists occurrences for the specified project. ### Required Parameters @@ -378,10 +379,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **parent** | **string**| The name of the project to list occurrences for in the form of `projects/[PROJECT_ID]`. | - **optional** | ***ListOccurrencesOpts** | optional parameters | nil if no parameters + **optional** | ***GrafeasV1Beta1ListOccurrencesOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a ListOccurrencesOpts struct +Optional parameters are passed through a pointer to a GrafeasV1Beta1ListOccurrencesOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -405,8 +406,8 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **UpdateNote** -> V1beta1Note UpdateNote(ctx, name, body) +# **GrafeasV1Beta1UpdateNote** +> V1beta1Note GrafeasV1Beta1UpdateNote(ctx, name1, body, optional) Updates the specified note. ### Required Parameters @@ -414,8 +415,18 @@ Updates the specified note. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **name** | **string**| The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. | + **name1** | **string**| The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. | **body** | [**V1beta1Note**](V1beta1Note.md)| The updated note. | + **optional** | ***GrafeasV1Beta1UpdateNoteOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a GrafeasV1Beta1UpdateNoteOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **updateMask** | **optional.String**| The fields to update. | ### Return type @@ -432,8 +443,8 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **UpdateOccurrence** -> V1beta1Occurrence UpdateOccurrence(ctx, name, body) +# **GrafeasV1Beta1UpdateOccurrence** +> V1beta1Occurrence GrafeasV1Beta1UpdateOccurrence(ctx, name, body, optional) Updates the specified occurrence. ### Required Parameters @@ -443,6 +454,16 @@ Name | Type | Description | Notes **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **name** | **string**| The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. | **body** | [**V1beta1Occurrence**](V1beta1Occurrence.md)| The updated occurrence. | + **optional** | ***GrafeasV1Beta1UpdateOccurrenceOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a GrafeasV1Beta1UpdateOccurrenceOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **updateMask** | **optional.String**| The fields to update. | ### Return type diff --git a/0.1.0/docs/V1beta1Signature.md b/grafeas/docs/Grafeasv1beta1Signature.md similarity index 51% rename from 0.1.0/docs/V1beta1Signature.md rename to grafeas/docs/Grafeasv1beta1Signature.md index 25accde..6329fdc 100644 --- a/0.1.0/docs/V1beta1Signature.md +++ b/grafeas/docs/Grafeasv1beta1Signature.md @@ -1,10 +1,10 @@ -# V1beta1Signature +# Grafeasv1beta1Signature ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Signature** | **string** | The content of the signature, an opaque bytestring. The payload that this signature verifies MUST be unambiguously provided with the Signature during verification. A wrapper message might provide the payload explicitly. Alternatively, a message might have a canonical serialization that can always be unambiguously computed to derive the payload. | [optional] [default to null] -**PublicKeyId** | **string** | The identifier for the public key that verifies this signature. * The `public_key_id` is required. * The `public_key_id` MUST be an RFC3986 conformant URI. * When possible, the `public_key_id` SHOULD be an immutable reference, such as a cryptographic digest. Examples of valid `public_key_id`s: OpenPGP V4 public key fingerprint: * \"openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA\" See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more details on this scheme. RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER serialization): * \"ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU\" * \"nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5\" | [optional] [default to null] +**PublicKeyId** | **string** | The identifier for the public key that verifies this signature. * The `public_key_id` is required. * The `public_key_id` SHOULD be an RFC3986 conformant URI. * When possible, the `public_key_id` SHOULD be an immutable reference, such as a cryptographic digest. Examples of valid `public_key_id`s: OpenPGP V4 public key fingerprint: * \"openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA\" See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more details on this scheme. RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER serialization): * \"ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU\" * \"nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5\" | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/0.1.0/docs/HashHashType.md b/grafeas/docs/HashHashType.md similarity index 100% rename from 0.1.0/docs/HashHashType.md rename to grafeas/docs/HashHashType.md diff --git a/0.1.0/docs/ImageBasis.md b/grafeas/docs/ImageBasis.md similarity index 100% rename from 0.1.0/docs/ImageBasis.md rename to grafeas/docs/ImageBasis.md diff --git a/0.1.0/docs/ImageDerived.md b/grafeas/docs/ImageDerived.md similarity index 100% rename from 0.1.0/docs/ImageDerived.md rename to grafeas/docs/ImageDerived.md diff --git a/0.1.0/docs/ImageFingerprint.md b/grafeas/docs/ImageFingerprint.md similarity index 100% rename from 0.1.0/docs/ImageFingerprint.md rename to grafeas/docs/ImageFingerprint.md diff --git a/0.1.0/docs/ImageLayer.md b/grafeas/docs/ImageLayer.md similarity index 100% rename from 0.1.0/docs/ImageLayer.md rename to grafeas/docs/ImageLayer.md diff --git a/grafeas/docs/InTotoArtifactRule.md b/grafeas/docs/InTotoArtifactRule.md new file mode 100644 index 0000000..f10e519 --- /dev/null +++ b/grafeas/docs/InTotoArtifactRule.md @@ -0,0 +1,10 @@ +# InTotoArtifactRule + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ArtifactRule** | **[]string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/IntotoInToto.md b/grafeas/docs/IntotoInToto.md new file mode 100644 index 0000000..09d2d33 --- /dev/null +++ b/grafeas/docs/IntotoInToto.md @@ -0,0 +1,15 @@ +# IntotoInToto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StepName** | **string** | This field identifies the name of the step in the supply chain. | [optional] [default to null] +**SigningKeys** | [**[]IntotoSigningKey**](intotoSigningKey.md) | This field contains the public keys that can be used to verify the signatures on the step metadata. | [optional] [default to null] +**ExpectedMaterials** | [**[]InTotoArtifactRule**](InTotoArtifactRule.md) | The following fields contain in-toto artifact rules identifying the artifacts that enter this supply chain step, and exit the supply chain step, i.e. materials and products of the step. | [optional] [default to null] +**ExpectedProducts** | [**[]InTotoArtifactRule**](InTotoArtifactRule.md) | | [optional] [default to null] +**ExpectedCommand** | **[]string** | This field contains the expected command used to perform the step. | [optional] [default to null] +**Threshold** | **string** | This field contains a value that indicates the minimum number of keys that need to be used to sign the step's in-toto link. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/IntotoLink.md b/grafeas/docs/IntotoLink.md new file mode 100644 index 0000000..56ab55b --- /dev/null +++ b/grafeas/docs/IntotoLink.md @@ -0,0 +1,14 @@ +# IntotoLink + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Command** | **[]string** | | [optional] [default to null] +**Materials** | [**[]IntotoLinkArtifact**](intotoLinkArtifact.md) | | [optional] [default to null] +**Products** | [**[]IntotoLinkArtifact**](intotoLinkArtifact.md) | Products are the supply chain artifacts generated as a result of the step. The structure is identical to that of materials. | [optional] [default to null] +**Byproducts** | [***LinkByProducts**](LinkByProducts.md) | ByProducts are data generated as part of a software supply chain step, but are not the actual result of the step. | [optional] [default to null] +**Environment** | [***LinkEnvironment**](LinkEnvironment.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/IntotoLinkArtifact.md b/grafeas/docs/IntotoLinkArtifact.md new file mode 100644 index 0000000..688d3ac --- /dev/null +++ b/grafeas/docs/IntotoLinkArtifact.md @@ -0,0 +1,11 @@ +# IntotoLinkArtifact + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ResourceUri** | **string** | | [optional] [default to null] +**Hashes** | [***LinkArtifactHashes**](LinkArtifactHashes.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/IntotoSigningKey.md b/grafeas/docs/IntotoSigningKey.md new file mode 100644 index 0000000..a25b71f --- /dev/null +++ b/grafeas/docs/IntotoSigningKey.md @@ -0,0 +1,13 @@ +# IntotoSigningKey + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**KeyId** | **string** | key_id is an identifier for the signing key. | [optional] [default to null] +**KeyType** | **string** | This field identifies the specific signing method. Eg: \"rsa\", \"ed25519\", and \"ecdsa\". | [optional] [default to null] +**PublicKeyValue** | **string** | This field contains the actual public key. | [optional] [default to null] +**KeyScheme** | **string** | This field contains the corresponding signature scheme. Eg: \"rsassa-pss-sha256\". | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/JustificationJustificationType.md b/grafeas/docs/JustificationJustificationType.md new file mode 100644 index 0000000..3e89608 --- /dev/null +++ b/grafeas/docs/JustificationJustificationType.md @@ -0,0 +1,9 @@ +# JustificationJustificationType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/0.1.0/docs/LayerDirective.md b/grafeas/docs/LayerDirective.md similarity index 100% rename from 0.1.0/docs/LayerDirective.md rename to grafeas/docs/LayerDirective.md diff --git a/grafeas/docs/LinkArtifactHashes.md b/grafeas/docs/LinkArtifactHashes.md new file mode 100644 index 0000000..d6042f5 --- /dev/null +++ b/grafeas/docs/LinkArtifactHashes.md @@ -0,0 +1,10 @@ +# LinkArtifactHashes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Sha256** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/LinkByProducts.md b/grafeas/docs/LinkByProducts.md new file mode 100644 index 0000000..ddf72c7 --- /dev/null +++ b/grafeas/docs/LinkByProducts.md @@ -0,0 +1,10 @@ +# LinkByProducts + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomValues** | **map[string]string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/LinkEnvironment.md b/grafeas/docs/LinkEnvironment.md new file mode 100644 index 0000000..4647157 --- /dev/null +++ b/grafeas/docs/LinkEnvironment.md @@ -0,0 +1,10 @@ +# LinkEnvironment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomValues** | **map[string]string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/0.1.0/docs/PackageArchitecture.md b/grafeas/docs/PackageArchitecture.md similarity index 100% rename from 0.1.0/docs/PackageArchitecture.md rename to grafeas/docs/PackageArchitecture.md diff --git a/0.1.0/docs/PackageDistribution.md b/grafeas/docs/PackageDistribution.md similarity index 83% rename from 0.1.0/docs/PackageDistribution.md rename to grafeas/docs/PackageDistribution.md index c15a9fc..0f1c509 100644 --- a/0.1.0/docs/PackageDistribution.md +++ b/grafeas/docs/PackageDistribution.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CpeUri** | **string** | Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. | [optional] [default to null] +**CpeUri** | **string** | The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. | [default to null] **Architecture** | [***PackageArchitecture**](packageArchitecture.md) | The CPU architecture for which packages in this distribution channel were built. | [optional] [default to null] **LatestVersion** | [***PackageVersion**](packageVersion.md) | The latest available version of this package in this distribution channel. | [optional] [default to null] **Maintainer** | **string** | A freeform string denoting the maintainer of this package. | [optional] [default to null] diff --git a/grafeas/docs/PackageInfoNoteExternalRef.md b/grafeas/docs/PackageInfoNoteExternalRef.md new file mode 100644 index 0000000..7a226d2 --- /dev/null +++ b/grafeas/docs/PackageInfoNoteExternalRef.md @@ -0,0 +1,13 @@ +# PackageInfoNoteExternalRef + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Category** | [***ExternalRefCategory**](ExternalRefCategory.md) | | [optional] [default to null] +**Type_** | **string** | | [optional] [default to null] +**Locator** | **string** | | [optional] [default to null] +**Comment** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/PackageInstallation.md b/grafeas/docs/PackageInstallation.md new file mode 100644 index 0000000..8c83d64 --- /dev/null +++ b/grafeas/docs/PackageInstallation.md @@ -0,0 +1,16 @@ +# PackageInstallation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the installed package. | [default to null] +**Location** | [**[]V1beta1packageLocation**](v1beta1packageLocation.md) | All of the places within the filesystem versions of this package have been found. | [optional] [default to null] +**PackageType** | **string** | The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.). | [optional] [default to null] +**CpeUri** | **string** | The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. The cpe_uri will be blank for language packages. | [optional] [default to null] +**Architecture** | [***PackageArchitecture**](packageArchitecture.md) | The CPU architecture for which packages in this distribution channel were built. Architecture will be blank for language packages. | [optional] [default to null] +**License** | [***V1beta1License**](v1beta1License.md) | Licenses that have been declared by the authors of the package. | [optional] [default to null] +**Version** | [***PackageVersion**](packageVersion.md) | The version of the package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/PackagePackage.md b/grafeas/docs/PackagePackage.md new file mode 100644 index 0000000..f46a2f6 --- /dev/null +++ b/grafeas/docs/PackagePackage.md @@ -0,0 +1,20 @@ +# PackagePackage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the package. | [default to null] +**Distribution** | [**[]PackageDistribution**](packageDistribution.md) | The various channels by which a package is distributed. | [optional] [default to null] +**PackageType** | **string** | The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.). | [optional] [default to null] +**CpeUri** | **string** | The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. The cpe_uri will be blank for language packages. | [optional] [default to null] +**Architecture** | [***PackageArchitecture**](packageArchitecture.md) | The CPU architecture for which packages in this distribution channel were built. Architecture will be blank for language packages. | [optional] [default to null] +**Version** | [***PackageVersion**](packageVersion.md) | The version of the package. | [optional] [default to null] +**Maintainer** | **string** | A freeform text denoting the maintainer of this package. | [optional] [default to null] +**Url** | **string** | The homepage for this package. | [optional] [default to null] +**Description** | **string** | The description of this package. | [optional] [default to null] +**License** | [***V1beta1License**](v1beta1License.md) | Licenses that have been declared by the authors of the package. | [optional] [default to null] +**Digest** | [**[]V1beta1Digest**](v1beta1Digest.md) | Hash value, typically a file digest, that allows unique identification a specific package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/0.1.0/docs/PackageVersion.md b/grafeas/docs/PackageVersion.md similarity index 63% rename from 0.1.0/docs/PackageVersion.md rename to grafeas/docs/PackageVersion.md index 457477c..f425e87 100644 --- a/0.1.0/docs/PackageVersion.md +++ b/grafeas/docs/PackageVersion.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **Epoch** | **int32** | Used to correct mistakes in the version numbering scheme. | [optional] [default to null] **Name** | **string** | Required only when version kind is NORMAL. The main part of the version name. | [optional] [default to null] **Revision** | **string** | The iteration of the package build from the above version. | [optional] [default to null] +**Inclusive** | **bool** | Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. | [optional] [default to null] **Kind** | [***VersionVersionKind**](VersionVersionKind.md) | Required. Distinguishes between sentinel MIN/MAX versions and normal versions. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/grafeas/docs/ProtobufAny.md b/grafeas/docs/ProtobufAny.md new file mode 100644 index 0000000..b70aaa3 --- /dev/null +++ b/grafeas/docs/ProtobufAny.md @@ -0,0 +1,10 @@ +# ProtobufAny + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type_** | **string** | A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/0.1.0/docs/ProvenanceBuildProvenance.md b/grafeas/docs/ProvenanceBuildProvenance.md similarity index 93% rename from 0.1.0/docs/ProvenanceBuildProvenance.md rename to grafeas/docs/ProvenanceBuildProvenance.md index 8a745a9..1fe7a09 100644 --- a/0.1.0/docs/ProvenanceBuildProvenance.md +++ b/grafeas/docs/ProvenanceBuildProvenance.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Id** | **string** | Required. Unique identifier of the build. | [optional] [default to null] **ProjectId** | **string** | ID of the project. | [optional] [default to null] **Commands** | [**[]ProvenanceCommand**](provenanceCommand.md) | Commands requested by the build. | [optional] [default to null] -**BuiltArtifacts** | [**[]ProvenanceArtifact**](provenanceArtifact.md) | Output of the build. | [optional] [default to null] +**BuiltArtifacts** | [**[]V1beta1provenanceArtifact**](v1beta1provenanceArtifact.md) | Output of the build. | [optional] [default to null] **CreateTime** | [**time.Time**](time.Time.md) | Time at which the build was created. | [optional] [default to null] **StartTime** | [**time.Time**](time.Time.md) | Time at which execution of the build was started. | [optional] [default to null] **EndTime** | [**time.Time**](time.Time.md) | Time at which execution of the build was finished. | [optional] [default to null] diff --git a/0.1.0/docs/ProvenanceCommand.md b/grafeas/docs/ProvenanceCommand.md similarity index 100% rename from 0.1.0/docs/ProvenanceCommand.md rename to grafeas/docs/ProvenanceCommand.md diff --git a/0.1.0/docs/ProvenanceFileHashes.md b/grafeas/docs/ProvenanceFileHashes.md similarity index 100% rename from 0.1.0/docs/ProvenanceFileHashes.md rename to grafeas/docs/ProvenanceFileHashes.md diff --git a/0.1.0/docs/ProvenanceHash.md b/grafeas/docs/ProvenanceHash.md similarity index 100% rename from 0.1.0/docs/ProvenanceHash.md rename to grafeas/docs/ProvenanceHash.md diff --git a/0.1.0/docs/ProvenanceSource.md b/grafeas/docs/ProvenanceSource.md similarity index 100% rename from 0.1.0/docs/ProvenanceSource.md rename to grafeas/docs/ProvenanceSource.md diff --git a/grafeas/docs/RemediationRemediationType.md b/grafeas/docs/RemediationRemediationType.md new file mode 100644 index 0000000..9ee08d0 --- /dev/null +++ b/grafeas/docs/RemediationRemediationType.md @@ -0,0 +1,9 @@ +# RemediationRemediationType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/0.1.0/docs/RpcStatus.md b/grafeas/docs/RpcStatus.md similarity index 100% rename from 0.1.0/docs/RpcStatus.md rename to grafeas/docs/RpcStatus.md diff --git a/0.1.0/docs/SourceAliasContext.md b/grafeas/docs/SourceAliasContext.md similarity index 100% rename from 0.1.0/docs/SourceAliasContext.md rename to grafeas/docs/SourceAliasContext.md diff --git a/0.1.0/docs/SourceCloudRepoSourceContext.md b/grafeas/docs/SourceCloudRepoSourceContext.md similarity index 100% rename from 0.1.0/docs/SourceCloudRepoSourceContext.md rename to grafeas/docs/SourceCloudRepoSourceContext.md diff --git a/0.1.0/docs/SourceGerritSourceContext.md b/grafeas/docs/SourceGerritSourceContext.md similarity index 100% rename from 0.1.0/docs/SourceGerritSourceContext.md rename to grafeas/docs/SourceGerritSourceContext.md diff --git a/0.1.0/docs/SourceGitSourceContext.md b/grafeas/docs/SourceGitSourceContext.md similarity index 100% rename from 0.1.0/docs/SourceGitSourceContext.md rename to grafeas/docs/SourceGitSourceContext.md diff --git a/0.1.0/docs/SourceProjectRepoId.md b/grafeas/docs/SourceProjectRepoId.md similarity index 100% rename from 0.1.0/docs/SourceProjectRepoId.md rename to grafeas/docs/SourceProjectRepoId.md diff --git a/0.1.0/docs/SourceRepoId.md b/grafeas/docs/SourceRepoId.md similarity index 100% rename from 0.1.0/docs/SourceRepoId.md rename to grafeas/docs/SourceRepoId.md diff --git a/0.1.0/docs/SourceSourceContext.md b/grafeas/docs/SourceSourceContext.md similarity index 100% rename from 0.1.0/docs/SourceSourceContext.md rename to grafeas/docs/SourceSourceContext.md diff --git a/grafeas/docs/SpdxDocumentNote.md b/grafeas/docs/SpdxDocumentNote.md new file mode 100644 index 0000000..ccf85ac --- /dev/null +++ b/grafeas/docs/SpdxDocumentNote.md @@ -0,0 +1,11 @@ +# SpdxDocumentNote + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SpdxVersion** | **string** | | [optional] [default to null] +**DataLicence** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/SpdxDocumentOccurrence.md b/grafeas/docs/SpdxDocumentOccurrence.md new file mode 100644 index 0000000..dca2a99 --- /dev/null +++ b/grafeas/docs/SpdxDocumentOccurrence.md @@ -0,0 +1,18 @@ +# SpdxDocumentOccurrence + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | [optional] [default to null] +**Title** | **string** | | [optional] [default to null] +**Namespace** | **string** | | [optional] [default to null] +**ExternalDocumentRefs** | **[]string** | | [optional] [default to null] +**LicenseListVersion** | **string** | | [optional] [default to null] +**Creators** | **[]string** | | [optional] [default to null] +**CreateTime** | [**time.Time**](time.Time.md) | | [optional] [default to null] +**CreatorComment** | **string** | | [optional] [default to null] +**DocumentComment** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/SpdxFileNote.md b/grafeas/docs/SpdxFileNote.md new file mode 100644 index 0000000..06c209e --- /dev/null +++ b/grafeas/docs/SpdxFileNote.md @@ -0,0 +1,12 @@ +# SpdxFileNote + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | **string** | | [optional] [default to null] +**FileType** | [***FileNoteFileType**](FileNoteFileType.md) | | [optional] [default to null] +**Checksum** | **[]string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/SpdxFileOccurrence.md b/grafeas/docs/SpdxFileOccurrence.md new file mode 100644 index 0000000..38b15f2 --- /dev/null +++ b/grafeas/docs/SpdxFileOccurrence.md @@ -0,0 +1,17 @@ +# SpdxFileOccurrence + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | [optional] [default to null] +**LicenseConcluded** | [***V1beta1License**](v1beta1License.md) | | [optional] [default to null] +**FilesLicenseInfo** | **[]string** | | [optional] [default to null] +**Copyright** | **string** | | [optional] [default to null] +**Comment** | **string** | | [optional] [default to null] +**Notice** | **string** | | [optional] [default to null] +**Contributors** | **[]string** | | [optional] [default to null] +**Attributions** | **[]string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/SpdxPackageInfoNote.md b/grafeas/docs/SpdxPackageInfoNote.md new file mode 100644 index 0000000..cbe1a58 --- /dev/null +++ b/grafeas/docs/SpdxPackageInfoNote.md @@ -0,0 +1,26 @@ +# SpdxPackageInfoNote + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | **string** | | [optional] [default to null] +**Version** | **string** | | [optional] [default to null] +**Supplier** | **string** | | [optional] [default to null] +**Originator** | **string** | | [optional] [default to null] +**DownloadLocation** | **string** | | [optional] [default to null] +**Analyzed** | **bool** | | [optional] [default to null] +**VerificationCode** | **string** | | [optional] [default to null] +**Checksum** | **string** | | [optional] [default to null] +**HomePage** | **string** | | [optional] [default to null] +**FilesLicenseInfo** | **[]string** | | [optional] [default to null] +**LicenseDeclared** | [***V1beta1License**](v1beta1License.md) | | [optional] [default to null] +**Copyright** | **string** | | [optional] [default to null] +**SummaryDescription** | **string** | | [optional] [default to null] +**DetailedDescription** | **string** | | [optional] [default to null] +**ExternalRefs** | [**[]PackageInfoNoteExternalRef**](PackageInfoNoteExternalRef.md) | | [optional] [default to null] +**Attribution** | **string** | | [optional] [default to null] +**PackageType** | **string** | The type of package: OS, MAVEN, GO, GO_STDLIB, etc. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/SpdxPackageInfoOccurrence.md b/grafeas/docs/SpdxPackageInfoOccurrence.md new file mode 100644 index 0000000..6878341 --- /dev/null +++ b/grafeas/docs/SpdxPackageInfoOccurrence.md @@ -0,0 +1,19 @@ +# SpdxPackageInfoOccurrence + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | [optional] [default to null] +**Filename** | **string** | | [optional] [default to null] +**SourceInfo** | **string** | | [optional] [default to null] +**LicenseConcluded** | [***V1beta1License**](v1beta1License.md) | | [optional] [default to null] +**Comment** | **string** | | [optional] [default to null] +**PackageType** | **string** | The type of package: OS, MAVEN, GO, GO_STDLIB, etc. | [optional] [default to null] +**Title** | **string** | | [optional] [default to null] +**Version** | **string** | | [optional] [default to null] +**HomePage** | **string** | | [optional] [default to null] +**SummaryDescription** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/SpdxRelationshipNote.md b/grafeas/docs/SpdxRelationshipNote.md new file mode 100644 index 0000000..f6bbc65 --- /dev/null +++ b/grafeas/docs/SpdxRelationshipNote.md @@ -0,0 +1,10 @@ +# SpdxRelationshipNote + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type_** | [***SpdxRelationshipType**](spdxRelationshipType.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/SpdxRelationshipOccurrence.md b/grafeas/docs/SpdxRelationshipOccurrence.md new file mode 100644 index 0000000..524b182 --- /dev/null +++ b/grafeas/docs/SpdxRelationshipOccurrence.md @@ -0,0 +1,13 @@ +# SpdxRelationshipOccurrence + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Source** | **string** | | [optional] [default to null] +**Target** | **string** | | [optional] [default to null] +**Type_** | [***SpdxRelationshipType**](spdxRelationshipType.md) | | [optional] [default to null] +**Comment** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/SpdxRelationshipType.md b/grafeas/docs/SpdxRelationshipType.md new file mode 100644 index 0000000..1fb5769 --- /dev/null +++ b/grafeas/docs/SpdxRelationshipType.md @@ -0,0 +1,9 @@ +# SpdxRelationshipType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/0.1.0/docs/V1beta1BatchCreateNotesResponse.md b/grafeas/docs/V1beta1BatchCreateNotesResponse.md similarity index 100% rename from 0.1.0/docs/V1beta1BatchCreateNotesResponse.md rename to grafeas/docs/V1beta1BatchCreateNotesResponse.md diff --git a/0.1.0/docs/V1beta1BatchCreateOccurrencesResponse.md b/grafeas/docs/V1beta1BatchCreateOccurrencesResponse.md similarity index 100% rename from 0.1.0/docs/V1beta1BatchCreateOccurrencesResponse.md rename to grafeas/docs/V1beta1BatchCreateOccurrencesResponse.md diff --git a/grafeas/docs/V1beta1Digest.md b/grafeas/docs/V1beta1Digest.md new file mode 100644 index 0000000..15d15a6 --- /dev/null +++ b/grafeas/docs/V1beta1Digest.md @@ -0,0 +1,11 @@ +# V1beta1Digest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Algo** | **string** | `SHA1`, `SHA512` etc. | [optional] [default to null] +**DigestBytes** | **string** | Value of the digest. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/V1beta1Envelope.md b/grafeas/docs/V1beta1Envelope.md new file mode 100644 index 0000000..6a62076 --- /dev/null +++ b/grafeas/docs/V1beta1Envelope.md @@ -0,0 +1,12 @@ +# V1beta1Envelope + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Payload** | **string** | | [optional] [default to null] +**PayloadType** | **string** | | [optional] [default to null] +**Signatures** | [**[]V1beta1EnvelopeSignature**](v1beta1EnvelopeSignature.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/V1beta1EnvelopeSignature.md b/grafeas/docs/V1beta1EnvelopeSignature.md new file mode 100644 index 0000000..fc44da7 --- /dev/null +++ b/grafeas/docs/V1beta1EnvelopeSignature.md @@ -0,0 +1,11 @@ +# V1beta1EnvelopeSignature + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Sig** | **string** | | [optional] [default to null] +**Keyid** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/V1beta1License.md b/grafeas/docs/V1beta1License.md new file mode 100644 index 0000000..7230c1a --- /dev/null +++ b/grafeas/docs/V1beta1License.md @@ -0,0 +1,11 @@ +# V1beta1License + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Expression** | **string** | Often a single license can be used to represent the licensing terms. Sometimes it is necessary to include a choice of one or more licenses or some combination of license identifiers. Examples: \"LGPL-2.1-only OR MIT\", \"LGPL-2.1-only AND MIT\", \"GPL-2.0-or-later WITH Bison-exception-2.2\". | [optional] [default to null] +**Comments** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/0.1.0/docs/V1beta1ListNoteOccurrencesResponse.md b/grafeas/docs/V1beta1ListNoteOccurrencesResponse.md similarity index 100% rename from 0.1.0/docs/V1beta1ListNoteOccurrencesResponse.md rename to grafeas/docs/V1beta1ListNoteOccurrencesResponse.md diff --git a/0.1.0/docs/V1beta1ListNotesResponse.md b/grafeas/docs/V1beta1ListNotesResponse.md similarity index 100% rename from 0.1.0/docs/V1beta1ListNotesResponse.md rename to grafeas/docs/V1beta1ListNotesResponse.md diff --git a/0.1.0/docs/V1beta1ListOccurrencesResponse.md b/grafeas/docs/V1beta1ListOccurrencesResponse.md similarity index 100% rename from 0.1.0/docs/V1beta1ListOccurrencesResponse.md rename to grafeas/docs/V1beta1ListOccurrencesResponse.md diff --git a/0.1.0/docs/V1beta1Note.md b/grafeas/docs/V1beta1Note.md similarity index 75% rename from 0.1.0/docs/V1beta1Note.md rename to grafeas/docs/V1beta1Note.md index 8cc5846..f5b066a 100644 --- a/0.1.0/docs/V1beta1Note.md +++ b/grafeas/docs/V1beta1Note.md @@ -19,6 +19,12 @@ Name | Type | Description | Notes **Deployable** | [***DeploymentDeployable**](deploymentDeployable.md) | A note describing something that can be deployed. | [optional] [default to null] **Discovery** | [***DiscoveryDiscovery**](discoveryDiscovery.md) | A note describing the initial analysis of a resource. | [optional] [default to null] **AttestationAuthority** | [***AttestationAuthority**](attestationAuthority.md) | A note describing an attestation role. | [optional] [default to null] +**Intoto** | [***IntotoInToto**](intotoInToto.md) | A note describing an in-toto link. | [optional] [default to null] +**Sbom** | [***SpdxDocumentNote**](spdxDocumentNote.md) | A note describing a software bill of materials. | [optional] [default to null] +**SpdxPackage** | [***SpdxPackageInfoNote**](spdxPackageInfoNote.md) | A note describing an SPDX Package. | [optional] [default to null] +**SpdxFile** | [***SpdxFileNote**](spdxFileNote.md) | A note describing an SPDX File. | [optional] [default to null] +**SpdxRelationship** | [***SpdxRelationshipNote**](spdxRelationshipNote.md) | A note describing an SPDX File. | [optional] [default to null] +**VulnerabilityAssessment** | [***VexVulnerabilityAssessmentNote**](vexVulnerabilityAssessmentNote.md) | A note describing a vulnerability assessment. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/0.1.0/docs/V1beta1NoteKind.md b/grafeas/docs/V1beta1NoteKind.md similarity index 100% rename from 0.1.0/docs/V1beta1NoteKind.md rename to grafeas/docs/V1beta1NoteKind.md diff --git a/0.1.0/docs/V1beta1Occurrence.md b/grafeas/docs/V1beta1Occurrence.md similarity index 75% rename from 0.1.0/docs/V1beta1Occurrence.md rename to grafeas/docs/V1beta1Occurrence.md index 34026ad..a99d7d3 100644 --- a/0.1.0/docs/V1beta1Occurrence.md +++ b/grafeas/docs/V1beta1Occurrence.md @@ -17,6 +17,12 @@ Name | Type | Description | Notes **Deployment** | [***V1beta1deploymentDetails**](v1beta1deploymentDetails.md) | Describes the deployment of an artifact on a runtime. | [optional] [default to null] **Discovered** | [***V1beta1discoveryDetails**](v1beta1discoveryDetails.md) | Describes when a resource was discovered. | [optional] [default to null] **Attestation** | [***V1beta1attestationDetails**](v1beta1attestationDetails.md) | Describes an attestation of an artifact. | [optional] [default to null] +**Intoto** | [***V1beta1intotoDetails**](v1beta1intotoDetails.md) | Describes a specific in-toto link. | [optional] [default to null] +**Sbom** | [***SpdxDocumentOccurrence**](spdxDocumentOccurrence.md) | Describes a specific software bill of materials document. | [optional] [default to null] +**SpdxPackage** | [***SpdxPackageInfoOccurrence**](spdxPackageInfoOccurrence.md) | Describes a specific SPDX Package. | [optional] [default to null] +**SpdxFile** | [***SpdxFileOccurrence**](spdxFileOccurrence.md) | Describes a specific SPDX File. | [optional] [default to null] +**SpdxRelationship** | [***SpdxRelationshipOccurrence**](spdxRelationshipOccurrence.md) | Describes a specific SPDX Relationship. | [optional] [default to null] +**Envelope** | [***V1beta1Envelope**](v1beta1Envelope.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/0.1.0/docs/V1beta1RelatedUrl.md b/grafeas/docs/V1beta1RelatedUrl.md similarity index 100% rename from 0.1.0/docs/V1beta1RelatedUrl.md rename to grafeas/docs/V1beta1RelatedUrl.md diff --git a/0.1.0/docs/V1beta1Resource.md b/grafeas/docs/V1beta1Resource.md similarity index 100% rename from 0.1.0/docs/V1beta1Resource.md rename to grafeas/docs/V1beta1Resource.md diff --git a/0.1.0/docs/V1beta1VulnerabilityOccurrencesSummary.md b/grafeas/docs/V1beta1VulnerabilityOccurrencesSummary.md similarity index 100% rename from 0.1.0/docs/V1beta1VulnerabilityOccurrencesSummary.md rename to grafeas/docs/V1beta1VulnerabilityOccurrencesSummary.md diff --git a/0.1.0/docs/V1beta1attestationDetails.md b/grafeas/docs/V1beta1attestationDetails.md similarity index 100% rename from 0.1.0/docs/V1beta1attestationDetails.md rename to grafeas/docs/V1beta1attestationDetails.md diff --git a/0.1.0/docs/V1beta1buildDetails.md b/grafeas/docs/V1beta1buildDetails.md similarity index 100% rename from 0.1.0/docs/V1beta1buildDetails.md rename to grafeas/docs/V1beta1buildDetails.md diff --git a/0.1.0/docs/V1beta1deploymentDetails.md b/grafeas/docs/V1beta1deploymentDetails.md similarity index 100% rename from 0.1.0/docs/V1beta1deploymentDetails.md rename to grafeas/docs/V1beta1deploymentDetails.md diff --git a/0.1.0/docs/V1beta1discoveryDetails.md b/grafeas/docs/V1beta1discoveryDetails.md similarity index 100% rename from 0.1.0/docs/V1beta1discoveryDetails.md rename to grafeas/docs/V1beta1discoveryDetails.md diff --git a/0.1.0/docs/V1beta1imageDetails.md b/grafeas/docs/V1beta1imageDetails.md similarity index 100% rename from 0.1.0/docs/V1beta1imageDetails.md rename to grafeas/docs/V1beta1imageDetails.md diff --git a/grafeas/docs/V1beta1intotoDetails.md b/grafeas/docs/V1beta1intotoDetails.md new file mode 100644 index 0000000..43ab266 --- /dev/null +++ b/grafeas/docs/V1beta1intotoDetails.md @@ -0,0 +1,11 @@ +# V1beta1intotoDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Signatures** | [**[]V1beta1intotoSignature**](v1beta1intotoSignature.md) | | [optional] [default to null] +**Signed** | [***IntotoLink**](intotoLink.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/V1beta1intotoSignature.md b/grafeas/docs/V1beta1intotoSignature.md new file mode 100644 index 0000000..a56abf1 --- /dev/null +++ b/grafeas/docs/V1beta1intotoSignature.md @@ -0,0 +1,11 @@ +# V1beta1intotoSignature + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Keyid** | **string** | | [optional] [default to null] +**Sig** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/0.1.0/docs/V1beta1packageDetails.md b/grafeas/docs/V1beta1packageDetails.md similarity index 100% rename from 0.1.0/docs/V1beta1packageDetails.md rename to grafeas/docs/V1beta1packageDetails.md diff --git a/0.1.0/docs/V1beta1packageLocation.md b/grafeas/docs/V1beta1packageLocation.md similarity index 55% rename from 0.1.0/docs/V1beta1packageLocation.md rename to grafeas/docs/V1beta1packageLocation.md index 20e8a17..c239f35 100644 --- a/0.1.0/docs/V1beta1packageLocation.md +++ b/grafeas/docs/V1beta1packageLocation.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CpeUri** | **string** | Required. The CPE URI in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. | [optional] [default to null] -**Version** | [***PackageVersion**](packageVersion.md) | The version installed at this location. | [optional] [default to null] +**CpeUri** | **string** | Deprecated. The CPE URI in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. | [optional] [default to null] +**Version** | [***PackageVersion**](packageVersion.md) | Deprecated. The version installed at this location. | [optional] [default to null] **Path** | **string** | The path from which we gathered that this package/version is installed. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/0.1.0/docs/ProvenanceArtifact.md b/grafeas/docs/V1beta1provenanceArtifact.md similarity index 97% rename from 0.1.0/docs/ProvenanceArtifact.md rename to grafeas/docs/V1beta1provenanceArtifact.md index e54463d..6584634 100644 --- a/0.1.0/docs/ProvenanceArtifact.md +++ b/grafeas/docs/V1beta1provenanceArtifact.md @@ -1,4 +1,4 @@ -# ProvenanceArtifact +# V1beta1provenanceArtifact ## Properties Name | Type | Description | Notes diff --git a/0.1.0/docs/V1beta1vulnerabilityDetails.md b/grafeas/docs/V1beta1vulnerabilityDetails.md similarity index 60% rename from 0.1.0/docs/V1beta1vulnerabilityDetails.md rename to grafeas/docs/V1beta1vulnerabilityDetails.md index 10aeb25..feaef8d 100644 --- a/0.1.0/docs/V1beta1vulnerabilityDetails.md +++ b/grafeas/docs/V1beta1vulnerabilityDetails.md @@ -10,7 +10,11 @@ Name | Type | Description | Notes **ShortDescription** | **string** | Output only. A one sentence description of this vulnerability. | [optional] [default to null] **LongDescription** | **string** | Output only. A detailed description of this vulnerability. | [optional] [default to null] **RelatedUrls** | [**[]V1beta1RelatedUrl**](v1beta1RelatedUrl.md) | Output only. URLs related to this vulnerability. | [optional] [default to null] -**EffectiveSeverity** | [***VulnerabilitySeverity**](vulnerabilitySeverity.md) | The distro assigned severity for this vulnerability when it is available, and note provider assigned severity when distro has not yet assigned a severity for this vulnerability. | [optional] [default to null] +**EffectiveSeverity** | [***VulnerabilitySeverity**](vulnerabilitySeverity.md) | The distro assigned severity for this vulnerability when it is available, and note provider assigned severity when distro has not yet assigned a severity for this vulnerability. When there are multiple PackageIssues for this vulnerability, they can have different effective severities because some might be provided by the distro while others are provided by the language ecosystem for a language pack. For this reason, it is advised to use the effective severity on the PackageIssue level. In the case where multiple PackageIssues have differing effective severities, this field should be the highest severity for any of the PackageIssues. | [optional] [default to null] +**CvssVersion** | [***VulnerabilityCvssVersion**](vulnerabilityCVSSVersion.md) | Output only. CVSS version used to populate cvss_score and severity. | [optional] [default to null] +**VexAssessment** | [***DetailsVexAssessment**](DetailsVexAssessment.md) | | [optional] [default to null] +**CvssV2** | [***VulnerabilityCvss**](vulnerabilityCVSS.md) | The cvss v2 score for the vulnerability. | [optional] [default to null] +**CvssV3** | [***VulnerabilityCvss**](vulnerabilityCVSS.md) | The cvss v3 score for the vulnerability. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/0.1.0/docs/VersionVersionKind.md b/grafeas/docs/VersionVersionKind.md similarity index 100% rename from 0.1.0/docs/VersionVersionKind.md rename to grafeas/docs/VersionVersionKind.md diff --git a/grafeas/docs/VexVulnerabilityAssessmentNote.md b/grafeas/docs/VexVulnerabilityAssessmentNote.md new file mode 100644 index 0000000..4e709bf --- /dev/null +++ b/grafeas/docs/VexVulnerabilityAssessmentNote.md @@ -0,0 +1,16 @@ +# VexVulnerabilityAssessmentNote + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | **string** | | [optional] [default to null] +**ShortDescription** | **string** | A one sentence description of this Vex. | [optional] [default to null] +**LongDescription** | **string** | A detailed description of this Vex. | [optional] [default to null] +**LanguageCode** | **string** | Identifies the language used by this document, corresponding to IETF BCP 47 / RFC 5646. | [optional] [default to null] +**Publisher** | [***VulnerabilityAssessmentNotePublisher**](VulnerabilityAssessmentNotePublisher.md) | Publisher details of this Note. | [optional] [default to null] +**Product** | [***VulnerabilityAssessmentNoteProduct**](VulnerabilityAssessmentNoteProduct.md) | The product affected by this vex. | [optional] [default to null] +**Assessment** | [***VulnerabilityAssessmentNoteAssessment**](VulnerabilityAssessmentNoteAssessment.md) | Represents a vulnerability assessment for the product. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/VulnerabilityAssessmentNoteAssessment.md b/grafeas/docs/VulnerabilityAssessmentNoteAssessment.md new file mode 100644 index 0000000..9816274 --- /dev/null +++ b/grafeas/docs/VulnerabilityAssessmentNoteAssessment.md @@ -0,0 +1,17 @@ +# VulnerabilityAssessmentNoteAssessment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Cve** | **string** | Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability. | [optional] [default to null] +**ShortDescription** | **string** | A one sentence description of this Vex. | [optional] [default to null] +**LongDescription** | **string** | A detailed description of this Vex. | [optional] [default to null] +**RelatedUris** | [**[]V1beta1RelatedUrl**](v1beta1RelatedUrl.md) | Holds a list of references associated with this vulnerability item and assessment. These uris have additional information about the vulnerability and the assessment itself. E.g. Link to a document which details how this assessment concluded the state of this vulnerability. | [optional] [default to null] +**State** | [***AssessmentState**](AssessmentState.md) | Provides the state of this Vulnerability assessment. | [optional] [default to null] +**Impacts** | **[]string** | Contains information about the impact of this vulnerability, this will change with time. | [optional] [default to null] +**Justification** | [***AssessmentJustification**](AssessmentJustification.md) | Justification provides the justification when the state of the assessment if NOT_AFFECTED. | [optional] [default to null] +**Remediations** | [**[]AssessmentRemediation**](AssessmentRemediation.md) | Specifies details on how to handle (and presumably, fix) a vulnerability. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/VulnerabilityAssessmentNoteProduct.md b/grafeas/docs/VulnerabilityAssessmentNoteProduct.md new file mode 100644 index 0000000..b4d3e8f --- /dev/null +++ b/grafeas/docs/VulnerabilityAssessmentNoteProduct.md @@ -0,0 +1,12 @@ +# VulnerabilityAssessmentNoteProduct + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the product. | [optional] [default to null] +**Id** | **string** | Token that identifies a product so that it can be referred to from other parts in the document. There is no predefined format as long as it uniquely identifies a group in the context of the current document. | [optional] [default to null] +**GenericUri** | **string** | Contains a URI which is vendor-specific. Example: The artifact repository URL of an image. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/VulnerabilityAssessmentNotePublisher.md b/grafeas/docs/VulnerabilityAssessmentNotePublisher.md new file mode 100644 index 0000000..99a9301 --- /dev/null +++ b/grafeas/docs/VulnerabilityAssessmentNotePublisher.md @@ -0,0 +1,12 @@ +# VulnerabilityAssessmentNotePublisher + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the publisher. Examples: 'Google', 'Google Cloud Platform'. | [optional] [default to null] +**IssuingAuthority** | **string** | Provides information about the authority of the issuing party to release the document, in particular, the party's constituency and responsibilities or other obligations. | [optional] [default to null] +**Context** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/grafeas/docs/VulnerabilityCvss.md b/grafeas/docs/VulnerabilityCvss.md new file mode 100644 index 0000000..888914b --- /dev/null +++ b/grafeas/docs/VulnerabilityCvss.md @@ -0,0 +1,21 @@ +# VulnerabilityCvss + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BaseScore** | **float32** | The base score is a function of the base metric scores. | [optional] [default to null] +**ExploitabilityScore** | **float32** | | [optional] [default to null] +**ImpactScore** | **float32** | | [optional] [default to null] +**AttackVector** | [***CvssAttackVector**](CVSSAttackVector.md) | Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments. | [optional] [default to null] +**AttackComplexity** | [***CvssAttackComplexity**](CVSSAttackComplexity.md) | | [optional] [default to null] +**Authentication** | [***CvssAuthentication**](CVSSAuthentication.md) | | [optional] [default to null] +**PrivilegesRequired** | [***CvssPrivilegesRequired**](CVSSPrivilegesRequired.md) | | [optional] [default to null] +**UserInteraction** | [***CvssUserInteraction**](CVSSUserInteraction.md) | | [optional] [default to null] +**Scope** | [***CvssScope**](CVSSScope.md) | | [optional] [default to null] +**ConfidentialityImpact** | [***CvssImpact**](CVSSImpact.md) | | [optional] [default to null] +**IntegrityImpact** | [***CvssImpact**](CVSSImpact.md) | | [optional] [default to null] +**AvailabilityImpact** | [***CvssImpact**](CVSSImpact.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/0.1.0/docs/CvsSv3PrivilegesRequired.md b/grafeas/docs/VulnerabilityCvssVersion.md similarity index 91% rename from 0.1.0/docs/CvsSv3PrivilegesRequired.md rename to grafeas/docs/VulnerabilityCvssVersion.md index 07bf90f..e15e612 100644 --- a/0.1.0/docs/CvsSv3PrivilegesRequired.md +++ b/grafeas/docs/VulnerabilityCvssVersion.md @@ -1,4 +1,4 @@ -# CvsSv3PrivilegesRequired +# VulnerabilityCvssVersion ## Properties Name | Type | Description | Notes diff --git a/0.1.0/docs/VulnerabilityDetail.md b/grafeas/docs/VulnerabilityDetail.md similarity index 73% rename from 0.1.0/docs/VulnerabilityDetail.md rename to grafeas/docs/VulnerabilityDetail.md index 5c485b4..7b7f3a3 100644 --- a/0.1.0/docs/VulnerabilityDetail.md +++ b/grafeas/docs/VulnerabilityDetail.md @@ -6,12 +6,15 @@ Name | Type | Description | Notes **CpeUri** | **string** | Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) in which the vulnerability manifests. Examples include distro or storage location for vulnerable jar. | [optional] [default to null] **Package_** | **string** | Required. The name of the package where the vulnerability was found. | [optional] [default to null] **MinAffectedVersion** | [***PackageVersion**](packageVersion.md) | The min version of the package in which the vulnerability exists. | [optional] [default to null] -**MaxAffectedVersion** | [***PackageVersion**](packageVersion.md) | Deprecated, do not use. Use fixed_location instead. The max version of the package in which the vulnerability exists. | [optional] [default to null] +**MaxAffectedVersion** | [***PackageVersion**](packageVersion.md) | The max version of the package in which the vulnerability exists. | [optional] [default to null] **SeverityName** | **string** | The severity (eg: distro assigned severity) for this vulnerability. | [optional] [default to null] **Description** | **string** | A vendor-specific description of this note. | [optional] [default to null] **FixedLocation** | [***VulnerabilityVulnerabilityLocation**](vulnerabilityVulnerabilityLocation.md) | The fix for this specific package version. | [optional] [default to null] **PackageType** | **string** | The type of package; whether native or non native(ruby gems, node.js packages etc). | [optional] [default to null] **IsObsolete** | **bool** | Whether this detail is obsolete. Occurrences are expected not to point to obsolete details. | [optional] [default to null] +**SourceUpdateTime** | [**time.Time**](time.Time.md) | The time this information was last changed at the source. This is an upstream timestamp from the underlying information source - e.g. Ubuntu security tracker. | [optional] [default to null] +**Source** | **string** | The source from which the information in this Detail was obtained. | [optional] [default to null] +**Vendor** | **string** | The name of the vendor of the product. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/0.1.0/docs/VulnerabilityOccurrencesSummaryFixableTotalByDigest.md b/grafeas/docs/VulnerabilityOccurrencesSummaryFixableTotalByDigest.md similarity index 100% rename from 0.1.0/docs/VulnerabilityOccurrencesSummaryFixableTotalByDigest.md rename to grafeas/docs/VulnerabilityOccurrencesSummaryFixableTotalByDigest.md diff --git a/0.1.0/docs/VulnerabilityPackageIssue.md b/grafeas/docs/VulnerabilityPackageIssue.md similarity index 69% rename from 0.1.0/docs/VulnerabilityPackageIssue.md rename to grafeas/docs/VulnerabilityPackageIssue.md index c531bc0..0d2c261 100644 --- a/0.1.0/docs/VulnerabilityPackageIssue.md +++ b/grafeas/docs/VulnerabilityPackageIssue.md @@ -6,6 +6,8 @@ Name | Type | Description | Notes **AffectedLocation** | [***VulnerabilityVulnerabilityLocation**](vulnerabilityVulnerabilityLocation.md) | Required. The location of the vulnerability. | [optional] [default to null] **FixedLocation** | [***VulnerabilityVulnerabilityLocation**](vulnerabilityVulnerabilityLocation.md) | The location of the available fix for vulnerability. | [optional] [default to null] **SeverityName** | **string** | Deprecated, use Details.effective_severity instead The severity (e.g., distro assigned severity) for this vulnerability. | [optional] [default to null] +**PackageType** | **string** | The type of package (e.g. OS, MAVEN, GO). | [optional] [default to null] +**EffectiveSeverity** | [***VulnerabilitySeverity**](vulnerabilitySeverity.md) | The distro or language system assigned severity for this vulnerability when that is available and note provider assigned severity when it is not available. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/0.1.0/docs/VulnerabilitySeverity.md b/grafeas/docs/VulnerabilitySeverity.md similarity index 100% rename from 0.1.0/docs/VulnerabilitySeverity.md rename to grafeas/docs/VulnerabilitySeverity.md diff --git a/0.1.0/docs/VulnerabilityVulnerability.md b/grafeas/docs/VulnerabilityVulnerability.md similarity index 61% rename from 0.1.0/docs/VulnerabilityVulnerability.md rename to grafeas/docs/VulnerabilityVulnerability.md index a2eb340..a227999 100644 --- a/0.1.0/docs/VulnerabilityVulnerability.md +++ b/grafeas/docs/VulnerabilityVulnerability.md @@ -6,8 +6,12 @@ Name | Type | Description | Notes **CvssScore** | **float32** | The CVSS score for this vulnerability. | [optional] [default to null] **Severity** | [***VulnerabilitySeverity**](vulnerabilitySeverity.md) | Note provider assigned impact of the vulnerability. | [optional] [default to null] **Details** | [**[]VulnerabilityDetail**](VulnerabilityDetail.md) | All information about the package to specifically identify this vulnerability. One entry per (version range and cpe_uri) the package vulnerability has manifested in. | [optional] [default to null] -**CvssV3** | [***VulnerabilityCvsSv3**](vulnerabilityCVSSv3.md) | The full description of the CVSSv3. | [optional] [default to null] +**CvssV3** | [***VulnerabilityCvss**](vulnerabilityCVSS.md) | The full description of the CVSS for version 3. | [optional] [default to null] **WindowsDetails** | [**[]VulnerabilityWindowsDetail**](VulnerabilityWindowsDetail.md) | Windows details get their own format because the information format and model don't match a normal detail. Specifically Windows updates are done as patches, thus Windows vulnerabilities really are a missing package, rather than a package being at an incorrect version. | [optional] [default to null] +**SourceUpdateTime** | [**time.Time**](time.Time.md) | The time this information was last changed at the source. This is an upstream timestamp from the underlying information source - e.g. Ubuntu security tracker. | [optional] [default to null] +**CvssV2** | [***VulnerabilityCvss**](vulnerabilityCVSS.md) | The full description of the CVSS for version 2. | [optional] [default to null] +**Cwe** | **[]string** | | [optional] [default to null] +**CvssVersion** | [***VulnerabilityCvssVersion**](vulnerabilityCVSSVersion.md) | CVSS version used to populate cvss_score and severity. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/0.1.0/docs/VulnerabilityVulnerabilityLocation.md b/grafeas/docs/VulnerabilityVulnerabilityLocation.md similarity index 100% rename from 0.1.0/docs/VulnerabilityVulnerabilityLocation.md rename to grafeas/docs/VulnerabilityVulnerabilityLocation.md diff --git a/0.1.0/docs/VulnerabilityWindowsDetail.md b/grafeas/docs/VulnerabilityWindowsDetail.md similarity index 100% rename from 0.1.0/docs/VulnerabilityWindowsDetail.md rename to grafeas/docs/VulnerabilityWindowsDetail.md diff --git a/0.1.0/docs/WindowsDetailKnowledgeBase.md b/grafeas/docs/WindowsDetailKnowledgeBase.md similarity index 100% rename from 0.1.0/docs/WindowsDetailKnowledgeBase.md rename to grafeas/docs/WindowsDetailKnowledgeBase.md diff --git a/0.1.0/git_push.sh b/grafeas/git_push.sh similarity index 100% rename from 0.1.0/git_push.sh rename to grafeas/git_push.sh diff --git a/0.1.0/model_alias_context_kind.go b/grafeas/model_alias_context_kind.go similarity index 96% rename from 0.1.0/model_alias_context_kind.go rename to grafeas/model_alias_context_kind.go index ae966f1..e3d5ad0 100644 --- a/0.1.0/model_alias_context_kind.go +++ b/grafeas/model_alias_context_kind.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/grafeas/model_assessment_justification.go b/grafeas/model_assessment_justification.go new file mode 100644 index 0000000..1d83a2c --- /dev/null +++ b/grafeas/model_assessment_justification.go @@ -0,0 +1,18 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// Justification provides the justification when the state of the assessment if NOT_AFFECTED. +type AssessmentJustification struct { + // The justification type for this vulnerability. + JustificationType *JustificationJustificationType `json:"justificationType,omitempty"` + // Additional details on why this justification was chosen. + Details string `json:"details,omitempty"` +} diff --git a/grafeas/model_assessment_remediation.go b/grafeas/model_assessment_remediation.go new file mode 100644 index 0000000..f1c1c16 --- /dev/null +++ b/grafeas/model_assessment_remediation.go @@ -0,0 +1,26 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +import ( + "time" +) + +// Specifies details on how to handle (and presumably, fix) a vulnerability. +type AssessmentRemediation struct { + // The type of remediation that can be applied. + RemediationType *RemediationRemediationType `json:"remediationType,omitempty"` + // Contains the date from which the remediation is available. + RemediationTime time.Time `json:"remediationTime,omitempty"` + // Contains a comprehensive human-readable discussion of the remediation. + Details string `json:"details,omitempty"` + // Contains the URL where to obtain the remediation. + RemediationUri *V1beta1RelatedUrl `json:"remediationUri,omitempty"` +} diff --git a/grafeas/model_assessment_state.go b/grafeas/model_assessment_state.go new file mode 100644 index 0000000..2851134 --- /dev/null +++ b/grafeas/model_assessment_state.go @@ -0,0 +1,21 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas +// AssessmentState : Provides the state of this Vulnerability assessment. - STATE_UNSPECIFIED: No state is specified. - AFFECTED: This product is known to be affected by this vulnerability. - NOT_AFFECTED: This product is known to be not affected by this vulnerability. - FIXED: This product contains a fix for this vulnerability. - UNDER_INVESTIGATION: It is not known yet whether these versions are or are not affected by the vulnerability. However, it is still under investigation. +type AssessmentState string + +// List of AssessmentState +const ( + STATE_UNSPECIFIED_AssessmentState AssessmentState = "STATE_UNSPECIFIED" + AFFECTED_AssessmentState AssessmentState = "AFFECTED" + NOT_AFFECTED_AssessmentState AssessmentState = "NOT_AFFECTED" + FIXED_AssessmentState AssessmentState = "FIXED" + UNDER_INVESTIGATION_AssessmentState AssessmentState = "UNDER_INVESTIGATION" +) diff --git a/0.1.0/model_attestation_attestation.go b/grafeas/model_attestation_attestation.go similarity index 91% rename from 0.1.0/model_attestation_attestation.go rename to grafeas/model_attestation_attestation.go index 4a14cdb..428e544 100644 --- a/0.1.0/model_attestation_attestation.go +++ b/grafeas/model_attestation_attestation.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -12,7 +12,7 @@ package grafeas // Occurrence that represents a single \"attestation\". The authenticity of an attestation can be verified using the attached signature. If the verifier trusts the public key of the signer, then verifying the signature is sufficient to establish trust. In this circumstance, the authority to which this attestation is attached is primarily useful for look-up (how to find this attestation if you already know the authority and artifact to be verified) and intent (which authority was this attestation intended to sign for). type AttestationAttestation struct { // A PGP signed attestation. - PgpSignedAttestation *AttestationPgpSignedAttestation `json:"pgp_signed_attestation,omitempty"` + PgpSignedAttestation *AttestationPgpSignedAttestation `json:"pgpSignedAttestation,omitempty"` // An attestation that supports multiple `Signature`s over the same attestation payload. The signatures (defined in common.proto) support a superset of public key types and IDs compared to PgpSignedAttestation. - GenericSignedAttestation *AttestationGenericSignedAttestation `json:"generic_signed_attestation,omitempty"` + GenericSignedAttestation *AttestationGenericSignedAttestation `json:"genericSignedAttestation,omitempty"` } diff --git a/0.1.0/model_attestation_authority.go b/grafeas/model_attestation_authority.go similarity index 96% rename from 0.1.0/model_attestation_authority.go rename to grafeas/model_attestation_authority.go index aef3cb2..4652ad4 100644 --- a/0.1.0/model_attestation_authority.go +++ b/grafeas/model_attestation_authority.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/0.1.0/model_attestation_generic_signed_attestation.go b/grafeas/model_attestation_generic_signed_attestation.go similarity index 88% rename from 0.1.0/model_attestation_generic_signed_attestation.go rename to grafeas/model_attestation_generic_signed_attestation.go index bc24916..2de9f67 100644 --- a/0.1.0/model_attestation_generic_signed_attestation.go +++ b/grafeas/model_attestation_generic_signed_attestation.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -12,9 +12,9 @@ package grafeas // An attestation wrapper that uses the Grafeas `Signature` message. This attestation must define the `serialized_payload` that the `signatures` verify and any metadata necessary to interpret that plaintext. The signatures should always be over the `serialized_payload` bytestring. type AttestationGenericSignedAttestation struct { // Type (for example schema) of the attestation payload that was signed. The verifier must ensure that the provided type is one that the verifier supports, and that the attestation payload is a valid instantiation of that type (for example by validating a JSON schema). - ContentType *AttestationGenericSignedAttestationContentType `json:"content_type,omitempty"` + ContentType *AttestationGenericSignedAttestationContentType `json:"contentType,omitempty"` // The serialized payload that is verified by one or more `signatures`. The encoding and semantic meaning of this payload must match what is set in `content_type`. - SerializedPayload string `json:"serialized_payload,omitempty"` + SerializedPayload string `json:"serializedPayload,omitempty"` // One or more signatures over `serialized_payload`. Verifier implementations should consider this attestation message verified if at least one `signature` verifies `serialized_payload`. See `Signature` in common.proto for more details on signature structure and verification. - Signatures []V1beta1Signature `json:"signatures,omitempty"` + Signatures []Grafeasv1beta1Signature `json:"signatures,omitempty"` } diff --git a/0.1.0/model_attestation_generic_signed_attestation_content_type.go b/grafeas/model_attestation_generic_signed_attestation_content_type.go similarity index 97% rename from 0.1.0/model_attestation_generic_signed_attestation_content_type.go rename to grafeas/model_attestation_generic_signed_attestation_content_type.go index b09962a..462abf9 100644 --- a/0.1.0/model_attestation_generic_signed_attestation_content_type.go +++ b/grafeas/model_attestation_generic_signed_attestation_content_type.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/0.1.0/model_attestation_pgp_signed_attestation.go b/grafeas/model_attestation_pgp_signed_attestation.go similarity index 93% rename from 0.1.0/model_attestation_pgp_signed_attestation.go rename to grafeas/model_attestation_pgp_signed_attestation.go index cbb13bc..4b23370 100644 --- a/0.1.0/model_attestation_pgp_signed_attestation.go +++ b/grafeas/model_attestation_pgp_signed_attestation.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -14,7 +14,7 @@ type AttestationPgpSignedAttestation struct { // Required. The raw content of the signature, as output by GNU Privacy Guard (GPG) or equivalent. Since this message only supports attached signatures, the payload that was signed must be attached. While the signature format supported is dependent on the verification implementation, currently only ASCII-armored (`--armor` to gpg), non-clearsigned (`--sign` rather than `--clearsign` to gpg) are supported. Concretely, `gpg --sign --armor --output=signature.gpg payload.json` will create the signature content expected in this field in `signature.gpg` for the `payload.json` attestation payload. Signature string `json:"signature,omitempty"` // Type (for example schema) of the attestation payload that was signed. The verifier must ensure that the provided type is one that the verifier supports, and that the attestation payload is a valid instantiation of that type (for example by validating a JSON schema). - ContentType *AttestationPgpSignedAttestationContentType `json:"content_type,omitempty"` - // The cryptographic fingerprint of the key used to generate the signature, as output by, e.g. `gpg --list-keys`. This should be the version 4, full 160-bit fingerprint, expressed as a 40 character hexidecimal string. See https://tools.ietf.org/html/rfc4880#section-12.2 for details. Implementations may choose to acknowledge \"LONG\", \"SHORT\", or other abbreviated key IDs, but only the full fingerprint is guaranteed to work. In gpg, the full fingerprint can be retrieved from the `fpr` field returned when calling --list-keys with --with-colons. For example: ``` gpg --with-colons --with-fingerprint --force-v4-certs \\ --list-keys attester@example.com tru::1:1513631572:0:3:1:5 pub:...... fpr:::::::::24FF6481B76AC91E66A00AC657A93A81EF3AE6FB: ``` Above, the fingerprint is `24FF6481B76AC91E66A00AC657A93A81EF3AE6FB`. - PgpKeyId string `json:"pgp_key_id,omitempty"` + ContentType *AttestationPgpSignedAttestationContentType `json:"contentType,omitempty"` + // The cryptographic fingerprint of the key used to generate the signature, as output by, e.g. `gpg --list-keys`. This should be the version 4, full 160-bit fingerprint, expressed as a 40 character hexadecimal string. See https://tools.ietf.org/html/rfc4880#section-12.2 for details. Implementations may choose to acknowledge \"LONG\", \"SHORT\", or other abbreviated key IDs, but only the full fingerprint is guaranteed to work. In gpg, the full fingerprint can be retrieved from the `fpr` field returned when calling --list-keys with --with-colons. For example: ``` gpg --with-colons --with-fingerprint --force-v4-certs \\ --list-keys attester@example.com tru::1:1513631572:0:3:1:5 pub:...... fpr:::::::::24FF6481B76AC91E66A00AC657A93A81EF3AE6FB: ``` Above, the fingerprint is `24FF6481B76AC91E66A00AC657A93A81EF3AE6FB`. + PgpKeyId string `json:"pgpKeyId,omitempty"` } diff --git a/0.1.0/model_attestation_pgp_signed_attestation_content_type.go b/grafeas/model_attestation_pgp_signed_attestation_content_type.go similarity index 97% rename from 0.1.0/model_attestation_pgp_signed_attestation_content_type.go rename to grafeas/model_attestation_pgp_signed_attestation_content_type.go index 1d4308b..c1edb37 100644 --- a/0.1.0/model_attestation_pgp_signed_attestation_content_type.go +++ b/grafeas/model_attestation_pgp_signed_attestation_content_type.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/0.1.0/model_authority_hint.go b/grafeas/model_authority_hint.go similarity index 89% rename from 0.1.0/model_authority_hint.go rename to grafeas/model_authority_hint.go index 7b27588..68ab5ae 100644 --- a/0.1.0/model_authority_hint.go +++ b/grafeas/model_authority_hint.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -12,5 +12,5 @@ package grafeas // This submessage provides human-readable hints about the purpose of the authority. Because the name of a note acts as its resource reference, it is important to disambiguate the canonical name of the Note (which might be a UUID for security purposes) from \"readable\" names more suitable for debug output. Note that these hints should not be used to look up authorities in security sensitive contexts, such as when looking up attestations to verify. type AuthorityHint struct { // Required. The human readable name of this attestation authority, for example \"qa\". - HumanReadableName string `json:"human_readable_name,omitempty"` + HumanReadableName string `json:"humanReadableName,omitempty"` } diff --git a/grafeas/model_body.go b/grafeas/model_body.go new file mode 100644 index 0000000..ef3e5e8 --- /dev/null +++ b/grafeas/model_body.go @@ -0,0 +1,16 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// Request to create notes in batch. +type Body struct { + // The notes to create, the key is expected to be the note ID. Max allowed length is 1000. + Notes map[string]V1beta1Note `json:"notes"` +} diff --git a/0.1.0/model_v1beta1_batch_create_occurrences_request.go b/grafeas/model_body_1.go similarity index 54% rename from 0.1.0/model_v1beta1_batch_create_occurrences_request.go rename to grafeas/model_body_1.go index 3f33c9f..3062c2b 100644 --- a/0.1.0/model_v1beta1_batch_create_occurrences_request.go +++ b/grafeas/model_body_1.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -10,9 +10,7 @@ package grafeas // Request to create occurrences in batch. -type V1beta1BatchCreateOccurrencesRequest struct { - // The name of the project in the form of `projects/[PROJECT_ID]`, under which the occurrences are to be created. - Parent string `json:"parent,omitempty"` +type Body1 struct { // The occurrences to create. Max allowed length is 1000. - Occurrences []V1beta1Occurrence `json:"occurrences,omitempty"` + Occurrences []V1beta1Occurrence `json:"occurrences"` } diff --git a/0.1.0/model_build_build.go b/grafeas/model_build_build.go similarity index 87% rename from 0.1.0/model_build_build.go rename to grafeas/model_build_build.go index 30fa764..62b28d1 100644 --- a/0.1.0/model_build_build.go +++ b/grafeas/model_build_build.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -12,7 +12,7 @@ package grafeas // Note holding the version of the provider's builder and the signature of the provenance message in the build details occurrence. type BuildBuild struct { // Required. Immutable. Version of the builder which produced this build. - BuilderVersion string `json:"builder_version,omitempty"` + BuilderVersion string `json:"builderVersion,omitempty"` // Signature of the build in occurrences pointing to this build note containing build details. Signature *BuildBuildSignature `json:"signature,omitempty"` } diff --git a/0.1.0/model_build_build_signature.go b/grafeas/model_build_build_signature.go similarity index 89% rename from 0.1.0/model_build_build_signature.go rename to grafeas/model_build_build_signature.go index 9cef286..8cfdbec 100644 --- a/0.1.0/model_build_build_signature.go +++ b/grafeas/model_build_build_signature.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -12,11 +12,11 @@ package grafeas // Message encapsulating the signature of the verified build. type BuildBuildSignature struct { // Public key of the builder which can be used to verify that the related findings are valid and unchanged. If `key_type` is empty, this defaults to PEM encoded public keys. This field may be empty if `key_id` references an external key. For Cloud Build based signatures, this is a PEM encoded public key. To verify the Cloud Build signature, place the contents of this field into a file (public.pem). The signature field is base64-decoded into its binary representation in signature.bin, and the provenance bytes from `BuildDetails` are base64-decoded into a binary representation in signed.bin. OpenSSL can then verify the signature: `openssl sha256 -verify public.pem -signature signature.bin signed.bin` - PublicKey string `json:"public_key,omitempty"` + PublicKey string `json:"publicKey,omitempty"` // Required. Signature of the related `BuildProvenance`. In JSON, this is base-64 encoded. Signature string `json:"signature,omitempty"` // An ID for the key used to sign. This could be either an ID for the key stored in `public_key` (such as the ID or fingerprint for a PGP key, or the CN for a cert), or a reference to an external key (such as a reference to a key in Cloud Key Management Service). - KeyId string `json:"key_id,omitempty"` + KeyId string `json:"keyId,omitempty"` // The type of the key, either stored in `public_key` or referenced in `key_id`. - KeyType *BuildSignatureKeyType `json:"key_type,omitempty"` + KeyType *BuildSignatureKeyType `json:"keyType,omitempty"` } diff --git a/0.1.0/model_build_signature_key_type.go b/grafeas/model_build_signature_key_type.go similarity index 96% rename from 0.1.0/model_build_signature_key_type.go rename to grafeas/model_build_signature_key_type.go index 609bcf7..dad8a87 100644 --- a/0.1.0/model_build_signature_key_type.go +++ b/grafeas/model_build_signature_key_type.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/grafeas/model_cvss_attack_complexity.go b/grafeas/model_cvss_attack_complexity.go new file mode 100644 index 0000000..4b2f183 --- /dev/null +++ b/grafeas/model_cvss_attack_complexity.go @@ -0,0 +1,20 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type CvssAttackComplexity string + +// List of CVSSAttackComplexity +const ( + UNSPECIFIED_CvssAttackComplexity CvssAttackComplexity = "ATTACK_COMPLEXITY_UNSPECIFIED" + LOW_CvssAttackComplexity CvssAttackComplexity = "ATTACK_COMPLEXITY_LOW" + HIGH_CvssAttackComplexity CvssAttackComplexity = "ATTACK_COMPLEXITY_HIGH" + MEDIUM_CvssAttackComplexity CvssAttackComplexity = "ATTACK_COMPLEXITY_MEDIUM" +) diff --git a/grafeas/model_cvss_attack_vector.go b/grafeas/model_cvss_attack_vector.go new file mode 100644 index 0000000..7112223 --- /dev/null +++ b/grafeas/model_cvss_attack_vector.go @@ -0,0 +1,21 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type CvssAttackVector string + +// List of CVSSAttackVector +const ( + UNSPECIFIED_CvssAttackVector CvssAttackVector = "ATTACK_VECTOR_UNSPECIFIED" + NETWORK_CvssAttackVector CvssAttackVector = "ATTACK_VECTOR_NETWORK" + ADJACENT_CvssAttackVector CvssAttackVector = "ATTACK_VECTOR_ADJACENT" + LOCAL_CvssAttackVector CvssAttackVector = "ATTACK_VECTOR_LOCAL" + PHYSICAL_CvssAttackVector CvssAttackVector = "ATTACK_VECTOR_PHYSICAL" +) diff --git a/grafeas/model_cvss_authentication.go b/grafeas/model_cvss_authentication.go new file mode 100644 index 0000000..f2771a1 --- /dev/null +++ b/grafeas/model_cvss_authentication.go @@ -0,0 +1,20 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type CvssAuthentication string + +// List of CVSSAuthentication +const ( + UNSPECIFIED_CvssAuthentication CvssAuthentication = "AUTHENTICATION_UNSPECIFIED" + MULTIPLE_CvssAuthentication CvssAuthentication = "AUTHENTICATION_MULTIPLE" + SINGLE_CvssAuthentication CvssAuthentication = "AUTHENTICATION_SINGLE" + NONE_CvssAuthentication CvssAuthentication = "AUTHENTICATION_NONE" +) diff --git a/grafeas/model_cvss_impact.go b/grafeas/model_cvss_impact.go new file mode 100644 index 0000000..e6a3908 --- /dev/null +++ b/grafeas/model_cvss_impact.go @@ -0,0 +1,22 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type CvssImpact string + +// List of CVSSImpact +const ( + UNSPECIFIED_CvssImpact CvssImpact = "IMPACT_UNSPECIFIED" + HIGH_CvssImpact CvssImpact = "IMPACT_HIGH" + LOW_CvssImpact CvssImpact = "IMPACT_LOW" + NONE_CvssImpact CvssImpact = "IMPACT_NONE" + PARTIAL_CvssImpact CvssImpact = "IMPACT_PARTIAL" + COMPLETE_CvssImpact CvssImpact = "IMPACT_COMPLETE" +) diff --git a/grafeas/model_cvss_privileges_required.go b/grafeas/model_cvss_privileges_required.go new file mode 100644 index 0000000..09be97f --- /dev/null +++ b/grafeas/model_cvss_privileges_required.go @@ -0,0 +1,20 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type CvssPrivilegesRequired string + +// List of CVSSPrivilegesRequired +const ( + UNSPECIFIED_CvssPrivilegesRequired CvssPrivilegesRequired = "PRIVILEGES_REQUIRED_UNSPECIFIED" + NONE_CvssPrivilegesRequired CvssPrivilegesRequired = "PRIVILEGES_REQUIRED_NONE" + LOW_CvssPrivilegesRequired CvssPrivilegesRequired = "PRIVILEGES_REQUIRED_LOW" + HIGH_CvssPrivilegesRequired CvssPrivilegesRequired = "PRIVILEGES_REQUIRED_HIGH" +) diff --git a/0.1.0/model_cvs_sv3_scope.go b/grafeas/model_cvss_scope.go similarity index 52% rename from 0.1.0/model_cvs_sv3_scope.go rename to grafeas/model_cvss_scope.go index 31e5e9b..414d0f9 100644 --- a/0.1.0/model_cvs_sv3_scope.go +++ b/grafeas/model_cvss_scope.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -9,11 +9,11 @@ package grafeas -type CvsSv3Scope string +type CvssScope string -// List of CVSSv3Scope +// List of CVSSScope const ( - UNSPECIFIED_CvsSv3Scope CvsSv3Scope = "SCOPE_UNSPECIFIED" - UNCHANGED_CvsSv3Scope CvsSv3Scope = "SCOPE_UNCHANGED" - CHANGED_CvsSv3Scope CvsSv3Scope = "SCOPE_CHANGED" + UNSPECIFIED_CvssScope CvssScope = "SCOPE_UNSPECIFIED" + UNCHANGED_CvssScope CvssScope = "SCOPE_UNCHANGED" + CHANGED_CvssScope CvssScope = "SCOPE_CHANGED" ) diff --git a/grafeas/model_cvss_user_interaction.go b/grafeas/model_cvss_user_interaction.go new file mode 100644 index 0000000..f498182 --- /dev/null +++ b/grafeas/model_cvss_user_interaction.go @@ -0,0 +1,19 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type CvssUserInteraction string + +// List of CVSSUserInteraction +const ( + UNSPECIFIED_CvssUserInteraction CvssUserInteraction = "USER_INTERACTION_UNSPECIFIED" + NONE_CvssUserInteraction CvssUserInteraction = "USER_INTERACTION_NONE" + REQUIRED_CvssUserInteraction CvssUserInteraction = "USER_INTERACTION_REQUIRED" +) diff --git a/0.1.0/model_deployment_deployable.go b/grafeas/model_deployment_deployable.go similarity index 82% rename from 0.1.0/model_deployment_deployable.go rename to grafeas/model_deployment_deployable.go index 3b95407..f5a6b85 100644 --- a/0.1.0/model_deployment_deployable.go +++ b/grafeas/model_deployment_deployable.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -12,5 +12,5 @@ package grafeas // An artifact that can be deployed in some runtime. type DeploymentDeployable struct { // Required. Resource URI for the artifact being deployed. - ResourceUri []string `json:"resource_uri,omitempty"` + ResourceUri []string `json:"resourceUri,omitempty"` } diff --git a/0.1.0/model_deployment_deployment.go b/grafeas/model_deployment_deployment.go similarity index 79% rename from 0.1.0/model_deployment_deployment.go rename to grafeas/model_deployment_deployment.go index 3dc9ad5..47bfddd 100644 --- a/0.1.0/model_deployment_deployment.go +++ b/grafeas/model_deployment_deployment.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -16,17 +16,17 @@ import ( // The period during which some deployable was active in a runtime. type DeploymentDeployment struct { // Identity of the user that triggered this deployment. - UserEmail string `json:"user_email,omitempty"` + UserEmail string `json:"userEmail,omitempty"` // Required. Beginning of the lifetime of this deployment. - DeployTime time.Time `json:"deploy_time,omitempty"` + DeployTime time.Time `json:"deployTime,omitempty"` // End of the lifetime of this deployment. - UndeployTime time.Time `json:"undeploy_time,omitempty"` + UndeployTime time.Time `json:"undeployTime,omitempty"` // Configuration used to create this deployment. Config string `json:"config,omitempty"` // Address of the runtime element hosting this deployment. Address string `json:"address,omitempty"` // Output only. Resource URI for the artifact being deployed taken from the deployable field with the same name. - ResourceUri []string `json:"resource_uri,omitempty"` + ResourceUri []string `json:"resourceUri,omitempty"` // Platform hosting this deployment. Platform *DeploymentPlatform `json:"platform,omitempty"` } diff --git a/0.1.0/model_deployment_platform.go b/grafeas/model_deployment_platform.go similarity index 96% rename from 0.1.0/model_deployment_platform.go rename to grafeas/model_deployment_platform.go index e95bfb3..f78e314 100644 --- a/0.1.0/model_deployment_platform.go +++ b/grafeas/model_deployment_platform.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/grafeas/model_details_vex_assessment.go b/grafeas/model_details_vex_assessment.go new file mode 100644 index 0000000..9410ea4 --- /dev/null +++ b/grafeas/model_details_vex_assessment.go @@ -0,0 +1,27 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// VexAssessment provides all publisher provided Vex information that is related to this vulnerability. +type DetailsVexAssessment struct { + // Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability. + Cve string `json:"cve,omitempty"` + // Holds a list of references associated with this vulnerability item and assessment. + RelatedUris []V1beta1RelatedUrl `json:"relatedUris,omitempty"` + NoteName string `json:"noteName,omitempty"` + // Provides the state of this Vulnerability assessment. + State *AssessmentState `json:"state,omitempty"` + // Contains information about the impact of this vulnerability, this will change with time. + Impacts []string `json:"impacts,omitempty"` + // Specifies details on how to handle (and presumably, fix) a vulnerability. + Remediations []AssessmentRemediation `json:"remediations,omitempty"` + // Justification provides the justification when the state of the assessment if NOT_AFFECTED. + Justification *AssessmentJustification `json:"justification,omitempty"` +} diff --git a/grafeas/model_discovered_analysis_completed.go b/grafeas/model_discovered_analysis_completed.go new file mode 100644 index 0000000..3451308 --- /dev/null +++ b/grafeas/model_discovered_analysis_completed.go @@ -0,0 +1,15 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// Indicates which analysis completed successfully. Multiple types of analysis can be performed on a single resource. +type DiscoveredAnalysisCompleted struct { + AnalysisType []string `json:"analysisType,omitempty"` +} diff --git a/0.1.0/model_discovered_analysis_status.go b/grafeas/model_discovered_analysis_status.go similarity index 79% rename from 0.1.0/model_discovered_analysis_status.go rename to grafeas/model_discovered_analysis_status.go index 4695e60..7b8052a 100644 --- a/0.1.0/model_discovered_analysis_status.go +++ b/grafeas/model_discovered_analysis_status.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -8,7 +8,7 @@ */ package grafeas -// DiscoveredAnalysisStatus : Analysis status for a resource. Currently for initial analysis only (not updated in continuous analysis). - ANALYSIS_STATUS_UNSPECIFIED: Unknown. - PENDING: Resource is known but no action has been taken yet. - SCANNING: Resource is being analyzed. - FINISHED_SUCCESS: Analysis has finished successfully. - FINISHED_FAILED: Analysis has finished unsuccessfully, the analysis itself is in a bad state. - FINISHED_UNSUPPORTED: The resource is known not to be supported +// DiscoveredAnalysisStatus : Analysis status for a resource. Currently for initial analysis only (not updated in continuous analysis). - ANALYSIS_STATUS_UNSPECIFIED: Unknown. - PENDING: Resource is known but no action has been taken yet. - SCANNING: Resource is being analyzed. - FINISHED_SUCCESS: Analysis has finished successfully. - COMPLETE: Analysis has completed. - FINISHED_FAILED: Analysis has finished unsuccessfully, the analysis itself is in a bad state. - FINISHED_UNSUPPORTED: The resource is known not to be supported type DiscoveredAnalysisStatus string // List of DiscoveredAnalysisStatus @@ -17,6 +17,7 @@ const ( PENDING_DiscoveredAnalysisStatus DiscoveredAnalysisStatus = "PENDING" SCANNING_DiscoveredAnalysisStatus DiscoveredAnalysisStatus = "SCANNING" FINISHED_SUCCESS_DiscoveredAnalysisStatus DiscoveredAnalysisStatus = "FINISHED_SUCCESS" + COMPLETE_DiscoveredAnalysisStatus DiscoveredAnalysisStatus = "COMPLETE" FINISHED_FAILED_DiscoveredAnalysisStatus DiscoveredAnalysisStatus = "FINISHED_FAILED" FINISHED_UNSUPPORTED_DiscoveredAnalysisStatus DiscoveredAnalysisStatus = "FINISHED_UNSUPPORTED" ) diff --git a/0.1.0/model_discovered_continuous_analysis.go b/grafeas/model_discovered_continuous_analysis.go similarity index 96% rename from 0.1.0/model_discovered_continuous_analysis.go rename to grafeas/model_discovered_continuous_analysis.go index 684dc3c..06c0659 100644 --- a/0.1.0/model_discovered_continuous_analysis.go +++ b/grafeas/model_discovered_continuous_analysis.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/0.1.0/model_discovery_discovered.go b/grafeas/model_discovery_discovered.go similarity index 61% rename from 0.1.0/model_discovery_discovered.go rename to grafeas/model_discovery_discovered.go index 4250b67..ab02081 100644 --- a/0.1.0/model_discovery_discovered.go +++ b/grafeas/model_discovery_discovered.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -16,11 +16,14 @@ import ( // Provides information about the analysis status of a discovered resource. type DiscoveryDiscovered struct { // Whether the resource is continuously analyzed. - ContinuousAnalysis *DiscoveredContinuousAnalysis `json:"continuous_analysis,omitempty"` + ContinuousAnalysis *DiscoveredContinuousAnalysis `json:"continuousAnalysis,omitempty"` // The last time continuous analysis was done for this resource. Deprecated, do not use. - LastAnalysisTime time.Time `json:"last_analysis_time,omitempty"` + LastAnalysisTime time.Time `json:"lastAnalysisTime,omitempty"` // The status of discovery for the resource. - AnalysisStatus *DiscoveredAnalysisStatus `json:"analysis_status,omitempty"` + AnalysisStatus *DiscoveredAnalysisStatus `json:"analysisStatus,omitempty"` + AnalysisCompleted *DiscoveredAnalysisCompleted `json:"analysisCompleted,omitempty"` + // Indicates any errors encountered during analysis of a resource. There could be 0 or more of these errors. + AnalysisError []RpcStatus `json:"analysisError,omitempty"` // When an error is encountered this will contain a LocalizedMessage under details to show to the user. The LocalizedMessage is output only and populated by the API. - AnalysisStatusError *RpcStatus `json:"analysis_status_error,omitempty"` + AnalysisStatusError *RpcStatus `json:"analysisStatusError,omitempty"` } diff --git a/0.1.0/model_discovery_discovery.go b/grafeas/model_discovery_discovery.go similarity index 85% rename from 0.1.0/model_discovery_discovery.go rename to grafeas/model_discovery_discovery.go index 874cee2..1bb4da3 100644 --- a/0.1.0/model_discovery_discovery.go +++ b/grafeas/model_discovery_discovery.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -12,5 +12,5 @@ package grafeas // A note that indicates a type of analysis a provider would perform. This note exists in a provider's project. A `Discovery` occurrence is created in a consumer's project at the start of analysis. type DiscoveryDiscovery struct { // Required. Immutable. The kind of analysis that is handled by this discovery. - AnalysisKind *V1beta1NoteKind `json:"analysis_kind,omitempty"` + AnalysisKind *V1beta1NoteKind `json:"analysisKind,omitempty"` } diff --git a/grafeas/model_external_ref_category.go b/grafeas/model_external_ref_category.go new file mode 100644 index 0000000..c9f3ce8 --- /dev/null +++ b/grafeas/model_external_ref_category.go @@ -0,0 +1,21 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas +// ExternalRefCategory : - CATEGORY_UNSPECIFIED: Unspecified - SECURITY: Security (e.g. cpe22Type, cpe23Type) - PACKAGE_MANAGER: Package Manager (e.g. maven-central, npm, nuget, bower, purl) - PERSISTENT_ID: Persistent-Id (e.g. swh) - OTHER: Other +type ExternalRefCategory string + +// List of ExternalRefCategory +const ( + CATEGORY_UNSPECIFIED_ExternalRefCategory ExternalRefCategory = "CATEGORY_UNSPECIFIED" + SECURITY_ExternalRefCategory ExternalRefCategory = "SECURITY" + PACKAGE_MANAGER_ExternalRefCategory ExternalRefCategory = "PACKAGE_MANAGER" + PERSISTENT_ID_ExternalRefCategory ExternalRefCategory = "PERSISTENT_ID" + OTHER_ExternalRefCategory ExternalRefCategory = "OTHER" +) diff --git a/grafeas/model_file_note_file_type.go b/grafeas/model_file_note_file_type.go new file mode 100644 index 0000000..74b2d1b --- /dev/null +++ b/grafeas/model_file_note_file_type.go @@ -0,0 +1,28 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas +// FileNoteFileType : - FILE_TYPE_UNSPECIFIED: Unspecified - SOURCE: The file is human readable source code (.c, .html, etc.) - BINARY: The file is a compiled object, target image or binary executable (.o, .a, etc.) - ARCHIVE: The file represents an archive (.tar, .jar, etc.) - APPLICATION: The file is associated with a specific application type (MIME type of application/_*) - AUDIO: The file is associated with an audio file (MIME type of audio/_* , e.g. .mp3) - IMAGE: The file is associated with an picture image file (MIME type of image/_*, e.g., .jpg, .gif) - TEXT: The file is human readable text file (MIME type of text/_*) - VIDEO: The file is associated with a video file type (MIME type of video/_*) - DOCUMENTATION: The file serves as documentation - SPDX: The file is an SPDX document - OTHER: The file doesn't fit into the above categories (generated artifacts, data files, etc.) +type FileNoteFileType string + +// List of FileNoteFileType +const ( + FILE_TYPE_UNSPECIFIED_FileNoteFileType FileNoteFileType = "FILE_TYPE_UNSPECIFIED" + SOURCE_FileNoteFileType FileNoteFileType = "SOURCE" + BINARY_FileNoteFileType FileNoteFileType = "BINARY" + ARCHIVE_FileNoteFileType FileNoteFileType = "ARCHIVE" + APPLICATION_FileNoteFileType FileNoteFileType = "APPLICATION" + AUDIO_FileNoteFileType FileNoteFileType = "AUDIO" + IMAGE_FileNoteFileType FileNoteFileType = "IMAGE" + TEXT_FileNoteFileType FileNoteFileType = "TEXT" + VIDEO_FileNoteFileType FileNoteFileType = "VIDEO" + DOCUMENTATION_FileNoteFileType FileNoteFileType = "DOCUMENTATION" + SPDX_FileNoteFileType FileNoteFileType = "SPDX" + OTHER_FileNoteFileType FileNoteFileType = "OTHER" +) diff --git a/0.1.0/model_v1beta1_signature.go b/grafeas/model_grafeasv1beta1_signature.go similarity index 74% rename from 0.1.0/model_v1beta1_signature.go rename to grafeas/model_grafeasv1beta1_signature.go index 2ddb29e..b4b837a 100644 --- a/0.1.0/model_v1beta1_signature.go +++ b/grafeas/model_grafeasv1beta1_signature.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -10,9 +10,9 @@ package grafeas // Verifiers (e.g. Kritis implementations) MUST verify signatures with respect to the trust anchors defined in policy (e.g. a Kritis policy). Typically this means that the verifier has been configured with a map from `public_key_id` to public key material (and any required parameters, e.g. signing algorithm). In particular, verification implementations MUST NOT treat the signature `public_key_id` as anything more than a key lookup hint. The `public_key_id` DOES NOT validate or authenticate a public key; it only provides a mechanism for quickly selecting a public key ALREADY CONFIGURED on the verifier through a trusted channel. Verification implementations MUST reject signatures in any of the following circumstances: * The `public_key_id` is not recognized by the verifier. * The public key that `public_key_id` refers to does not verify the signature with respect to the payload. The `signature` contents SHOULD NOT be \"attached\" (where the payload is included with the serialized `signature` bytes). Verifiers MUST ignore any \"attached\" payload and only verify signatures with respect to explicitly provided payload (e.g. a `payload` field on the proto message that holds this Signature, or the canonical serialization of the proto message that holds this signature). -type V1beta1Signature struct { +type Grafeasv1beta1Signature struct { // The content of the signature, an opaque bytestring. The payload that this signature verifies MUST be unambiguously provided with the Signature during verification. A wrapper message might provide the payload explicitly. Alternatively, a message might have a canonical serialization that can always be unambiguously computed to derive the payload. Signature string `json:"signature,omitempty"` - // The identifier for the public key that verifies this signature. * The `public_key_id` is required. * The `public_key_id` MUST be an RFC3986 conformant URI. * When possible, the `public_key_id` SHOULD be an immutable reference, such as a cryptographic digest. Examples of valid `public_key_id`s: OpenPGP V4 public key fingerprint: * \"openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA\" See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more details on this scheme. RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER serialization): * \"ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU\" * \"nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5\" - PublicKeyId string `json:"public_key_id,omitempty"` + // The identifier for the public key that verifies this signature. * The `public_key_id` is required. * The `public_key_id` SHOULD be an RFC3986 conformant URI. * When possible, the `public_key_id` SHOULD be an immutable reference, such as a cryptographic digest. Examples of valid `public_key_id`s: OpenPGP V4 public key fingerprint: * \"openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA\" See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more details on this scheme. RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER serialization): * \"ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU\" * \"nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5\" + PublicKeyId string `json:"publicKeyId,omitempty"` } diff --git a/0.1.0/model_hash_hash_type.go b/grafeas/model_hash_hash_type.go similarity index 94% rename from 0.1.0/model_hash_hash_type.go rename to grafeas/model_hash_hash_type.go index de4a38b..51e0ec7 100644 --- a/0.1.0/model_hash_hash_type.go +++ b/grafeas/model_hash_hash_type.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/0.1.0/model_image_basis.go b/grafeas/model_image_basis.go similarity index 90% rename from 0.1.0/model_image_basis.go rename to grafeas/model_image_basis.go index 3455449..7237672 100644 --- a/0.1.0/model_image_basis.go +++ b/grafeas/model_image_basis.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -12,7 +12,7 @@ package grafeas // Basis describes the base image portion (Note) of the DockerImage relationship. Linked occurrences are derived from this or an equivalent image via: FROM Or an equivalent reference, e.g. a tag of the resource_url. type ImageBasis struct { // Required. Immutable. The resource_url for the resource representing the basis of associated occurrence images. - ResourceUrl string `json:"resource_url,omitempty"` + ResourceUrl string `json:"resourceUrl,omitempty"` // Required. Immutable. The fingerprint of the base image. Fingerprint *ImageFingerprint `json:"fingerprint,omitempty"` } diff --git a/0.1.0/model_image_derived.go b/grafeas/model_image_derived.go similarity index 87% rename from 0.1.0/model_image_derived.go rename to grafeas/model_image_derived.go index b6e3d67..5b6ccd8 100644 --- a/0.1.0/model_image_derived.go +++ b/grafeas/model_image_derived.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -16,7 +16,7 @@ type ImageDerived struct { // Output only. The number of layers by which this image differs from the associated image basis. Distance int32 `json:"distance,omitempty"` // This contains layer-specific metadata, if populated it has length \"distance\" and is ordered with [distance] being the layer immediately following the base image and [1] being the final layer. - LayerInfo []ImageLayer `json:"layer_info,omitempty"` + LayerInfo []ImageLayer `json:"layerInfo,omitempty"` // Output only. This contains the base image URL for the derived image occurrence. - BaseResourceUrl string `json:"base_resource_url,omitempty"` + BaseResourceUrl string `json:"baseResourceUrl,omitempty"` } diff --git a/0.1.0/model_image_fingerprint.go b/grafeas/model_image_fingerprint.go similarity index 81% rename from 0.1.0/model_image_fingerprint.go rename to grafeas/model_image_fingerprint.go index 75b9dda..87d3932 100644 --- a/0.1.0/model_image_fingerprint.go +++ b/grafeas/model_image_fingerprint.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -12,9 +12,9 @@ package grafeas // A set of properties that uniquely identify a given Docker image. type ImageFingerprint struct { // Required. The layer ID of the final layer in the Docker image's v1 representation. - V1Name string `json:"v1_name,omitempty"` + V1Name string `json:"v1Name,omitempty"` // Required. The ordered list of v2 blobs that represent a given image. - V2Blob []string `json:"v2_blob,omitempty"` + V2Blob []string `json:"v2Blob,omitempty"` // Output only. The name of the image's v2 blobs computed via: [bottom] := v2_blob[bottom] [N] := sha256(v2_blob[N] + \" \" + v2_name[N+1]) Only the name of the final blob is kept. - V2Name string `json:"v2_name,omitempty"` + V2Name string `json:"v2Name,omitempty"` } diff --git a/0.1.0/model_image_layer.go b/grafeas/model_image_layer.go similarity index 94% rename from 0.1.0/model_image_layer.go rename to grafeas/model_image_layer.go index bedc4ba..13aed25 100644 --- a/0.1.0/model_image_layer.go +++ b/grafeas/model_image_layer.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/grafeas/model_in_toto_artifact_rule.go b/grafeas/model_in_toto_artifact_rule.go new file mode 100644 index 0000000..bb34e79 --- /dev/null +++ b/grafeas/model_in_toto_artifact_rule.go @@ -0,0 +1,14 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type InTotoArtifactRule struct { + ArtifactRule []string `json:"artifactRule,omitempty"` +} diff --git a/grafeas/model_intoto_in_toto.go b/grafeas/model_intoto_in_toto.go new file mode 100644 index 0000000..11c6296 --- /dev/null +++ b/grafeas/model_intoto_in_toto.go @@ -0,0 +1,25 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// This contains the fields corresponding to the definition of a software supply chain step in an in-toto layout. This information goes into a Grafeas note. +type IntotoInToto struct { + // This field identifies the name of the step in the supply chain. + StepName string `json:"stepName,omitempty"` + // This field contains the public keys that can be used to verify the signatures on the step metadata. + SigningKeys []IntotoSigningKey `json:"signingKeys,omitempty"` + // The following fields contain in-toto artifact rules identifying the artifacts that enter this supply chain step, and exit the supply chain step, i.e. materials and products of the step. + ExpectedMaterials []InTotoArtifactRule `json:"expectedMaterials,omitempty"` + ExpectedProducts []InTotoArtifactRule `json:"expectedProducts,omitempty"` + // This field contains the expected command used to perform the step. + ExpectedCommand []string `json:"expectedCommand,omitempty"` + // This field contains a value that indicates the minimum number of keys that need to be used to sign the step's in-toto link. + Threshold string `json:"threshold,omitempty"` +} diff --git a/grafeas/model_intoto_link.go b/grafeas/model_intoto_link.go new file mode 100644 index 0000000..f9dc6af --- /dev/null +++ b/grafeas/model_intoto_link.go @@ -0,0 +1,21 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// This corresponds to an in-toto link. +type IntotoLink struct { + Command []string `json:"command,omitempty"` + Materials []IntotoLinkArtifact `json:"materials,omitempty"` + // Products are the supply chain artifacts generated as a result of the step. The structure is identical to that of materials. + Products []IntotoLinkArtifact `json:"products,omitempty"` + // ByProducts are data generated as part of a software supply chain step, but are not the actual result of the step. + Byproducts *LinkByProducts `json:"byproducts,omitempty"` + Environment *LinkEnvironment `json:"environment,omitempty"` +} diff --git a/grafeas/model_intoto_link_artifact.go b/grafeas/model_intoto_link_artifact.go new file mode 100644 index 0000000..9f1ceff --- /dev/null +++ b/grafeas/model_intoto_link_artifact.go @@ -0,0 +1,15 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type IntotoLinkArtifact struct { + ResourceUri string `json:"resourceUri,omitempty"` + Hashes *LinkArtifactHashes `json:"hashes,omitempty"` +} diff --git a/grafeas/model_intoto_signing_key.go b/grafeas/model_intoto_signing_key.go new file mode 100644 index 0000000..5412c8e --- /dev/null +++ b/grafeas/model_intoto_signing_key.go @@ -0,0 +1,22 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// This defines the format used to record keys used in the software supply chain. An in-toto link is attested using one or more keys defined in the in-toto layout. An example of this is: { \"key_id\": \"776a00e29f3559e0141b3b096f696abc6cfb0c657ab40f441132b345b0...\", \"key_type\": \"rsa\", \"public_key_value\": \"-----BEGIN PUBLIC KEY-----\\nMIIBojANBgkqhkiG9w0B...\", \"key_scheme\": \"rsassa-pss-sha256\" } The format for in-toto's key definition can be found in section 4.2 of the in-toto specification. +type IntotoSigningKey struct { + // key_id is an identifier for the signing key. + KeyId string `json:"keyId,omitempty"` + // This field identifies the specific signing method. Eg: \"rsa\", \"ed25519\", and \"ecdsa\". + KeyType string `json:"keyType,omitempty"` + // This field contains the actual public key. + PublicKeyValue string `json:"publicKeyValue,omitempty"` + // This field contains the corresponding signature scheme. Eg: \"rsassa-pss-sha256\". + KeyScheme string `json:"keyScheme,omitempty"` +} diff --git a/grafeas/model_justification_justification_type.go b/grafeas/model_justification_justification_type.go new file mode 100644 index 0000000..6c703ff --- /dev/null +++ b/grafeas/model_justification_justification_type.go @@ -0,0 +1,22 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas +// JustificationJustificationType : Provides the type of justification. - JUSTIFICATION_TYPE_UNSPECIFIED: JUSTIFICATION_TYPE_UNSPECIFIED. - COMPONENT_NOT_PRESENT: The vulnerable component is not present in the product. - VULNERABLE_CODE_NOT_PRESENT: The vulnerable code is not present. Typically this case occurs when source code is configured or built in a way that excludes the vulnerable code. - VULNERABLE_CODE_NOT_IN_EXECUTE_PATH: The vulnerable code can not be executed. Typically this case occurs when the product includes the vulnerable code but does not call or use the vulnerable code. - VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY: The vulnerable code cannot be controlled by an attacker to exploit the vulnerability. - INLINE_MITIGATIONS_ALREADY_EXIST: The product includes built-in protections or features that prevent exploitation of the vulnerability. These built-in protections cannot be subverted by the attacker and cannot be configured or disabled by the user. These mitigations completely prevent exploitation based on known attack vectors. +type JustificationJustificationType string + +// List of JustificationJustificationType +const ( + JUSTIFICATION_TYPE_UNSPECIFIED_JustificationJustificationType JustificationJustificationType = "JUSTIFICATION_TYPE_UNSPECIFIED" + COMPONENT_NOT_PRESENT_JustificationJustificationType JustificationJustificationType = "COMPONENT_NOT_PRESENT" + VULNERABLE_CODE_NOT_PRESENT_JustificationJustificationType JustificationJustificationType = "VULNERABLE_CODE_NOT_PRESENT" + VULNERABLE_CODE_NOT_IN_EXECUTE_PATH_JustificationJustificationType JustificationJustificationType = "VULNERABLE_CODE_NOT_IN_EXECUTE_PATH" + VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY_JustificationJustificationType JustificationJustificationType = "VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY" + INLINE_MITIGATIONS_ALREADY_EXIST_JustificationJustificationType JustificationJustificationType = "INLINE_MITIGATIONS_ALREADY_EXIST" +) diff --git a/0.1.0/model_layer_directive.go b/grafeas/model_layer_directive.go similarity index 98% rename from 0.1.0/model_layer_directive.go rename to grafeas/model_layer_directive.go index 52ff082..ba6b582 100644 --- a/0.1.0/model_layer_directive.go +++ b/grafeas/model_layer_directive.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/grafeas/model_link_artifact_hashes.go b/grafeas/model_link_artifact_hashes.go new file mode 100644 index 0000000..5e84169 --- /dev/null +++ b/grafeas/model_link_artifact_hashes.go @@ -0,0 +1,15 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// Defines a hash object for use in Materials and Products. +type LinkArtifactHashes struct { + Sha256 string `json:"sha256,omitempty"` +} diff --git a/grafeas/model_link_by_products.go b/grafeas/model_link_by_products.go new file mode 100644 index 0000000..0eb33d5 --- /dev/null +++ b/grafeas/model_link_by_products.go @@ -0,0 +1,15 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// Defines an object for the byproducts field in in-toto links. The suggested fields are \"stderr\", \"stdout\", and \"return-value\". +type LinkByProducts struct { + CustomValues map[string]string `json:"customValues,omitempty"` +} diff --git a/grafeas/model_link_environment.go b/grafeas/model_link_environment.go new file mode 100644 index 0000000..52f999a --- /dev/null +++ b/grafeas/model_link_environment.go @@ -0,0 +1,15 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// Defines an object for the environment field in in-toto links. The suggested fields are \"variables\", \"filesystem\", and \"workdir\". +type LinkEnvironment struct { + CustomValues map[string]string `json:"customValues,omitempty"` +} diff --git a/0.1.0/model_package_architecture.go b/grafeas/model_package_architecture.go similarity index 95% rename from 0.1.0/model_package_architecture.go rename to grafeas/model_package_architecture.go index 1ee6748..789144c 100644 --- a/0.1.0/model_package_architecture.go +++ b/grafeas/model_package_architecture.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/0.1.0/model_package_distribution.go b/grafeas/model_package_distribution.go similarity index 77% rename from 0.1.0/model_package_distribution.go rename to grafeas/model_package_distribution.go index c60059c..cdbe7a4 100644 --- a/0.1.0/model_package_distribution.go +++ b/grafeas/model_package_distribution.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -11,12 +11,12 @@ package grafeas // This represents a particular channel of distribution for a given package. E.g., Debian's jessie-backports dpkg mirror. type PackageDistribution struct { - // Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. - CpeUri string `json:"cpe_uri,omitempty"` + // The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. + CpeUri string `json:"cpeUri"` // The CPU architecture for which packages in this distribution channel were built. Architecture *PackageArchitecture `json:"architecture,omitempty"` // The latest available version of this package in this distribution channel. - LatestVersion *PackageVersion `json:"latest_version,omitempty"` + LatestVersion *PackageVersion `json:"latestVersion,omitempty"` // A freeform string denoting the maintainer of this package. Maintainer string `json:"maintainer,omitempty"` // The distribution channel-specific homepage for this package. diff --git a/grafeas/model_package_info_note_external_ref.go b/grafeas/model_package_info_note_external_ref.go new file mode 100644 index 0000000..2f1c94f --- /dev/null +++ b/grafeas/model_package_info_note_external_ref.go @@ -0,0 +1,17 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type PackageInfoNoteExternalRef struct { + Category *ExternalRefCategory `json:"category,omitempty"` + Type_ string `json:"type,omitempty"` + Locator string `json:"locator,omitempty"` + Comment string `json:"comment,omitempty"` +} diff --git a/grafeas/model_package_installation.go b/grafeas/model_package_installation.go new file mode 100644 index 0000000..1cc6a8e --- /dev/null +++ b/grafeas/model_package_installation.go @@ -0,0 +1,28 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// This represents how a particular software package may be installed on a system. +type PackageInstallation struct { + // The name of the installed package. + Name string `json:"name"` + // All of the places within the filesystem versions of this package have been found. + Location []V1beta1packageLocation `json:"location,omitempty"` + // The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.). + PackageType string `json:"packageType,omitempty"` + // The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. The cpe_uri will be blank for language packages. + CpeUri string `json:"cpeUri,omitempty"` + // The CPU architecture for which packages in this distribution channel were built. Architecture will be blank for language packages. + Architecture *PackageArchitecture `json:"architecture,omitempty"` + // Licenses that have been declared by the authors of the package. + License *V1beta1License `json:"license,omitempty"` + // The version of the package. + Version *PackageVersion `json:"version,omitempty"` +} diff --git a/grafeas/model_package_package.go b/grafeas/model_package_package.go new file mode 100644 index 0000000..1847676 --- /dev/null +++ b/grafeas/model_package_package.go @@ -0,0 +1,36 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// Package represents a particular package version. +type PackagePackage struct { + // The name of the package. + Name string `json:"name"` + // The various channels by which a package is distributed. + Distribution []PackageDistribution `json:"distribution,omitempty"` + // The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.). + PackageType string `json:"packageType,omitempty"` + // The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. The cpe_uri will be blank for language packages. + CpeUri string `json:"cpeUri,omitempty"` + // The CPU architecture for which packages in this distribution channel were built. Architecture will be blank for language packages. + Architecture *PackageArchitecture `json:"architecture,omitempty"` + // The version of the package. + Version *PackageVersion `json:"version,omitempty"` + // A freeform text denoting the maintainer of this package. + Maintainer string `json:"maintainer,omitempty"` + // The homepage for this package. + Url string `json:"url,omitempty"` + // The description of this package. + Description string `json:"description,omitempty"` + // Licenses that have been declared by the authors of the package. + License *V1beta1License `json:"license,omitempty"` + // Hash value, typically a file digest, that allows unique identification a specific package. + Digest []V1beta1Digest `json:"digest,omitempty"` +} diff --git a/0.1.0/model_package_version.go b/grafeas/model_package_version.go similarity index 63% rename from 0.1.0/model_package_version.go rename to grafeas/model_package_version.go index 93c2f5d..3232cf4 100644 --- a/0.1.0/model_package_version.go +++ b/grafeas/model_package_version.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -17,6 +17,8 @@ type PackageVersion struct { Name string `json:"name,omitempty"` // The iteration of the package build from the above version. Revision string `json:"revision,omitempty"` + // Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. + Inclusive bool `json:"inclusive,omitempty"` // Required. Distinguishes between sentinel MIN/MAX versions and normal versions. Kind *VersionVersionKind `json:"kind,omitempty"` } diff --git a/grafeas/model_protobuf_any.go b/grafeas/model_protobuf_any.go new file mode 100644 index 0000000..5136306 --- /dev/null +++ b/grafeas/model_protobuf_any.go @@ -0,0 +1,16 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := ptypes.MarshalAny(foo) ... foo := &pb.Foo{} if err := ptypes.UnmarshalAny(any, foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": , \"lastName\": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" } +type ProtobufAny struct { + // A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. + Type_ string `json:"@type,omitempty"` +} diff --git a/0.1.0/model_provenance_build_provenance.go b/grafeas/model_provenance_build_provenance.go similarity index 71% rename from 0.1.0/model_provenance_build_provenance.go rename to grafeas/model_provenance_build_provenance.go index d75556c..ddf94ee 100644 --- a/0.1.0/model_provenance_build_provenance.go +++ b/grafeas/model_provenance_build_provenance.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -18,27 +18,27 @@ type ProvenanceBuildProvenance struct { // Required. Unique identifier of the build. Id string `json:"id,omitempty"` // ID of the project. - ProjectId string `json:"project_id,omitempty"` + ProjectId string `json:"projectId,omitempty"` // Commands requested by the build. Commands []ProvenanceCommand `json:"commands,omitempty"` // Output of the build. - BuiltArtifacts []ProvenanceArtifact `json:"built_artifacts,omitempty"` + BuiltArtifacts []V1beta1provenanceArtifact `json:"builtArtifacts,omitempty"` // Time at which the build was created. - CreateTime time.Time `json:"create_time,omitempty"` + CreateTime time.Time `json:"createTime,omitempty"` // Time at which execution of the build was started. - StartTime time.Time `json:"start_time,omitempty"` + StartTime time.Time `json:"startTime,omitempty"` // Time at which execution of the build was finished. - EndTime time.Time `json:"end_time,omitempty"` + EndTime time.Time `json:"endTime,omitempty"` // E-mail address of the user who initiated this build. Note that this was the user's e-mail address at the time the build was initiated; this address may not represent the same end-user for all time. Creator string `json:"creator,omitempty"` // URI where any logs for this provenance were written. - LogsUri string `json:"logs_uri,omitempty"` + LogsUri string `json:"logsUri,omitempty"` // Details of the Source input to the build. - SourceProvenance *ProvenanceSource `json:"source_provenance,omitempty"` + SourceProvenance *ProvenanceSource `json:"sourceProvenance,omitempty"` // Trigger identifier if the build was triggered automatically; empty if not. - TriggerId string `json:"trigger_id,omitempty"` + TriggerId string `json:"triggerId,omitempty"` // Special options applied to this build. This is a catch-all field where build providers can enter any desired additional details. - BuildOptions map[string]string `json:"build_options,omitempty"` + BuildOptions map[string]string `json:"buildOptions,omitempty"` // Version string of the builder at the time this build was executed. - BuilderVersion string `json:"builder_version,omitempty"` + BuilderVersion string `json:"builderVersion,omitempty"` } diff --git a/0.1.0/model_provenance_command.go b/grafeas/model_provenance_command.go similarity index 93% rename from 0.1.0/model_provenance_command.go rename to grafeas/model_provenance_command.go index b63614a..6042a83 100644 --- a/0.1.0/model_provenance_command.go +++ b/grafeas/model_provenance_command.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -22,5 +22,5 @@ type ProvenanceCommand struct { // Optional unique identifier for this command, used in wait_for to reference this command as a dependency. Id string `json:"id,omitempty"` // The ID(s) of the command(s) that this command depends on. - WaitFor []string `json:"wait_for,omitempty"` + WaitFor []string `json:"waitFor,omitempty"` } diff --git a/0.1.0/model_provenance_file_hashes.go b/grafeas/model_provenance_file_hashes.go similarity index 84% rename from 0.1.0/model_provenance_file_hashes.go rename to grafeas/model_provenance_file_hashes.go index b7b9377..b70fa7f 100644 --- a/0.1.0/model_provenance_file_hashes.go +++ b/grafeas/model_provenance_file_hashes.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -12,5 +12,5 @@ package grafeas // Container message for hashes of byte content of files, used in source messages to verify integrity of source input to the build. type ProvenanceFileHashes struct { // Required. Collection of file hashes. - FileHash []ProvenanceHash `json:"file_hash,omitempty"` + FileHash []ProvenanceHash `json:"fileHash,omitempty"` } diff --git a/0.1.0/model_provenance_hash.go b/grafeas/model_provenance_hash.go similarity index 94% rename from 0.1.0/model_provenance_hash.go rename to grafeas/model_provenance_hash.go index e2f1d35..20f8156 100644 --- a/0.1.0/model_provenance_hash.go +++ b/grafeas/model_provenance_hash.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/0.1.0/model_provenance_source.go b/grafeas/model_provenance_source.go similarity index 81% rename from 0.1.0/model_provenance_source.go rename to grafeas/model_provenance_source.go index 2ed7b0b..a49a146 100644 --- a/0.1.0/model_provenance_source.go +++ b/grafeas/model_provenance_source.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -12,11 +12,11 @@ package grafeas // Source describes the location of the source used for the build. type ProvenanceSource struct { // If provided, the input binary artifacts for the build came from this location. - ArtifactStorageSourceUri string `json:"artifact_storage_source_uri,omitempty"` + ArtifactStorageSourceUri string `json:"artifactStorageSourceUri,omitempty"` // Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (.tar.gz), the FileHash will be for the single path to that file. - FileHashes map[string]ProvenanceFileHashes `json:"file_hashes,omitempty"` + FileHashes map[string]ProvenanceFileHashes `json:"fileHashes,omitempty"` // If provided, the source code used for the build came from this location. Context *SourceSourceContext `json:"context,omitempty"` // If provided, some of the source code used for the build may be found in these locations, in the case where the source repository had multiple remotes or submodules. This list will not include the context specified in the context field. - AdditionalContexts []SourceSourceContext `json:"additional_contexts,omitempty"` + AdditionalContexts []SourceSourceContext `json:"additionalContexts,omitempty"` } diff --git a/grafeas/model_remediation_remediation_type.go b/grafeas/model_remediation_remediation_type.go new file mode 100644 index 0000000..3d639ae --- /dev/null +++ b/grafeas/model_remediation_remediation_type.go @@ -0,0 +1,22 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas +// RemediationRemediationType : The type of remediation that can be applied. - REMEDIATION_TYPE_UNSPECIFIED: No remediation type specified. - MITIGATION: A MITIGATION is available. - NO_FIX_PLANNED: No fix is planned. - NONE_AVAILABLE: Not available. - VENDOR_FIX: A vendor fix is available. - WORKAROUND: A workaround is available. +type RemediationRemediationType string + +// List of RemediationRemediationType +const ( + REMEDIATION_TYPE_UNSPECIFIED_RemediationRemediationType RemediationRemediationType = "REMEDIATION_TYPE_UNSPECIFIED" + MITIGATION_RemediationRemediationType RemediationRemediationType = "MITIGATION" + NO_FIX_PLANNED_RemediationRemediationType RemediationRemediationType = "NO_FIX_PLANNED" + NONE_AVAILABLE_RemediationRemediationType RemediationRemediationType = "NONE_AVAILABLE" + VENDOR_FIX_RemediationRemediationType RemediationRemediationType = "VENDOR_FIX" + WORKAROUND_RemediationRemediationType RemediationRemediationType = "WORKAROUND" +) diff --git a/0.1.0/model_rpc_status.go b/grafeas/model_rpc_status.go similarity index 99% rename from 0.1.0/model_rpc_status.go rename to grafeas/model_rpc_status.go index 83392bb..e462625 100644 --- a/0.1.0/model_rpc_status.go +++ b/grafeas/model_rpc_status.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/0.1.0/model_source_alias_context.go b/grafeas/model_source_alias_context.go similarity index 93% rename from 0.1.0/model_source_alias_context.go rename to grafeas/model_source_alias_context.go index 635d91c..c92baff 100644 --- a/0.1.0/model_source_alias_context.go +++ b/grafeas/model_source_alias_context.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/0.1.0/model_source_cloud_repo_source_context.go b/grafeas/model_source_cloud_repo_source_context.go similarity index 70% rename from 0.1.0/model_source_cloud_repo_source_context.go rename to grafeas/model_source_cloud_repo_source_context.go index 8f542b5..0775c23 100644 --- a/0.1.0/model_source_cloud_repo_source_context.go +++ b/grafeas/model_source_cloud_repo_source_context.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -12,9 +12,9 @@ package grafeas // A CloudRepoSourceContext denotes a particular revision in a Google Cloud Source Repo. type SourceCloudRepoSourceContext struct { // The ID of the repo. - RepoId *SourceRepoId `json:"repo_id,omitempty"` + RepoId *SourceRepoId `json:"repoId,omitempty"` // A revision ID. - RevisionId string `json:"revision_id,omitempty"` + RevisionId string `json:"revisionId,omitempty"` // An alias, which may be a branch or tag. - AliasContext *SourceAliasContext `json:"alias_context,omitempty"` + AliasContext *SourceAliasContext `json:"aliasContext,omitempty"` } diff --git a/0.1.0/model_source_gerrit_source_context.go b/grafeas/model_source_gerrit_source_context.go similarity index 71% rename from 0.1.0/model_source_gerrit_source_context.go rename to grafeas/model_source_gerrit_source_context.go index 5b2f0c6..18ae93e 100644 --- a/0.1.0/model_source_gerrit_source_context.go +++ b/grafeas/model_source_gerrit_source_context.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -12,11 +12,11 @@ package grafeas // A SourceContext referring to a Gerrit project. type SourceGerritSourceContext struct { // The URI of a running Gerrit instance. - HostUri string `json:"host_uri,omitempty"` + HostUri string `json:"hostUri,omitempty"` // The full project name within the host. Projects may be nested, so \"project/subproject\" is a valid project name. The \"repo name\" is the hostURI/project. - GerritProject string `json:"gerrit_project,omitempty"` + GerritProject string `json:"gerritProject,omitempty"` // A revision (commit) ID. - RevisionId string `json:"revision_id,omitempty"` + RevisionId string `json:"revisionId,omitempty"` // An alias, which may be a branch or tag. - AliasContext *SourceAliasContext `json:"alias_context,omitempty"` + AliasContext *SourceAliasContext `json:"aliasContext,omitempty"` } diff --git a/0.1.0/model_source_git_source_context.go b/grafeas/model_source_git_source_context.go similarity index 85% rename from 0.1.0/model_source_git_source_context.go rename to grafeas/model_source_git_source_context.go index a11f07d..26f459d 100644 --- a/0.1.0/model_source_git_source_context.go +++ b/grafeas/model_source_git_source_context.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -14,5 +14,5 @@ type SourceGitSourceContext struct { // Git repository URL. Url string `json:"url,omitempty"` // Git commit hash. - RevisionId string `json:"revision_id,omitempty"` + RevisionId string `json:"revisionId,omitempty"` } diff --git a/0.1.0/model_source_project_repo_id.go b/grafeas/model_source_project_repo_id.go similarity index 79% rename from 0.1.0/model_source_project_repo_id.go rename to grafeas/model_source_project_repo_id.go index 369434f..bd95fb8 100644 --- a/0.1.0/model_source_project_repo_id.go +++ b/grafeas/model_source_project_repo_id.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -12,7 +12,7 @@ package grafeas // Selects a repo using a Google Cloud Platform project ID (e.g., winged-cargo-31) and a repo name within that project. type SourceProjectRepoId struct { // The ID of the project. - ProjectId string `json:"project_id,omitempty"` + ProjectId string `json:"projectId,omitempty"` // The name of the repo. Leave empty for the default repo. - RepoName string `json:"repo_name,omitempty"` + RepoName string `json:"repoName,omitempty"` } diff --git a/0.1.0/model_source_repo_id.go b/grafeas/model_source_repo_id.go similarity index 81% rename from 0.1.0/model_source_repo_id.go rename to grafeas/model_source_repo_id.go index 2817938..4a223a3 100644 --- a/0.1.0/model_source_repo_id.go +++ b/grafeas/model_source_repo_id.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -12,7 +12,7 @@ package grafeas // A unique identifier for a Cloud Repo. type SourceRepoId struct { // A combination of a project ID and a repo name. - ProjectRepoId *SourceProjectRepoId `json:"project_repo_id,omitempty"` + ProjectRepoId *SourceProjectRepoId `json:"projectRepoId,omitempty"` // A server-assigned, globally unique identifier. Uid string `json:"uid,omitempty"` } diff --git a/0.1.0/model_source_source_context.go b/grafeas/model_source_source_context.go similarity index 89% rename from 0.1.0/model_source_source_context.go rename to grafeas/model_source_source_context.go index 6f976b1..da1cf07 100644 --- a/0.1.0/model_source_source_context.go +++ b/grafeas/model_source_source_context.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -12,7 +12,7 @@ package grafeas // A SourceContext is a reference to a tree of files. A SourceContext together with a path point to a unique revision of a single file or directory. type SourceSourceContext struct { // A SourceContext referring to a revision in a Google Cloud Source Repo. - CloudRepo *SourceCloudRepoSourceContext `json:"cloud_repo,omitempty"` + CloudRepo *SourceCloudRepoSourceContext `json:"cloudRepo,omitempty"` // A SourceContext referring to a Gerrit project. Gerrit *SourceGerritSourceContext `json:"gerrit,omitempty"` // A SourceContext referring to any third party Git repo (e.g., GitHub). diff --git a/grafeas/model_spdx_document_note.go b/grafeas/model_spdx_document_note.go new file mode 100644 index 0000000..5227741 --- /dev/null +++ b/grafeas/model_spdx_document_note.go @@ -0,0 +1,15 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type SpdxDocumentNote struct { + SpdxVersion string `json:"spdxVersion,omitempty"` + DataLicence string `json:"dataLicence,omitempty"` +} diff --git a/grafeas/model_spdx_document_occurrence.go b/grafeas/model_spdx_document_occurrence.go new file mode 100644 index 0000000..ea3f71c --- /dev/null +++ b/grafeas/model_spdx_document_occurrence.go @@ -0,0 +1,26 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +import ( + "time" +) + +type SpdxDocumentOccurrence struct { + Id string `json:"id,omitempty"` + Title string `json:"title,omitempty"` + Namespace string `json:"namespace,omitempty"` + ExternalDocumentRefs []string `json:"externalDocumentRefs,omitempty"` + LicenseListVersion string `json:"licenseListVersion,omitempty"` + Creators []string `json:"creators,omitempty"` + CreateTime time.Time `json:"createTime,omitempty"` + CreatorComment string `json:"creatorComment,omitempty"` + DocumentComment string `json:"documentComment,omitempty"` +} diff --git a/grafeas/model_spdx_file_note.go b/grafeas/model_spdx_file_note.go new file mode 100644 index 0000000..116c8fb --- /dev/null +++ b/grafeas/model_spdx_file_note.go @@ -0,0 +1,16 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type SpdxFileNote struct { + Title string `json:"title,omitempty"` + FileType *FileNoteFileType `json:"fileType,omitempty"` + Checksum []string `json:"checksum,omitempty"` +} diff --git a/grafeas/model_spdx_file_occurrence.go b/grafeas/model_spdx_file_occurrence.go new file mode 100644 index 0000000..c2c1b88 --- /dev/null +++ b/grafeas/model_spdx_file_occurrence.go @@ -0,0 +1,21 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type SpdxFileOccurrence struct { + Id string `json:"id,omitempty"` + LicenseConcluded *V1beta1License `json:"licenseConcluded,omitempty"` + FilesLicenseInfo []string `json:"filesLicenseInfo,omitempty"` + Copyright string `json:"copyright,omitempty"` + Comment string `json:"comment,omitempty"` + Notice string `json:"notice,omitempty"` + Contributors []string `json:"contributors,omitempty"` + Attributions []string `json:"attributions,omitempty"` +} diff --git a/grafeas/model_spdx_package_info_note.go b/grafeas/model_spdx_package_info_note.go new file mode 100644 index 0000000..dcde802 --- /dev/null +++ b/grafeas/model_spdx_package_info_note.go @@ -0,0 +1,31 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type SpdxPackageInfoNote struct { + Title string `json:"title,omitempty"` + Version string `json:"version,omitempty"` + Supplier string `json:"supplier,omitempty"` + Originator string `json:"originator,omitempty"` + DownloadLocation string `json:"downloadLocation,omitempty"` + Analyzed bool `json:"analyzed,omitempty"` + VerificationCode string `json:"verificationCode,omitempty"` + Checksum string `json:"checksum,omitempty"` + HomePage string `json:"homePage,omitempty"` + FilesLicenseInfo []string `json:"filesLicenseInfo,omitempty"` + LicenseDeclared *V1beta1License `json:"licenseDeclared,omitempty"` + Copyright string `json:"copyright,omitempty"` + SummaryDescription string `json:"summaryDescription,omitempty"` + DetailedDescription string `json:"detailedDescription,omitempty"` + ExternalRefs []PackageInfoNoteExternalRef `json:"externalRefs,omitempty"` + Attribution string `json:"attribution,omitempty"` + // The type of package: OS, MAVEN, GO, GO_STDLIB, etc. + PackageType string `json:"packageType,omitempty"` +} diff --git a/grafeas/model_spdx_package_info_occurrence.go b/grafeas/model_spdx_package_info_occurrence.go new file mode 100644 index 0000000..8107956 --- /dev/null +++ b/grafeas/model_spdx_package_info_occurrence.go @@ -0,0 +1,24 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type SpdxPackageInfoOccurrence struct { + Id string `json:"id,omitempty"` + Filename string `json:"filename,omitempty"` + SourceInfo string `json:"sourceInfo,omitempty"` + LicenseConcluded *V1beta1License `json:"licenseConcluded,omitempty"` + Comment string `json:"comment,omitempty"` + // The type of package: OS, MAVEN, GO, GO_STDLIB, etc. + PackageType string `json:"packageType,omitempty"` + Title string `json:"title,omitempty"` + Version string `json:"version,omitempty"` + HomePage string `json:"homePage,omitempty"` + SummaryDescription string `json:"summaryDescription,omitempty"` +} diff --git a/grafeas/model_spdx_relationship_note.go b/grafeas/model_spdx_relationship_note.go new file mode 100644 index 0000000..5cdc69d --- /dev/null +++ b/grafeas/model_spdx_relationship_note.go @@ -0,0 +1,14 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type SpdxRelationshipNote struct { + Type_ *SpdxRelationshipType `json:"type,omitempty"` +} diff --git a/grafeas/model_spdx_relationship_occurrence.go b/grafeas/model_spdx_relationship_occurrence.go new file mode 100644 index 0000000..1e19e6e --- /dev/null +++ b/grafeas/model_spdx_relationship_occurrence.go @@ -0,0 +1,17 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type SpdxRelationshipOccurrence struct { + Source string `json:"source,omitempty"` + Target string `json:"target,omitempty"` + Type_ *SpdxRelationshipType `json:"type,omitempty"` + Comment string `json:"comment,omitempty"` +} diff --git a/grafeas/model_spdx_relationship_type.go b/grafeas/model_spdx_relationship_type.go new file mode 100644 index 0000000..44d57e3 --- /dev/null +++ b/grafeas/model_spdx_relationship_type.go @@ -0,0 +1,60 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas +// SpdxRelationshipType : - RELATIONSHIP_TYPE_UNSPECIFIED: Unspecified - DESCRIBES: Is to be used when SPDXRef-DOCUMENT describes SPDXRef-A - DESCRIBED_BY: Is to be used when SPDXRef-A is described by SPDXREF-Document - CONTAINS: Is to be used when SPDXRef-A contains SPDXRef-B - CONTAINED_BY: Is to be used when SPDXRef-A is contained by SPDXRef-B - DEPENDS_ON: Is to be used when SPDXRef-A depends on SPDXRef-B - DEPENDENCY_OF: Is to be used when SPDXRef-A is dependency of SPDXRef-B - DEPENDENCY_MANIFEST_OF: Is to be used when SPDXRef-A is a manifest file that lists a set of dependencies for SPDXRef-B - BUILD_DEPENDENCY_OF: Is to be used when SPDXRef-A is a build dependency of SPDXRef-B - DEV_DEPENDENCY_OF: Is to be used when SPDXRef-A is a development dependency of SPDXRef-B - OPTIONAL_DEPENDENCY_OF: Is to be used when SPDXRef-A is an optional dependency of SPDXRef-B - PROVIDED_DEPENDENCY_OF: Is to be used when SPDXRef-A is a to be provided dependency of SPDXRef-B - TEST_DEPENDENCY_OF: Is to be used when SPDXRef-A is a test dependency of SPDXRef-B - RUNTIME_DEPENDENCY_OF: Is to be used when SPDXRef-A is a dependency required for the execution of SPDXRef-B - EXAMPLE_OF: Is to be used when SPDXRef-A is an example of SPDXRef-B - GENERATES: Is to be used when SPDXRef-A generates SPDXRef-B - GENERATED_FROM: Is to be used when SPDXRef-A was generated from SPDXRef-B - ANCESTOR_OF: Is to be used when SPDXRef-A is an ancestor (same lineage but pre-dates) SPDXRef-B - DESCENDANT_OF: Is to be used when SPDXRef-A is a descendant of (same lineage but postdates) SPDXRef-B - VARIANT_OF: Is to be used when SPDXRef-A is a variant of (same lineage but not clear which came first) SPDXRef-B - DISTRIBUTION_ARTIFACT: Is to be used when distributing SPDXRef-A requires that SPDXRef-B also be distributed - PATCH_FOR: Is to be used when SPDXRef-A is a patch file for (to be applied to) SPDXRef-B - PATCH_APPLIED: Is to be used when SPDXRef-A is a patch file that has been applied to SPDXRef-B - COPY_OF: Is to be used when SPDXRef-A is an exact copy of SPDXRef-B - FILE_ADDED: Is to be used when SPDXRef-A is a file that was added to SPDXRef-B - FILE_DELETED: Is to be used when SPDXRef-A is a file that was deleted from SPDXRef-B - FILE_MODIFIED: Is to be used when SPDXRef-A is a file that was modified from SPDXRef-B - EXPANDED_FROM_ARCHIVE: Is to be used when SPDXRef-A is expanded from the archive SPDXRef-B - DYNAMIC_LINK: Is to be used when SPDXRef-A dynamically links to SPDXRef-B - STATIC_LINK: Is to be used when SPDXRef-A statically links to SPDXRef-B - DATA_FILE_OF: Is to be used when SPDXRef-A is a data file used in SPDXRef-B - TEST_CASE_OF: Is to be used when SPDXRef-A is a test case used in testing SPDXRef-B - BUILD_TOOL_OF: Is to be used when SPDXRef-A is used to build SPDXRef-B - DEV_TOOL_OF: Is to be used when SPDXRef-A is used as a development tool for SPDXRef-B - TEST_OF: Is to be used when SPDXRef-A is used for testing SPDXRef-B - TEST_TOOL_OF: Is to be used when SPDXRef-A is used as a test tool for SPDXRef-B - DOCUMENTATION_OF: Is to be used when SPDXRef-A provides documentation of SPDXRef-B - OPTIONAL_COMPONENT_OF: Is to be used when SPDXRef-A is an optional component of SPDXRef-B - METAFILE_OF: Is to be used when SPDXRef-A is a metafile of SPDXRef-B - PACKAGE_OF: Is to be used when SPDXRef-A is used as a package as part of SPDXRef-B - AMENDS: Is to be used when (current) SPDXRef-DOCUMENT amends the SPDX information in SPDXRef-B - PREREQUISITE_FOR: Is to be used when SPDXRef-A is a prerequisite for SPDXRef-B - HAS_PREREQUISITE: Is to be used when SPDXRef-A has as a prerequisite SPDXRef-B - OTHER: Is to be used for a relationship which has not been defined in the formal SPDX specification. A description of the relationship should be included in the Relationship comments field +type SpdxRelationshipType string + +// List of spdxRelationshipType +const ( + RELATIONSHIP_TYPE_UNSPECIFIED_SpdxRelationshipType SpdxRelationshipType = "RELATIONSHIP_TYPE_UNSPECIFIED" + DESCRIBES_SpdxRelationshipType SpdxRelationshipType = "DESCRIBES" + DESCRIBED_BY_SpdxRelationshipType SpdxRelationshipType = "DESCRIBED_BY" + CONTAINS_SpdxRelationshipType SpdxRelationshipType = "CONTAINS" + CONTAINED_BY_SpdxRelationshipType SpdxRelationshipType = "CONTAINED_BY" + DEPENDS_ON_SpdxRelationshipType SpdxRelationshipType = "DEPENDS_ON" + DEPENDENCY_OF_SpdxRelationshipType SpdxRelationshipType = "DEPENDENCY_OF" + DEPENDENCY_MANIFEST_OF_SpdxRelationshipType SpdxRelationshipType = "DEPENDENCY_MANIFEST_OF" + BUILD_DEPENDENCY_OF_SpdxRelationshipType SpdxRelationshipType = "BUILD_DEPENDENCY_OF" + DEV_DEPENDENCY_OF_SpdxRelationshipType SpdxRelationshipType = "DEV_DEPENDENCY_OF" + OPTIONAL_DEPENDENCY_OF_SpdxRelationshipType SpdxRelationshipType = "OPTIONAL_DEPENDENCY_OF" + PROVIDED_DEPENDENCY_OF_SpdxRelationshipType SpdxRelationshipType = "PROVIDED_DEPENDENCY_OF" + TEST_DEPENDENCY_OF_SpdxRelationshipType SpdxRelationshipType = "TEST_DEPENDENCY_OF" + RUNTIME_DEPENDENCY_OF_SpdxRelationshipType SpdxRelationshipType = "RUNTIME_DEPENDENCY_OF" + EXAMPLE_OF_SpdxRelationshipType SpdxRelationshipType = "EXAMPLE_OF" + GENERATES_SpdxRelationshipType SpdxRelationshipType = "GENERATES" + GENERATED_FROM_SpdxRelationshipType SpdxRelationshipType = "GENERATED_FROM" + ANCESTOR_OF_SpdxRelationshipType SpdxRelationshipType = "ANCESTOR_OF" + DESCENDANT_OF_SpdxRelationshipType SpdxRelationshipType = "DESCENDANT_OF" + VARIANT_OF_SpdxRelationshipType SpdxRelationshipType = "VARIANT_OF" + DISTRIBUTION_ARTIFACT_SpdxRelationshipType SpdxRelationshipType = "DISTRIBUTION_ARTIFACT" + PATCH_FOR_SpdxRelationshipType SpdxRelationshipType = "PATCH_FOR" + PATCH_APPLIED_SpdxRelationshipType SpdxRelationshipType = "PATCH_APPLIED" + COPY_OF_SpdxRelationshipType SpdxRelationshipType = "COPY_OF" + FILE_ADDED_SpdxRelationshipType SpdxRelationshipType = "FILE_ADDED" + FILE_DELETED_SpdxRelationshipType SpdxRelationshipType = "FILE_DELETED" + FILE_MODIFIED_SpdxRelationshipType SpdxRelationshipType = "FILE_MODIFIED" + EXPANDED_FROM_ARCHIVE_SpdxRelationshipType SpdxRelationshipType = "EXPANDED_FROM_ARCHIVE" + DYNAMIC_LINK_SpdxRelationshipType SpdxRelationshipType = "DYNAMIC_LINK" + STATIC_LINK_SpdxRelationshipType SpdxRelationshipType = "STATIC_LINK" + DATA_FILE_OF_SpdxRelationshipType SpdxRelationshipType = "DATA_FILE_OF" + TEST_CASE_OF_SpdxRelationshipType SpdxRelationshipType = "TEST_CASE_OF" + BUILD_TOOL_OF_SpdxRelationshipType SpdxRelationshipType = "BUILD_TOOL_OF" + DEV_TOOL_OF_SpdxRelationshipType SpdxRelationshipType = "DEV_TOOL_OF" + TEST_OF_SpdxRelationshipType SpdxRelationshipType = "TEST_OF" + TEST_TOOL_OF_SpdxRelationshipType SpdxRelationshipType = "TEST_TOOL_OF" + DOCUMENTATION_OF_SpdxRelationshipType SpdxRelationshipType = "DOCUMENTATION_OF" + OPTIONAL_COMPONENT_OF_SpdxRelationshipType SpdxRelationshipType = "OPTIONAL_COMPONENT_OF" + METAFILE_OF_SpdxRelationshipType SpdxRelationshipType = "METAFILE_OF" + PACKAGE_OF_SpdxRelationshipType SpdxRelationshipType = "PACKAGE_OF" + AMENDS_SpdxRelationshipType SpdxRelationshipType = "AMENDS" + PREREQUISITE_FOR_SpdxRelationshipType SpdxRelationshipType = "PREREQUISITE_FOR" + HAS_PREREQUISITE_SpdxRelationshipType SpdxRelationshipType = "HAS_PREREQUISITE" + OTHER_SpdxRelationshipType SpdxRelationshipType = "OTHER" +) diff --git a/0.1.0/model_v1beta1_batch_create_notes_response.go b/grafeas/model_v1beta1_batch_create_notes_response.go similarity index 93% rename from 0.1.0/model_v1beta1_batch_create_notes_response.go rename to grafeas/model_v1beta1_batch_create_notes_response.go index 5d65e3f..6186900 100644 --- a/0.1.0/model_v1beta1_batch_create_notes_response.go +++ b/grafeas/model_v1beta1_batch_create_notes_response.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/0.1.0/model_v1beta1_batch_create_occurrences_response.go b/grafeas/model_v1beta1_batch_create_occurrences_response.go similarity index 93% rename from 0.1.0/model_v1beta1_batch_create_occurrences_response.go rename to grafeas/model_v1beta1_batch_create_occurrences_response.go index aa07fa6..941e8f2 100644 --- a/0.1.0/model_v1beta1_batch_create_occurrences_response.go +++ b/grafeas/model_v1beta1_batch_create_occurrences_response.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/grafeas/model_v1beta1_digest.go b/grafeas/model_v1beta1_digest.go new file mode 100644 index 0000000..2dc533e --- /dev/null +++ b/grafeas/model_v1beta1_digest.go @@ -0,0 +1,18 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// Digest information. +type V1beta1Digest struct { + // `SHA1`, `SHA512` etc. + Algo string `json:"algo,omitempty"` + // Value of the digest. + DigestBytes string `json:"digestBytes,omitempty"` +} diff --git a/grafeas/model_v1beta1_envelope.go b/grafeas/model_v1beta1_envelope.go new file mode 100644 index 0000000..0a4c0b0 --- /dev/null +++ b/grafeas/model_v1beta1_envelope.go @@ -0,0 +1,17 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// MUST match https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An authenticated message of arbitrary type. +type V1beta1Envelope struct { + Payload string `json:"payload,omitempty"` + PayloadType string `json:"payloadType,omitempty"` + Signatures []V1beta1EnvelopeSignature `json:"signatures,omitempty"` +} diff --git a/grafeas/model_v1beta1_envelope_signature.go b/grafeas/model_v1beta1_envelope_signature.go new file mode 100644 index 0000000..2d7c88c --- /dev/null +++ b/grafeas/model_v1beta1_envelope_signature.go @@ -0,0 +1,15 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type V1beta1EnvelopeSignature struct { + Sig string `json:"sig,omitempty"` + Keyid string `json:"keyid,omitempty"` +} diff --git a/grafeas/model_v1beta1_license.go b/grafeas/model_v1beta1_license.go new file mode 100644 index 0000000..c6a009f --- /dev/null +++ b/grafeas/model_v1beta1_license.go @@ -0,0 +1,17 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// License information. +type V1beta1License struct { + // Often a single license can be used to represent the licensing terms. Sometimes it is necessary to include a choice of one or more licenses or some combination of license identifiers. Examples: \"LGPL-2.1-only OR MIT\", \"LGPL-2.1-only AND MIT\", \"GPL-2.0-or-later WITH Bison-exception-2.2\". + Expression string `json:"expression,omitempty"` + Comments string `json:"comments,omitempty"` +} diff --git a/0.1.0/model_v1beta1_list_note_occurrences_response.go b/grafeas/model_v1beta1_list_note_occurrences_response.go similarity index 85% rename from 0.1.0/model_v1beta1_list_note_occurrences_response.go rename to grafeas/model_v1beta1_list_note_occurrences_response.go index 7c4e958..8e1274a 100644 --- a/0.1.0/model_v1beta1_list_note_occurrences_response.go +++ b/grafeas/model_v1beta1_list_note_occurrences_response.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -14,5 +14,5 @@ type V1beta1ListNoteOccurrencesResponse struct { // The occurrences attached to the specified note. Occurrences []V1beta1Occurrence `json:"occurrences,omitempty"` // Token to provide to skip to a particular spot in the list. - NextPageToken string `json:"next_page_token,omitempty"` + NextPageToken string `json:"nextPageToken,omitempty"` } diff --git a/0.1.0/model_v1beta1_list_notes_response.go b/grafeas/model_v1beta1_list_notes_response.go similarity index 86% rename from 0.1.0/model_v1beta1_list_notes_response.go rename to grafeas/model_v1beta1_list_notes_response.go index 6a6ec36..f94081f 100644 --- a/0.1.0/model_v1beta1_list_notes_response.go +++ b/grafeas/model_v1beta1_list_notes_response.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -14,5 +14,5 @@ type V1beta1ListNotesResponse struct { // The notes requested. Notes []V1beta1Note `json:"notes,omitempty"` // The next pagination token in the list response. It should be used as `page_token` for the following request. An empty value means no more results. - NextPageToken string `json:"next_page_token,omitempty"` + NextPageToken string `json:"nextPageToken,omitempty"` } diff --git a/0.1.0/model_v1beta1_list_occurrences_response.go b/grafeas/model_v1beta1_list_occurrences_response.go similarity index 86% rename from 0.1.0/model_v1beta1_list_occurrences_response.go rename to grafeas/model_v1beta1_list_occurrences_response.go index e6879ee..e2dcfdd 100644 --- a/0.1.0/model_v1beta1_list_occurrences_response.go +++ b/grafeas/model_v1beta1_list_occurrences_response.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -14,5 +14,5 @@ type V1beta1ListOccurrencesResponse struct { // The occurrences requested. Occurrences []V1beta1Occurrence `json:"occurrences,omitempty"` // The next pagination token in the list response. It should be used as `page_token` for the following request. An empty value means no more results. - NextPageToken string `json:"next_page_token,omitempty"` + NextPageToken string `json:"nextPageToken,omitempty"` } diff --git a/0.1.0/model_v1beta1_note.go b/grafeas/model_v1beta1_note.go similarity index 59% rename from 0.1.0/model_v1beta1_note.go rename to grafeas/model_v1beta1_note.go index 55d9846..5e70ac0 100644 --- a/0.1.0/model_v1beta1_note.go +++ b/grafeas/model_v1beta1_note.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -18,27 +18,27 @@ type V1beta1Note struct { // Output only. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. Name string `json:"name,omitempty"` // A one sentence description of this note. - ShortDescription string `json:"short_description,omitempty"` + ShortDescription string `json:"shortDescription,omitempty"` // A detailed description of this note. - LongDescription string `json:"long_description,omitempty"` + LongDescription string `json:"longDescription,omitempty"` // Output only. The type of analysis. This field can be used as a filter in list requests. Kind *V1beta1NoteKind `json:"kind,omitempty"` // URLs associated with this note. - RelatedUrl []V1beta1RelatedUrl `json:"related_url,omitempty"` + RelatedUrl []V1beta1RelatedUrl `json:"relatedUrl,omitempty"` // Time of expiration for this note. Empty if note does not expire. - ExpirationTime time.Time `json:"expiration_time,omitempty"` + ExpirationTime time.Time `json:"expirationTime,omitempty"` // Output only. The time this note was created. This field can be used as a filter in list requests. - CreateTime time.Time `json:"create_time,omitempty"` + CreateTime time.Time `json:"createTime,omitempty"` // Output only. The time this note was last updated. This field can be used as a filter in list requests. - UpdateTime time.Time `json:"update_time,omitempty"` + UpdateTime time.Time `json:"updateTime,omitempty"` // Other notes related to this note. - RelatedNoteNames []string `json:"related_note_names,omitempty"` + RelatedNoteNames []string `json:"relatedNoteNames,omitempty"` // A note describing a package vulnerability. Vulnerability *VulnerabilityVulnerability `json:"vulnerability,omitempty"` // A note describing build provenance for a verifiable build. Build *BuildBuild `json:"build,omitempty"` // A note describing a base image. - BaseImage *ImageBasis `json:"base_image,omitempty"` + BaseImage *ImageBasis `json:"baseImage,omitempty"` // A note describing a package hosted by various package managers. Package_ *PackagePackage `json:"package,omitempty"` // A note describing something that can be deployed. @@ -46,5 +46,17 @@ type V1beta1Note struct { // A note describing the initial analysis of a resource. Discovery *DiscoveryDiscovery `json:"discovery,omitempty"` // A note describing an attestation role. - AttestationAuthority *AttestationAuthority `json:"attestation_authority,omitempty"` + AttestationAuthority *AttestationAuthority `json:"attestationAuthority,omitempty"` + // A note describing an in-toto link. + Intoto *IntotoInToto `json:"intoto,omitempty"` + // A note describing a software bill of materials. + Sbom *SpdxDocumentNote `json:"sbom,omitempty"` + // A note describing an SPDX Package. + SpdxPackage *SpdxPackageInfoNote `json:"spdxPackage,omitempty"` + // A note describing an SPDX File. + SpdxFile *SpdxFileNote `json:"spdxFile,omitempty"` + // A note describing an SPDX File. + SpdxRelationship *SpdxRelationshipNote `json:"spdxRelationship,omitempty"` + // A note describing a vulnerability assessment. + VulnerabilityAssessment *VexVulnerabilityAssessmentNote `json:"vulnerabilityAssessment,omitempty"` } diff --git a/grafeas/model_v1beta1_note_kind.go b/grafeas/model_v1beta1_note_kind.go new file mode 100644 index 0000000..ae5751b --- /dev/null +++ b/grafeas/model_v1beta1_note_kind.go @@ -0,0 +1,30 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas +// V1beta1NoteKind : Kind represents the kinds of notes supported. - NOTE_KIND_UNSPECIFIED: Default value. This value is unused. - VULNERABILITY: The note and occurrence represent a package vulnerability. - BUILD: The note and occurrence assert build provenance. - IMAGE: This represents an image basis relationship. - PACKAGE: This represents a package installed via a package manager. - DEPLOYMENT: The note and occurrence track deployment events. - DISCOVERY: The note and occurrence track the initial discovery status of a resource. - ATTESTATION: This represents a logical \"role\" that can attest to artifacts. - INTOTO: This represents an in-toto link. - SBOM: This represents a software bill of materials. - SPDX_PACKAGE: This represents an SPDX Package. - SPDX_FILE: This represents an SPDX File. - SPDX_RELATIONSHIP: This represents an SPDX Relationship. - VULNERABILITY_ASSESSMENT: This represents a Vulnerability Assessment. +type V1beta1NoteKind string + +// List of v1beta1NoteKind +const ( + NOTE_KIND_UNSPECIFIED_V1beta1NoteKind V1beta1NoteKind = "NOTE_KIND_UNSPECIFIED" + VULNERABILITY_V1beta1NoteKind V1beta1NoteKind = "VULNERABILITY" + BUILD_V1beta1NoteKind V1beta1NoteKind = "BUILD" + IMAGE_V1beta1NoteKind V1beta1NoteKind = "IMAGE" + PACKAGE__V1beta1NoteKind V1beta1NoteKind = "PACKAGE" + DEPLOYMENT_V1beta1NoteKind V1beta1NoteKind = "DEPLOYMENT" + DISCOVERY_V1beta1NoteKind V1beta1NoteKind = "DISCOVERY" + ATTESTATION_V1beta1NoteKind V1beta1NoteKind = "ATTESTATION" + INTOTO_V1beta1NoteKind V1beta1NoteKind = "INTOTO" + SBOM_V1beta1NoteKind V1beta1NoteKind = "SBOM" + SPDX_PACKAGE_V1beta1NoteKind V1beta1NoteKind = "SPDX_PACKAGE" + SPDX_FILE_V1beta1NoteKind V1beta1NoteKind = "SPDX_FILE" + SPDX_RELATIONSHIP_V1beta1NoteKind V1beta1NoteKind = "SPDX_RELATIONSHIP" + VULNERABILITY_ASSESSMENT_V1beta1NoteKind V1beta1NoteKind = "VULNERABILITY_ASSESSMENT" +) diff --git a/0.1.0/model_v1beta1_occurrence.go b/grafeas/model_v1beta1_occurrence.go similarity index 71% rename from 0.1.0/model_v1beta1_occurrence.go rename to grafeas/model_v1beta1_occurrence.go index ef07e45..d1ff2bd 100644 --- a/0.1.0/model_v1beta1_occurrence.go +++ b/grafeas/model_v1beta1_occurrence.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -20,21 +20,21 @@ type V1beta1Occurrence struct { // Required. Immutable. The resource for which the occurrence applies. Resource *V1beta1Resource `json:"resource,omitempty"` // Required. Immutable. The analysis note associated with this occurrence, in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be used as a filter in list requests. - NoteName string `json:"note_name,omitempty"` + NoteName string `json:"noteName,omitempty"` // Output only. This explicitly denotes which of the occurrence details are specified. This field can be used as a filter in list requests. Kind *V1beta1NoteKind `json:"kind,omitempty"` // A description of actions that can be taken to remedy the note. Remediation string `json:"remediation,omitempty"` // Output only. The time this occurrence was created. - CreateTime time.Time `json:"create_time,omitempty"` + CreateTime time.Time `json:"createTime,omitempty"` // Output only. The time this occurrence was last updated. - UpdateTime time.Time `json:"update_time,omitempty"` + UpdateTime time.Time `json:"updateTime,omitempty"` // Describes a security vulnerability. Vulnerability *V1beta1vulnerabilityDetails `json:"vulnerability,omitempty"` // Describes a verifiable build. Build *V1beta1buildDetails `json:"build,omitempty"` // Describes how this resource derives from the basis in the associated note. - DerivedImage *V1beta1imageDetails `json:"derived_image,omitempty"` + DerivedImage *V1beta1imageDetails `json:"derivedImage,omitempty"` // Describes the installation of a package on the linked resource. Installation *V1beta1packageDetails `json:"installation,omitempty"` // Describes the deployment of an artifact on a runtime. @@ -43,4 +43,15 @@ type V1beta1Occurrence struct { Discovered *V1beta1discoveryDetails `json:"discovered,omitempty"` // Describes an attestation of an artifact. Attestation *V1beta1attestationDetails `json:"attestation,omitempty"` + // Describes a specific in-toto link. + Intoto *V1beta1intotoDetails `json:"intoto,omitempty"` + // Describes a specific software bill of materials document. + Sbom *SpdxDocumentOccurrence `json:"sbom,omitempty"` + // Describes a specific SPDX Package. + SpdxPackage *SpdxPackageInfoOccurrence `json:"spdxPackage,omitempty"` + // Describes a specific SPDX File. + SpdxFile *SpdxFileOccurrence `json:"spdxFile,omitempty"` + // Describes a specific SPDX Relationship. + SpdxRelationship *SpdxRelationshipOccurrence `json:"spdxRelationship,omitempty"` + Envelope *V1beta1Envelope `json:"envelope,omitempty"` } diff --git a/0.1.0/model_v1beta1_related_url.go b/grafeas/model_v1beta1_related_url.go similarity index 94% rename from 0.1.0/model_v1beta1_related_url.go rename to grafeas/model_v1beta1_related_url.go index dfd4dd1..52d9ce0 100644 --- a/0.1.0/model_v1beta1_related_url.go +++ b/grafeas/model_v1beta1_related_url.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/0.1.0/model_v1beta1_resource.go b/grafeas/model_v1beta1_resource.go similarity index 89% rename from 0.1.0/model_v1beta1_resource.go rename to grafeas/model_v1beta1_resource.go index 8079bca..646ee9c 100644 --- a/0.1.0/model_v1beta1_resource.go +++ b/grafeas/model_v1beta1_resource.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -16,5 +16,5 @@ type V1beta1Resource struct { // Required. The unique URI of the resource. For example, `https://gcr.io/project/image@sha256:foo` for a Docker image. Uri string `json:"uri,omitempty"` // Deprecated, do not use. Use uri instead. The hash of the resource content. For example, the Docker digest. - ContentHash *ProvenanceHash `json:"content_hash,omitempty"` + ContentHash *ProvenanceHash `json:"contentHash,omitempty"` } diff --git a/0.1.0/model_v1beta1_vulnerability_occurrences_summary.go b/grafeas/model_v1beta1_vulnerability_occurrences_summary.go similarity index 94% rename from 0.1.0/model_v1beta1_vulnerability_occurrences_summary.go rename to grafeas/model_v1beta1_vulnerability_occurrences_summary.go index 4e8b5b3..961b5de 100644 --- a/0.1.0/model_v1beta1_vulnerability_occurrences_summary.go +++ b/grafeas/model_v1beta1_vulnerability_occurrences_summary.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/0.1.0/model_v1beta1attestation_details.go b/grafeas/model_v1beta1attestation_details.go similarity index 93% rename from 0.1.0/model_v1beta1attestation_details.go rename to grafeas/model_v1beta1attestation_details.go index db40c2a..0d8419c 100644 --- a/0.1.0/model_v1beta1attestation_details.go +++ b/grafeas/model_v1beta1attestation_details.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/0.1.0/model_v1beta1build_details.go b/grafeas/model_v1beta1build_details.go similarity index 91% rename from 0.1.0/model_v1beta1build_details.go rename to grafeas/model_v1beta1build_details.go index 0bc1b68..1804d5d 100644 --- a/0.1.0/model_v1beta1build_details.go +++ b/grafeas/model_v1beta1build_details.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -14,5 +14,5 @@ type V1beta1buildDetails struct { // Required. The actual provenance for the build. Provenance *ProvenanceBuildProvenance `json:"provenance,omitempty"` // Serialized JSON representation of the provenance, used in generating the build signature in the corresponding build note. After verifying the signature, `provenance_bytes` can be unmarshalled and compared to the provenance to confirm that it is unchanged. A base64-encoded string representation of the provenance bytes is used for the signature in order to interoperate with openssl which expects this format for signature verification. The serialized form is captured both to avoid ambiguity in how the provenance is marshalled to json as well to prevent incompatibilities with future changes. - ProvenanceBytes string `json:"provenance_bytes,omitempty"` + ProvenanceBytes string `json:"provenanceBytes,omitempty"` } diff --git a/0.1.0/model_v1beta1deployment_details.go b/grafeas/model_v1beta1deployment_details.go similarity index 93% rename from 0.1.0/model_v1beta1deployment_details.go rename to grafeas/model_v1beta1deployment_details.go index f0ee284..fb52b74 100644 --- a/0.1.0/model_v1beta1deployment_details.go +++ b/grafeas/model_v1beta1deployment_details.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/0.1.0/model_v1beta1discovery_details.go b/grafeas/model_v1beta1discovery_details.go similarity index 93% rename from 0.1.0/model_v1beta1discovery_details.go rename to grafeas/model_v1beta1discovery_details.go index 5163c8e..cb0e689 100644 --- a/0.1.0/model_v1beta1discovery_details.go +++ b/grafeas/model_v1beta1discovery_details.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/0.1.0/model_v1beta1image_details.go b/grafeas/model_v1beta1image_details.go similarity index 81% rename from 0.1.0/model_v1beta1image_details.go rename to grafeas/model_v1beta1image_details.go index 1128466..d508f3d 100644 --- a/0.1.0/model_v1beta1image_details.go +++ b/grafeas/model_v1beta1image_details.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -12,5 +12,5 @@ package grafeas // Details of an image occurrence. type V1beta1imageDetails struct { // Required. Immutable. The child image derived from the base image. - DerivedImage *ImageDerived `json:"derived_image,omitempty"` + DerivedImage *ImageDerived `json:"derivedImage,omitempty"` } diff --git a/grafeas/model_v1beta1intoto_details.go b/grafeas/model_v1beta1intoto_details.go new file mode 100644 index 0000000..a320731 --- /dev/null +++ b/grafeas/model_v1beta1intoto_details.go @@ -0,0 +1,16 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// This corresponds to a signed in-toto link - it is made up of one or more signatures and the in-toto link itself. This is used for occurrences of a Grafeas in-toto note. +type V1beta1intotoDetails struct { + Signatures []V1beta1intotoSignature `json:"signatures,omitempty"` + Signed *IntotoLink `json:"signed,omitempty"` +} diff --git a/grafeas/model_v1beta1intoto_signature.go b/grafeas/model_v1beta1intoto_signature.go new file mode 100644 index 0000000..3581d58 --- /dev/null +++ b/grafeas/model_v1beta1intoto_signature.go @@ -0,0 +1,16 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// A signature object consists of the KeyID used and the signature itself. +type V1beta1intotoSignature struct { + Keyid string `json:"keyid,omitempty"` + Sig string `json:"sig,omitempty"` +} diff --git a/0.1.0/model_v1beta1package_details.go b/grafeas/model_v1beta1package_details.go similarity index 93% rename from 0.1.0/model_v1beta1package_details.go rename to grafeas/model_v1beta1package_details.go index 8d0a7a8..a7c9e29 100644 --- a/0.1.0/model_v1beta1package_details.go +++ b/grafeas/model_v1beta1package_details.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/0.1.0/model_v1beta1package_location.go b/grafeas/model_v1beta1package_location.go similarity index 69% rename from 0.1.0/model_v1beta1package_location.go rename to grafeas/model_v1beta1package_location.go index 0c40de3..06843f9 100644 --- a/0.1.0/model_v1beta1package_location.go +++ b/grafeas/model_v1beta1package_location.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -11,9 +11,9 @@ package grafeas // An occurrence of a particular package installation found within a system's filesystem. E.g., glibc was found in `/var/lib/dpkg/status`. type V1beta1packageLocation struct { - // Required. The CPE URI in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. - CpeUri string `json:"cpe_uri,omitempty"` - // The version installed at this location. + // Deprecated. The CPE URI in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. + CpeUri string `json:"cpeUri,omitempty"` + // Deprecated. The version installed at this location. Version *PackageVersion `json:"version,omitempty"` // The path from which we gathered that this package/version is installed. Path string `json:"path,omitempty"` diff --git a/0.1.0/model_provenance_artifact.go b/grafeas/model_v1beta1provenance_artifact.go similarity index 93% rename from 0.1.0/model_provenance_artifact.go rename to grafeas/model_v1beta1provenance_artifact.go index 389fe15..a0940cf 100644 --- a/0.1.0/model_provenance_artifact.go +++ b/grafeas/model_v1beta1provenance_artifact.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -10,7 +10,7 @@ package grafeas // Artifact describes a build product. -type ProvenanceArtifact struct { +type V1beta1provenanceArtifact struct { // Hash or checksum value of a binary, or Docker Registry 2.0 digest of a container. Checksum string `json:"checksum,omitempty"` // Artifact ID, if any; for container images, this will be a URL by digest like `gcr.io/projectID/imagename@sha256:123456`. diff --git a/grafeas/model_v1beta1vulnerability_details.go b/grafeas/model_v1beta1vulnerability_details.go new file mode 100644 index 0000000..a495203 --- /dev/null +++ b/grafeas/model_v1beta1vulnerability_details.go @@ -0,0 +1,36 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// Details of a vulnerability Occurrence. +type V1beta1vulnerabilityDetails struct { + Type_ string `json:"type,omitempty"` + // Output only. The note provider assigned Severity of the vulnerability. + Severity *VulnerabilitySeverity `json:"severity,omitempty"` + // Output only. The CVSS score of this vulnerability. CVSS score is on a scale of 0-10 where 0 indicates low severity and 10 indicates high severity. + CvssScore float32 `json:"cvssScore,omitempty"` + // Required. The set of affected locations and their fixes (if available) within the associated resource. + PackageIssue []VulnerabilityPackageIssue `json:"packageIssue,omitempty"` + // Output only. A one sentence description of this vulnerability. + ShortDescription string `json:"shortDescription,omitempty"` + // Output only. A detailed description of this vulnerability. + LongDescription string `json:"longDescription,omitempty"` + // Output only. URLs related to this vulnerability. + RelatedUrls []V1beta1RelatedUrl `json:"relatedUrls,omitempty"` + // The distro assigned severity for this vulnerability when it is available, and note provider assigned severity when distro has not yet assigned a severity for this vulnerability. When there are multiple PackageIssues for this vulnerability, they can have different effective severities because some might be provided by the distro while others are provided by the language ecosystem for a language pack. For this reason, it is advised to use the effective severity on the PackageIssue level. In the case where multiple PackageIssues have differing effective severities, this field should be the highest severity for any of the PackageIssues. + EffectiveSeverity *VulnerabilitySeverity `json:"effectiveSeverity,omitempty"` + // Output only. CVSS version used to populate cvss_score and severity. + CvssVersion *VulnerabilityCvssVersion `json:"cvssVersion,omitempty"` + VexAssessment *DetailsVexAssessment `json:"vexAssessment,omitempty"` + // The cvss v2 score for the vulnerability. + CvssV2 *VulnerabilityCvss `json:"cvssV2,omitempty"` + // The cvss v3 score for the vulnerability. + CvssV3 *VulnerabilityCvss `json:"cvssV3,omitempty"` +} diff --git a/0.1.0/model_version_version_kind.go b/grafeas/model_version_version_kind.go similarity index 96% rename from 0.1.0/model_version_version_kind.go rename to grafeas/model_version_version_kind.go index 7d31463..cf8416d 100644 --- a/0.1.0/model_version_version_kind.go +++ b/grafeas/model_version_version_kind.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/grafeas/model_vex_vulnerability_assessment_note.go b/grafeas/model_vex_vulnerability_assessment_note.go new file mode 100644 index 0000000..7de90c1 --- /dev/null +++ b/grafeas/model_vex_vulnerability_assessment_note.go @@ -0,0 +1,27 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// A single VulnerabilityAssessmentNote represents one particular product's vulnerability assessment for one CVE. +type VexVulnerabilityAssessmentNote struct { + Title string `json:"title,omitempty"` + // A one sentence description of this Vex. + ShortDescription string `json:"shortDescription,omitempty"` + // A detailed description of this Vex. + LongDescription string `json:"longDescription,omitempty"` + // Identifies the language used by this document, corresponding to IETF BCP 47 / RFC 5646. + LanguageCode string `json:"languageCode,omitempty"` + // Publisher details of this Note. + Publisher *VulnerabilityAssessmentNotePublisher `json:"publisher,omitempty"` + // The product affected by this vex. + Product *VulnerabilityAssessmentNoteProduct `json:"product,omitempty"` + // Represents a vulnerability assessment for the product. + Assessment *VulnerabilityAssessmentNoteAssessment `json:"assessment,omitempty"` +} diff --git a/grafeas/model_vulnerability_assessment_note_assessment.go b/grafeas/model_vulnerability_assessment_note_assessment.go new file mode 100644 index 0000000..1d8eb2a --- /dev/null +++ b/grafeas/model_vulnerability_assessment_note_assessment.go @@ -0,0 +1,30 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// Assessment provides all information that is related to a single vulnerability for this product. +type VulnerabilityAssessmentNoteAssessment struct { + // Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability. + Cve string `json:"cve,omitempty"` + // A one sentence description of this Vex. + ShortDescription string `json:"shortDescription,omitempty"` + // A detailed description of this Vex. + LongDescription string `json:"longDescription,omitempty"` + // Holds a list of references associated with this vulnerability item and assessment. These uris have additional information about the vulnerability and the assessment itself. E.g. Link to a document which details how this assessment concluded the state of this vulnerability. + RelatedUris []V1beta1RelatedUrl `json:"relatedUris,omitempty"` + // Provides the state of this Vulnerability assessment. + State *AssessmentState `json:"state,omitempty"` + // Contains information about the impact of this vulnerability, this will change with time. + Impacts []string `json:"impacts,omitempty"` + // Justification provides the justification when the state of the assessment if NOT_AFFECTED. + Justification *AssessmentJustification `json:"justification,omitempty"` + // Specifies details on how to handle (and presumably, fix) a vulnerability. + Remediations []AssessmentRemediation `json:"remediations,omitempty"` +} diff --git a/grafeas/model_vulnerability_assessment_note_product.go b/grafeas/model_vulnerability_assessment_note_product.go new file mode 100644 index 0000000..1e4d023 --- /dev/null +++ b/grafeas/model_vulnerability_assessment_note_product.go @@ -0,0 +1,19 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type VulnerabilityAssessmentNoteProduct struct { + // Name of the product. + Name string `json:"name,omitempty"` + // Token that identifies a product so that it can be referred to from other parts in the document. There is no predefined format as long as it uniquely identifies a group in the context of the current document. + Id string `json:"id,omitempty"` + // Contains a URI which is vendor-specific. Example: The artifact repository URL of an image. + GenericUri string `json:"genericUri,omitempty"` +} diff --git a/grafeas/model_vulnerability_assessment_note_publisher.go b/grafeas/model_vulnerability_assessment_note_publisher.go new file mode 100644 index 0000000..0607eaf --- /dev/null +++ b/grafeas/model_vulnerability_assessment_note_publisher.go @@ -0,0 +1,18 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type VulnerabilityAssessmentNotePublisher struct { + // Name of the publisher. Examples: 'Google', 'Google Cloud Platform'. + Name string `json:"name,omitempty"` + // Provides information about the authority of the issuing party to release the document, in particular, the party's constituency and responsibilities or other obligations. + IssuingAuthority string `json:"issuingAuthority,omitempty"` + Context string `json:"context,omitempty"` +} diff --git a/grafeas/model_vulnerability_cvss.go b/grafeas/model_vulnerability_cvss.go new file mode 100644 index 0000000..15fb1f7 --- /dev/null +++ b/grafeas/model_vulnerability_cvss.go @@ -0,0 +1,27 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type VulnerabilityCvss struct { + // The base score is a function of the base metric scores. + BaseScore float32 `json:"baseScore,omitempty"` + ExploitabilityScore float32 `json:"exploitabilityScore,omitempty"` + ImpactScore float32 `json:"impactScore,omitempty"` + // Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments. + AttackVector *CvssAttackVector `json:"attackVector,omitempty"` + AttackComplexity *CvssAttackComplexity `json:"attackComplexity,omitempty"` + Authentication *CvssAuthentication `json:"authentication,omitempty"` + PrivilegesRequired *CvssPrivilegesRequired `json:"privilegesRequired,omitempty"` + UserInteraction *CvssUserInteraction `json:"userInteraction,omitempty"` + Scope *CvssScope `json:"scope,omitempty"` + ConfidentialityImpact *CvssImpact `json:"confidentialityImpact,omitempty"` + IntegrityImpact *CvssImpact `json:"integrityImpact,omitempty"` + AvailabilityImpact *CvssImpact `json:"availabilityImpact,omitempty"` +} diff --git a/grafeas/model_vulnerability_cvss_version.go b/grafeas/model_vulnerability_cvss_version.go new file mode 100644 index 0000000..1e918fb --- /dev/null +++ b/grafeas/model_vulnerability_cvss_version.go @@ -0,0 +1,19 @@ +/* + * grafeas.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas +// VulnerabilityCvssVersion : CVSS Version. +type VulnerabilityCvssVersion string + +// List of vulnerabilityCVSSVersion +const ( + UNSPECIFIED_VulnerabilityCvssVersion VulnerabilityCvssVersion = "CVSS_VERSION_UNSPECIFIED" + 2__VulnerabilityCvssVersion VulnerabilityCvssVersion = "CVSS_VERSION_2" + 3__VulnerabilityCvssVersion VulnerabilityCvssVersion = "CVSS_VERSION_3" +) diff --git a/0.1.0/model_vulnerability_detail.go b/grafeas/model_vulnerability_detail.go similarity index 52% rename from 0.1.0/model_vulnerability_detail.go rename to grafeas/model_vulnerability_detail.go index eb8a6bd..6fc9a33 100644 --- a/0.1.0/model_vulnerability_detail.go +++ b/grafeas/model_vulnerability_detail.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -9,23 +9,33 @@ package grafeas +import ( + "time" +) + type VulnerabilityDetail struct { // Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) in which the vulnerability manifests. Examples include distro or storage location for vulnerable jar. - CpeUri string `json:"cpe_uri,omitempty"` + CpeUri string `json:"cpeUri,omitempty"` // Required. The name of the package where the vulnerability was found. Package_ string `json:"package,omitempty"` // The min version of the package in which the vulnerability exists. - MinAffectedVersion *PackageVersion `json:"min_affected_version,omitempty"` - // Deprecated, do not use. Use fixed_location instead. The max version of the package in which the vulnerability exists. - MaxAffectedVersion *PackageVersion `json:"max_affected_version,omitempty"` + MinAffectedVersion *PackageVersion `json:"minAffectedVersion,omitempty"` + // The max version of the package in which the vulnerability exists. + MaxAffectedVersion *PackageVersion `json:"maxAffectedVersion,omitempty"` // The severity (eg: distro assigned severity) for this vulnerability. - SeverityName string `json:"severity_name,omitempty"` + SeverityName string `json:"severityName,omitempty"` // A vendor-specific description of this note. Description string `json:"description,omitempty"` // The fix for this specific package version. - FixedLocation *VulnerabilityVulnerabilityLocation `json:"fixed_location,omitempty"` + FixedLocation *VulnerabilityVulnerabilityLocation `json:"fixedLocation,omitempty"` // The type of package; whether native or non native(ruby gems, node.js packages etc). - PackageType string `json:"package_type,omitempty"` + PackageType string `json:"packageType,omitempty"` // Whether this detail is obsolete. Occurrences are expected not to point to obsolete details. - IsObsolete bool `json:"is_obsolete,omitempty"` + IsObsolete bool `json:"isObsolete,omitempty"` + // The time this information was last changed at the source. This is an upstream timestamp from the underlying information source - e.g. Ubuntu security tracker. + SourceUpdateTime time.Time `json:"sourceUpdateTime,omitempty"` + // The source from which the information in this Detail was obtained. + Source string `json:"source,omitempty"` + // The name of the vendor of the product. + Vendor string `json:"vendor,omitempty"` } diff --git a/0.1.0/model_vulnerability_occurrences_summary_fixable_total_by_digest.go b/grafeas/model_vulnerability_occurrences_summary_fixable_total_by_digest.go similarity index 85% rename from 0.1.0/model_vulnerability_occurrences_summary_fixable_total_by_digest.go rename to grafeas/model_vulnerability_occurrences_summary_fixable_total_by_digest.go index 99b9766..c527875 100644 --- a/0.1.0/model_vulnerability_occurrences_summary_fixable_total_by_digest.go +++ b/grafeas/model_vulnerability_occurrences_summary_fixable_total_by_digest.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -16,7 +16,7 @@ type VulnerabilityOccurrencesSummaryFixableTotalByDigest struct { // The severity for this count. SEVERITY_UNSPECIFIED indicates total across all severities. Severity *VulnerabilitySeverity `json:"severity,omitempty"` // The number of fixable vulnerabilities associated with this resource. - FixableCount string `json:"fixable_count,omitempty"` + FixableCount string `json:"fixableCount,omitempty"` // The total number of vulnerabilities associated with this resource. - TotalCount string `json:"total_count,omitempty"` + TotalCount string `json:"totalCount,omitempty"` } diff --git a/0.1.0/model_vulnerability_package_issue.go b/grafeas/model_vulnerability_package_issue.go similarity index 57% rename from 0.1.0/model_vulnerability_package_issue.go rename to grafeas/model_vulnerability_package_issue.go index 0b21a86..0a647c5 100644 --- a/0.1.0/model_vulnerability_package_issue.go +++ b/grafeas/model_vulnerability_package_issue.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -12,9 +12,13 @@ package grafeas // This message wraps a location affected by a vulnerability and its associated fix (if one is available). type VulnerabilityPackageIssue struct { // Required. The location of the vulnerability. - AffectedLocation *VulnerabilityVulnerabilityLocation `json:"affected_location,omitempty"` + AffectedLocation *VulnerabilityVulnerabilityLocation `json:"affectedLocation,omitempty"` // The location of the available fix for vulnerability. - FixedLocation *VulnerabilityVulnerabilityLocation `json:"fixed_location,omitempty"` + FixedLocation *VulnerabilityVulnerabilityLocation `json:"fixedLocation,omitempty"` // Deprecated, use Details.effective_severity instead The severity (e.g., distro assigned severity) for this vulnerability. - SeverityName string `json:"severity_name,omitempty"` + SeverityName string `json:"severityName,omitempty"` + // The type of package (e.g. OS, MAVEN, GO). + PackageType string `json:"packageType,omitempty"` + // The distro or language system assigned severity for this vulnerability when that is available and note provider assigned severity when it is not available. + EffectiveSeverity *VulnerabilitySeverity `json:"effectiveSeverity,omitempty"` } diff --git a/0.1.0/model_vulnerability_severity.go b/grafeas/model_vulnerability_severity.go similarity index 96% rename from 0.1.0/model_vulnerability_severity.go rename to grafeas/model_vulnerability_severity.go index 78460bd..1a97fb7 100644 --- a/0.1.0/model_vulnerability_severity.go +++ b/grafeas/model_vulnerability_severity.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/0.1.0/model_vulnerability_vulnerability.go b/grafeas/model_vulnerability_vulnerability.go similarity index 57% rename from 0.1.0/model_vulnerability_vulnerability.go rename to grafeas/model_vulnerability_vulnerability.go index bc37541..1abddbf 100644 --- a/0.1.0/model_vulnerability_vulnerability.go +++ b/grafeas/model_vulnerability_vulnerability.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -9,16 +9,27 @@ package grafeas +import ( + "time" +) + // Vulnerability provides metadata about a security vulnerability in a Note. type VulnerabilityVulnerability struct { // The CVSS score for this vulnerability. - CvssScore float32 `json:"cvss_score,omitempty"` + CvssScore float32 `json:"cvssScore,omitempty"` // Note provider assigned impact of the vulnerability. Severity *VulnerabilitySeverity `json:"severity,omitempty"` // All information about the package to specifically identify this vulnerability. One entry per (version range and cpe_uri) the package vulnerability has manifested in. Details []VulnerabilityDetail `json:"details,omitempty"` - // The full description of the CVSSv3. - CvssV3 *VulnerabilityCvsSv3 `json:"cvss_v3,omitempty"` + // The full description of the CVSS for version 3. + CvssV3 *VulnerabilityCvss `json:"cvssV3,omitempty"` // Windows details get their own format because the information format and model don't match a normal detail. Specifically Windows updates are done as patches, thus Windows vulnerabilities really are a missing package, rather than a package being at an incorrect version. - WindowsDetails []VulnerabilityWindowsDetail `json:"windows_details,omitempty"` + WindowsDetails []VulnerabilityWindowsDetail `json:"windowsDetails,omitempty"` + // The time this information was last changed at the source. This is an upstream timestamp from the underlying information source - e.g. Ubuntu security tracker. + SourceUpdateTime time.Time `json:"sourceUpdateTime,omitempty"` + // The full description of the CVSS for version 2. + CvssV2 *VulnerabilityCvss `json:"cvssV2,omitempty"` + Cwe []string `json:"cwe,omitempty"` + // CVSS version used to populate cvss_score and severity. + CvssVersion *VulnerabilityCvssVersion `json:"cvssVersion,omitempty"` } diff --git a/0.1.0/model_vulnerability_vulnerability_location.go b/grafeas/model_vulnerability_vulnerability_location.go similarity index 90% rename from 0.1.0/model_vulnerability_vulnerability_location.go rename to grafeas/model_vulnerability_vulnerability_location.go index a1d895e..f6ce240 100644 --- a/0.1.0/model_vulnerability_vulnerability_location.go +++ b/grafeas/model_vulnerability_vulnerability_location.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -12,7 +12,7 @@ package grafeas // The location of the vulnerability. type VulnerabilityVulnerabilityLocation struct { // Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) format. Examples include distro or storage location for vulnerable jar. - CpeUri string `json:"cpe_uri,omitempty"` + CpeUri string `json:"cpeUri,omitempty"` // Required. The package being described. Package_ string `json:"package,omitempty"` // Required. The version of the package being described. diff --git a/0.1.0/model_vulnerability_windows_detail.go b/grafeas/model_vulnerability_windows_detail.go similarity index 86% rename from 0.1.0/model_vulnerability_windows_detail.go rename to grafeas/model_vulnerability_windows_detail.go index a786361..3f04d58 100644 --- a/0.1.0/model_vulnerability_windows_detail.go +++ b/grafeas/model_vulnerability_windows_detail.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * @@ -11,11 +11,11 @@ package grafeas type VulnerabilityWindowsDetail struct { // Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) in which the vulnerability manifests. Examples include distro or storage location for vulnerable jar. - CpeUri string `json:"cpe_uri,omitempty"` + CpeUri string `json:"cpeUri,omitempty"` // Required. The name of the vulnerability. Name string `json:"name,omitempty"` // The description of the vulnerability. Description string `json:"description,omitempty"` // Required. The names of the KBs which have hotfixes to mitigate this vulnerability. Note that there may be multiple hotfixes (and thus multiple KBs) that mitigate a given vulnerability. Currently any listed kb's presence is considered a fix. - FixingKbs []WindowsDetailKnowledgeBase `json:"fixing_kbs,omitempty"` + FixingKbs []WindowsDetailKnowledgeBase `json:"fixingKbs,omitempty"` } diff --git a/0.1.0/model_windows_detail_knowledge_base.go b/grafeas/model_windows_detail_knowledge_base.go similarity index 93% rename from 0.1.0/model_windows_detail_knowledge_base.go rename to grafeas/model_windows_detail_knowledge_base.go index 714f08a..9fd9b88 100644 --- a/0.1.0/model_windows_detail_knowledge_base.go +++ b/grafeas/model_windows_detail_knowledge_base.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/0.1.0/response.go b/grafeas/response.go similarity index 97% rename from 0.1.0/response.go rename to grafeas/response.go index 8d3cc78..557274d 100644 --- a/0.1.0/response.go +++ b/grafeas/response.go @@ -1,5 +1,5 @@ /* - * proto/v1beta1/grafeas.proto + * grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * diff --git a/project/.gitignore b/project/.gitignore new file mode 100644 index 0000000..daf913b --- /dev/null +++ b/project/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/project/.swagger-codegen-ignore b/project/.swagger-codegen-ignore new file mode 100644 index 0000000..c5fa491 --- /dev/null +++ b/project/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/project/.swagger-codegen/VERSION b/project/.swagger-codegen/VERSION new file mode 100644 index 0000000..26f8b8b --- /dev/null +++ b/project/.swagger-codegen/VERSION @@ -0,0 +1 @@ +2.4.5 \ No newline at end of file diff --git a/project/.travis.yml b/project/.travis.yml new file mode 100644 index 0000000..f5cb2ce --- /dev/null +++ b/project/.travis.yml @@ -0,0 +1,8 @@ +language: go + +install: + - go get -d -v . + +script: + - go build -v ./ + diff --git a/project/README.md b/project/README.md new file mode 100644 index 0000000..bbd48dc --- /dev/null +++ b/project/README.md @@ -0,0 +1,45 @@ +# Go API client for grafeas + +No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + +## Overview +This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client. + +- API version: version not set +- Package version: 1.0.0 +- Build package: io.swagger.codegen.languages.GoClientCodegen + +## Installation +Put the package under your project folder and add the following in import: +```golang +import "./grafeas" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ProjectsApi* | [**ProjectsCreateProject**](docs/ProjectsApi.md#projectscreateproject) | **Post** /v1beta1/projects | Creates a new project. +*ProjectsApi* | [**ProjectsDeleteProject**](docs/ProjectsApi.md#projectsdeleteproject) | **Delete** /v1beta1/{name} | Deletes the specified project. +*ProjectsApi* | [**ProjectsGetProject**](docs/ProjectsApi.md#projectsgetproject) | **Get** /v1beta1/{name} | Gets the specified project. +*ProjectsApi* | [**ProjectsListProjects**](docs/ProjectsApi.md#projectslistprojects) | **Get** /v1beta1/projects | Lists projects. + + +## Documentation For Models + + - [ProjectListProjectsResponse](docs/ProjectListProjectsResponse.md) + - [ProjectProject](docs/ProjectProject.md) + - [ProtobufAny](docs/ProtobufAny.md) + - [RpcStatus](docs/RpcStatus.md) + + +## Documentation For Authorization + Endpoints do not require authorization. + + +## Author + + + diff --git a/project/api/swagger.yaml b/project/api/swagger.yaml new file mode 100644 index 0000000..f613032 --- /dev/null +++ b/project/api/swagger.yaml @@ -0,0 +1,163 @@ +--- +swagger: "2.0" +info: + version: "version not set" + title: "project.proto" +tags: +- name: "Projects" +consumes: +- "application/json" +produces: +- "application/json" +paths: + /v1beta1/projects: + get: + tags: + - "Projects" + summary: "Lists projects." + operationId: "Projects_ListProjects" + parameters: + - name: "filter" + in: "query" + description: "The filter expression." + required: false + type: "string" + x-exportParamName: "Filter" + x-optionalDataType: "String" + - name: "pageSize" + in: "query" + description: "Number of projects to return in the list." + required: false + type: "integer" + format: "int32" + x-exportParamName: "PageSize" + x-optionalDataType: "Int32" + - name: "pageToken" + in: "query" + description: "Token to provide to skip to a particular spot in the list." + required: false + type: "string" + x-exportParamName: "PageToken" + x-optionalDataType: "String" + responses: + 200: + description: "A successful response." + schema: + $ref: "#/definitions/projectListProjectsResponse" + default: + description: "An unexpected error response." + schema: + $ref: "#/definitions/rpcStatus" + post: + tags: + - "Projects" + summary: "Creates a new project." + operationId: "Projects_CreateProject" + parameters: + - in: "body" + name: "body" + description: "The project to create." + required: true + schema: + $ref: "#/definitions/projectProject" + x-exportParamName: "Body" + responses: + 200: + description: "A successful response." + schema: + $ref: "#/definitions/projectProject" + default: + description: "An unexpected error response." + schema: + $ref: "#/definitions/rpcStatus" + /v1beta1/{name}: + get: + tags: + - "Projects" + summary: "Gets the specified project." + operationId: "Projects_GetProject" + parameters: + - name: "name" + in: "path" + description: "The name of the project in the form of `projects/{PROJECT_ID}`." + required: true + type: "string" + pattern: "projects/[^/]+" + x-exportParamName: "Name" + responses: + 200: + description: "A successful response." + schema: + $ref: "#/definitions/projectProject" + default: + description: "An unexpected error response." + schema: + $ref: "#/definitions/rpcStatus" + delete: + tags: + - "Projects" + summary: "Deletes the specified project." + operationId: "Projects_DeleteProject" + parameters: + - name: "name" + in: "path" + description: "The name of the project in the form of `projects/{PROJECT_ID}`." + required: true + type: "string" + pattern: "projects/[^/]+" + x-exportParamName: "Name" + responses: + 200: + description: "A successful response." + schema: {} + default: + description: "An unexpected error response." + schema: + $ref: "#/definitions/rpcStatus" +definitions: + projectListProjectsResponse: + type: "object" + properties: + projects: + type: "array" + description: "The projects requested." + items: + $ref: "#/definitions/projectProject" + nextPageToken: + type: "string" + description: "The next pagination token in the list response. It should be\ + \ used as\n`page_token` for the following request. An empty value means\ + \ no more\nresults." + description: "Response for listing projects." + example: + projects: + - name: "name" + - name: "name" + nextPageToken: "nextPageToken" + projectProject: + type: "object" + properties: + name: + type: "string" + description: "The name of the project in the form of `projects/{PROJECT_ID}`." + description: "Describes a Grafeas project." + example: + name: "name" + protobufAny: + type: "object" + properties: + '@type': + type: "string" + additionalProperties: {} + rpcStatus: + type: "object" + properties: + code: + type: "integer" + format: "int32" + message: + type: "string" + details: + type: "array" + items: + $ref: "#/definitions/protobufAny" diff --git a/project/api_projects.go b/project/api_projects.go new file mode 100644 index 0000000..0548f53 --- /dev/null +++ b/project/api_projects.go @@ -0,0 +1,442 @@ +/* + * project.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +import ( + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" + "fmt" + "github.com/antihax/optional" +) + +// Linger please +var ( + _ context.Context +) + +type ProjectsApiService service + +/* +ProjectsApiService Creates a new project. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body The project to create. + +@return ProjectProject +*/ +func (a *ProjectsApiService) ProjectsCreateProject(ctx context.Context, body ProjectProject) (ProjectProject, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ProjectProject + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v1beta1/projects" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v ProjectProject + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 0 { + var v RpcStatus + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +ProjectsApiService Deletes the specified project. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param name The name of the project in the form of `projects/{PROJECT_ID}`. + +@return interface{} +*/ +func (a *ProjectsApiService) ProjectsDeleteProject(ctx context.Context, name string) (interface{}, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue interface{} + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v1beta1/{name}" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", fmt.Sprintf("%v", name), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v interface{} + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 0 { + var v RpcStatus + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +ProjectsApiService Gets the specified project. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param name The name of the project in the form of `projects/{PROJECT_ID}`. + +@return ProjectProject +*/ +func (a *ProjectsApiService) ProjectsGetProject(ctx context.Context, name string) (ProjectProject, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ProjectProject + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v1beta1/{name}" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", fmt.Sprintf("%v", name), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v ProjectProject + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 0 { + var v RpcStatus + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +ProjectsApiService Lists projects. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *ProjectsListProjectsOpts - Optional Parameters: + * @param "Filter" (optional.String) - The filter expression. + * @param "PageSize" (optional.Int32) - Number of projects to return in the list. + * @param "PageToken" (optional.String) - Token to provide to skip to a particular spot in the list. + +@return ProjectListProjectsResponse +*/ + +type ProjectsListProjectsOpts struct { + Filter optional.String + PageSize optional.Int32 + PageToken optional.String +} + +func (a *ProjectsApiService) ProjectsListProjects(ctx context.Context, localVarOptionals *ProjectsListProjectsOpts) (ProjectListProjectsResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ProjectListProjectsResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v1beta1/projects" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Filter.IsSet() { + localVarQueryParams.Add("filter", parameterToString(localVarOptionals.Filter.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.PageSize.IsSet() { + localVarQueryParams.Add("pageSize", parameterToString(localVarOptionals.PageSize.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.PageToken.IsSet() { + localVarQueryParams.Add("pageToken", parameterToString(localVarOptionals.PageToken.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v ProjectListProjectsResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 0 { + var v RpcStatus + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/project/client.go b/project/client.go new file mode 100644 index 0000000..255124f --- /dev/null +++ b/project/client.go @@ -0,0 +1,464 @@ +/* + * project.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "mime/multipart" + "net/http" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + "golang.org/x/oauth2" +) + +var ( + jsonCheck = regexp.MustCompile("(?i:[application|text]/json)") + xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)") +) + +// APIClient manages communication with the project.proto API vversion not set +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + ProjectsApi *ProjectsApiService +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.ProjectsApi = (*ProjectsApiService)(&c.common) + + return c +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insenstive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.ToLower(a) == strings.ToLower(needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +// parameterToString convert interface{} parameters to string, using a delimiter if format is provided. +func parameterToString(obj interface{}, collectionFormat string) string { + var delimiter string + + switch collectionFormat { + case "pipes": + delimiter = "|" + case "ssv": + delimiter = " " + case "tsv": + delimiter = "\t" + case "csv": + delimiter = "," + } + + if reflect.TypeOf(obj).Kind() == reflect.Slice { + return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") + } + + return fmt.Sprintf("%v", obj) +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + return c.cfg.HTTPClient.Do(request) +} + +// Change base path to allow switching to mocks +func (c *APIClient) ChangeBasePath(path string) { + c.cfg.BasePath = path +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + fileName string, + fileBytes []byte) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if postBody != nil { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + if len(fileBytes) > 0 && fileName != "" { + w.Boundary() + //_, fileNm := filepath.Split(fileName) + part, err := w.CreateFormFile("file", filepath.Base(fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(fileBytes) + if err != nil { + return nil, err + } + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + } + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = query.Encode() + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers.Set(h, v) + } + localVarRequest.Header = headers + } + + // Override request host, if applicable + if c.cfg.Host != "" { + localVarRequest.Host = c.cfg.Host + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + // OAuth2 authentication + if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { + // We were able to grab an oauth2 token from the context + var latestToken *oauth2.Token + if latestToken, err = tok.Token(); err != nil { + return nil, err + } + + latestToken.SetAuthHeader(localVarRequest) + } + + // Basic HTTP Authentication + if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { + localVarRequest.SetBasicAuth(auth.UserName, auth.Password) + } + + // AccessToken Authentication + if auth, ok := ctx.Value(ContextAccessToken).(string); ok { + localVarRequest.Header.Add("Authorization", "Bearer "+auth) + } + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if strings.Contains(contentType, "application/xml") { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } else if strings.Contains(contentType, "application/json") { + if err = json.Unmarshal(b, v); err != nil { + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(path) + if err != nil { + return err + } + defer file.Close() + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if jsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if xmlCheck.MatchString(contentType) { + xml.NewEncoder(bodyBuf).Encode(body) + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("Invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } + expires = now.Add(lifetime) + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// GenericSwaggerError Provides access to the body, error and model on returned errors. +type GenericSwaggerError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericSwaggerError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericSwaggerError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericSwaggerError) Model() interface{} { + return e.model +} \ No newline at end of file diff --git a/project/configuration.go b/project/configuration.go new file mode 100644 index 0000000..456fd26 --- /dev/null +++ b/project/configuration.go @@ -0,0 +1,72 @@ +/* + * project.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +import ( + "net/http" +) + +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). + +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +var ( + // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. + ContextOAuth2 = contextKey("token") + + // ContextBasicAuth takes BasicAuth as authentication for the request. + ContextBasicAuth = contextKey("basic") + + // ContextAccessToken takes a string oauth2 access token as authentication for the request. + ContextAccessToken = contextKey("accesstoken") + + // ContextAPIKey takes an APIKey as authentication for the request + ContextAPIKey = contextKey("apikey") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth +type BasicAuth struct { + UserName string `json:"userName,omitempty"` + Password string `json:"password,omitempty"` +} + +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey +type APIKey struct { + Key string + Prefix string +} + +type Configuration struct { + BasePath string `json:"basePath,omitempty"` + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + HTTPClient *http.Client +} + +func NewConfiguration() *Configuration { + cfg := &Configuration{ + BasePath: "https://localhost", + DefaultHeader: make(map[string]string), + UserAgent: "Swagger-Codegen/1.0.0/go", + } + return cfg +} + +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} diff --git a/project/docs/ProjectListProjectsResponse.md b/project/docs/ProjectListProjectsResponse.md new file mode 100644 index 0000000..1867026 --- /dev/null +++ b/project/docs/ProjectListProjectsResponse.md @@ -0,0 +1,11 @@ +# ProjectListProjectsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Projects** | [**[]ProjectProject**](projectProject.md) | The projects requested. | [optional] [default to null] +**NextPageToken** | **string** | The next pagination token in the list response. It should be used as `page_token` for the following request. An empty value means no more results. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/project/docs/ProjectProject.md b/project/docs/ProjectProject.md new file mode 100644 index 0000000..79be0c8 --- /dev/null +++ b/project/docs/ProjectProject.md @@ -0,0 +1,10 @@ +# ProjectProject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the project in the form of `projects/{PROJECT_ID}`. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/project/docs/ProjectsApi.md b/project/docs/ProjectsApi.md new file mode 100644 index 0000000..b8cf7d7 --- /dev/null +++ b/project/docs/ProjectsApi.md @@ -0,0 +1,125 @@ +# \ProjectsApi + +All URIs are relative to *https://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ProjectsCreateProject**](ProjectsApi.md#ProjectsCreateProject) | **Post** /v1beta1/projects | Creates a new project. +[**ProjectsDeleteProject**](ProjectsApi.md#ProjectsDeleteProject) | **Delete** /v1beta1/{name} | Deletes the specified project. +[**ProjectsGetProject**](ProjectsApi.md#ProjectsGetProject) | **Get** /v1beta1/{name} | Gets the specified project. +[**ProjectsListProjects**](ProjectsApi.md#ProjectsListProjects) | **Get** /v1beta1/projects | Lists projects. + + +# **ProjectsCreateProject** +> ProjectProject ProjectsCreateProject(ctx, body) +Creates a new project. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**ProjectProject**](ProjectProject.md)| The project to create. | + +### Return type + +[**ProjectProject**](projectProject.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ProjectsDeleteProject** +> interface{} ProjectsDeleteProject(ctx, name) +Deletes the specified project. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **name** | **string**| The name of the project in the form of `projects/{PROJECT_ID}`. | + +### Return type + +[**interface{}**](interface{}.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ProjectsGetProject** +> ProjectProject ProjectsGetProject(ctx, name) +Gets the specified project. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **name** | **string**| The name of the project in the form of `projects/{PROJECT_ID}`. | + +### Return type + +[**ProjectProject**](projectProject.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ProjectsListProjects** +> ProjectListProjectsResponse ProjectsListProjects(ctx, optional) +Lists projects. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ProjectsListProjectsOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a ProjectsListProjectsOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filter** | **optional.String**| The filter expression. | + **pageSize** | **optional.Int32**| Number of projects to return in the list. | + **pageToken** | **optional.String**| Token to provide to skip to a particular spot in the list. | + +### Return type + +[**ProjectListProjectsResponse**](projectListProjectsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/project/docs/ProtobufAny.md b/project/docs/ProtobufAny.md new file mode 100644 index 0000000..029c2d3 --- /dev/null +++ b/project/docs/ProtobufAny.md @@ -0,0 +1,10 @@ +# ProtobufAny + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type_** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/project/docs/RpcStatus.md b/project/docs/RpcStatus.md new file mode 100644 index 0000000..04bc70e --- /dev/null +++ b/project/docs/RpcStatus.md @@ -0,0 +1,12 @@ +# RpcStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **int32** | | [optional] [default to null] +**Message** | **string** | | [optional] [default to null] +**Details** | [**[]ProtobufAny**](protobufAny.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/project/git_push.sh b/project/git_push.sh new file mode 100644 index 0000000..ae01b18 --- /dev/null +++ b/project/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/project/model_project_list_projects_response.go b/project/model_project_list_projects_response.go new file mode 100644 index 0000000..9d54801 --- /dev/null +++ b/project/model_project_list_projects_response.go @@ -0,0 +1,18 @@ +/* + * project.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// Response for listing projects. +type ProjectListProjectsResponse struct { + // The projects requested. + Projects []ProjectProject `json:"projects,omitempty"` + // The next pagination token in the list response. It should be used as `page_token` for the following request. An empty value means no more results. + NextPageToken string `json:"nextPageToken,omitempty"` +} diff --git a/project/model_project_project.go b/project/model_project_project.go new file mode 100644 index 0000000..501034a --- /dev/null +++ b/project/model_project_project.go @@ -0,0 +1,16 @@ +/* + * project.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +// Describes a Grafeas project. +type ProjectProject struct { + // The name of the project in the form of `projects/{PROJECT_ID}`. + Name string `json:"name,omitempty"` +} diff --git a/project/model_protobuf_any.go b/project/model_protobuf_any.go new file mode 100644 index 0000000..79804e3 --- /dev/null +++ b/project/model_protobuf_any.go @@ -0,0 +1,14 @@ +/* + * project.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type ProtobufAny struct { + Type_ string `json:"@type,omitempty"` +} diff --git a/project/model_rpc_status.go b/project/model_rpc_status.go new file mode 100644 index 0000000..128ab76 --- /dev/null +++ b/project/model_rpc_status.go @@ -0,0 +1,16 @@ +/* + * project.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +type RpcStatus struct { + Code int32 `json:"code,omitempty"` + Message string `json:"message,omitempty"` + Details []ProtobufAny `json:"details,omitempty"` +} diff --git a/project/response.go b/project/response.go new file mode 100644 index 0000000..d70f27a --- /dev/null +++ b/project/response.go @@ -0,0 +1,43 @@ +/* + * project.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package grafeas + +import ( + "net/http" +) + +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the swagger operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} From ccac2b60fb035d89470d8a337a11f311889b2871 Mon Sep 17 00:00:00 2001 From: Ethan Anderson Date: Tue, 28 Feb 2023 12:36:40 -0600 Subject: [PATCH 2/3] Add blurb on breaking changes with Semantic Import Versioning --- README.md | 4 ++++ config.go.json | 1 + 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index d1e594a..5f65437 100644 --- a/README.md +++ b/README.md @@ -34,3 +34,7 @@ running: ```bash java -jar swagger-codegen-cli.jar config.go.json -l go ``` + +### Introducing a breaking change + +When introducing a breaking change v2, follow Semantic Import Versioning https://research.swtch.com/vgo-import and append the /v2 to the module path. \ No newline at end of file diff --git a/config.go.json b/config.go.json index c602db6..012b82b 100644 --- a/config.go.json +++ b/config.go.json @@ -1,3 +1,4 @@ { + "packageVersion": "1.0.0", "packageName":"grafeas" } From cc15d2a7fb09f435126f915200373dc63692413d Mon Sep 17 00:00:00 2001 From: Ethan Anderson Date: Wed, 1 Mar 2023 14:32:38 -0600 Subject: [PATCH 3/3] regenerate with 2.4.18 and manually update broken number const --- generate/main.go | 2 +- grafeas/.swagger-codegen/VERSION | 2 +- grafeas/api/swagger.yaml | 30 ++--- grafeas/api_grafeas_v1_beta1.go | 128 ++++++++------------ grafeas/client.go | 18 ++- grafeas/docs/GrafeasV1Beta1Api.md | 24 ++-- grafeas/model_vulnerability_cvss_version.go | 5 +- project/.swagger-codegen/VERSION | 2 +- project/api/swagger.yaml | 8 +- project/api_projects.go | 32 ++--- project/client.go | 18 ++- project/docs/ProjectsApi.md | 4 +- 12 files changed, 130 insertions(+), 143 deletions(-) diff --git a/generate/main.go b/generate/main.go index 003bcbb..5736b9e 100644 --- a/generate/main.go +++ b/generate/main.go @@ -25,7 +25,7 @@ var Reference = "master" var APIVersion = "v1beta1" // SwaggerCodegenVersion : the version of the Swagger CodeGen CLI to download -var SwaggerCodegenVersion = "2.4.5" +var SwaggerCodegenVersion = "2.4.18" // trimVersionTag : remove the "v" prefix from the version tag string func trimVersionTag(tag string) string { diff --git a/grafeas/.swagger-codegen/VERSION b/grafeas/.swagger-codegen/VERSION index 26f8b8b..6381ae0 100644 --- a/grafeas/.swagger-codegen/VERSION +++ b/grafeas/.swagger-codegen/VERSION @@ -1 +1 @@ -2.4.5 \ No newline at end of file +2.4.18 \ No newline at end of file diff --git a/grafeas/api/swagger.yaml b/grafeas/api/swagger.yaml index 69b98a1..bc76691 100644 --- a/grafeas/api/swagger.yaml +++ b/grafeas/api/swagger.yaml @@ -25,7 +25,7 @@ paths: pattern: "projects/[^/]+/notes/[^/]+" x-exportParamName: "Name1" responses: - 200: + "200": description: "A successful response." schema: $ref: "#/definitions/v1beta1Note" @@ -47,7 +47,7 @@ paths: pattern: "projects/[^/]+/notes/[^/]+" x-exportParamName: "Name1" responses: - 200: + "200": description: "A successful response." schema: {} default: @@ -82,7 +82,7 @@ paths: x-exportParamName: "UpdateMask" x-optionalDataType: "String" responses: - 200: + "200": description: "A successful response." schema: $ref: "#/definitions/v1beta1Note" @@ -105,7 +105,7 @@ paths: pattern: "projects/[^/]+/occurrences/[^/]+" x-exportParamName: "Name" responses: - 200: + "200": description: "A successful response." schema: $ref: "#/definitions/v1beta1Occurrence" @@ -129,7 +129,7 @@ paths: pattern: "projects/[^/]+/occurrences/[^/]+" x-exportParamName: "Name" responses: - 200: + "200": description: "A successful response." schema: {} default: @@ -164,7 +164,7 @@ paths: x-exportParamName: "UpdateMask" x-optionalDataType: "String" responses: - 200: + "200": description: "A successful response." schema: $ref: "#/definitions/v1beta1Occurrence" @@ -188,7 +188,7 @@ paths: pattern: "projects/[^/]+/occurrences/[^/]+" x-exportParamName: "Name" responses: - 200: + "200": description: "A successful response." schema: $ref: "#/definitions/v1beta1Note" @@ -236,7 +236,7 @@ paths: x-exportParamName: "PageToken" x-optionalDataType: "String" responses: - 200: + "200": description: "A successful response." schema: $ref: "#/definitions/v1beta1ListNoteOccurrencesResponse" @@ -282,7 +282,7 @@ paths: x-exportParamName: "PageToken" x-optionalDataType: "String" responses: - 200: + "200": description: "A successful response." schema: $ref: "#/definitions/v1beta1ListNotesResponse" @@ -318,7 +318,7 @@ paths: type: "string" x-exportParamName: "NoteId" responses: - 200: + "200": description: "A successful response." schema: $ref: "#/definitions/v1beta1Note" @@ -348,7 +348,7 @@ paths: $ref: "#/definitions/body" x-exportParamName: "Body" responses: - 200: + "200": description: "A successful response." schema: $ref: "#/definitions/v1beta1BatchCreateNotesResponse" @@ -396,7 +396,7 @@ paths: x-exportParamName: "PageToken" x-optionalDataType: "String" responses: - 200: + "200": description: "A successful response." schema: $ref: "#/definitions/v1beta1ListOccurrencesResponse" @@ -426,7 +426,7 @@ paths: $ref: "#/definitions/v1beta1Occurrence" x-exportParamName: "Body" responses: - 200: + "200": description: "A successful response." schema: $ref: "#/definitions/v1beta1Occurrence" @@ -456,7 +456,7 @@ paths: $ref: "#/definitions/body_1" x-exportParamName: "Body" responses: - 200: + "200": description: "A successful response." schema: $ref: "#/definitions/v1beta1BatchCreateOccurrencesResponse" @@ -487,7 +487,7 @@ paths: x-exportParamName: "Filter" x-optionalDataType: "String" responses: - 200: + "200": description: "A successful response." schema: $ref: "#/definitions/v1beta1VulnerabilityOccurrencesSummary" diff --git a/grafeas/api_grafeas_v1_beta1.go b/grafeas/api_grafeas_v1_beta1.go index ee69aae..83ff2c7 100644 --- a/grafeas/api_grafeas_v1_beta1.go +++ b/grafeas/api_grafeas_v1_beta1.go @@ -1,3 +1,4 @@ + /* * grafeas.proto * @@ -26,7 +27,7 @@ var ( type GrafeasV1Beta1ApiService service -/* +/* GrafeasV1Beta1ApiService Creates new notes in batch. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the notes are to be created. @@ -89,9 +90,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1BatchCreateNotes(ctx context.Co if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } + return localVarReturnValue, localVarHttpResponse, err } if localVarHttpResponse.StatusCode >= 300 { @@ -128,7 +127,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1BatchCreateNotes(ctx context.Co return localVarReturnValue, localVarHttpResponse, nil } -/* +/* GrafeasV1Beta1ApiService Creates new occurrences in batch. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the occurrences are to be created. @@ -191,9 +190,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1BatchCreateOccurrences(ctx cont if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } + return localVarReturnValue, localVarHttpResponse, err } if localVarHttpResponse.StatusCode >= 300 { @@ -230,7 +227,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1BatchCreateOccurrences(ctx cont return localVarReturnValue, localVarHttpResponse, nil } -/* +/* GrafeasV1Beta1ApiService Creates a new note. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the note is to be created. @@ -295,9 +292,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1CreateNote(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } + return localVarReturnValue, localVarHttpResponse, err } if localVarHttpResponse.StatusCode >= 300 { @@ -334,7 +329,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1CreateNote(ctx context.Context, return localVarReturnValue, localVarHttpResponse, nil } -/* +/* GrafeasV1Beta1ApiService Creates a new occurrence. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the occurrence is to be created. @@ -397,9 +392,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1CreateOccurrence(ctx context.Co if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } + return localVarReturnValue, localVarHttpResponse, err } if localVarHttpResponse.StatusCode >= 300 { @@ -436,7 +429,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1CreateOccurrence(ctx context.Co return localVarReturnValue, localVarHttpResponse, nil } -/* +/* GrafeasV1Beta1ApiService Deletes the specified note. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param name1 The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. @@ -496,9 +489,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1DeleteNote(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } + return localVarReturnValue, localVarHttpResponse, err } if localVarHttpResponse.StatusCode >= 300 { @@ -535,7 +526,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1DeleteNote(ctx context.Context, return localVarReturnValue, localVarHttpResponse, nil } -/* +/* GrafeasV1Beta1ApiService Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param name The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. @@ -595,9 +586,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1DeleteOccurrence(ctx context.Co if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } + return localVarReturnValue, localVarHttpResponse, err } if localVarHttpResponse.StatusCode >= 300 { @@ -634,7 +623,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1DeleteOccurrence(ctx context.Co return localVarReturnValue, localVarHttpResponse, nil } -/* +/* GrafeasV1Beta1ApiService Gets the specified note. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param name1 The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. @@ -694,9 +683,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1GetNote(ctx context.Context, na if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } + return localVarReturnValue, localVarHttpResponse, err } if localVarHttpResponse.StatusCode >= 300 { @@ -733,7 +720,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1GetNote(ctx context.Context, na return localVarReturnValue, localVarHttpResponse, nil } -/* +/* GrafeasV1Beta1ApiService Gets the specified occurrence. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param name The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. @@ -793,9 +780,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1GetOccurrence(ctx context.Conte if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } + return localVarReturnValue, localVarHttpResponse, err } if localVarHttpResponse.StatusCode >= 300 { @@ -832,7 +817,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1GetOccurrence(ctx context.Conte return localVarReturnValue, localVarHttpResponse, nil } -/* +/* GrafeasV1Beta1ApiService Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param name The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. @@ -892,9 +877,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1GetOccurrenceNote(ctx context.C if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } + return localVarReturnValue, localVarHttpResponse, err } if localVarHttpResponse.StatusCode >= 300 { @@ -931,21 +914,21 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1GetOccurrenceNote(ctx context.C return localVarReturnValue, localVarHttpResponse, nil } -/* +/* GrafeasV1Beta1ApiService Gets a summary of the number and severity of occurrences. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param parent The name of the project to get a vulnerability summary for in the form of `projects/[PROJECT_ID]`. - * @param optional nil or *GrafeasV1Beta1GetVulnerabilityOccurrencesSummaryOpts - Optional Parameters: + * @param optional nil or *GrafeasV1Beta1ApiGrafeasV1Beta1GetVulnerabilityOccurrencesSummaryOpts - Optional Parameters: * @param "Filter" (optional.String) - The filter expression. @return V1beta1VulnerabilityOccurrencesSummary */ -type GrafeasV1Beta1GetVulnerabilityOccurrencesSummaryOpts struct { +type GrafeasV1Beta1ApiGrafeasV1Beta1GetVulnerabilityOccurrencesSummaryOpts struct { Filter optional.String } -func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1GetVulnerabilityOccurrencesSummary(ctx context.Context, parent string, localVarOptionals *GrafeasV1Beta1GetVulnerabilityOccurrencesSummaryOpts) (V1beta1VulnerabilityOccurrencesSummary, *http.Response, error) { +func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1GetVulnerabilityOccurrencesSummary(ctx context.Context, parent string, localVarOptionals *GrafeasV1Beta1ApiGrafeasV1Beta1GetVulnerabilityOccurrencesSummaryOpts) (V1beta1VulnerabilityOccurrencesSummary, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -1001,9 +984,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1GetVulnerabilityOccurrencesSumm if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } + return localVarReturnValue, localVarHttpResponse, err } if localVarHttpResponse.StatusCode >= 300 { @@ -1040,11 +1021,11 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1GetVulnerabilityOccurrencesSumm return localVarReturnValue, localVarHttpResponse, nil } -/* +/* GrafeasV1Beta1ApiService Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param name The name of the note to list occurrences for in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @param optional nil or *GrafeasV1Beta1ListNoteOccurrencesOpts - Optional Parameters: + * @param optional nil or *GrafeasV1Beta1ApiGrafeasV1Beta1ListNoteOccurrencesOpts - Optional Parameters: * @param "Filter" (optional.String) - The filter expression. * @param "PageSize" (optional.Int32) - Number of occurrences to return in the list. * @param "PageToken" (optional.String) - Token to provide to skip to a particular spot in the list. @@ -1052,13 +1033,13 @@ GrafeasV1Beta1ApiService Lists occurrences referencing the specified note. Provi @return V1beta1ListNoteOccurrencesResponse */ -type GrafeasV1Beta1ListNoteOccurrencesOpts struct { +type GrafeasV1Beta1ApiGrafeasV1Beta1ListNoteOccurrencesOpts struct { Filter optional.String PageSize optional.Int32 PageToken optional.String } -func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1ListNoteOccurrences(ctx context.Context, name string, localVarOptionals *GrafeasV1Beta1ListNoteOccurrencesOpts) (V1beta1ListNoteOccurrencesResponse, *http.Response, error) { +func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1ListNoteOccurrences(ctx context.Context, name string, localVarOptionals *GrafeasV1Beta1ApiGrafeasV1Beta1ListNoteOccurrencesOpts) (V1beta1ListNoteOccurrencesResponse, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -1120,9 +1101,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1ListNoteOccurrences(ctx context if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } + return localVarReturnValue, localVarHttpResponse, err } if localVarHttpResponse.StatusCode >= 300 { @@ -1159,11 +1138,11 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1ListNoteOccurrences(ctx context return localVarReturnValue, localVarHttpResponse, nil } -/* +/* GrafeasV1Beta1ApiService Lists notes for the specified project. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param parent The name of the project to list notes for in the form of `projects/[PROJECT_ID]`. - * @param optional nil or *GrafeasV1Beta1ListNotesOpts - Optional Parameters: + * @param optional nil or *GrafeasV1Beta1ApiGrafeasV1Beta1ListNotesOpts - Optional Parameters: * @param "Filter" (optional.String) - The filter expression. * @param "PageSize" (optional.Int32) - Number of notes to return in the list. Must be positive. Max allowed page size is 1000. If not specified, page size defaults to 20. * @param "PageToken" (optional.String) - Token to provide to skip to a particular spot in the list. @@ -1171,13 +1150,13 @@ GrafeasV1Beta1ApiService Lists notes for the specified project. @return V1beta1ListNotesResponse */ -type GrafeasV1Beta1ListNotesOpts struct { +type GrafeasV1Beta1ApiGrafeasV1Beta1ListNotesOpts struct { Filter optional.String PageSize optional.Int32 PageToken optional.String } -func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1ListNotes(ctx context.Context, parent string, localVarOptionals *GrafeasV1Beta1ListNotesOpts) (V1beta1ListNotesResponse, *http.Response, error) { +func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1ListNotes(ctx context.Context, parent string, localVarOptionals *GrafeasV1Beta1ApiGrafeasV1Beta1ListNotesOpts) (V1beta1ListNotesResponse, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -1239,9 +1218,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1ListNotes(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } + return localVarReturnValue, localVarHttpResponse, err } if localVarHttpResponse.StatusCode >= 300 { @@ -1278,11 +1255,11 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1ListNotes(ctx context.Context, return localVarReturnValue, localVarHttpResponse, nil } -/* +/* GrafeasV1Beta1ApiService Lists occurrences for the specified project. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param parent The name of the project to list occurrences for in the form of `projects/[PROJECT_ID]`. - * @param optional nil or *GrafeasV1Beta1ListOccurrencesOpts - Optional Parameters: + * @param optional nil or *GrafeasV1Beta1ApiGrafeasV1Beta1ListOccurrencesOpts - Optional Parameters: * @param "Filter" (optional.String) - The filter expression. * @param "PageSize" (optional.Int32) - Number of occurrences to return in the list. Must be positive. Max allowed page size is 1000. If not specified, page size defaults to 20. * @param "PageToken" (optional.String) - Token to provide to skip to a particular spot in the list. @@ -1290,13 +1267,13 @@ GrafeasV1Beta1ApiService Lists occurrences for the specified project. @return V1beta1ListOccurrencesResponse */ -type GrafeasV1Beta1ListOccurrencesOpts struct { +type GrafeasV1Beta1ApiGrafeasV1Beta1ListOccurrencesOpts struct { Filter optional.String PageSize optional.Int32 PageToken optional.String } -func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1ListOccurrences(ctx context.Context, parent string, localVarOptionals *GrafeasV1Beta1ListOccurrencesOpts) (V1beta1ListOccurrencesResponse, *http.Response, error) { +func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1ListOccurrences(ctx context.Context, parent string, localVarOptionals *GrafeasV1Beta1ApiGrafeasV1Beta1ListOccurrencesOpts) (V1beta1ListOccurrencesResponse, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -1358,9 +1335,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1ListOccurrences(ctx context.Con if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } + return localVarReturnValue, localVarHttpResponse, err } if localVarHttpResponse.StatusCode >= 300 { @@ -1397,22 +1372,22 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1ListOccurrences(ctx context.Con return localVarReturnValue, localVarHttpResponse, nil } -/* +/* GrafeasV1Beta1ApiService Updates the specified note. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param name1 The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * @param body The updated note. - * @param optional nil or *GrafeasV1Beta1UpdateNoteOpts - Optional Parameters: + * @param optional nil or *GrafeasV1Beta1ApiGrafeasV1Beta1UpdateNoteOpts - Optional Parameters: * @param "UpdateMask" (optional.String) - The fields to update. @return V1beta1Note */ -type GrafeasV1Beta1UpdateNoteOpts struct { +type GrafeasV1Beta1ApiGrafeasV1Beta1UpdateNoteOpts struct { UpdateMask optional.String } -func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1UpdateNote(ctx context.Context, name1 string, body V1beta1Note, localVarOptionals *GrafeasV1Beta1UpdateNoteOpts) (V1beta1Note, *http.Response, error) { +func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1UpdateNote(ctx context.Context, name1 string, body V1beta1Note, localVarOptionals *GrafeasV1Beta1ApiGrafeasV1Beta1UpdateNoteOpts) (V1beta1Note, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Patch") localVarPostBody interface{} @@ -1470,9 +1445,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1UpdateNote(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } + return localVarReturnValue, localVarHttpResponse, err } if localVarHttpResponse.StatusCode >= 300 { @@ -1509,22 +1482,22 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1UpdateNote(ctx context.Context, return localVarReturnValue, localVarHttpResponse, nil } -/* +/* GrafeasV1Beta1ApiService Updates the specified occurrence. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param name The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * @param body The updated occurrence. - * @param optional nil or *GrafeasV1Beta1UpdateOccurrenceOpts - Optional Parameters: + * @param optional nil or *GrafeasV1Beta1ApiGrafeasV1Beta1UpdateOccurrenceOpts - Optional Parameters: * @param "UpdateMask" (optional.String) - The fields to update. @return V1beta1Occurrence */ -type GrafeasV1Beta1UpdateOccurrenceOpts struct { +type GrafeasV1Beta1ApiGrafeasV1Beta1UpdateOccurrenceOpts struct { UpdateMask optional.String } -func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1UpdateOccurrence(ctx context.Context, name string, body V1beta1Occurrence, localVarOptionals *GrafeasV1Beta1UpdateOccurrenceOpts) (V1beta1Occurrence, *http.Response, error) { +func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1UpdateOccurrence(ctx context.Context, name string, body V1beta1Occurrence, localVarOptionals *GrafeasV1Beta1ApiGrafeasV1Beta1UpdateOccurrenceOpts) (V1beta1Occurrence, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Patch") localVarPostBody interface{} @@ -1582,9 +1555,7 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1UpdateOccurrence(ctx context.Co if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } + return localVarReturnValue, localVarHttpResponse, err } if localVarHttpResponse.StatusCode >= 300 { @@ -1620,3 +1591,4 @@ func (a *GrafeasV1Beta1ApiService) GrafeasV1Beta1UpdateOccurrence(ctx context.Co return localVarReturnValue, localVarHttpResponse, nil } + diff --git a/grafeas/client.go b/grafeas/client.go index fa81d90..952e12a 100644 --- a/grafeas/client.go +++ b/grafeas/client.go @@ -33,8 +33,8 @@ import ( ) var ( - jsonCheck = regexp.MustCompile("(?i:[application|text]/json)") - xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)") + jsonCheck = regexp.MustCompile("(?i:(?:application|text)/json)") + xmlCheck = regexp.MustCompile("(?i:(?:application|text)/xml)") ) // APIClient manages communication with the grafeas.proto API vversion not set @@ -181,7 +181,7 @@ func (c *APIClient) prepareRequest( } // add form parameters and file if available. - if len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { if body != nil { return nil, errors.New("Cannot specify postBody and multipart form at the same time.") } @@ -220,6 +220,16 @@ func (c *APIClient) prepareRequest( w.Close() } + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + // Setup path and query parameters url, err := url.Parse(path) if err != nil { @@ -461,4 +471,4 @@ func (e GenericSwaggerError) Body() []byte { // Model returns the unpacked model of the error func (e GenericSwaggerError) Model() interface{} { return e.model -} \ No newline at end of file +} diff --git a/grafeas/docs/GrafeasV1Beta1Api.md b/grafeas/docs/GrafeasV1Beta1Api.md index 19a1fa5..eed9409 100644 --- a/grafeas/docs/GrafeasV1Beta1Api.md +++ b/grafeas/docs/GrafeasV1Beta1Api.md @@ -270,10 +270,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **parent** | **string**| The name of the project to get a vulnerability summary for in the form of `projects/[PROJECT_ID]`. | - **optional** | ***GrafeasV1Beta1GetVulnerabilityOccurrencesSummaryOpts** | optional parameters | nil if no parameters + **optional** | ***GrafeasV1Beta1ApiGrafeasV1Beta1GetVulnerabilityOccurrencesSummaryOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a GrafeasV1Beta1GetVulnerabilityOccurrencesSummaryOpts struct +Optional parameters are passed through a pointer to a GrafeasV1Beta1ApiGrafeasV1Beta1GetVulnerabilityOccurrencesSummaryOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -305,10 +305,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **name** | **string**| The name of the note to list occurrences for in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. | - **optional** | ***GrafeasV1Beta1ListNoteOccurrencesOpts** | optional parameters | nil if no parameters + **optional** | ***GrafeasV1Beta1ApiGrafeasV1Beta1ListNoteOccurrencesOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a GrafeasV1Beta1ListNoteOccurrencesOpts struct +Optional parameters are passed through a pointer to a GrafeasV1Beta1ApiGrafeasV1Beta1ListNoteOccurrencesOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -342,10 +342,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **parent** | **string**| The name of the project to list notes for in the form of `projects/[PROJECT_ID]`. | - **optional** | ***GrafeasV1Beta1ListNotesOpts** | optional parameters | nil if no parameters + **optional** | ***GrafeasV1Beta1ApiGrafeasV1Beta1ListNotesOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a GrafeasV1Beta1ListNotesOpts struct +Optional parameters are passed through a pointer to a GrafeasV1Beta1ApiGrafeasV1Beta1ListNotesOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -379,10 +379,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **parent** | **string**| The name of the project to list occurrences for in the form of `projects/[PROJECT_ID]`. | - **optional** | ***GrafeasV1Beta1ListOccurrencesOpts** | optional parameters | nil if no parameters + **optional** | ***GrafeasV1Beta1ApiGrafeasV1Beta1ListOccurrencesOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a GrafeasV1Beta1ListOccurrencesOpts struct +Optional parameters are passed through a pointer to a GrafeasV1Beta1ApiGrafeasV1Beta1ListOccurrencesOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -417,10 +417,10 @@ Name | Type | Description | Notes **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **name1** | **string**| The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. | **body** | [**V1beta1Note**](V1beta1Note.md)| The updated note. | - **optional** | ***GrafeasV1Beta1UpdateNoteOpts** | optional parameters | nil if no parameters + **optional** | ***GrafeasV1Beta1ApiGrafeasV1Beta1UpdateNoteOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a GrafeasV1Beta1UpdateNoteOpts struct +Optional parameters are passed through a pointer to a GrafeasV1Beta1ApiGrafeasV1Beta1UpdateNoteOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -454,10 +454,10 @@ Name | Type | Description | Notes **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **name** | **string**| The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. | **body** | [**V1beta1Occurrence**](V1beta1Occurrence.md)| The updated occurrence. | - **optional** | ***GrafeasV1Beta1UpdateOccurrenceOpts** | optional parameters | nil if no parameters + **optional** | ***GrafeasV1Beta1ApiGrafeasV1Beta1UpdateOccurrenceOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a GrafeasV1Beta1UpdateOccurrenceOpts struct +Optional parameters are passed through a pointer to a GrafeasV1Beta1ApiGrafeasV1Beta1UpdateOccurrenceOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- diff --git a/grafeas/model_vulnerability_cvss_version.go b/grafeas/model_vulnerability_cvss_version.go index 1e918fb..b527e28 100644 --- a/grafeas/model_vulnerability_cvss_version.go +++ b/grafeas/model_vulnerability_cvss_version.go @@ -8,12 +8,13 @@ */ package grafeas + // VulnerabilityCvssVersion : CVSS Version. type VulnerabilityCvssVersion string // List of vulnerabilityCVSSVersion const ( UNSPECIFIED_VulnerabilityCvssVersion VulnerabilityCvssVersion = "CVSS_VERSION_UNSPECIFIED" - 2__VulnerabilityCvssVersion VulnerabilityCvssVersion = "CVSS_VERSION_2" - 3__VulnerabilityCvssVersion VulnerabilityCvssVersion = "CVSS_VERSION_3" + _2_VulnerabilityCvssVersion VulnerabilityCvssVersion = "CVSS_VERSION_2" + _3_VulnerabilityCvssVersion VulnerabilityCvssVersion = "CVSS_VERSION_3" ) diff --git a/project/.swagger-codegen/VERSION b/project/.swagger-codegen/VERSION index 26f8b8b..6381ae0 100644 --- a/project/.swagger-codegen/VERSION +++ b/project/.swagger-codegen/VERSION @@ -1 +1 @@ -2.4.5 \ No newline at end of file +2.4.18 \ No newline at end of file diff --git a/project/api/swagger.yaml b/project/api/swagger.yaml index f613032..bf8fe72 100644 --- a/project/api/swagger.yaml +++ b/project/api/swagger.yaml @@ -40,7 +40,7 @@ paths: x-exportParamName: "PageToken" x-optionalDataType: "String" responses: - 200: + "200": description: "A successful response." schema: $ref: "#/definitions/projectListProjectsResponse" @@ -62,7 +62,7 @@ paths: $ref: "#/definitions/projectProject" x-exportParamName: "Body" responses: - 200: + "200": description: "A successful response." schema: $ref: "#/definitions/projectProject" @@ -85,7 +85,7 @@ paths: pattern: "projects/[^/]+" x-exportParamName: "Name" responses: - 200: + "200": description: "A successful response." schema: $ref: "#/definitions/projectProject" @@ -107,7 +107,7 @@ paths: pattern: "projects/[^/]+" x-exportParamName: "Name" responses: - 200: + "200": description: "A successful response." schema: {} default: diff --git a/project/api_projects.go b/project/api_projects.go index 0548f53..491ffb5 100644 --- a/project/api_projects.go +++ b/project/api_projects.go @@ -1,3 +1,4 @@ + /* * project.proto * @@ -26,7 +27,7 @@ var ( type ProjectsApiService service -/* +/* ProjectsApiService Creates a new project. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param body The project to create. @@ -87,9 +88,7 @@ func (a *ProjectsApiService) ProjectsCreateProject(ctx context.Context, body Pro if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } + return localVarReturnValue, localVarHttpResponse, err } if localVarHttpResponse.StatusCode >= 300 { @@ -126,7 +125,7 @@ func (a *ProjectsApiService) ProjectsCreateProject(ctx context.Context, body Pro return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ProjectsApiService Deletes the specified project. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param name The name of the project in the form of `projects/{PROJECT_ID}`. @@ -186,9 +185,7 @@ func (a *ProjectsApiService) ProjectsDeleteProject(ctx context.Context, name str if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } + return localVarReturnValue, localVarHttpResponse, err } if localVarHttpResponse.StatusCode >= 300 { @@ -225,7 +222,7 @@ func (a *ProjectsApiService) ProjectsDeleteProject(ctx context.Context, name str return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ProjectsApiService Gets the specified project. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param name The name of the project in the form of `projects/{PROJECT_ID}`. @@ -285,9 +282,7 @@ func (a *ProjectsApiService) ProjectsGetProject(ctx context.Context, name string if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } + return localVarReturnValue, localVarHttpResponse, err } if localVarHttpResponse.StatusCode >= 300 { @@ -324,10 +319,10 @@ func (a *ProjectsApiService) ProjectsGetProject(ctx context.Context, name string return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ProjectsApiService Lists projects. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *ProjectsListProjectsOpts - Optional Parameters: + * @param optional nil or *ProjectsApiProjectsListProjectsOpts - Optional Parameters: * @param "Filter" (optional.String) - The filter expression. * @param "PageSize" (optional.Int32) - Number of projects to return in the list. * @param "PageToken" (optional.String) - Token to provide to skip to a particular spot in the list. @@ -335,13 +330,13 @@ ProjectsApiService Lists projects. @return ProjectListProjectsResponse */ -type ProjectsListProjectsOpts struct { +type ProjectsApiProjectsListProjectsOpts struct { Filter optional.String PageSize optional.Int32 PageToken optional.String } -func (a *ProjectsApiService) ProjectsListProjects(ctx context.Context, localVarOptionals *ProjectsListProjectsOpts) (ProjectListProjectsResponse, *http.Response, error) { +func (a *ProjectsApiService) ProjectsListProjects(ctx context.Context, localVarOptionals *ProjectsApiProjectsListProjectsOpts) (ProjectListProjectsResponse, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -402,9 +397,7 @@ func (a *ProjectsApiService) ProjectsListProjects(ctx context.Context, localVarO if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } + return localVarReturnValue, localVarHttpResponse, err } if localVarHttpResponse.StatusCode >= 300 { @@ -440,3 +433,4 @@ func (a *ProjectsApiService) ProjectsListProjects(ctx context.Context, localVarO return localVarReturnValue, localVarHttpResponse, nil } + diff --git a/project/client.go b/project/client.go index 255124f..dc43efc 100644 --- a/project/client.go +++ b/project/client.go @@ -33,8 +33,8 @@ import ( ) var ( - jsonCheck = regexp.MustCompile("(?i:[application|text]/json)") - xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)") + jsonCheck = regexp.MustCompile("(?i:(?:application|text)/json)") + xmlCheck = regexp.MustCompile("(?i:(?:application|text)/xml)") ) // APIClient manages communication with the project.proto API vversion not set @@ -181,7 +181,7 @@ func (c *APIClient) prepareRequest( } // add form parameters and file if available. - if len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { if body != nil { return nil, errors.New("Cannot specify postBody and multipart form at the same time.") } @@ -220,6 +220,16 @@ func (c *APIClient) prepareRequest( w.Close() } + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + // Setup path and query parameters url, err := url.Parse(path) if err != nil { @@ -461,4 +471,4 @@ func (e GenericSwaggerError) Body() []byte { // Model returns the unpacked model of the error func (e GenericSwaggerError) Model() interface{} { return e.model -} \ No newline at end of file +} diff --git a/project/docs/ProjectsApi.md b/project/docs/ProjectsApi.md index b8cf7d7..09f7318 100644 --- a/project/docs/ProjectsApi.md +++ b/project/docs/ProjectsApi.md @@ -97,10 +97,10 @@ Lists projects. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***ProjectsListProjectsOpts** | optional parameters | nil if no parameters + **optional** | ***ProjectsApiProjectsListProjectsOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a ProjectsListProjectsOpts struct +Optional parameters are passed through a pointer to a ProjectsApiProjectsListProjectsOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------