Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
f8dabe5
test create evidence
mnsboev Jul 22, 2025
aad1afd
insecure registry
mnsboev Jul 22, 2025
bc6a7c1
insecure registry
mnsboev Jul 22, 2025
e352a77
Update Dockerfile to use specific base images for builder and runtime
mnsboev Jul 22, 2025
1716cc7
Update Dockerfile and workflow to use specific image names for builde…
mnsboev Jul 22, 2025
5299626
Update Dockerfile and workflow to use corrected image names for build…
mnsboev Jul 22, 2025
069db99
Remove conditional checks for pull requests in artifact attestation a…
mnsboev Jul 22, 2025
b985eb6
Enable pushing of Docker images for all events in the workflow
mnsboev Jul 22, 2025
51446cf
Make create_evidence.sh executable
mnsboev Jul 22, 2025
eaa5d21
Refactor evidence creation logic to read file paths directly from the…
mnsboev Jul 22, 2025
a5a59a2
Refactor create_evidence.sh to improve error handling and logging for…
mnsboev Jul 22, 2025
438b9a0
Remove detailed logging and error handling for evidence creation in c…
mnsboev Jul 22, 2025
efd2c7a
Fix subject-name path for artifact attestation in docker-publish.yml
mnsboev Jul 22, 2025
98b32c0
Update artifact attestation subject-name and subject-digest to use im…
mnsboev Jul 22, 2025
1afc7c3
Fix image name reference in Get Image Digest step of docker-publish.yml
mnsboev Jul 22, 2025
635edfe
Fix image digest retrieval by including the registry in the Get Image…
mnsboev Jul 22, 2025
ac5fa18
Fix Get Image Digest step to use output from build step and update ou…
mnsboev Jul 22, 2025
7634a3e
Fix subject-name format in artifact attestation to include sha256 prefix
mnsboev Jul 22, 2025
40c5c1c
Refactor artifact attestation to use fixed subject-name and subject-d…
mnsboev Jul 22, 2025
6e7e4b8
Fix subject-digest format in artifact attestation to include sha256 p…
mnsboev Jul 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
- main

env:
REGISTRY: 192.168.1.2:8082
IMAGE_NAME: my-docker-local/sigs
REGISTRY: evidencetrial.jfrog.io
IMAGE_NAME: misha-docker-docker-local/sigs

jobs:
build-and-push:
Expand All @@ -34,8 +34,8 @@ jobs:
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: admin
password: password
username: ${{ secrets.user }}
password: ${{ secrets.password }}

- name: Extract metadata (tags, labels) for Docker
id: meta
Expand All @@ -53,16 +53,23 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Enable provenance and SBOM generation
provenance: true
sbom: true

- name: Generate artifact attestation
if: github.event_name != 'pull_request'
uses: actions/attest-build-provenance@v2
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.build-and-push.outputs.digest }}
subject-name: ${{ env.IMAGE_NAME }}/pr-1/list.manifest.json
subject-digest: sha256:31aee6a749e3a739be317bddcb145a2f9ffec98b8c357410862c9694b6a3df31

- name: Create evidence from attestation
run: |
./create_evidence.sh




5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use the official lightweight Alpine image as the base
FROM golang:alpine AS builder
FROM evidencetrial.jfrog.io/misha-docker-docker/golang:alpine AS builder


# Set the working directory inside the container
Expand All @@ -18,7 +18,8 @@ COPY src/ ./src/
RUN go build -o main ./src/cmd/main.go

# Use a minimal runtime image
FROM alpine:latest
FROM evidencetrial.jfrog.io/misha-docker-docker/alpine:latest


# Set the working directory inside the runtime container
WORKDIR /app
Expand Down
9 changes: 2 additions & 7 deletions buildkitd.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
insecure-entitlements = ["security.insecure"]
[registry."192.168.50.113:8082"]
http = true

[registry."10.1.27.21:8082"]
http = true

[registry."10.1.66.83:8082"]
http = true
[registry."evidencetrial.jfrog.io"]
insecure = true
31 changes: 31 additions & 0 deletions create_evidence.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

set -euo pipefail

# Folder where the runner temp files are stored
RUNNER_TEMP=${RUNNER_TEMP:-""}

if [[ -z "$RUNNER_TEMP" ]]; then
echo "::warning RUNNER_TEMP environment variable is not set. Skipping evidence creation."
exit 0
fi

ATTESTATION_PATHS_FILE="$RUNNER_TEMP/created_attestation_paths.txt"

# Check if attestation paths file exists
if [[ ! -f "$ATTESTATION_PATHS_FILE" ]]; then
echo "::info No attestation paths file found. Skipping evidence creation. Searched for: $ATTESTATION_PATHS_FILE."
exit 0
fi

echo "::info Reading attestation paths file: $ATTESTATION_PATHS_FILE"

while IFS= read -r FILE_PATH || [[ -n "$FILE_PATH" ]]; do
# Trim whitespaces
FILE_PATH=$(echo "$FILE_PATH" | xargs)

if [[ -z "$FILE_PATH" ]]; then
continue
fi
./jf evd create --sigstore-bundle $FILE_PATH
done < "$ATTESTATION_PATHS_FILE"
Binary file added jf
Binary file not shown.
Loading