Skip to content

test/images with tailor [2]: fix Image Customizer arguments and signing backends - #897

Draft
bfjelds (bfjelds) wants to merge 1 commit into
user/bfjelds/tailor-dependency-updatesfrom
user/bfjelds/tailor-execution-signing
Draft

bfjelds (bfjelds) wants to merge 1 commit into
user/bfjelds/tailor-dependency-updatesfrom
user/bfjelds/tailor-execution-signing

Conversation

@bfjelds

@bfjelds bfjelds (bfjelds) commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Scope Image Customizer arguments correctly, pass fragment signing configuration, support pesign, and bound certificate common names.

Part 2 of the 16-PR Tailor migration stack. Depends on #896.

This split preserves the aggregate migration content; the original tooling, image-config, and final trees are unchanged.

Stack

Restore per-cell fragment signing, scope Image Customizer cache arguments, support pesign, and bound certificate common names safely.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6501a6e2-9ece-44f9-a91a-4d8e0c0e6d07
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@bfjelds bfjelds (bfjelds) changed the title tailor: fix Image Customizer arguments and signing backends test/images with tailor [2]: fix Image Customizer arguments and signing backends Oct 26, 2026
@bfjelds
bfjelds (bfjelds) requested a balanced review from Copilot October 26, 2026 19:31

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

Signing-only fragment changes can reuse unsigned cached artifacts, and the new PE-signing fallback lacks execution and signature-verification coverage.

2 open issues
What changed in this PR

This second step in the Tailor migration fixes Image Customizer argument handling and extends per-cell signing support for test-image builds.

Changes:

  • Restrict --image-cache-dir to customization operations.
  • Carry fragment signing settings through rendering, selection, validation, and cleanup.
  • Add a pesign fallback and bound certificate common names with UTF-8-safe truncation and hashing.
File Description
tools/​tailor/​docs/​explanation/​crate-architecture.md Document the additional signing backend.
tools/​tailor/​crates/​tailor/​src/​run.rs Resolve and dispatch signing by selected cell.
tools/​tailor/​crates/​tailor-sign/​src/​lib.rs Add pesign support and bounded certificate names.
tools/​tailor/​crates/​tailor-sign/​Cargo.toml Add the workspace hashing dependency.
tools/​tailor/​crates/​tailor-exec/​src/​executor.rs Update test cells with the signing field.
tools/​tailor/​crates/​tailor-exec/​src/​arg_builder.rs Scope cache arguments and update regression assertions.
tools/​tailor/​crates/​tailor-core/​src/​signing.rs Update signing-backend comments.
tools/​tailor/​crates/​tailor-core/​src/​selector.rs Update selector test cells.
tools/​tailor/​crates/​tailor-core/​src/​ports.rs Document alternate signing prerequisites.
tools/​tailor/​crates/​tailor-core/​src/​orchestrator.rs Propagate rendered signing settings into cells.
tools/​tailor/​crates/​tailor-core/​src/​domain.rs Add per-cell signing configuration.
tools/​tailor/​crates/​tailor-config/​src/​render.rs Resolve signing across matched fragments.
tools/​tailor/​crates/​tailor-config/​src/​fragment.rs Accept fragment-level signing settings.
tools/​tailor/​Cargo.lock Record the signing crate’s hashing dependency.

Review effort: Balanced

base_image: base_image.clone(),
rpm_sources: rc.rpm_sources.clone(),
extra_params: rc.extra_params.clone(),
signing: rc.signing.clone(),
fn sign_pe(file: &Path, key: &Path, cert: &Path) -> Result<(), SignError> {
match pe_signing_tool() {
Some(PeSigningTool::Sbsign) => sign_pe_with_sbsign(file, key, cert),
Some(PeSigningTool::Pesign) => sign_pe_with_pesign(file, key, cert),

This branch has not been deployed

No deployments
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