Skip to content

Harden release workflow cache and checkout use#74

Merged
gontzess merged 2 commits into
mainfrom
gontzess/disable-release-caches
May 13, 2026
Merged

Harden release workflow cache and checkout use#74
gontzess merged 2 commits into
mainfrom
gontzess/disable-release-caches

Conversation

@gontzess
Copy link
Copy Markdown
Contributor

@gontzess gontzess commented May 13, 2026

Why

The shared release workflow signs and publishes release artifacts, uploads to S3/ECR, and records registry metadata while holding OIDC permissions and release secrets. actions/setup-go restores GitHub Actions caches by default, so these privileged jobs should not restore dependency or build state written by other workflow runs. The workflow should also avoid inherited token permissions and avoid persisting checkout credentials into working trees unless a job needs them.

What this changes

  • Adds cache: false to every actions/setup-go@v6 step in the release workflow.
  • Adds top-level default-deny permissions: {} while keeping explicit per-job grants for the jobs that need them.
  • Adds persist-credentials: false to every release workflow checkout.
  • Adds safe relative-path validation for dockerfile_template, docker_extra_files, and msi_wxs_path before those inputs are used in generated release config paths.
  • Passes validation inputs through step environment variables instead of interpolating them directly into shell scripts.

No setup-node cache or explicit actions/cache use was found in the release workflow.

Validation

  • Parsed .github/workflows/release.yaml with yq.
  • Ran git diff --check.
  • Verified every release setup-go@v6 step now has cache: false.
  • Verified every release actions/checkout@v5 step now has persist-credentials: false.
  • Checked existing custom Docker input values found in caller config; they pass the stricter path rules.
  • Ran orch-cross-review focused on correctness, regressions, and security hardening; no blockers were reported.

@gontzess gontzess changed the title Disable release dependency caches Harden release workflow cache and checkout use May 13, 2026
@gontzess gontzess requested review from ggreer and kans May 13, 2026 15:19
@gontzess gontzess merged commit 9726023 into main May 13, 2026
1 check passed
@gontzess gontzess deleted the gontzess/disable-release-caches branch May 13, 2026 15:49
gontzess added a commit that referenced this pull request May 13, 2026
**Why**

The release workflow accepts a tag input and then builds, signs,
uploads, and records release metadata. The caller checkout should be
tied directly to that tag so a release run cannot publish artifacts from
one commit while labeling or recording them as another tag.

**What this changes**

- Checks out caller code from `refs/tags/${{ inputs.tag }}` in the
binaries, Windows, Docker, and registry metadata jobs.
- Verifies each checked-out caller repository HEAD matches the tag
target before continuing.
- Records the verified connector checkout commit SHA in the registry
metadata instead of using `github.sha`.
- Documents the release source identity invariant in the release
workflow docs.

This PR is stacked on #74 and should merge after it.

**Validation**

- Parsed `.github/workflows/release.yaml` with `yq`.
- Ran `git diff --check`.
- Verified all caller/connector release checkouts use `refs/tags/${{
inputs.tag }}`.
- Ran `orch-cross-review` focused on annotated/lightweight tags,
cross-runner behavior, registry commit recording, and regressions; no
blockers were reported.
- Ran a private connector release canary against this branch; the
release completed successfully, including macOS, Windows, Docker,
manifest publication, artifact verification, and registry recording
jobs.
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.

2 participants