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 theEVIDENCE material type. This is a general-purpose type that lets you attest arbitrary JSON data and run policies against it.
Common use cases include security scanner results (e.g. SonarQube, custom SAST tools), 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.
Example: Importing Issues from the SonarQube API
This example shows how to extract issues from SonarQube’s API and send them to Chainloop as custom evidence. The end result is a JSON file that wraps the SonarQube API response in the recommended evidence format:Step 1: Export issues from the SonarQube API
Use the SonarQube Issues Search API to export issues for your project. You can filter by severity, status, and other parameters:Step 2: Wrap the response in evidence format
Wrap the API response using the recommended structure with a descriptive identifier:Step 3: Add it to your contract and attest
In your workflow contract, declare the material asEVIDENCE and use the built-in sast-scan-present and sast policies to validate it:
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 evidence during attestation:
