Skip to content

[release/v7.7.0] Add warning for SHA-1 File Catalog - #28342

Closed
Justin Chung (jshigetomi) wants to merge 1 commit into
PowerShell:release/v7.7.0from
jshigetomi:backport-27805-to-7.7.0
Closed

Justin Chung (jshigetomi) wants to merge 1 commit into
PowerShell:release/v7.7.0from
jshigetomi:backport-27805-to-7.7.0

Conversation

@jshigetomi

Copy link
Copy Markdown
Collaborator

Backport of #27805 to release/v7.7.0.

@jshigetomi
Justin Chung (jshigetomi) requested a review from a team as a code owner November 5, 2026 00:25
Copilot AI balanced review requested due to automatic review settings November 5, 2026 00:25
@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.

🟡 Changes recommended

The security warning is misleading because it omits catalog version 1 and incorrectly names SHA0 instead of SHA-1.

1 open issue
What changed in this PR

Backports #27805 to release/v7.7.0, adding an advisory warning when PowerShell creates or validates legacy SHA-1 file catalogs.

Changes:

  • Adds a shared warning helper used during catalog generation and validation.
  • Adds warning text recommending regeneration with -CatalogVersion 2.
File Description
src/​System.Management.Automation/​security/​CatalogHelper.cs Emits warnings when generating or validating version 1 catalogs.
src/​System.Management.Automation/​resources/​CatalogStrings.resx Adds the legacy catalog warning resource.

Review effort: Balanced

<value>Catalog version is not valid. We only support catalog version {0} and version {1}.</value>
</data>
<data name="WeakCatalogHashAlgorithm" xml:space="preserve">
<value>'{0}' is a version catalog that uses SHA0 or SHA1. Consider regenerating this catalog with '-CatalogVersion 2'.</value>
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.

3 participants