Skip to content

trusted signing: add filter to sign files with .cip extension #28207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Jaxelr
Copy link
Member

@Jaxelr Jaxelr commented Jul 17, 2025

Description

This PR expands the Az.TrustedSigning module to also support Signing .cip files along with .bin files for signing ci policies.

cc: @janielMartell

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

@Copilot Copilot AI review requested due to automatic review settings July 17, 2025 15:15
Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

@Jaxelr Jaxelr changed the title trusted signing: add option filter to sign cip files trusted signing: add filter to sign files with .cip extension Jul 17, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

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 support for signing .cip files alongside .bin files in the Az.TrustedSigning module.

  • Added a null-environment check with an exception in CodeSigningServiceClient.
  • Extended InvokeCIPolicySigning.ValidateFileType to recognize .cip files and updated messaging.
  • Updated ChangeLog.md to document .cip extension support.

Reviewed Changes

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

File Description
src/TrustedSigning/TrustedSigning/Models/CodeSigningServiceClient.cs Throw ArgumentException when context.Environment is null
src/TrustedSigning/TrustedSigning/Commands/InvokeCIPolicySigning.cs Accept .cip extension in ValidateFileType and adjust warning text
src/TrustedSigning/TrustedSigning/ChangeLog.md Added entry for .cip support in upcoming release
Comments suppressed due to low confidence (2)

src/TrustedSigning/TrustedSigning/Commands/InvokeCIPolicySigning.cs:145

  • There should be automated tests covering .cip extension handling in ValidateFileType to ensure new behavior is verified.
            string fileExtension = System.IO.Path.GetExtension(fullInPath);

src/TrustedSigning/TrustedSigning/Commands/InvokeCIPolicySigning.cs:147

  • [nitpick] The indentation for the second OR condition is inconsistent. Align it under the first string.Equals for better readability.
                     string.Equals(fileExtension, ".cip", StringComparison.OrdinalIgnoreCase))

@YanaXu
Copy link
Contributor

YanaXu commented Jul 18, 2025

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

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.

2 participants