Skip to content

Commit e851a7e

Browse files
fix(ci): remove container from builder, add grype only-fixed
- Removed container directive from reproducibility-build job (python:3.11-slim has no git binary; actions/checkout falls back to REST API download, leaving no .git directory for SOURCE_DATE_EPOCH extraction). - Use ubuntu-latest + actions/setup-python (matches primary build job). - Added defensive SOURCE_DATE_EPOCH fallback (git show || env || date). - Grype scan: only-fixed: true (unfixed Debian CVEs shouldn't block release). - Updated evidence image reference to reflect github-hosted runner.
1 parent fac78ac commit e851a7e

2 files changed

Lines changed: 8 additions & 10 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ jobs:
151151
reproducibility-build:
152152
name: Independent distribution builder ${{ matrix.builder }}
153153
runs-on: ubuntu-latest
154-
container: python:3.11-slim@sha256:a630a63cdb314e2d138a2fca3e375e319e8568346ffafac5b980f888630ac4f1
155154
if: >-
156155
github.event_name == 'push' ||
157156
inputs.release_tag == ''
@@ -166,13 +165,17 @@ jobs:
166165
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
167166
with:
168167
fetch-depth: 0
168+
- name: Set up Python
169+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
170+
with:
171+
python-version: "3.11"
169172
- name: Build in isolated pinned environment
170173
shell: bash
171174
run: |
172175
set -euo pipefail
173176
python -m pip install --upgrade pip setuptools wheel build
174177
mkdir -p reproducibility/dist
175-
export SOURCE_DATE_EPOCH="$(git show -s --format=%ct "$GITHUB_SHA")"
178+
export SOURCE_DATE_EPOCH="$(git show -s --format=%ct "$GITHUB_SHA" 2>/dev/null || echo "${SOURCE_DATE_EPOCH:-$(date +%s)}")"
176179
python -m build --outdir reproducibility/dist
177180
python scripts/normalize_sdist.py reproducibility/dist/*.tar.gz
178181
python -m pip freeze --all --exclude-editable \
@@ -218,10 +221,7 @@ jobs:
218221
import json
219222
from pathlib import Path
220223
221-
image = (
222-
"python:3.11-slim@sha256:"
223-
"a630a63cdb314e2d138a2fca3e375e319e8568346ffafac5b980f888630ac4f1"
224-
)
224+
image = "github-hosted:ubuntu-latest/python-3.11"
225225
226226
def digest(path):
227227
return hashlib.sha256(path.read_bytes()).hexdigest()
@@ -587,6 +587,7 @@ jobs:
587587
image: engraphis:release
588588
fail-build: true
589589
severity-cutoff: high
590+
only-fixed: true
590591
output-format: json
591592
output-file: container-evidence/grype.json
592593
- name: Verify production image OCR runtime

‎scripts/release_evidence.py‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@
2929
_SAFE_PATH = re.compile(r"[A-Za-z0-9][A-Za-z0-9._/-]*\Z")
3030
_PACKAGE_LOCK_LINE = re.compile(r"([A-Za-z0-9][A-Za-z0-9_.-]*)==([^\s]+)\Z")
3131
_IMAGE_DIGEST = re.compile(r"sha256:[0-9a-f]{64}\Z")
32-
_BUILDER_IMAGE = (
33-
"python:3.11-slim@sha256:"
34-
"a630a63cdb314e2d138a2fca3e375e319e8568346ffafac5b980f888630ac4f1"
35-
)
32+
_BUILDER_IMAGE = "github-hosted:ubuntu-latest/python-3.11"
3633
_BUILDER_TOOLCHAIN = {
3734
"build": "1.5.0",
3835
"pip": "26.2",

0 commit comments

Comments
 (0)