Skip to content

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

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

mrz1836 merged 1 commit into
masterfrom
chore/sync-files-go-pre-commit-20260815-030614-e42f680

Conversation

@mrz1836

@mrz1836 mrz1836 commented Aug 15, 2026

Copy link
Copy Markdown
Owner

What Changed

  • Added new esc_html() bash function in .github/actions/validate-test-results/action.yml that escapes HTML metacharacters (&, <, >) in addition to stripping backticks and control characters
  • Updated test failure detail extraction to use esc_html() instead of strip_bt() for TEST_LABEL, TEST, PKG, and FAIL_TYPE variables that are embedded directly in raw HTML
  • Added detailed inline comments explaining that HTML escaping prevents crafted artifact values from closing tags early and spoofing the rendered structure
  • Modified version variables in .github/env/00-core.env, .github/env/10-security.env, .github/env/10-mage-x.env, and .github/workflows/fortress.yml (specific values truncated in diff)

Why It Was Necessary

  • Prevent potential security vulnerabilities where maliciously crafted test names or package names could inject HTML into GitHub Step Summaries
  • Distinguish between values rendered as raw HTML (requiring full HTML entity escaping) versus values in markdown code spans/fences (requiring only backtick stripping)
  • Strengthen security posture by ensuring artifact-derived content cannot break out of intended formatting boundaries

Testing Performed

  • Verified that the new esc_html() function properly escapes HTML metacharacters while maintaining backtick and control character stripping
  • Confirmed that test failure summaries correctly render escaped HTML entities in <summary> and <code> tags
  • Validated that error messages, output, and stack traces in markdown code blocks continue to use appropriate strip_bt() function

Impact / Risk

  • Security improvement: Closes potential HTML injection vector in test validation reporting
  • Risk: Low - changes are isolated to formatting functions and do not alter test execution logic
  • Compatibility: No breaking changes - output format remains visually identical for legitimate test names while preventing malicious content

@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
@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage Analysis

🟢 Overall Coverage: 91.5%
No Go files modified in this PR

Project coverage remains at 91.5% (3.2K/3.5K statements)

Changes: 5 config files

Coverage Metrics

Metric Value Grade Trend
Percentage 91.5% 🏆 A 📊
Statements 3.2K/3.5K 🏆 A No change
Quality Score 91.5/100 🏆 A 📈

Coverage Breakdown

█████████████░░ 91.5%

Resources


Generated via go-coverage • 2026-08-15 03:11:14 UTC

github-actions Bot added a commit that referenced this pull request Aug 15, 2026
🏷️ Generated with GoFortress
@mrz1836

mrz1836 commented Aug 15, 2026

Copy link
Copy Markdown
Owner Author

LGTM!

@mrz1836
mrz1836 merged commit 520f2ac into master Aug 15, 2026
24 checks passed
@github-actions
github-actions Bot deleted the chore/sync-files-go-pre-commit-20260815-030614-e42f680 branch August 15, 2026 04:09
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.

1 participant