Skip to main content
Glama

On-Demand Scanning API MCP Server

models.py57.8 kB
# generated by fastapi-codegen: # filename: openapi.yaml # timestamp: 2025-06-29T02:33:51+00:00 from __future__ import annotations from enum import Enum from typing import Any, Dict, List, Optional from pydantic import BaseModel, Field class Kind(Enum): KIND_UNSPECIFIED = 'KIND_UNSPECIFIED' FIXED = 'FIXED' MOVABLE = 'MOVABLE' OTHER = 'OTHER' class AliasContext(BaseModel): kind: Optional[Kind] = Field(None, description='The alias kind.') name: Optional[str] = Field(None, description='The alias name.') class AnalysisCompleted(BaseModel): analysisType: Optional[List[str]] = None class AnalyzePackagesMetadata(BaseModel): createTime: Optional[str] = Field(None, description='When the scan was created.') resourceUri: Optional[str] = Field( None, description='The resource URI of the container image being scanned.' ) class AnalyzePackagesMetadataV1(BaseModel): createTime: Optional[str] = Field(None, description='When the scan was created.') resourceUri: Optional[str] = Field( None, description='The resource URI of the container image being scanned.' ) class AnalyzePackagesResponse(BaseModel): scan: Optional[str] = Field( None, description='The name of the scan resource created by this successful scan.', ) class AnalyzePackagesResponseV1(BaseModel): scan: Optional[str] = Field( None, description='The name of the scan resource created by this successful scan.', ) class Artifact(BaseModel): checksum: Optional[str] = Field( None, description='Hash or checksum value of a binary, or Docker Registry 2.0 digest of a container.', ) id: Optional[str] = Field( None, description='Artifact ID, if any; for container images, this will be a URL by digest like `gcr.io/projectID/imagename@sha256:123456`.', ) names: Optional[List[str]] = Field( None, description='Related artifact names. This may be the path to a binary or jar file, or in the case of a container build, the name used to push the container image to Google Container Registry, as presented to `docker push`. Note that a single Artifact ID can have multiple names, for example if two tags are applied to one image.', ) class Binary(BaseModel): name: Optional[str] = None version: Optional[str] = None class BuilderConfig(BaseModel): id: Optional[str] = None class AttackComplexity(Enum): ATTACK_COMPLEXITY_UNSPECIFIED = 'ATTACK_COMPLEXITY_UNSPECIFIED' ATTACK_COMPLEXITY_LOW = 'ATTACK_COMPLEXITY_LOW' ATTACK_COMPLEXITY_HIGH = 'ATTACK_COMPLEXITY_HIGH' ATTACK_COMPLEXITY_MEDIUM = 'ATTACK_COMPLEXITY_MEDIUM' class AttackVector(Enum): ATTACK_VECTOR_UNSPECIFIED = 'ATTACK_VECTOR_UNSPECIFIED' ATTACK_VECTOR_NETWORK = 'ATTACK_VECTOR_NETWORK' ATTACK_VECTOR_ADJACENT = 'ATTACK_VECTOR_ADJACENT' ATTACK_VECTOR_LOCAL = 'ATTACK_VECTOR_LOCAL' ATTACK_VECTOR_PHYSICAL = 'ATTACK_VECTOR_PHYSICAL' class Authentication(Enum): AUTHENTICATION_UNSPECIFIED = 'AUTHENTICATION_UNSPECIFIED' AUTHENTICATION_MULTIPLE = 'AUTHENTICATION_MULTIPLE' AUTHENTICATION_SINGLE = 'AUTHENTICATION_SINGLE' AUTHENTICATION_NONE = 'AUTHENTICATION_NONE' class AvailabilityImpact(Enum): IMPACT_UNSPECIFIED = 'IMPACT_UNSPECIFIED' IMPACT_HIGH = 'IMPACT_HIGH' IMPACT_LOW = 'IMPACT_LOW' IMPACT_NONE = 'IMPACT_NONE' IMPACT_PARTIAL = 'IMPACT_PARTIAL' IMPACT_COMPLETE = 'IMPACT_COMPLETE' class ConfidentialityImpact(Enum): IMPACT_UNSPECIFIED = 'IMPACT_UNSPECIFIED' IMPACT_HIGH = 'IMPACT_HIGH' IMPACT_LOW = 'IMPACT_LOW' IMPACT_NONE = 'IMPACT_NONE' IMPACT_PARTIAL = 'IMPACT_PARTIAL' IMPACT_COMPLETE = 'IMPACT_COMPLETE' class IntegrityImpact(Enum): IMPACT_UNSPECIFIED = 'IMPACT_UNSPECIFIED' IMPACT_HIGH = 'IMPACT_HIGH' IMPACT_LOW = 'IMPACT_LOW' IMPACT_NONE = 'IMPACT_NONE' IMPACT_PARTIAL = 'IMPACT_PARTIAL' IMPACT_COMPLETE = 'IMPACT_COMPLETE' class PrivilegesRequired(Enum): PRIVILEGES_REQUIRED_UNSPECIFIED = 'PRIVILEGES_REQUIRED_UNSPECIFIED' PRIVILEGES_REQUIRED_NONE = 'PRIVILEGES_REQUIRED_NONE' PRIVILEGES_REQUIRED_LOW = 'PRIVILEGES_REQUIRED_LOW' PRIVILEGES_REQUIRED_HIGH = 'PRIVILEGES_REQUIRED_HIGH' class Scope(Enum): SCOPE_UNSPECIFIED = 'SCOPE_UNSPECIFIED' SCOPE_UNCHANGED = 'SCOPE_UNCHANGED' SCOPE_CHANGED = 'SCOPE_CHANGED' class UserInteraction(Enum): USER_INTERACTION_UNSPECIFIED = 'USER_INTERACTION_UNSPECIFIED' USER_INTERACTION_NONE = 'USER_INTERACTION_NONE' USER_INTERACTION_REQUIRED = 'USER_INTERACTION_REQUIRED' class CVSS(BaseModel): attackComplexity: Optional[AttackComplexity] = None attackVector: Optional[AttackVector] = Field( None, description='Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments.', ) authentication: Optional[Authentication] = None availabilityImpact: Optional[AvailabilityImpact] = None baseScore: Optional[float] = Field( None, description='The base score is a function of the base metric scores.' ) confidentialityImpact: Optional[ConfidentialityImpact] = None exploitabilityScore: Optional[float] = None impactScore: Optional[float] = None integrityImpact: Optional[IntegrityImpact] = None privilegesRequired: Optional[PrivilegesRequired] = None scope: Optional[Scope] = None userInteraction: Optional[UserInteraction] = None class Category(BaseModel): categoryId: Optional[str] = Field( None, description='The identifier of the category.' ) name: Optional[str] = Field(None, description='The localized name of the category.') class Command(BaseModel): args: Optional[List[str]] = Field( None, description='Command-line arguments used when executing this command.' ) dir: Optional[str] = Field( None, description='Working directory (relative to project source root) used when running this command.', ) env: Optional[List[str]] = Field( None, description='Environment variables set before running this command.' ) id: Optional[str] = Field( None, description='Optional unique identifier for this command, used in wait_for to reference this command as a dependency.', ) name: Optional[str] = Field( None, description='Required. Name of the command, as presented on the command line, or if the command is packaged as a Docker container, as presented to `docker pull`.', ) waitFor: Optional[List[str]] = Field( None, description='The ID(s) of the command(s) that this command depends on.' ) class Completeness(BaseModel): arguments: Optional[bool] = Field( None, description='If true, the builder claims that recipe.arguments is complete, meaning that all external inputs are properly captured in the recipe.', ) environment: Optional[bool] = Field( None, description='If true, the builder claims that recipe.environment is claimed to be complete.', ) materials: Optional[bool] = Field( None, description='If true, the builder claims that materials are complete, usually through some controls to prevent network access. Sometimes called "hermetic".', ) class Platform(Enum): PLATFORM_UNSPECIFIED = 'PLATFORM_UNSPECIFIED' GKE = 'GKE' FLEX = 'FLEX' CUSTOM = 'CUSTOM' class DeploymentOccurrence(BaseModel): address: Optional[str] = Field( None, description='Address of the runtime element hosting this deployment.' ) config: Optional[str] = Field( None, description='Configuration used to create this deployment.' ) deployTime: Optional[str] = Field( None, description='Required. Beginning of the lifetime of this deployment.' ) platform: Optional[Platform] = Field( None, description='Platform hosting this deployment.' ) resourceUri: Optional[List[str]] = Field( None, description='Output only. Resource URI for the artifact being deployed taken from the deployable field with the same name.', ) undeployTime: Optional[str] = Field( None, description='End of the lifetime of this deployment.' ) userEmail: Optional[str] = Field( None, description='Identity of the user that triggered this deployment.' ) class AnalysisStatus(Enum): ANALYSIS_STATUS_UNSPECIFIED = 'ANALYSIS_STATUS_UNSPECIFIED' PENDING = 'PENDING' SCANNING = 'SCANNING' FINISHED_SUCCESS = 'FINISHED_SUCCESS' COMPLETE = 'COMPLETE' FINISHED_FAILED = 'FINISHED_FAILED' FINISHED_UNSUPPORTED = 'FINISHED_UNSUPPORTED' class ContinuousAnalysis(Enum): CONTINUOUS_ANALYSIS_UNSPECIFIED = 'CONTINUOUS_ANALYSIS_UNSPECIFIED' ACTIVE = 'ACTIVE' INACTIVE = 'INACTIVE' class Empty(BaseModel): pass class EnvelopeSignature(BaseModel): keyid: Optional[str] = None sig: Optional[str] = None class FileLocation(BaseModel): filePath: Optional[str] = Field( None, description='For jars that are contained inside .war files, this filepath can indicate the path to war file combined with the path to jar file.', ) class Fingerprint(BaseModel): v1Name: Optional[str] = Field( None, description="Required. The layer ID of the final layer in the Docker image's v1 representation.", ) v2Blob: Optional[List[str]] = Field( None, description='Required. The ordered list of v2 blobs that represent a given image.', ) v2Name: Optional[str] = Field( None, description='Output only. The name of the image\'s v2 blobs computed via: [bottom] := v2_blobbottom := sha256(v2_blob[N] + " " + v2_name[N+1]) Only the name of the final blob is kept.', ) class GerritSourceContext(BaseModel): aliasContext: Optional[AliasContext] = Field( None, description='An alias, which may be a branch or tag.' ) gerritProject: Optional[str] = Field( None, description='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.', ) hostUri: Optional[str] = Field( None, description='The URI of a running Gerrit instance.' ) revisionId: Optional[str] = Field(None, description='A revision (commit) ID.') class GitSourceContext(BaseModel): revisionId: Optional[str] = Field(None, description='Git commit hash.') url: Optional[str] = Field(None, description='Git repository URL.') class GrafeasV1FileLocation(BaseModel): filePath: Optional[str] = Field( None, description='For jars that are contained inside .war files, this filepath can indicate the path to war file combined with the path to jar file.', ) class GrafeasV1SlsaProvenanceZeroTwoSlsaBuilder(BaseModel): id: Optional[str] = None class GrafeasV1SlsaProvenanceZeroTwoSlsaCompleteness(BaseModel): environment: Optional[bool] = None materials: Optional[bool] = None parameters: Optional[bool] = None class GrafeasV1SlsaProvenanceZeroTwoSlsaConfigSource(BaseModel): digest: Optional[Dict[str, str]] = None entryPoint: Optional[str] = None uri: Optional[str] = None class GrafeasV1SlsaProvenanceZeroTwoSlsaInvocation(BaseModel): configSource: Optional[GrafeasV1SlsaProvenanceZeroTwoSlsaConfigSource] = None environment: Optional[Dict[str, Any]] = None parameters: Optional[Dict[str, Any]] = None class GrafeasV1SlsaProvenanceZeroTwoSlsaMaterial(BaseModel): digest: Optional[Dict[str, str]] = None uri: Optional[str] = None class GrafeasV1SlsaProvenanceZeroTwoSlsaMetadata(BaseModel): buildFinishedOn: Optional[str] = None buildInvocationId: Optional[str] = None buildStartedOn: Optional[str] = None completeness: Optional[GrafeasV1SlsaProvenanceZeroTwoSlsaCompleteness] = None reproducible: Optional[bool] = None class Hash(BaseModel): type: Optional[str] = Field( None, description='Required. The type of hash that was performed, e.g. "SHA-256".', ) value: Optional[str] = Field(None, description='Required. The hash value.') class Identity(BaseModel): revision: Optional[int] = Field( None, description='The revision number of the update.' ) updateId: Optional[str] = Field( None, description='The revision independent identifier of the update.' ) class JustificationType(Enum): JUSTIFICATION_TYPE_UNSPECIFIED = 'JUSTIFICATION_TYPE_UNSPECIFIED' COMPONENT_NOT_PRESENT = 'COMPONENT_NOT_PRESENT' VULNERABLE_CODE_NOT_PRESENT = 'VULNERABLE_CODE_NOT_PRESENT' VULNERABLE_CODE_NOT_IN_EXECUTE_PATH = 'VULNERABLE_CODE_NOT_IN_EXECUTE_PATH' VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY = ( 'VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY' ) INLINE_MITIGATIONS_ALREADY_EXIST = 'INLINE_MITIGATIONS_ALREADY_EXIST' class Justification(BaseModel): details: Optional[str] = Field( None, description='Additional details on why this justification was chosen.' ) justificationType: Optional[JustificationType] = Field( None, description='The justification type for this vulnerability.' ) class Jwt(BaseModel): compactJwt: Optional[str] = Field( None, description='The compact encoding of a JWS, which is always three base64 encoded strings joined by periods. For details, see: https://tools.ietf.org/html/rfc7515.html#section-3.1', ) class LanguagePackageDependency(BaseModel): package: Optional[str] = None version: Optional[str] = None class Layer(BaseModel): arguments: Optional[str] = Field( None, description='The recovered arguments to the Dockerfile directive.' ) directive: Optional[str] = Field( None, description='Required. The recovered Dockerfile directive used to construct this layer. See https://docs.docker.com/engine/reference/builder/ for more information.', ) class License(BaseModel): comments: Optional[str] = Field(None, description='Comments') expression: Optional[str] = Field( None, description='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".', ) class Maintainer(BaseModel): kind: Optional[str] = None name: Optional[str] = None class Material(BaseModel): digest: Optional[Dict[str, str]] = None uri: Optional[str] = None class Metadata(BaseModel): buildFinishedOn: Optional[str] = Field( None, description='The timestamp of when the build completed.' ) buildInvocationId: Optional[str] = Field( None, description='Identifies the particular build invocation, which can be useful for finding associated logs or other ad-hoc analysis. The value SHOULD be globally unique, per in-toto Provenance spec.', ) buildStartedOn: Optional[str] = Field( None, description='The timestamp of when the build started.' ) completeness: Optional[Completeness] = Field( None, description='Indicates that the builder claims certain fields in this message to be complete.', ) reproducible: Optional[bool] = Field( None, description='If true, the builder claims that running the recipe on materials will produce bit-for-bit identical output.', ) class NonCompliantFile(BaseModel): displayCommand: Optional[str] = Field( None, description='Command to display the non-compliant files.' ) path: Optional[str] = Field(None, description='Empty if `display_command` is set.') reason: Optional[str] = Field( None, description='Explains why a file is non compliant for a CIS check.' ) class Kind1(Enum): NOTE_KIND_UNSPECIFIED = 'NOTE_KIND_UNSPECIFIED' VULNERABILITY = 'VULNERABILITY' BUILD = 'BUILD' IMAGE = 'IMAGE' PACKAGE = 'PACKAGE' DEPLOYMENT = 'DEPLOYMENT' DISCOVERY = 'DISCOVERY' ATTESTATION = 'ATTESTATION' UPGRADE = 'UPGRADE' COMPLIANCE = 'COMPLIANCE' DSSE_ATTESTATION = 'DSSE_ATTESTATION' VULNERABILITY_ASSESSMENT = 'VULNERABILITY_ASSESSMENT' class PackageType(Enum): PACKAGE_TYPE_UNSPECIFIED = 'PACKAGE_TYPE_UNSPECIFIED' OS = 'OS' MAVEN = 'MAVEN' GO = 'GO' GO_STDLIB = 'GO_STDLIB' PYPI = 'PYPI' NPM = 'NPM' class PackageData(BaseModel): architecture: Optional[str] = Field( None, description='The architecture of the package.' ) binary: Optional[Binary] = Field( None, description="The binary package. This is significant when the source is different than the binary itself. Historically if they've differed, we've stored the name of the source and its version in the package/version fields, but we should also store the binary package info, as that's what's actually installed. See b/175908657#comment15.", ) cpeUri: Optional[str] = Field( None, description='The cpe_uri in [cpe format] (https://cpe.mitre.org/specification/) in which the vulnerability may manifest. Examples include distro or storage location for vulnerable jar.', ) dependencyChain: Optional[List[LanguagePackageDependency]] = Field( None, description="The dependency chain between this package and the user's artifact. List in order from the customer's package under review first, to the current package last. Inclusive of the original package and the current package.", ) fileLocation: Optional[List[FileLocation]] = Field( None, description='The path to the jar file / go binary file.' ) hashDigest: Optional[str] = Field( None, description='HashDigest stores the SHA512 hash digest of the jar file if the package is of type Maven. This field will be unset for non Maven packages.', ) maintainer: Optional[Maintainer] = Field( None, description='The maintainer of the package.' ) os: Optional[str] = Field( None, description='The OS affected by a vulnerability Used to generate the cpe_uri for OS packages', ) osVersion: Optional[str] = Field( None, description='The version of the OS Used to generate the cpe_uri for OS packages', ) package: Optional[str] = Field( None, description='The package being analysed for vulnerabilities' ) packageType: Optional[PackageType] = Field( None, description='The type of package: os, maven, go, etc.' ) patchedCve: Optional[List[str]] = Field( None, description='CVEs that this package is no longer vulnerable to go/drydock-dd-custom-binary-scanning', ) unused: Optional[str] = None version: Optional[str] = Field( None, description='The version of the package being analysed' ) class EffectiveSeverity(Enum): SEVERITY_UNSPECIFIED = 'SEVERITY_UNSPECIFIED' MINIMAL = 'MINIMAL' LOW = 'LOW' MEDIUM = 'MEDIUM' HIGH = 'HIGH' CRITICAL = 'CRITICAL' class Architecture(Enum): ARCHITECTURE_UNSPECIFIED = 'ARCHITECTURE_UNSPECIFIED' X86 = 'X86' X64 = 'X64' class ProjectRepoId(BaseModel): projectId: Optional[str] = Field(None, description='The ID of the project.') repoName: Optional[str] = Field( None, description='The name of the repo. Leave empty for the default repo.' ) class Recipe(BaseModel): arguments: Optional[List[Dict[str, Any]]] = Field( None, description='Collection of all external inputs that influenced the build on top of recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe type were "make", then this might be the flags passed to make aside from the target, which is captured in recipe.entryPoint. Since the arguments field can greatly vary in structure, depending on the builder and recipe type, this is of form "Any".', ) definedInMaterial: Optional[str] = Field( None, description='Index in materials containing the recipe steps that are not implied by recipe.type. For example, if the recipe type were "make", then this would point to the source containing the Makefile, not the make program itself. Set to -1 if the recipe doesn\'t come from a material, as zero is default unset value for int64.', ) entryPoint: Optional[str] = Field( None, description='String identifying the entry point into the build. This is often a path to a configuration file and/or a target label within that file. The syntax and meaning are defined by recipe.type. For example, if the recipe type were "make", then this would reference the directory in which to run make as well as which target to use.', ) environment: Optional[List[Dict[str, Any]]] = Field( None, description='Any other builder-controlled inputs necessary for correctly evaluating the recipe. Usually only needed for reproducing the build but not evaluated as part of policy. Since the environment field can greatly vary in structure, depending on the builder and recipe type, this is of form "Any".', ) type: Optional[str] = Field( None, description='URI indicating what type of recipe was performed. It determines the meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.', ) class RelatedUrl(BaseModel): label: Optional[str] = Field( None, description='Label to describe usage of the URL.' ) url: Optional[str] = Field( None, description='Specific URL associated with the resource.' ) class RemediationType(Enum): REMEDIATION_TYPE_UNSPECIFIED = 'REMEDIATION_TYPE_UNSPECIFIED' MITIGATION = 'MITIGATION' NO_FIX_PLANNED = 'NO_FIX_PLANNED' NONE_AVAILABLE = 'NONE_AVAILABLE' VENDOR_FIX = 'VENDOR_FIX' WORKAROUND = 'WORKAROUND' class Remediation(BaseModel): details: Optional[str] = Field( None, description='Contains a comprehensive human-readable discussion of the remediation.', ) remediationType: Optional[RemediationType] = Field( None, description='The type of remediation that can be applied.' ) remediationUri: Optional[RelatedUrl] = Field( None, description='Contains the URL where to obtain the remediation.' ) class RepoId(BaseModel): projectRepoId: Optional[ProjectRepoId] = Field( None, description='A combination of a project ID and a repo name.' ) uid: Optional[str] = Field( None, description='A server-assigned, globally unique identifier.' ) class Signature(BaseModel): publicKeyId: Optional[str] = Field( None, description='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"', ) signature: Optional[str] = Field( None, description='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.', ) class SlsaBuilder(BaseModel): id: Optional[str] = None class SlsaCompleteness(BaseModel): arguments: Optional[bool] = Field( None, description='If true, the builder claims that recipe.arguments is complete, meaning that all external inputs are properly captured in the recipe.', ) environment: Optional[bool] = Field( None, description='If true, the builder claims that recipe.environment is claimed to be complete.', ) materials: Optional[bool] = Field( None, description='If true, the builder claims that materials are complete, usually through some controls to prevent network access. Sometimes called "hermetic".', ) class SlsaMetadata(BaseModel): buildFinishedOn: Optional[str] = Field( None, description='The timestamp of when the build completed.' ) buildInvocationId: Optional[str] = Field( None, description='Identifies the particular build invocation, which can be useful for finding associated logs or other ad-hoc analysis. The value SHOULD be globally unique, per in-toto Provenance spec.', ) buildStartedOn: Optional[str] = Field( None, description='The timestamp of when the build started.' ) completeness: Optional[SlsaCompleteness] = Field( None, description='Indicates that the builder claims certain fields in this message to be complete.', ) reproducible: Optional[bool] = Field( None, description='If true, the builder claims that running the recipe on materials will produce bit-for-bit identical output.', ) class SlsaProvenanceZeroTwo(BaseModel): buildConfig: Optional[Dict[str, Any]] = None buildType: Optional[str] = None builder: Optional[GrafeasV1SlsaProvenanceZeroTwoSlsaBuilder] = None invocation: Optional[GrafeasV1SlsaProvenanceZeroTwoSlsaInvocation] = None materials: Optional[List[GrafeasV1SlsaProvenanceZeroTwoSlsaMaterial]] = None metadata: Optional[GrafeasV1SlsaProvenanceZeroTwoSlsaMetadata] = None class SlsaRecipe(BaseModel): arguments: Optional[Dict[str, Any]] = Field( None, description='Collection of all external inputs that influenced the build on top of recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe type were "make", then this might be the flags passed to make aside from the target, which is captured in recipe.entryPoint. Depending on the recipe Type, the structure may be different.', ) definedInMaterial: Optional[str] = Field( None, description='Index in materials containing the recipe steps that are not implied by recipe.type. For example, if the recipe type were "make", then this would point to the source containing the Makefile, not the make program itself. Set to -1 if the recipe doesn\'t come from a material, as zero is default unset value for int64.', ) entryPoint: Optional[str] = Field( None, description='String identifying the entry point into the build. This is often a path to a configuration file and/or a target label within that file. The syntax and meaning are defined by recipe.type. For example, if the recipe type were "make", then this would reference the directory in which to run make as well as which target to use.', ) environment: Optional[Dict[str, Any]] = Field( None, description='Any other builder-controlled inputs necessary for correctly evaluating the recipe. Usually only needed for reproducing the build but not evaluated as part of policy. Depending on the recipe Type, the structure may be different.', ) type: Optional[str] = Field( None, description='URI indicating what type of recipe was performed. It determines the meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.', ) class Status(BaseModel): code: Optional[int] = Field( None, description='The status code, which should be an enum value of google.rpc.Code.', ) details: Optional[List[Dict[str, Any]]] = Field( None, description='A list of messages that carry the error details. There is a common set of message types for APIs to use.', ) message: Optional[str] = Field( None, description='A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.', ) class Subject(BaseModel): digest: Optional[Dict[str, str]] = Field( None, description='`"": ""` Algorithms can be e.g. sha256, sha512 See https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet', ) name: Optional[str] = None class UpgradeDistribution(BaseModel): classification: Optional[str] = Field( None, description='The operating system classification of this Upgrade, as specified by the upstream operating system upgrade feed. For Windows the classification is one of the category_ids listed at https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)', ) cpeUri: Optional[str] = Field( None, description='Required - The specific operating system this metadata applies to. See https://cpe.mitre.org/specification/.', ) cve: Optional[List[str]] = Field(None, description='The cve tied to this Upgrade.') severity: Optional[str] = Field( None, description='The severity as specified by the upstream operating system.' ) class Kind2(Enum): VERSION_KIND_UNSPECIFIED = 'VERSION_KIND_UNSPECIFIED' NORMAL = 'NORMAL' MINIMUM = 'MINIMUM' MAXIMUM = 'MAXIMUM' class Version(BaseModel): epoch: Optional[int] = Field( None, description='Used to correct mistakes in the version numbering scheme.' ) fullName: Optional[str] = Field( None, description='Human readable version string. This string is of the form :- and is only set when kind is NORMAL.', ) inclusive: Optional[bool] = Field( None, description='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.', ) kind: Optional[Kind2] = Field( None, description='Required. Distinguishes between sentinel MIN/MAX versions and normal versions.', ) name: Optional[str] = Field( None, description='Required only when version kind is NORMAL. The main part of the version name.', ) revision: Optional[str] = Field( None, description='The iteration of the package build from the above version.' ) class State(Enum): STATE_UNSPECIFIED = 'STATE_UNSPECIFIED' AFFECTED = 'AFFECTED' NOT_AFFECTED = 'NOT_AFFECTED' FIXED = 'FIXED' UNDER_INVESTIGATION = 'UNDER_INVESTIGATION' class VexAssessment(BaseModel): cve: Optional[str] = Field( None, description='Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability.', ) impacts: Optional[List[str]] = Field( None, description='Contains information about the impact of this vulnerability, this will change with time.', ) justification: Optional[Justification] = Field( None, description='Justification provides the justification when the state of the assessment if NOT_AFFECTED.', ) noteName: Optional[str] = Field( None, description='The VulnerabilityAssessment note from which this VexAssessment was generated. This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.', ) relatedUris: Optional[List[RelatedUrl]] = Field( None, description='Holds a list of references associated with this vulnerability item and assessment.', ) remediations: Optional[List[Remediation]] = Field( None, description='Specifies details on how to handle (and presumably, fix) a vulnerability.', ) state: Optional[State] = Field( None, description='Provides the state of this Vulnerability assessment.' ) class CvssVersion(Enum): CVSS_VERSION_UNSPECIFIED = 'CVSS_VERSION_UNSPECIFIED' CVSS_VERSION_2 = 'CVSS_VERSION_2' CVSS_VERSION_3 = 'CVSS_VERSION_3' class Severity(Enum): SEVERITY_UNSPECIFIED = 'SEVERITY_UNSPECIFIED' MINIMAL = 'MINIMAL' LOW = 'LOW' MEDIUM = 'MEDIUM' HIGH = 'HIGH' CRITICAL = 'CRITICAL' class WindowsUpdate(BaseModel): categories: Optional[List[Category]] = Field( None, description='The list of categories to which the update belongs.' ) description: Optional[str] = Field( None, description='The localized description of the update.' ) identity: Optional[Identity] = Field( None, description='Required - The unique identifier for the update.' ) kbArticleIds: Optional[List[str]] = Field( None, description='The Microsoft Knowledge Base article IDs that are associated with the update.', ) lastPublishedTimestamp: Optional[str] = Field( None, description='The last published timestamp of the update.' ) supportUrl: Optional[str] = Field( None, description='The hyperlink to the support information for the update.' ) title: Optional[str] = Field(None, description='The localized title of the update.') class FieldXgafv(Enum): field_1 = '1' field_2 = '2' class Alt(Enum): json = 'json' media = 'media' proto = 'proto' class AnalyzePackagesRequest(BaseModel): packages: Optional[List[PackageData]] = Field( None, description='The packages to analyze.' ) resourceUri: Optional[str] = Field( None, description='Required. The resource URI of the container image being scanned.', ) class AttestationOccurrence(BaseModel): jwts: Optional[List[Jwt]] = Field( None, description='One or more JWTs encoding a self-contained attestation. Each JWT encodes the payload that it verifies within the JWT itself. Verifier implementation SHOULD ignore the `serialized_payload` field when verifying these JWTs. If only JWTs are present on this AttestationOccurrence, then the `serialized_payload` SHOULD be left empty. Each JWT SHOULD encode a claim specific to the `resource_uri` of this Occurrence, but this is not validated by Grafeas metadata API implementations. The JWT itself is opaque to Grafeas.', ) serializedPayload: Optional[str] = Field( None, description='Required. The serialized payload that is verified by one or more `signatures`.', ) signatures: Optional[List[Signature]] = Field( None, description='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.', ) class CloudRepoSourceContext(BaseModel): aliasContext: Optional[AliasContext] = Field( None, description='An alias, which may be a branch or tag.' ) repoId: Optional[RepoId] = Field(None, description='The ID of the repo.') revisionId: Optional[str] = Field(None, description='A revision ID.') class ComplianceOccurrence(BaseModel): nonComplianceReason: Optional[str] = None nonCompliantFiles: Optional[List[NonCompliantFile]] = None class DiscoveryOccurrence(BaseModel): analysisCompleted: Optional[AnalysisCompleted] = None analysisError: Optional[List[Status]] = Field( None, description='Indicates any errors encountered during analysis of a resource. There could be 0 or more of these errors.', ) analysisStatus: Optional[AnalysisStatus] = Field( None, description='The status of discovery for the resource.' ) analysisStatusError: Optional[Status] = Field( None, description='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.', ) archiveTime: Optional[str] = Field( None, description='Output only. The time occurrences related to this discovery occurrence were archived.', ) continuousAnalysis: Optional[ContinuousAnalysis] = Field( None, description='Whether the resource is continuously analyzed.' ) cpe: Optional[str] = Field( None, description='The CPE of the resource being scanned.' ) lastScanTime: Optional[str] = Field( None, description='The last time this resource was scanned.' ) class Envelope(BaseModel): payload: Optional[str] = None payloadType: Optional[str] = None signatures: Optional[List[EnvelopeSignature]] = None class FileHashes(BaseModel): fileHash: Optional[List[Hash]] = Field( None, description='Required. Collection of file hashes.' ) class ImageOccurrence(BaseModel): baseResourceUrl: Optional[str] = Field( None, description='Output only. This contains the base image URL for the derived image occurrence.', ) distance: Optional[int] = Field( None, description='Output only. The number of layers by which this image differs from the associated image basis.', ) fingerprint: Optional[Fingerprint] = Field( None, description='Required. The fingerprint of the derived image.' ) layerInfo: Optional[List[Layer]] = Field( None, description='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.', ) class InTotoProvenance(BaseModel): builderConfig: Optional[BuilderConfig] = Field(None, description='required') materials: Optional[List[str]] = Field( None, description='The collection of artifacts that influenced the build including sources, dependencies, build tools, base images, and so on. This is considered to be incomplete unless metadata.completeness.materials is true. Unset or null is equivalent to empty.', ) metadata: Optional[Metadata] = None recipe: Optional[Recipe] = Field( None, description='Identifies the configuration used for the build. When combined with materials, this SHOULD fully describe the build, such that re-running this recipe results in bit-for-bit identical output (if the build is reproducible). required', ) class Location(BaseModel): cpeUri: Optional[str] = Field( None, description='Deprecated. The CPE URI in [CPE format](https://cpe.mitre.org/specification/)', ) path: Optional[str] = Field( None, description='The path from which we gathered that this package/version is installed.', ) version: Optional[Version] = Field( None, description='Deprecated. The version installed at this location.' ) class Operation(BaseModel): done: Optional[bool] = Field( None, description='If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.', ) error: Optional[Status] = Field( None, description='The error result of the operation in case of failure or cancellation.', ) metadata: Optional[Dict[str, Any]] = Field( None, description='Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.', ) name: Optional[str] = Field( None, description='The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.', ) response: Optional[Dict[str, Any]] = Field( None, description='The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.', ) class PackageIssue(BaseModel): affectedCpeUri: Optional[str] = Field( None, description='Required. The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability was found in.', ) affectedPackage: Optional[str] = Field( None, description='Required. The package this vulnerability was found in.' ) affectedVersion: Optional[Version] = Field( None, description='Required. The version of the package that is installed on the resource affected by this vulnerability.', ) effectiveSeverity: Optional[EffectiveSeverity] = Field( None, description='Output only. The distro or language system assigned severity for this vulnerability when that is available and note provider assigned severity when it is not available.', ) fileLocation: Optional[List[GrafeasV1FileLocation]] = Field( None, description='The location at which this package was found.' ) fixAvailable: Optional[bool] = Field( None, description='Output only. Whether a fix is available for this package.' ) fixedCpeUri: Optional[str] = Field( None, description='The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability was fixed in. It is possible for this to be different from the affected_cpe_uri.', ) fixedPackage: Optional[str] = Field( None, description='The package this vulnerability was fixed in. It is possible for this to be different from the affected_package.', ) fixedVersion: Optional[Version] = Field( None, description='Required. The version of the package this vulnerability was fixed in. Setting this to VersionKind.MAXIMUM means no fix is yet available.', ) packageType: Optional[str] = Field( None, description='The type of package (e.g. OS, MAVEN, GO).' ) class PackageOccurrence(BaseModel): architecture: Optional[Architecture] = Field( None, description='Output only. The CPU architecture for which packages in this distribution channel were built. Architecture will be blank for language packages.', ) cpeUri: Optional[str] = Field( None, description='Output only. 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.', ) license: Optional[License] = Field( None, description='Licenses that have been declared by the authors of the package.', ) location: Optional[List[Location]] = Field( None, description='All of the places within the filesystem versions of this package have been found.', ) name: Optional[str] = Field( None, description='Required. Output only. The name of the installed package.' ) packageType: Optional[str] = Field( None, description='Output only. The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.).', ) version: Optional[Version] = Field( None, description='Output only. The version of the package.' ) class SlsaProvenance(BaseModel): builder: Optional[SlsaBuilder] = Field(None, description='required') materials: Optional[List[Material]] = Field( None, description='The collection of artifacts that influenced the build including sources, dependencies, build tools, base images, and so on. This is considered to be incomplete unless metadata.completeness.materials is true. Unset or null is equivalent to empty.', ) metadata: Optional[SlsaMetadata] = None recipe: Optional[SlsaRecipe] = Field( None, description='Identifies the configuration used for the build. When combined with materials, this SHOULD fully describe the build, such that re-running this recipe results in bit-for-bit identical output (if the build is reproducible). required', ) class SourceContext(BaseModel): cloudRepo: Optional[CloudRepoSourceContext] = Field( None, description='A SourceContext referring to a revision in a Google Cloud Source Repo.', ) gerrit: Optional[GerritSourceContext] = Field( None, description='A SourceContext referring to a Gerrit project.' ) git: Optional[GitSourceContext] = Field( None, description='A SourceContext referring to any third party Git repo (e.g., GitHub).', ) labels: Optional[Dict[str, str]] = Field( None, description='Labels with user defined metadata.' ) class UpgradeOccurrence(BaseModel): distribution: Optional[UpgradeDistribution] = Field( None, description='Metadata about the upgrade for available for the specific operating system for the resource_url. This allows efficient filtering, as well as making it easier to use the occurrence.', ) package: Optional[str] = Field( None, description='Required for non-Windows OS. The package this Upgrade is for.', ) parsedVersion: Optional[Version] = Field( None, description='Required for non-Windows OS. The version of the package in a machine + human readable form.', ) windowsUpdate: Optional[WindowsUpdate] = Field( None, description='Required for Windows OS. Represents the metadata about the Windows update.', ) class VulnerabilityOccurrence(BaseModel): cvssScore: Optional[float] = Field( None, description='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.', ) cvssV2: Optional[CVSS] = Field( None, description='The cvss v2 score for the vulnerability.' ) cvssVersion: Optional[CvssVersion] = Field( None, description='Output only. CVSS version used to populate cvss_score and severity.', ) cvssv3: Optional[CVSS] = Field( None, description='The cvss v3 score for the vulnerability.' ) effectiveSeverity: Optional[EffectiveSeverity] = Field( None, description='The distro assigned severity for this vulnerability when it is available, otherwise this is the note provider assigned severity. 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.', ) fixAvailable: Optional[bool] = Field( None, description='Output only. Whether at least one of the affected packages has a fix available.', ) longDescription: Optional[str] = Field( None, description='Output only. A detailed description of this vulnerability.' ) packageIssue: Optional[List[PackageIssue]] = Field( None, description='Required. The set of affected locations and their fixes (if available) within the associated resource.', ) relatedUrls: Optional[List[RelatedUrl]] = Field( None, description='Output only. URLs related to this vulnerability.' ) severity: Optional[Severity] = Field( None, description='Output only. The note provider assigned severity of this vulnerability.', ) shortDescription: Optional[str] = Field( None, description='Output only. A one sentence description of this vulnerability.', ) type: Optional[str] = Field( None, description='The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.).', ) vexAssessment: Optional[VexAssessment] = None class InTotoStatement(BaseModel): field_type: Optional[str] = Field( None, alias='_type', description='Always `https://in-toto.io/Statement/v0.1`.' ) predicateType: Optional[str] = Field( None, description='`https://slsa.dev/provenance/v0.1` for SlsaProvenance.' ) provenance: Optional[InTotoProvenance] = None slsaProvenance: Optional[SlsaProvenance] = None slsaProvenanceZeroTwo: Optional[SlsaProvenanceZeroTwo] = None subject: Optional[List[Subject]] = None class ListOperationsResponse(BaseModel): nextPageToken: Optional[str] = Field( None, description='The standard List next-page token.' ) operations: Optional[List[Operation]] = Field( None, description='A list of operations that matches the specified filter in the request.', ) class Source(BaseModel): additionalContexts: Optional[List[SourceContext]] = Field( None, description='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.', ) artifactStorageSourceUri: Optional[str] = Field( None, description='If provided, the input binary artifacts for the build came from this location.', ) context: Optional[SourceContext] = Field( None, description='If provided, the source code used for the build came from this location.', ) fileHashes: Optional[Dict[str, FileHashes]] = Field( None, description='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.', ) class BuildProvenance(BaseModel): buildOptions: Optional[Dict[str, str]] = Field( None, description='Special options applied to this build. This is a catch-all field where build providers can enter any desired additional details.', ) builderVersion: Optional[str] = Field( None, description='Version string of the builder at the time this build was executed.', ) builtArtifacts: Optional[List[Artifact]] = Field( None, description='Output of the build.' ) commands: Optional[List[Command]] = Field( None, description='Commands requested by the build.' ) createTime: Optional[str] = Field( None, description='Time at which the build was created.' ) creator: Optional[str] = Field( None, description="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.", ) endTime: Optional[str] = Field( None, description='Time at which execution of the build was finished.' ) id: Optional[str] = Field( None, description='Required. Unique identifier of the build.' ) logsUri: Optional[str] = Field( None, description='URI where any logs for this provenance were written.' ) projectId: Optional[str] = Field(None, description='ID of the project.') sourceProvenance: Optional[Source] = Field( None, description='Details of the Source input to the build.' ) startTime: Optional[str] = Field( None, description='Time at which execution of the build was started.' ) triggerId: Optional[str] = Field( None, description='Trigger identifier if the build was triggered automatically; empty if not.', ) class DSSEAttestationOccurrence(BaseModel): envelope: Optional[Envelope] = Field( None, description='If doing something security critical, make sure to verify the signatures in this metadata.', ) statement: Optional[InTotoStatement] = None class BuildOccurrence(BaseModel): intotoProvenance: Optional[InTotoProvenance] = Field( None, description='Deprecated. See InTotoStatement for the replacement. In-toto Provenance representation as defined in spec.', ) intotoStatement: Optional[InTotoStatement] = Field( None, description="In-toto Statement representation as defined in spec. The intoto_statement can contain any type of provenance. The serialized payload of the statement can be stored and signed in the Occurrence's envelope.", ) provenance: Optional[BuildProvenance] = Field( None, description='The actual provenance for the build.' ) provenanceBytes: Optional[str] = Field( None, description='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.', ) class Occurrence(BaseModel): attestation: Optional[AttestationOccurrence] = Field( None, description='Describes an attestation of an artifact.' ) build: Optional[BuildOccurrence] = Field( None, description='Describes a verifiable build.' ) compliance: Optional[ComplianceOccurrence] = Field( None, description='Describes a compliance violation on a linked resource.' ) createTime: Optional[str] = Field( None, description='Output only. The time this occurrence was created.' ) deployment: Optional[DeploymentOccurrence] = Field( None, description='Describes the deployment of an artifact on a runtime.' ) discovery: Optional[DiscoveryOccurrence] = Field( None, description='Describes when a resource was discovered.' ) dsseAttestation: Optional[DSSEAttestationOccurrence] = Field( None, description='Describes an attestation of an artifact using dsse.' ) envelope: Optional[Envelope] = Field( None, description='https://github.com/secure-systems-lab/dsse' ) image: Optional[ImageOccurrence] = Field( None, description='Describes how this resource derives from the basis in the associated note.', ) kind: Optional[Kind1] = Field( None, description='Output only. This explicitly denotes which of the occurrence details are specified. This field can be used as a filter in list requests.', ) name: Optional[str] = Field( None, description='Output only. The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.', ) noteName: Optional[str] = Field( None, description='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.', ) package: Optional[PackageOccurrence] = Field( None, description='Describes the installation of a package on the linked resource.', ) remediation: Optional[str] = Field( None, description='A description of actions that can be taken to remedy the note.', ) resourceUri: Optional[str] = Field( None, description='Required. Immutable. A URI that represents the resource for which the occurrence applies. For example, `https://gcr.io/project/image@sha256:123abc` for a Docker image.', ) updateTime: Optional[str] = Field( None, description='Output only. The time this occurrence was last updated.' ) upgrade: Optional[UpgradeOccurrence] = Field( None, description='Describes an available package upgrade on the linked resource.', ) vulnerability: Optional[VulnerabilityOccurrence] = Field( None, description='Describes a security vulnerability.' ) class ListVulnerabilitiesResponse(BaseModel): nextPageToken: Optional[str] = Field( None, description='A page token that can be used in a subsequent call to ListVulnerabilities to continue retrieving results.', ) occurrences: Optional[List[Occurrence]] = Field( None, description='The list of Vulnerability Occurrences resulting from a scan.' )

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ag2-mcp-servers/on-demand-scanning-api'

If you have feedback or need assistance with the MCP directory API, please join our Discord server