Skip to content

Add warning for SHA-1 File Catalog - #27805

Merged
Dongbo Wang (daxian-dbw) merged 8 commits into
PowerShell:masterfrom
anamnavi:cataloghelper-version-warning
Oct 29, 2026
Merged

Dongbo Wang (daxian-dbw) merged 8 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
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

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.

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!

@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

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@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
@anamnavi Anam Navied (anamnavi) changed the title Add warning against using weak SHA-1 File Catalog Add warning for SHA-1 File Catalog Oct 28, 2026
@daxian-dbw
Dongbo Wang (daxian-dbw) merged commit 097b42e into PowerShell:master Oct 29, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport-7.6.x-Migrated Backport-7.7.x-Consider CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants