Create Evidence CLI
Create signed evidence for artifacts, packages, builds, and more using the JFrog CLI.
Description: Use the create command to create evidence files, which are then deployed to Artifactory. You can create evidence for artifacts, packages, builds, and Release Bundles v2.
The Create Evidence command creates evidence files, which are then deployed to Artifactory. You can create evidence for:
- Artifacts
- Packages
- Builds
- Release Bundles v2
- Application versions
Authentication
To create and deploy evidence, use an access token or the web login mechanism for authentication. Basic authentication using a username or password is not supported.
Syntax
Artifact evidence:
jf evd create --predicate <file-path> --predicate-type <predicate-type-uri> --subject-repo-path <target-path> --subject-sha256 <digest> --attach-local <file-name> --attach-artifactory-temp-path <target-path> --attach-artifactory-path <target-path> --key <local-private-key-path> --key-alias <public-key-name> --provider-id <provider-id>Package evidence:
jf evd create --predicate <file-path> --predicate-type <predicate-type-uri> --package-name <name> --package-version <version-number> --package-repo-name <repo-name> --attach-local <file-name> --attach-artifactory-temp-path <target-path> --attach-artifactory-path <target-path> --key <local-private-key-path> --key-alias <public-key-name> --provider-id <provider-id>Build evidence:
jf evd create --predicate <file-path> --predicate-type <predicate-type-uri> --build-name <name> --build-number <version-number> --attach-local <file-name> --attach-artifactory-temp-path <target-path> --attach-artifactory-path <target-path> --key <local-private-key-path> --key-alias <public-key-name> --provider-id <provider-id>Release Bundle v2 evidence:
jf evd create --predicate <file-path> --predicate-type <predicate-type-uri> --release-bundle <name> --release-bundle-version <version-number> --attach-local <file-name> --attach-artifactory-temp-path <target-path> --attach-artifactory-path <target-path> --key <local-private-key-path> --key-alias <public-key-name> --provider-id <provider-id>Application version evidence:
jf evd create --predicate <file-path> --predicate-type <predicate-type-uri> --application-key <name> --application-version <version-number> --attach-local <file-name> --attach-artifactory-temp-path <target-path> --attach-artifactory-path <target-path> --key <local-private-key-path> --key-alias <public-key-name> --provider-id <provider-id>Note
For sample commands, see Create Evidence CLI - Sample Commands.
Command Parameters
| Parameter | Required/Optional | Type | Description |
|---|---|---|---|
file-path | required unless --sigstore-bundle is used | string | Defines the path to a locally-stored, arbitrary JSON file that contains the predicate (the content of the evidence). |
predicate-type-uri | required unless --sigstore-bundle is used | string | The type of predicate defined by the JSON file. Sample predicate type URIs: |
local-private-key-path | optional | string | Path to a private key. Supported key types: Supported key formats: PEM and SSH |
RSA-1024 | optional | string | Case-sensitive name for the public key created from the private key. The public key is used to verify the DSSE envelope that contains the evidence.
|
md-file | optional | string | Path to a file that contains evidence in Markdown format. |
project-name | optional | string | Name of the project associated with the evidence subject. This argument can be used with build, package, and Release Bundle evidence. |
--provider-id | optional | string | Name of the provider that created the evidence. |
--sigstore-bundle | optional | string | Path to a Sigstore bundle file containing a pre-signed DSSE envelope. If the evidence subject is not provided (using
|
--integration | optional | string | Indicates an attestation created by a 3rd-party tool that can be converted by the JFrog Platform into evidence. Available values:
|
file-name | optional | string | Path to a local file to attach to the evidence. Incompatible with --attach-artifactory-path. |
file-path | optional | string | Defines the path to a repository in Artifactory to be used for the temporary uploading of attachments. Users have write permissions to this repository. This value is persisted until it is next changed. |
file-path | optional | string | Defines the path to a file stored in Artifactory that will be attached to the evidence. Incompatible with --attach-local. |
--format | optional | string | Output format:
Requires CLI version 2.105.0 or later. |
--type | optional | string | Can contain the value gh-commiter, used together with --build-name. |
Environment Variables
You can use the following environment variables as an alternative to using command parameters.
| Environment Variable | Command Parameter | Notes |
|---|---|---|
JFROG_CLI_SIGNING_KEY | --key | If the environment variable is not defined, the --key command is mandatory. |
JFROG_CLI_KEY_ALIAS | --key-alias | |
EVIDENCE_ATTACHMENT_ARTIFACTORY_TEMP_PATH | --attach-artifactory-temp-path | A third option is to add the following configuration to the Evidence YAML file: |
Note
In the unlikely event the public key is deleted from Artifactory, it may take up to 4 hours for the Evidence service to clear the key from the cache. Evidence can still be signed with the deleted key during this time.
Artifact Command Parameters
| Parameter | Required/Optional | Description |
|---|---|---|
--subject-repo-path | required for artifact evidence | The target path of the artifact. Each evidence file must contain a single subject and include the path. Artifacts located in local repositories aggregated inside virtual repositories are supported (evidence is added to the local path). |
--subject-sha256 | optional | Optional digest (sha256) of the artifact.
|
Package Command Parameters
| Parameter | Required/Optional | Description |
|---|---|---|
--package-name | required for package evidence | The package name. |
--package-version | required for package evidence | The package version. |
--package-repo-name | required for package evidence | The package repository name. |
Build Command Parameters
| Parameter | Required/Optional | Description |
|---|---|---|
--build-name | required (unless environment variables are used) | The build name. |
--build-number | required (unless environment variables are used) | The build number. |
Tip
You can use the
JFROG_CLI_BUILD_NAMEandJFROG_CLI_BUILD_NUMBERenvironment variables as an alternative to the build command parameters.
Release Bundle v2 Parameters
| Parameter | Required/Optional | Description |
|---|---|---|
--release-bundle | required for Release Bundle evidence | Release Bundle name. |
--release-bundle-version | required for Release Bundle evidence | Release Bundle version. |
Application Version Parameters
| Parameter | Required/Optional | Description |
|---|---|---|
--application-key | required for application version evidence | Application key. |
--application-version | required for application version evidence | Application version. |
Note
When DSSE verification is successful, the following message is displayed:
Evidence successfully created and verified.When DSSE verification is unsuccessful, the following message is displayed:
Evidence successfully created but not verified due to missing/invalid public key.
Frequently Asked Questions
Common questions about creating evidence with the JFrog CLI.
FAQs
Q: How do I create evidence for an artifact using the JFrog CLI?
A: Run jf evd create with --subject-repo-path (and optionally --subject-sha256) along with --predicate and --predicate-type. See Artifact Command Parameters.
Q: What authentication is required to create and deploy evidence?
A: Use an access token or the web login mechanism. Basic authentication using a username or password is not supported. See Authentication.
Q: What happens if I don't include a key alias when creating evidence?
A: DSSE verification with the public key is not performed during creation. If you do include --key-alias, verification fails when that key alias isn't found in Artifactory.
Q: What is the difference between --attach-local and --attach-artifactory-path?
A: --attach-local attaches a file from your local machine, while --attach-artifactory-path attaches a file already stored in Artifactory. The two flags are incompatible with each other.
Q: Can I create evidence from a pre-signed Sigstore bundle instead of a predicate?
A: Yes. Use --sigstore-bundle with a path to the bundle file. This flag is incompatible with --key, --key-alias, --predicate, --predicate-type, --subject-sha256, and all --attach-* flags.
Related Topics
Updated 2 days ago
