Skip to content

[Sync] Update project files from source repository (4a55386) - #355

Merged
mrz1836 merged 1 commit into
masterfrom
chore/sync-files-go-bitcoin-20260824-152328-4a55386
Aug 24, 2026
Merged

mrz1836 merged 1 commit into
masterfrom
chore/sync-files-go-bitcoin-20260824-152328-4a55386

Conversation

@mrz1836

@mrz1836 mrz1836 commented Aug 24, 2026

Copy link
Copy Markdown
Member

What Changed

  • Added CR/LF stripping to caller-supplied version strings in .github/actions/setup-benchstat/action.yml to prevent output-injection attacks via $GITHUB_OUTPUT and workflow commands
  • Added validation in setup-benchstat to reject Go versions with MAJOR < 1 (e.g., "0.99") to prevent incorrect benchstat version selection logic
  • Extracted shared helper functions (to_int and effective_failures) from .github/actions/validate-test-results/action.yml into new shared script .github/scripts/test-result-helpers.sh to prevent drift between validation and summary steps
  • Added invalid JSON detection in validate-test-results to treat unparseable summary lines as hard failures instead of silently underreporting
  • Updated MAGE_X_GORELEASER_VERSION from v2.17.1 to v2.18.0 in .github/env/10-mage-x.env
  • Modified version variables in .github/env/10-pre-commit.env (1 line changed)
  • Updated permissions and configuration in .github/workflows/codeql-analysis.yml (3 additions, 3 removals)
  • Updated workflow configuration in .github/workflows/fortress-security-scans.yml (1 addition, 1 removal)
  • Updated workflow configuration in .github/workflows/fortress-test-matrix.yml (75 additions, 7 removals)
  • Updated workflow configuration in .github/workflows/scorecard.yml (1 addition, 1 removal)

Why It Was Necessary

  • Security hardening to prevent injection attacks through crafted input values containing newlines or control characters in GitHub Actions workflows
  • Prevent silent failure undercounting when test result JSON is corrupted or truncated
  • Reduce code duplication and prevent logic drift between validation and summary generation steps by centralizing shared helper functions

Testing Performed

  • Verify that CR/LF stripping correctly sanitizes malicious version strings before they reach $GITHUB_OUTPUT or workflow commands
  • Validate that invalid Go version strings (e.g., "0.99") are properly rejected with appropriate error messages
  • Confirm that corrupted JSON summary lines are detected and counted as failures rather than silently coercing to zero

Impact / Risk

  • Security improvement - Prevents output-injection and arithmetic-eval injection attack vectors in GitHub Actions
  • Low risk - Changes are defensive hardening that reject invalid input; valid inputs continue to work as before
  • Improved reliability - Test result validation now catches corrupted JSONL files instead of underreporting failures

Copilot AI lite review requested due to automatic review settings August 24, 2026 15:23
@mrz1836 mrz1836 self-assigned this Aug 24, 2026
@mrz1836 mrz1836 added automated-sync Automated sync PR, e.g. from a fork or external repo automerge Label to automatically merge pull requests that meet all required conditions chore Simple dependency updates or version bumps labels Aug 24, 2026
@github-actions github-actions Bot added update General updates size/L Large change (201-500 lines) labels Aug 24, 2026

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.

Pull request overview

This PR syncs CI/GitHub Actions infrastructure changes from the source repository, focusing on security hardening (workflow-command / output-injection mitigations), more reliable test-result processing, and routine version bumps for CI tooling.

Changes:

  • Hardened multiple workflows/actions against injection vectors by stripping CR/LF from untrusted inputs and percent-encoding values embedded in ::error workflow commands.
  • Centralized test-result helper functions into a shared script and added invalid-JSON detection while summarizing CI JSONL outputs.
  • Updated pinned github/codeql-action/* SHAs and bumped CI tool versions in .github/env.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/scorecard.yml Bumps pinned CodeQL upload-sarif action SHA/version.
.github/workflows/fortress-test-matrix.yml Adds stronger matrix validation and sanitization/encoding of untrusted values emitted into logs and workflow commands.
.github/workflows/fortress-security-scans.yml Bumps pinned CodeQL upload-sarif action SHA/version.
.github/workflows/codeql-analysis.yml Bumps pinned CodeQL init/autobuild/analyze action SHAs/versions.
.github/scripts/test-result-helpers.sh New shared bash helpers for safe integer coercion and failure counting.
.github/env/10-pre-commit.env Bumps GO_PRE_COMMIT_VERSION.
.github/env/10-mage-x.env Bumps MAGE_X_GORELEASER_VERSION.
.github/actions/validate-test-results/action.yml Uses shared helpers; adds invalid JSON detection during aggregation (see review comment re: “hard failure” behavior).
.github/actions/setup-benchstat/action.yml Strips CR/LF from version inputs and rejects Go versions with MAJOR < 1 to prevent incorrect benchstat selection.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mrz1836
mrz1836 merged commit d765555 into master Aug 24, 2026
25 checks passed
@github-actions
github-actions Bot deleted the chore/sync-files-go-bitcoin-20260824-152328-4a55386 branch August 24, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated-sync Automated sync PR, e.g. from a fork or external repo automerge Label to automatically merge pull requests that meet all required conditions chore Simple dependency updates or version bumps size/L Large change (201-500 lines) update General updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants