Skip to content

ci: stop the PR image builds from printing the GitHub event payload (PER-17677) - #420

Merged
EliMoshkovich merged 5 commits into
mainfrom
eli/per-17677-ci-image-builds-no-provenance
Oct 22, 2026
Merged

EliMoshkovich merged 5 commits into
mainfrom
eli/per-17677-ci-image-builds-no-provenance

Conversation

@EliMoshkovich

@EliMoshkovich EliMoshkovich commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Linear: PER-17677

Why

In each step's Metadata log group, docker/build-push-action prints the build's metadata file. That includes buildx.build.provenance, and its invocation.environment holds github_event_payload, the whole GitHub event. On a pull_request run that's the PR's title and description as they were when the run started. So every build-pdp-image job copies the PR description into the run's public log, and editing the description later doesn't remove it from there.

The payload comes from two places:

  • The metadata file. buildx writes provenance into it separately from any attestation, in min mode by default, and min already includes the event payload. BUILDX_METADATA_PROVENANCE controls this.
  • The attestation. On a public repo the action defaults to --attest type=provenance,mode=max, which embeds the same payload. The provenance input controls this.

What

Change Why
BUILDX_METADATA_PROVENANCE: disabled in the build-pdp-image job env Stops the metadata file, and so the printed Metadata group, from carrying provenance. On its own, the first commit (provenance: false) left 6 github_event_payload occurrences in this PR's first run.
provenance: false on the three build-push-action steps: the rust_chef cache step, the arm64 opa_build step, and the build that loads permitio/pdp-v2:next No attestation is built that embeds the payload. The first two only write to the build cache. The third loads the image for pdp-tester and the scans and is never pushed, so there's nothing to attest.

One more commit, because it was turning this PR's CI red:

Change Why
GitPython floor 3.1.59 → 3.2.1 in pyproject.toml; lock moves only gitpython 3.2.0 → 3.2.1 (uv 0.12.19, so revision stays 3) docker-scout now reports CVE-2026-114145 (high) on gitpython 3.2.0, fixed in 3.2.1, so the image gate fails on every new PDP build. Nothing here imports GitPython; it comes in through opal-common.

release.yml is unchanged. Whether published images should carry provenance, and in which mode, is part of signing and provenance for releases (PER-16901).

Verification

  • pre-commit (the repo's hooks) and zizmor --offline on tests.yml pass.
  • First run (provenance: false only): the builds ran with --attest type=provenance,disabled=true, but the log still had github_event_payload 6 times, from the metadata file.
  • Run on the current head (ec9cbad, run 39832596994): build-pdp-image passed, and its log has 0 github_event_payload and 0 buildx.build.provenance. The three Metadata groups are still printed, without provenance.

🤖 Generated with Claude Code

…PER-17677)

On a public repo docker/build-push-action defaults to max-mode provenance,
and prints it in each step's "Metadata" log group. Its invocation block holds
the whole event payload, which on a pull_request run is the PR title and
description as they were when the run started. The three tests.yml builds
only fill the cache or load the image locally, so turn provenance off there.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 22, 2026 18:17
@linear-code

linear-code Bot commented Oct 22, 2026

Copy link
Copy Markdown

PER-17677

@github-actions

Copy link
Copy Markdown

✅ Cargo Security Audit

No vulnerable crates in Cargo.lock.

1 warning(s): unmaintained or yanked crates

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

PDP image vulnerability report

Image: permitio/pdp-v2:next

✅ No CRITICAL or HIGH findings after waivers.

Trivy

No CRITICAL or HIGH findings.

Docker Scout

No CRITICAL or HIGH findings.


Scanned by Trivy, Docker Scout. Waivers: .trivyignore.yaml + .docker/scout/pdp-v2.vex.json. View run

…uilds (PER-17677)

provenance: false only drops the attestation. buildx still writes min-mode
provenance into the metadata file, and the action prints that file; its
invocation environment holds the whole GitHub event payload. The first run on
this PR still printed it 6 times. BUILDX_METADATA_PROVENANCE=disabled turns it off.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@zeevmoney zeevmoney left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved — no CRITICAL or HIGH issues found.

Non-blocking:

  • LOW .github/workflows/tests.yml:132 — two claims in the provenance: false comment don't fit every step

Details are in the inline comments on each line.

Comment thread .github/workflows/tests.yml Outdated
EliMoshkovich and others added 2 commits October 22, 2026 14:19
The action adds its default attestation only to the cache-only builds, not to
the load: true one, and the arm64 opa_build step only compiles a stage.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
docker-scout now reports CVE-2026-114145 (high) on gitpython 3.2.0, fixed in
3.2.1, so the image gate fails on every new PDP build, this PR's included.
Floor the transitive dependency at 3.2.1 and move only gitpython in the lock
(uv 0.12.19, the image's version, so revision stays 3).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@EliMoshkovich
EliMoshkovich merged commit 987ce67 into main Oct 22, 2026
16 checks passed
@EliMoshkovich
EliMoshkovich deleted the eli/per-17677-ci-image-builds-no-provenance branch October 22, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants