Add warning against using weak SHA-1 File Catalog by anamnavi · Pull Request #27805 · PowerShell/PowerShell · GitHub
Skip to content

Add warning against using weak SHA-1 File Catalog - #27805

Open
Anam Navied (anamnavi) wants to merge 6 commits into
PowerShell:masterfrom
anamnavi:cataloghelper-version-warning
Open

Anam Navied (anamnavi) wants to merge 6 commits into
PowerShell:masterfrom
anamnavi:cataloghelper-version-warning

Conversation

@anamnavi

@anamnavi Anam Navied (anamnavi) commented Aug 10, 2026 •

Copy link
Copy Markdown
Member

PR Summary

Add warning against using weak SHA-1 File Catalog

PR Context

PR Checklist

Copilot AI lite review requested due to automatic review settings August 10, 2026 19:47
@anamnavi
Anam Navied (anamnavi) requested a review from a team as a code owner August 10, 2026 19:47
@azure-pipelines

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an advisory warning when New-FileCatalog/Test-FileCatalog operate on legacy catalog version 1 (SHA-1), encouraging use of catalog version 2 (SHA-256) without breaking compatibility.

Changes:

  • Added a helper to emit a warning when the catalog version indicates SHA-1 (legacy v1).
  • Invoked the warning during both catalog generation and validation flows.
  • Added a new localized resource string for the warning text.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/System.Management.Automation/security/CatalogHelper.cs Adds and invokes a warning helper for legacy (v1/SHA-1) catalogs during generate/validate operations.
src/System.Management.Automation/resources/CatalogStrings.resx Introduces the user-facing warning string used by the cmdlet warning stream.

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

Comment thread src/System.Management.Automation/security/CatalogHelper.cs
Comment thread src/System.Management.Automation/resources/CatalogStrings.resx Outdated
Comment thread src/System.Management.Automation/security/CatalogHelper.cs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread src/System.Management.Automation/resources/CatalogStrings.resx Outdated
Comment thread src/System.Management.Automation/resources/CatalogStrings.resx Outdated
@microsoft-github-policy-service microsoft-github-policy-service Bot added the Review - Needed The PR is being reviewed label Sep 25, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

@anamnavi Anam Navied (anamnavi) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log Review - Needed The PR is being reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants