Skip to content

[Sync] Update project files from source repository (e42f680) - #155

Merged
mrz1836 merged 1 commit into
masterfrom
chore/sync-files-go-template-20260815-024254-e42f680
Aug 15, 2026
Merged

[Sync] Update project files from source repository (e42f680)#155
mrz1836 merged 1 commit into
masterfrom
chore/sync-files-go-template-20260815-024254-e42f680

Conversation

@mrz1836

@mrz1836 mrz1836 commented Aug 15, 2026

Copy link
Copy Markdown
Member

What Changed

  • Added new esc_html() function in .github/actions/validate-test-results/action.yml that escapes HTML metacharacters (&, <, >) in addition to stripping backticks and control characters
  • Updated TEST_LABEL, TEST, PKG, and FAIL_TYPE variables to use esc_html() instead of strip_bt() to prevent HTML injection when these values are written into raw HTML tags in the GitHub step summary
  • Kept strip_bt() for ERROR_MSG, OUTPUT, and STACK variables that are embedded in markdown code spans/fences where HTML is not interpreted
  • Modified version variables in .github/env/10-security.env, .github/env/00-core.env, and .github/env/10-mage-x.env (specific version changes truncated in diff)
  • Modified .github/workflows/fortress.yml (specific change truncated in diff)

Why It Was Necessary

  • Prevent security vulnerability where crafted test names or package names containing HTML metacharacters could break out of HTML tags and spoof the structure of GitHub Actions step summaries
  • Existing strip_bt() function only prevented markdown code span/fence breakout but did not protect against HTML injection in raw HTML contexts
  • Different sanitization strategies are needed based on whether artifact-derived values are embedded in raw HTML versus markdown code blocks

Testing Performed

  • Verified that esc_html() properly escapes &, <, and > characters in addition to applying existing strip_bt() sanitization
  • Confirmed that variables used in raw HTML contexts (<summary>, <code> tags) now use HTML escaping
  • Validated that variables used in markdown code spans/fences continue to use backtick-stripping only, avoiding literal entity rendering

Impact / Risk

  • Security improvement: Closes potential HTML injection vulnerability in test validation reporting
  • Risk: Low - enhances existing sanitization without changing functional behavior of test result display
  • Breaking changes: None - output format remains the same for legitimate test names, only prevents malicious input from breaking HTML structure

Copilot AI lite review requested due to automatic review settings August 15, 2026 02:43
@mrz1836 mrz1836 self-assigned this Aug 15, 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 15, 2026
@github-actions github-actions Bot added update General updates size/S Small change (11-50 lines) labels Aug 15, 2026
@sonarqubecloud

Copy link
Copy Markdown

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

Sync update from upstream repository to harden the GitHub Actions test-validation summary output against HTML injection, plus routine CI tool/version bumps.

Changes:

  • Added esc_html() to the validate-test-results composite action and applied it to artifact-derived fields rendered inside raw HTML in the step summary.
  • Updated pinned versions for govulncheck (and related Mage-X env pins), govulncheck’s Go toolchain version, and benchstat.
  • Bumped the GoFortress workflow header version metadata.

Reviewed changes

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

Show a summary per file
File Description
.github/actions/validate-test-results/action.yml Introduces esc_html() and applies it to untrusted values rendered into raw HTML in the step summary.
.github/env/10-security.env Updates the pinned govulncheck version used by security tooling.
.github/env/10-mage-x.env Aligns Mage-X tool version pins (govulncheck/benchstat).
.github/env/00-core.env Updates the Go toolchain version used specifically for govulncheck scanning.
.github/workflows/fortress.yml Updates GoFortress workflow header version metadata.

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

fi

TEST_LABEL=$(strip_bt "$(parse_test_label "$ARTIFACT_DIR" "$JSONL_NAME")")
TEST_LABEL=$(esc_html "$(parse_test_label "$ARTIFACT_DIR" "$JSONL_NAME")")
@mrz1836

mrz1836 commented Aug 15, 2026

Copy link
Copy Markdown
Member Author

LGTM!

@mrz1836
mrz1836 merged commit 3b4d27c into master Aug 15, 2026
25 checks passed
@github-actions
github-actions Bot deleted the chore/sync-files-go-template-20260815-024254-e42f680 branch August 15, 2026 03:02
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/S Small change (11-50 lines) update General updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants