Skip to main content

Built-in Material Types

Chainloop supports the following pieces of evidence types that can be attached during the attestation process. See below an example on how to use them in your contract or refer to this guide to learn more about how to use them.
skynet.contract.yaml

Custom Material Types

When your data doesn’t fit any of the built-in types listed above, use the EVIDENCE material type. This is a general-purpose type that lets you attest arbitrary JSON data and run policies against it. Common use cases include in-house scanner output, approval reports, deployment manifests, or any structured data relevant to your supply chain.

Structure Guidelines

We recommend that custom evidence follows these conventions:
  • It must be in JSON format, since the policy engine only supports JSON.
  • The document should have an identifier and a clear separation between metadata and data.
Instead of this:
Structure it like this:
This pattern lets you write policies that identify the evidence type, skip irrelevant evidence, or route to the correct validation logic. For example, a policy can skip evaluation if the evidence doesn’t match:

Example: Attesting a Release Approval Report

This example shows how to send an internal release approval record to Chainloop as custom evidence. Following the structure guidelines above, the approval report is wrapped with a descriptive identifier:
In your workflow contract, declare the material as EVIDENCE:
Then attach the evidence during attestation:
Since no built-in policy understands your document’s shape, write a custom policy to validate it — for example, one that requires an approval from the security role before the attestation can be pushed.

Importing SonarQube Findings

To bring SonarQube results into an attestation, use the chainloop transform sonarqube command. It fetches issues and Security Hotspots from the SonarQube REST API, enriches them with CWE IDs, and writes SARIF 2.1.0, which you attest as a SARIF material.
chainloop transform is part of the Enterprise Edition CLI.
By default the command fetches only Security-quality issues that are OPEN, plus HIGH and MEDIUM priority hotspots. Broaden the scope with --software-qualities MAINTAINABILITY,RELIABILITY to also cover dead, unreachable, and unused code, or narrow it to specific rule keys with --rules. See the command reference for the full flag list. Declare the result as a SARIF material in your contract and validate it with the built-in sast-scan-present and sast policies:
The sast-scan-present policy checks that a SAST scan material is present in the attestation, while the sast policy evaluates the actual findings against a severity threshold. Then attach the report during attestation: