Skip to content

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

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

ffumero2003 wants to merge 11 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.
  • Validate the publication task graph in CI using --dry-run and placeholder credentials; use a fixed principal for registered SSH signing keys, independently of tagger metadata. Document the ordinary token’s checkout, signing-key lookup, milestone, and release uses.

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 and complete the release-owner TODO for the Maven artifact-signing trust source and independent primary-fingerprint confirmation. No production artifact-signing fingerprint is approved in this change. 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 93 release-tooling tests passed, including real disposable GPG and SSH signatures with email tagger identities, documented SSH-tag cleanup, signing-only SSH keys, both hardware-backed SSH public-key formats, enforcing/warn-only modes, moved-tag rejection, event-commit/master checks, unscored alerts, security API pagination and access failures, explicit generic secret-pattern queries with hidden values, milestones, action pinning, and changelog extraction. Workflow-contract tests exercise release CLI arguments and assert the Pages actions, status gate, release-check dependency, signed-tag/milestone/security commands, and weekly root Actions updates; fifteen explicit disposable configuration mutations are checked by scripts/tests/test_workflow_mutations.py, including unchanged baselines and assertion failures for the original eight workflow cases plus signed-tag, milestone, security, and Dependabot entry removals, plus removal of metadata validation and restoration of restricted changelog PR branches and removal of the release build command. A real Git fixture executes that metadata step against the event commit and rejects tag/version and changelog mismatches. The default maintainer-registry test confirms all three intended accounts are consumed; disposable added/removed-maintainer mutations fail.
  • 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.

@ffumero2003
ffumero2003 force-pushed the release-standard-conformance-workflows branch 10 times, most recently from 757b613 to fa5bb43 Compare November 19, 2026 15:41
Check the signed-tag, milestone, and security commands in the release-checks job and the weekly root Actions update entry. Preserve the original eight workflow mutations and add four removal probes for these checks.
…se gates

Query generic secret patterns explicitly and omit secret values from both alert responses. Cover pagination, inaccessible responses, and every supported generic pattern.

Retain registered hardware-backed SSH public keys in the allowed-signers input while keeping real signature verification and the fixed signer principal.
Execute the workflow metadata step against immutable Git fixtures, requiring tag/version and changelog agreement while ignoring uncommitted local metadata.

Add a mutation that removes the validation command and strengthen the workflow contract to detect it. Keep all existing workflow mutations.
@ffumero2003
ffumero2003 force-pushed the release-standard-conformance-workflows branch from fa5bb43 to 745b250 Compare November 19, 2026 15:51
Exercise signed-tag verification with the repository's default maintainer registry and assert each intended account's key endpoints are consumed.

Check the unrestricted changelog pull-request trigger and mutation-test restoration of the old branch filter.
Check that the deployment job runs a real Gradle build before Maven publication, and prove removal of the build command fails the workflow contract.
@ffumero2003
ffumero2003 marked this pull request as draft November 19, 2026 16:30
@ffumero2003

Copy link
Copy Markdown
Contributor Author

Converting to draft and parking this (stacked on #268). On hold pending internal coordination on this repo's release-process ownership; work preserved to revisit later. Not for merge in the meantime.

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