Create JFrog Evidence from a GitHub Attestation
Create JFrog Evidence from a GitHub build-provenance attestation.
Create JFrog Evidence from the Sigstore bundle written by GitHub build provenance. The jfrog/setup-jfrog-cli post step reads the attestation paths and runs jf evd create with the GitHub provider.
Note
GitHub Attestation to JFrog Evidence requires an Enterprise+ subscription. A JFrog AppTrust entitlement also allows evidence creation.
Before You Begin
- Use
jfrog/setup-jfrog-cli@v5, which enables evidence collection unlessdisable-auto-evidence-collectionistrue. - Authenticate with an access token or OpenID Connect (OIDC). For more information, see OIDC Authentication. If you authenticate with a username and password, evidence collection is skipped.
- Set
JF_URLto your JFrog Platform URL. - Use a workflow that creates a GitHub build-provenance attestation and writes its Sigstore bundle path where the action can read it.
- An Enterprise+ subscription or a JFrog AppTrust entitlement. Without one, the job log says
Evidence collection is not supported by Artifactory's license type. Skipping evidence collection.
For other GitHub integration features, see JFrog and GitHub Feature Availability.
Create the Attestation
Generate provenance for the pushed image so jfrog/setup-jfrog-cli can create JFrog Evidence from the Sigstore bundle. Use a fully qualified image name without an oci:// prefix and without a tag. The digest identifies the image.
To create the attestation:
-
Generate provenance for the pushed image:
- name: Generate attestation uses: actions/attest-build-provenance@v3 with: subject-name: yourorg.jfrog.io/${{ env.DOCKER_REPO }}/${{ env.IMAGE_NAME }} subject-digest: ${{ steps.build-and-push.outputs.digest }} -
(Optional) Use the
oci://prefix only when you verify the attestation with the GitHub CLI, for examplegh attestation verify oci://yourorg.jfrog.io/<REPOSITORY>/<IMAGE>.
After the attestation files exist, the jfrog/setup-jfrog-cli post step checks the file size against the JFrog Platform limit. When the JFrog Platform doesn't return a limit, the action uses 16 MB. For each accepted bundle, it runs:
jf evd create --sigstore-bundle <BUNDLE_PATH> --provider-id githubWhere:
<BUNDLE_PATH>: The Sigstore bundle path
Verify the Result
The workflow log contains the evidence collection group and reports the number of Sigstore bundles it processed. The action skips collection when no attestation path file exists, the Artifactory subscription doesn't support evidence collection, or the job authenticated with username and password.
To verify the result:
- In the JFrog Platform, open the artifact, package, or build and select the Evidence tab to find the GitHub provenance record.
Troubleshoot Evidence Collection
The following table lists common evidence collection issues and what to check.
| Symptom | What to Check |
|---|---|
Evidence collection does not support authentication with username and password | Configure OIDC or an access token. |
No attestation paths file found | Confirm the attest action ran in the same job and created created_attestation_paths.txt. |
| Evidence collection exits without creating evidence. | In the job log, look for Evidence collection is not supported by Artifactory's license type. Skipping evidence collection. Also confirm the bundle is within the maximum file size. The action uses 16 MB when the JFrog Platform doesn't return a limit. |
subject-name is rejected. | Remove the oci:// prefix and image tag. Pass the digest separately. |
Related Topics
Updated 12 days ago
