Create Evidence 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 (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> --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> --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> --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> --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> --key <local-private-key-path> --key-alias <public-key-name> --provider-id <provider-id>
Note
For sample commands, click here.
Command Parameters
Parameter | Required/Optional | Type | Description |
|---|---|---|---|
file-path | required | string | Defines the path to a locally-stored, arbitrary JSON file that contains the predicate (the content of the evidence). |
predicate-type-uri | required | 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 (see Tip below). Supported key types: 'rsa', 'ed25519', 'ecdsa' Supported key formats: PEM and SSH |
RSA-1024 | optional | string | Case-sensitive name for the public key created from the private key (see Tip below). 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. |
| optional | string | Name of the provider that created the evidence. |
| optional | string | Path to a Sigstore bundle file containing a pre-signed DSSE envelope. If the evidence subject is not provided (using
|
| 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 | Name of a local file to attach to the evidence. |
file-path | optional | string | Defines the path to a locally-stored file that will be attached to the evidence. This value is persisted until it is next changed. |
Environment Variables
You can use the following environment variables as an alternative to using command parameters.
Environment Variable | Command Parameter | Notes |
|---|---|---|
|
| If the environment variable is not defined, the |
|
| |
|
| 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 |
|---|---|---|
| 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). |
| 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 – see tip below) | The build name. |
--build-number | required (unless environment variables are used – see tip below) | The build number. |
Tip
You can use the
FROG_CLI_BUILD_NAMEandFROG_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.
Updated 18 days ago
