Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix(docker): sign images by digest instead of tag

LearningCircuit40ccb463cb2d
diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml
index e4b102d4b3..38479f71cf 100644
--- a/.github/workflows/docker-publish.yml
+++ b/.github/workflows/docker-publish.yml
@@ -228,6 +228,8 @@ jobs:
- name: Create and push multi-platform manifest
id: manifest
+ env:
+ DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: |
set -euo pipefail
# Get the tags from metadata (newline separated)
@@ -242,29 +244,37 @@ jobs:
if [ -n "$tag" ]; then
echo "Creating manifest for: $tag"
docker buildx imagetools create -t "$tag" \
- ${{ secrets.DOCKER_USERNAME }}/local-deep-research:amd64-${{ github.sha }} \
- ${{ secrets.DOCKER_USERNAME }}/local-deep-research:arm64-${{ github.sha }}
+ "${DOCKER_USERNAME}/local-deep-research:amd64-${{ github.sha }}" \
+ "${DOCKER_USERNAME}/local-deep-research:arm64-${{ github.sha }}"
fi
done <<< "$TAGS"
+ # Get the manifest digest for the primary tag (used for signing)
+ DIGEST=$(docker buildx imagetools inspect "$FIRST_TAG" --format '{{json .Manifest.Digest}}' | tr -d '"')
+ echo "digest=$DIGEST" >> "$GITHUB_OUTPUT"
+ echo "Manifest digest: $DIGEST"
+
- name: Sign Docker images with Cosign
env:
TAGS: ${{ steps.meta.outputs.tags }}
+ DIGEST: ${{ steps.manifest.outputs.digest }}
+ DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: |
set -euo pipefail
- # Sign each image tag using keyless signing with GitHub OIDC
- while IFS= read -r tag; do
- if [ -n "$tag" ]; then
- echo "Signing image: $tag"
- cosign sign --yes "$tag"
- fi
- done <<< "$TAGS"
+ # Sign by digest for reliability with manifest lists
+ # All tags point to the same manifest, so we sign once by digest
+ IMAGE_REF="${DOCKER_USERNAME}/local-deep-research@${DIGEST}"
+ echo "Signing image by digest: $IMAGE_REF"
+ cosign sign --yes "$IMAGE_REF"
- name: Generate SLSA provenance attestation
env:
- PRIMARY_TAG: ${{ steps.manifest.outputs.primary_tag }}
+ DIGEST: ${{ steps.manifest.outputs.digest }}
+ DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: |
set -euo pipefail
+ IMAGE_REF="${DOCKER_USERNAME}/local-deep-research@${DIGEST}"
+
# Generate SLSA provenance predicate
# Note: SLSA spec requires "sha1" field name for git commit digest
cat > provenance.json <<EOF
@@ -304,33 +314,39 @@ jobs:
EOF
# Attach provenance to image
- cosign attest --yes --predicate provenance.json --type slsaprovenance "$PRIMARY_TAG"
+ cosign attest --yes --predicate provenance.json --type slsaprovenance "$IMAGE_REF"
- name: Verify image signature
env:
- PRIMARY_TAG: ${{ steps.manifest.outputs.primary_tag }}
+ DIGEST: ${{ steps.manifest.outputs.digest }}
+ DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: |
set -euo pipefail
- echo "Verifying signature for: $PRIMARY_TAG"
+ IMAGE_REF="${DOCKER_USERNAME}/local-deep-research@${DIGEST}"
+ echo "Verifying signature for: $IMAGE_REF"
cosign verify \
--certificate-identity-regexp="https://github.com/${{ github.repository }}" \
--certificate-oidc-issuer=https://token.actions.githubusercontent.com \
- "$PRIMARY_TAG"
+ "$IMAGE_REF"
- name: Attach SBOM to image
env:
+ DIGEST: ${{ steps.manifest.outputs.digest }}
PRIMARY_TAG: ${{ steps.manifest.outputs.primary_tag }}
+ DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: |
set -euo pipefail
+ IMAGE_REF="${DOCKER_USERNAME}/local-deep-research@${DIGEST}"
+
# Generate SBOM using syft
docker pull "$PRIMARY_TAG"
syft "$PRIMARY_TAG" -o spdx-json > sbom.spdx.json
- # Attach SBOM to image
- cosign attach sbom --sbom sbom.spdx.json "$PRIMARY_TAG"
+ # Attach SBOM to image by digest
+ cosign attach sbom --sbom sbom.spdx.json "$IMAGE_REF"
# Sign the SBOM
- cosign sign --yes --attachment sbom "$PRIMARY_TAG"
+ cosign sign --yes --attachment sbom "$IMAGE_REF"
- name: Upload SBOM artifact
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0