docker build -t $REGISTRY_USERNAME snyk-juice-shop:v1.0.3 --platform=linux/amd64 . --pushsnyk container test $REGISTRY_USERNAME/snyk-juice-shop:v1.0.3 --platform=linux/amd64 --sarif-file-output=snyk-sarif.jsonsnyk container sbom $REGISTRY_USERNAME/snyk-juice-shop:v1.0.3 --format=spdx2.3+json > bom.spdx.jsonoras attach "docker.io/$REGISTRY_USERNAME/snyk-juice-shop:v1.0.3" \
--artifact-type application/spdx+json \
bom.spdx.jsonoras discover docker.io/$REGISTRY_USERNAME/snyk-juice-shop:v1.0.3oras pull docker.io/$REGISTRY_USERNAME/snyk-juice-shop@$SBOM_SHA -o ./artifactskubectl run verified -n sbom-demo --image=iuriikogan/snyk-juice-shop:v1.0.3Expected Output: pod/verified created
Show logs on Ratify pod in Gatekeeper-System namespace
{
"subject": "docker.io/iuriikogan/snyk-juice-shop@sha256:97e7c99eb657bcc631232b747ff7904b2fea40b7301b7c4658e62f6ec6a82dfd",
"referenceDigest": "sha256:05149e16a75f5667d31906b1aa595c9dca6947c79a3de904292b513cbc6ea400",
"artifactType": "application/spdx+json",
"verifierReports": [
{
"isSuccess": true,
"message": "SBOM verification success. No license or package violation found.",
"name": "verifier-sbom",
"verifierName": "verifier-sbom",
"type": "sbom",
"verifierType": "sbom",
"extensions": {
"creationInfo": {
"created": "2024-09-23T13:43:58Z",
"creators": [
"Tool: Snyk SBOM Export API v1.98.0",
"Organization: Snyk"
],
"licenseListVersion": "3.19"
}
}
}
],
"nestedReports": []
}kubectl run unverified -n sbom-demo --image=iuriikogan/unverified:latestExpected Output: Error from server (Forbidden): admission webhook "validation.gatekeeper.sh" denied the request: [ratify-constraint] Subject failed verification: docker.io/iuriikogan/unverified
Authenticating with Artifactory:
echo $ARTIFACTORY_PAT | oras login artifactory.your-company.com -u ARTIFACTORY_USERNAME --password-stdinPushing an artifact to Artifactory:
oras push artifactory.your-company.com/$ARTIFACTORY_OCI_REPOSITORY/myartifact:v1 --artifact-type application/text ./myartifact.txtPulling an artifact from Artifactory
oras pull artifactory.your-company.com/$ARTIFACTORY_OCI_REPOSITORY/myartifact:v1Addtional Registy configuration can be found here: ORAS-Registry-Configuration