Skip to content

Update SHA validation: Tighten and align grep pattern with script output#2905

Open
vijaysaayi wants to merge 1 commit intomainfrom
user/visaayir/tighten-sha-validation
Open

Update SHA validation: Tighten and align grep pattern with script output#2905
vijaysaayi wants to merge 1 commit intomainfrom
user/visaayir/tighten-sha-validation

Conversation

@vijaysaayi
Copy link
Copy Markdown
Contributor

The validate-sha workflow grepped for ^PASSED$ but the scripts used inconsistent output messages. This PR aligns all scripts and the workflow to use SHA VALIDATION PASSED / SHA VALIDATION FAILED.

Changes

  • build/scripts/validate-dotnet-sha.sh — output SHA VALIDATION PASSED / SHA VALIDATION FAILED
  • build/scripts/validate-php-sha.sh — output SHA VALIDATION PASSED / SHA VALIDATION FAILED
  • .github/workflows/validate-sha.yaml — grep for SHA VALIDATION PASSED in both PHP and .NET steps

Testing

Both scripts were run locally against images/constants.yml with valid and tampered SHAs.

Scenario Script Output Workflow grep Result
.NET all SHAs valid SHA VALIDATION PASSED exit 0
.NET SHA mismatch (tampered ASPNET_CORE_APP_80_SHA) SHA VALIDATION FAILED exit 1
PHP all SHAs valid SHA VALIDATION PASSED exit 0
PHP SHA mismatch (tampered php84Version_SHA) SHA VALIDATION FAILED - SHA256 mismatches detected! exit 1

The workflow also triggers on this PR since it touches build/scripts/validate-*-sha.sh.

  • The purpose of this PR is explained in this message or in an issue. If an issue please include a reference as #<issue_number>.
  • Tests are included and/or updated for code changes.
  • Proper license headers are included in each file.

Update validation scripts and workflow to use 'SHA VALIDATION PASSED'
and 'SHA VALIDATION FAILED' consistently across both the PHP and .NET
validation scripts, and align the workflow grep patterns to match.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vijaysaayi vijaysaayi requested a review from a team as a code owner April 23, 2026 05:21
@vijaysaayi vijaysaayi enabled auto-merge (squash) April 23, 2026 08:56
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.

2 participants