Skip to content

More GHA fixes - #6775

Merged
erikd merged 2 commits into
masterfrom
erikd/yet-more-gha-fixes
Nov 18, 2026
Merged

erikd merged 2 commits into
masterfrom
erikd/yet-more-gha-fixes

Conversation

@erikd

@erikd erikd commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Description

As per GHA hardening guidelines documented in the cardano-packages repo.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. These may include:
    • golden tests
    • property tests
    • roundtrip tests
    • integration tests
      See Running tests for more details
  • Any changes are noted in the CHANGELOG.md for affected package
    • cardano-node-chairman, cardano-submit-api and cardano-testnet instead need a
      changelog fragment in <package>/.changes/, because their CHANGELOG.md is generated
      from fragments at release time. Copy _TEMPLATE.yml from that directory, or run
      nix run github:input-output-hk/cardano-dev#herald -- new
  • The version bounds in .cabal files are updated
  • CI passes. See note on CI. The following CI checks are required:
    • Code is linted with hlint. See .github/workflows/check-hlint.yml to get the hlint version
    • Code is formatted with stylish-haskell. See .github/workflows/stylish-haskell.yml to get the stylish-haskell version
    • Code builds on Linux, MacOS and Windows for ghc-9.6 and ghc-9.12
  • Self-reviewed the diff

Note on CI

If your PR is from a fork, the necessary CI jobs won't trigger automatically for security reasons.
You will need to get someone with write privileges. Please contact IOG node developers to do this
for you.

@erikd
erikd requested review from a team as code owners November 18, 2026 02:41
@erikd
erikd requested a balanced review from Copilot and removed request for a team November 18, 2026 02:41

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.

🟡 Changes recommended

Package input remains vulnerable to command injection in the write-enabled job, and version validation rejects the current three-component release versions.

2 open issues
What changed in this PR

This PR continues hardening the repository’s GitHub Actions workflows by reducing direct expression interpolation in shell scripts and validating release inputs.

Changes:

  • Adds version and branch validation before Herald release steps.
  • Parses formatting paths into a Bash array for quoted argument expansion.
  • Passes the build result through an environment variable.
File Description
.github/​workflows/​stylish-haskell.yml Uses shell environment variables and array-based path arguments.
.github/​workflows/​herald-release.yml Validates release version and branch inputs before checkout.
.github/​workflows/​haskell.yml Reads the build result from an environment variable.

Review effort: Balanced

Comment thread .github/workflows/herald-release.yml Resolved
Comment thread .github/workflows/herald-release.yml Resolved
erikd and others added 2 commits November 18, 2026 13:59
The build-complete job interpolated ${{ needs.build.result }} and the
stylish-haskell job interpolated ${{ env.STYLISH_HASKELL_* }} directly
into their run: scripts. Read them from the environment instead; the
path list is split into an array so it is passed to git as separate
arguments, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
herald-release interpolates its package, version and base-branch inputs
into shell scripts in a job with contents and pull-requests write
access. Before checking out, reject a package that is not one of the
listed options, a version that is not empty or a plain A.B.C or A.B.C.D
version, and a branch that is not a valid branch name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@erikd
erikd force-pushed the erikd/yet-more-gha-fixes branch from e6e480e to 9e26673 Compare November 18, 2026 02:59
@erikd
erikd requested a balanced review from Copilot November 18, 2026 03:00

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.

🟢 Approval recommended

No active review issues are reported for the workflow-hardening changes.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@erikd
erikd added this pull request to the merge queue Nov 18, 2026
Merged via the queue into master with commit a48ede3 Nov 18, 2026
31 checks passed
@erikd
erikd deleted the erikd/yet-more-gha-fixes branch November 18, 2026 20:01
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.

4 participants