chainloop auth login or CHAINLOOP_TOKEN).
This is the list of APIs supported currently:
chainloop.discover
Calls Chainloop’s Discover API. It’s the same aschainloop discover --digest sha256:foobar
Usage: chainloop.discover(digest, kind)
Arguments:
digest(string): artifact digest in the form ofsha256:foobarkind(string, optional): optional filter by kind to disambiguate
chainloop discover CLI call. A JSON with the artifact metadata and the list of referenced artifacts. Example:
chainloop.evidence
Lists evidence stored in the platform by querying the Evidence service (see API Reference - EvidenceService/List). Use this to retrieve evidence metadata across projects and workflows for compliance validation.This feature is only available on Chainloop’s platform paid plans.
chainloop.evidence(filters)
Arguments:
filters(object): filter object with optional fields:project_name(string, optional): name of the project to filter byproject_version_name(string, optional): name of the project version to filter bykind(array of strings, optional): array of material types to filter by (e.g.,["SBOM_CYCLONEDX_JSON", "HELM_CHART"])workflow_name(array of strings, optional): array of workflow names to filter bysearch(string, optional): search term to filter evidence by name or subject namelatest(boolean, optional): if true, only the latest evidence for each kind and name is returnedhide_attestation(boolean, optional): if true, excludes attestation evidence from the resultsproduct_id(string, optional): ID of the product to filter evidence byproduct_version_id(string, optional): ID of the product version to filter evidence bylimit(number, optional): maximum number of results to return per page
chainloop.project_compliance
Retrieves project-level compliance data (see API Reference - ComplianceService/Get project-level compliance evaluation) for all requirements. Use this to check compliance status for a project version.This feature is only available on Chainloop’s platform paid plans.
chainloop.project_compliance(filters)
Arguments:
filters(object): filter object with:project_version_id(string, required): UUID of the project version to check compliance forframework_ids(optional): array of framework IDs. If not provided, returns requirements from all frameworks associated with the project versionlimit(number, optional): maximum number of results to return per page
chainloop.evidence_prompt
Evaluates evidence using AI-powered analysis. The function sends evidence content along with a prompt to an AI agent for evaluation, enabling automated compliance checks such as license analysis, vulnerability assessment, or custom validation logic.This feature is only available on Chainloop’s platform paid plans.
chainloop.evidence_prompt(evidence, prompt)
Arguments:
evidence(string): CAS digest (sha256:...) or raw evidence content to evaluateprompt(string): the prompt to be passed on to the AI agent for evaluation
skipped will be true and violations will be empty.
Example usage:
chainloop.download_artifact
Downloads an artifact using the Chainloop CAS service. It allows to inject content into policy evaluation context. Note that binary content will be encoded as base64.This feature is only available on Chainloop’s platform paid plans.
chainloop.download_artifact(digest)
Arguments:
digest(string): CAS digest (sha256:...) of the artifact to download
