microsoft / microsoft/scitt-verifier
Policy: protectedHeaders needs byte-string matching and array quantifiers
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_scalaroutput is a type-confusion vulnerability.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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