Skip to content

feat: Add SHA-256 validation for Win11 media artifacts - #1950

Closed
emersonbusson wants to merge 2 commits into
mainfrom
feat/ps1-artifact-sha256-4315492295834312224
Closed

emersonbusson wants to merge 2 commits into
mainfrom
feat/ps1-artifact-sha256-4315492295834312224

Conversation

@emersonbusson

Copy link
Copy Markdown
Owner

Summary

This PR implements Assert-Win11LabMediaArtifactSha256 in Win11LabMediaContract.ps1 to compute and verify the SHA-256 hash of downloaded media artifacts against expected manifest checksums, fulfilling the requirement for Operational Infrastructure script hardening.

Commits

Commit What was done Why it was done Details
48837be feat: Add SHA-256 validation for Win11 media artifacts To validate downloaded ISO/VHD artifact integrity via physical file existence bounds checks and SHA-256 comparisons.
Details
  • Files: scripts/windows/Win11LabMediaContract.ps1, scripts/windows/Test-Win11LabMediaContractStatic.ps1
  • Validation: Unit tests successfully run in pwsh verify matches, mismatches, and empty file boundaries.
  • Risk/rollback: If artifact hashing causes performance regressions or line-ending mismatches trigger false validation failures.

Issue

OpsInfra100/2026-09-06/ps1-windows/011

Owner

jules

Labels

type:feature, area:infrastructure

Validation

Unit tests passing successfully via pwsh scripts/windows/Test-Win11LabMediaContractStatic.ps1 checking valid file matching, mismatch throws, missing file throws, and empty file throws.

Rollback trigger

Triggered if valid downloaded ISOs hash mismatched due to line-ending conversions or performance degradations due to hashing large 4GiB+ VHDs.


PR created automatically by Jules for task 4315492295834312224 started by @emersonbusson

@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

This commit implements `Assert-Win11LabMediaArtifactSha256` in
`Win11LabMediaContract.ps1` to compute and verify the SHA-256 hash of
downloaded media artifacts against expected manifest checksums.
It includes corresponding tests for valid matches, mismatches,
missing files, and empty files.

Rollback Trigger: If hash validations fail due to unexpected artifact
modifications or if file hashing causes performance regressions.
@emersonbusson

Copy link
Copy Markdown
Owner Author

Closed in favor of PR #2085 consolidation.

@emersonbusson
emersonbusson deleted the feat/ps1-artifact-sha256-4315492295834312224 branch September 23, 2026 15:03
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.

1 participant