Skip to content

Pin PowerShell-Yaml module version across all install sites #1377

@WilliamBerryiii

Description

@WilliamBerryiii

Summary

Pin the PowerShell-Yaml module to a specific version (0.4.7) at every install site across workflows, the devcontainer setup, documentation, and error messages. Today most sites call Install-Module -Name PowerShell-Yaml -Force -Scope CurrentUser without -RequiredVersion, which means CI builds and contributor environments silently float to whatever the PowerShell Gallery serves at install time. A breaking upstream release would surface as flaky or red builds with no obvious cause.

Motivation

Surfaced from review feedback on #1287 (RAI Planner alignment update) — comment r3104011635 — where the unpinned install pattern was flagged as a supply-chain and reproducibility risk.

Scope

Pin every existing Install-Module -Name PowerShell-Yaml ... invocation to -RequiredVersion 0.4.7:

  • .devcontainer/scripts/on-create.sh
  • .github/workflows/ai-artifact-validation.yml
  • .github/workflows/copilot-setup-steps.yml
  • .github/workflows/extension-package.yml (two install sites)
  • .github/workflows/frontmatter-validation.yml
  • .github/workflows/msdate-freshness-check.yml
  • .github/workflows/pester-tests.yml
  • .github/workflows/plugin-package.yml
  • .github/workflows/plugin-validation.yml
  • .github/workflows/release-prerelease-pr.yml
  • .github/workflows/release-stable.yml

Update guidance and diagnostic strings to use the pinned form:

  • extension/PACKAGING.md
  • scripts/collections/README.md
  • scripts/plugins/README.md
  • scripts/linting/Invoke-MsDateFreshnessCheck.ps1
  • scripts/linting/Modules/FrontmatterValidation.psm1

Acceptance criteria

  • No Install-Module -Name PowerShell-Yaml invocation in the repository is missing -RequiredVersion.
  • All workflows continue to pass on a clean runner.
  • Documentation and warning/error messages instruct contributors to use the pinned form.

Follow-ups (out of scope)

  • Evaluate automation for keeping this pin current. Renovate already handles the powershell-galleryV2 ecosystem, but Dependabot does not have a PowerShell Gallery datasource. A small validator or Renovate rule could enforce that every Install-Module PowerShell-Yaml site stays pinned.

🔒 - Generated by Copilot

Metadata

Metadata

Assignees

No one assigned

    Labels

    ciContinuous integrationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions