microsoft / microsoft/scitt-verifier

Policy: protectedHeaders needs byte-string matching and array quantifiers

Open
#7 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1
Forks
0
Avg merge
1d 34m
Merged PRs (30d)
5

Description

protectedHeaders ships with text and int scalar matchers. Two things it cannot express:

1. Byte strings. A bstr header can be addressed but no matcher applies, so certificate thumbprints and key identifiers are not pinnable. render_scalar truncates a bstr to its first 16 bytes, so matching must be on real bytes, not the rendering.

2. Arrays. A path can index one element ([34, 0]), but there is no way to say "any element" or "every element".

The motivating shape is the Azure Artifact Signing external-signatures proposal: a text label whose value is an array of maps, each re-using COSE labels 1 (alg), 4 (kid), 33 (x5chain), 34 (x5t = [hashAlg, hashValue]), -1 (raw signature).

Design constraints already committed to:

  • * is refused at parse time today and is reserved for this.
  • match: "all" over an empty array must not pass vacuously.
  • Matchers must stay type-declared; matching on render_scalar output is a type-confusion vulnerability.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing protectedHeaders parsing and matching, including render_scalar, and inspect how indexed paths are handled. Confirm the existing refusal of * and the scalar type declarations before designing byte-string and array-quantifier behavior. Done means byte matching uses actual bytes, any/all handle empty arrays as specified, and render_scalar is not used for matching.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.