Skip to content

ci: add release gates and pin workflow actions - #269

Open
ffumero2003 wants to merge 3 commits into
release-standard-conformancefrom
release-standard-conformance-workflows
Open

ffumero2003 wants to merge 3 commits into
release-standard-conformancefrom
release-standard-conformance-workflows

Conversation

@ffumero2003

@ffumero2003 ffumero2003 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Context

Tag-triggered publication needs explicit release checks, immutable action revisions, and release notes drawn from the reviewed changelog. This PR is stacked on #268 (release-standard-conformance). After #268 is squash-merged, rebase only this branch's workflow commits onto the updated master, then retarget this PR to master.

Changes

  • Pin every workflow action to a commit SHA and enable Dependabot updates for action pins. Replace the Pages and status community actions with official Pages artifact/OIDC deployment and the GitHub status API; replace release creation with gh release create --notes-file using the exact version changelog section.
  • Bind the fetched release tag to the workflow's immutable event commit, check that it belongs to master, validate the Gradle/changelog version and complete version milestone, and build that same commit. Require readable security data and hold for medium/high/critical findings, open secret alerts, or unscored active advisories.
  • Verify GPG/SSH tags against registered keys for the named maintainers. Verification warns by default; ENFORCE_SIGNED_TAGS=true enables enforcement after enrollment. Disposable fixture keys exist only during tests.
  • Scope publishing secrets and workflow permissions, and document the required security-read token and Pages repository/environment settings.

The Maven Central publishing command, GPG artifact-signing secrets, Gradle publication configuration, and Sonatype staging endpoint/tasks remain unchanged. OIDC is used for Pages only.

Before merging this PR, switch Pages to GitHub Actions and configure the github-pages environment. Before the first tagged release, provision the documented read-only security token/source access. Signed-tag verification remains warn-only until maintainers enroll their keys and ENFORCE_SIGNED_TAGS=true is deliberately enabled.

Verification

  • ./gradlew build --no-daemon passed.
  • All 41 release-tooling tests passed, including real disposable GPG and SSH signatures with email tagger identities, signing-only SSH keys, enforcing/warn-only modes, moved-tag rejection, event-commit/master checks, unscored alerts, security API pagination and access failures, milestones, action pinning, and changelog extraction.
  • Focused tests were observed failing before the new behavior was implemented. The unknown-state regression also failed before rejection was added.
  • actionlint, shell syntax, changelog consistency, and whitespace checks passed. The public Pages status API returned operational through the replacement command.
  • The local SDK health check passed against a disposable loopback simulator.
  • Sonatype publishing/staging task-graph validation passed with --dry-run; all publishing operations were skipped. No production release was attempted.
  • A read-only live security probe held on unavailable code-scanning access, as designed. This is not security clearance; the documented RELEASE_READ_TOKEN and source access must be configured before publishing. Pages must be switched to GitHub Actions before the new Pages deployment is used.

Closes #267

@ffumero2003

Copy link
Copy Markdown
Contributor Author

Snyk Code (code/snyk) — 6 findings triaged as false positives

The 6 newly introduced SAST issues originate in the release tooling added by the stacked base #268 (scripts/release.py, scripts/tests/test_release.py); this PR inherits them. Triage is identical:

  • Command Injection (CWE-78) ×3 — release.py:45, release.py:51, test_release.py:137. These subprocess.run calls use list-form arguments with no shell=True; the flagged "environment variable" is the Changie executable path (e.g. [changie, "merge"]), not a shell string. With no shell there is no command string to inject — the env var only selects which trusted binary to invoke.
  • Path Traversal (CWE-23) ×3 — release.py:42-48 (shutil.copy / copytree). The flagged input is a maintainer-supplied command-line argument to a local release script run by maintainers and CI, not untrusted external input crossing a trust boundary.

These are local release/test scripts executed by trusted operators and CI with trusted inputs; none of the flagged flows is an untrusted trust boundary. code/snyk is not a required status check on this repository, so it does not gate merge. The findings are being dismissed in Snyk as false positives with this rationale.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant