-
Notifications
You must be signed in to change notification settings - Fork 176
feat(jans-cedarling): implement Sigstore/Cosign verification library #14636
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
Merged
Merged
Changes from 92 commits
Commits
Show all changes
95 commits
Select commit
Hold shift + click to select a range
d03ab35
feat(jans-cedarling): created sigstore-verifier and skeleton with red…
olehbozhok 44d0196
fix(sigstore-verifier): fix double-hashing bug and SET verification
olehbozhok 452c56a
docs(sigstore-verifier): add architecture and algorithm reference docs
olehbozhok 4a16c4f
refactor(sigstore-verifier): consolidate on x509-parser for DER parsing
olehbozhok f6b0d28
feat(sigstore-verifier): implement RFC 6962 SCT verification with pre…
olehbozhok 101c3af
feat(sigstore-verifier): implement Merkle tree verification and TLOG …
olehbozhok 47f699b
refactor(sigstore-verifier): consolidate cert chain validation and er…
olehbozhok 9b2eb17
refactor(sigstore-verifier): remove legacy RekorBundle, drop unused C…
olehbozhok 6c77b02
refactor(sigstore-verifier): set correct visibility
olehbozhok a7decc0
refactor(sigstore-verifier): remove unused entities
olehbozhok 11defb3
fix(sigstore-verifier): enforce DSSE artifact binding, tlog key-ID fi…
olehbozhok 0f8ade7
fix(sigstore-verifier): replace version().expect() panic with proper …
olehbozhok 0bc091c
style(sigstore-verifier): apply cargo fmt
olehbozhok 6ad624e
docs(sigstore-verifier): up to date architecture file
olehbozhok bf06a2f
docs(sigstore-verifier): fix docstring
olehbozhok cc11ea8
docs(jans-cedarling): add readme file
olehbozhok ffd989a
test(sigstore-verifier): align assertions with code conventions
olehbozhok d1aee65
Merge branch 'main' into jans-cedarling-14465
olehbozhok 4c6f35c
chore(jans-cedarling): update lock file
olehbozhok 10ec459
docs(sigstore-verifier): add merkle module to architecture docs, step…
olehbozhok e351290
docs(sigstore-verifier): fix trust root field names in README example
olehbozhok bbd6a4d
docs(sigstore-verifier): remove unimplemented RekorBundle claim from …
olehbozhok 6f8200e
fix(sigstore-verifier): remove duplicate SAN collection in extract_sans
olehbozhok 82ca2e7
fix(sigstore-verifier): support long-form DER lengths in UTF8String p…
olehbozhok 427a897
refactor(sigstore-verifier): limit visibility of internal verify func…
olehbozhok 3b506fe
docs(sigstore-verifier): correct chain signature doc — digest varies …
olehbozhok 8b0f7d9
test(sigstore-verifier): replace unwrap with expect in chain tests
olehbozhok 6f3e49c
fix(sigstore-verifier): fallback to raw signature when DER parses but…
olehbozhok 48a5898
fix(sigstore-verifier): validate sec1 point length in key ID computation
olehbozhok 43dbd95
docs(AGENTS): forbid runtime panics for input validation, mandate typ…
olehbozhok 59399b2
docs(sigstore-verifier): mark DSSE as implemented, remove phase-2 wor…
olehbozhok a437b08
refactor(sigstore-verifier): make bundle module pub(crate)
olehbozhok efc4948
fix(sigstore-verifier): validate exact merkle proof length and siblin…
olehbozhok 2fac401
fix(sigstore-verifier): redact SAN values from policy-violation error…
olehbozhok 15cbecd
test(sigstore-verifier): replace bare assertions with expect/expect_err
olehbozhok 82af5ff
docs(sigstore-verifier): document caller responsibility for chain val…
olehbozhok dcf99cc
refactor(sigstore-verifier): tighten visibility of internal types and…
olehbozhok e48d0d6
test(sigstore-verifier): add assertion messages in sct remove_sct_ext…
olehbozhok 547c6f8
test(sigstore-verifier): guard short-form DER length in sct_extension…
olehbozhok 1bb63e2
fix(sigstore-verifier): reject missing canonicalizedBody with explici…
olehbozhok dddfd30
refactor(sigstore-verifier): use hex::encode over inline format in tl…
olehbozhok cfb6b43
fix(sigstore-verifier): resolve PEM to DER in DSSE tlog verifier comp…
olehbozhok 44a97c5
docs(sigstore-verifier): fix capitalization in trust root doc comment
olehbozhok f42dbe9
refactor(sigstore-verifier): return leaf issuer from validate_chain, …
olehbozhok 3e86e53
feat(sigstore-verifier): dynamic ECDSA curve dispatch for leaf signat…
olehbozhok ad60ce7
test(sigstore-verifier): add checkpoint test with Timestamp note line
olehbozhok fed599c
chore(sigstore-verifier): fix clippy warnings and add checkpoint note…
olehbozhok 473b3ff
docs(sigstore-verifier): add text lang tag to DSSE PAE code block
olehbozhok 0347dc9
refactor(sigstore-verifier): enforce canonical DER and use Option ove…
olehbozhok b9e7c8a
chore(sigstore-verifier): add debug assert for merkle proof inner/exp…
olehbozhok 68a6d96
Merge commit 'main' into jans-cedarling-14465
olehbozhok 1e62c55
docs(sigstore-verifier): fix bundle example inclusionProof comment
olehbozhok 5dbb14f
test(sigstore-verifier): add P-384 prehash regression tests
olehbozhok a1bd046
fix(sigstore-verifier): skip broken keys in checkpoint verification
olehbozhok 09ed923
style(sigstore-verifier): wrap P-256 verifier cast to fit 100-char width
olehbozhok c5d8d09
refactor(sigstore-verifier): extract EcdsaPrehashVerifier type alias
olehbozhok 54f8614
style(sigstore-verifier): reorder crypto test imports per StdExternal…
olehbozhok 5f471ee
feat(sigstore-verifier): support P-384 leaf prehashes with SHA-384
olehbozhok 647530d
refactor(sigstore-verifier): satisfy clippy pedantic without blanket …
olehbozhok d2bb83b
refactor(sigstore-verifier): remove the remaining clippy allows
olehbozhok 3a1bc09
fix(sigstore-verifier): skip malformed CTFE keys instead of aborting …
olehbozhok 698fbc3
fix(sigstore-verifier): assert trust-root public key algorithm/curve …
olehbozhok 3466071
refactor(sigstore-verifier): drop unreachable leaf-issuer fallback in…
olehbozhok 9d8bcfe
docs(sigstore-verifier): fix digest encoding comment, note SET trust …
olehbozhok d49ebd4
build(sigstore-verifier): hard-fail on CA cert nearing expiry
olehbozhok 25c674a
fix(sigstore-verifier): drop expired CA certs from the trust root at …
olehbozhok 4b92eb8
fix(sigstore-verifier): thread DSSE signature keyid through to the en…
olehbozhok c952525
fix(sigstore-verifier): enforce KeyUsage digitalSignature on the leaf…
olehbozhok d897861
fix(sigstore-verifier): enforce pathLenConstraint on the trusted root…
olehbozhok 60cde04
fix(sigstore-verifier): fix DSSE keyid omission and wire conformance …
olehbozhok de69293
fix(sigstore-verifier): harden regex identity matching against paren-…
olehbozhok c88230b
feat(sigstore-verifier): allow a pre-compiled regex in IdentityMatch
olehbozhok 21e735e
refactor(sigstore-verifier): select EC curve from SPKI algorithm OID,…
olehbozhok 71295bc
test(sigstore-verifier): exercise P-384 chain-link verification throu…
olehbozhok e426968
refactor(sigstore-verifier): split RekorInconsistency into malformed-…
olehbozhok 7bdafe1
test(sigstore-verifier): cover chain-link and Rekor-consistency rejec…
olehbozhok e0b5ef7
test(sigstore-verifier): cover malformed-input rejection paths in ver…
olehbozhok dfb1b6f
build(sigstore-verifier): add cargo-fuzz targets for hand-rolled parsers
olehbozhok 45dd3dc
tool(sigstore-verifier): add run_fuzz.py to drive cargo-fuzz to plateau
olehbozhok 5a0111e
tool(sigstore-verifier): add to Cargo.toml optimization parameter
olehbozhok 8e9c624
tool(sigstore-verifier): add gitignore to fuzz files
olehbozhok aaeed35
build(sigstore-verifier): drop unused der dependency
olehbozhok f0469e0
fix(sigstore-verifier): reject malformed and multi-block PEM input
olehbozhok e3545c4
fix(sigstore-verifier): reject bundles that don't carry exactly one c…
olehbozhok f04cafb
fix(sigstore-verifier): verify every tlog entry, not only the first
olehbozhok ecbca14
fix(sigstore-verifier): require an inclusion proof unless the caller …
olehbozhok 00503e5
fix(sigstore-verifier): bind checkpoint verification to the entry's log
olehbozhok ae49e6d
test(sigstore-verifier): lock the negative fixtures against a v0.1 do…
olehbozhok 40dc5b9
ci(sigstore-verifier): build the crate for wasm32-unknown-unknown
olehbozhok e00bb5c
fix(sigstore-verifier): match SAN regex unanchored, as upstream does
olehbozhok 8bddcbc
refactor(sigstore-verifier): drop the dead already-expired assert in …
olehbozhok fa14c90
fix(ci): select the stable toolchain for the sigstore-verifier wasm b…
olehbozhok 3e472c5
Merge branch 'main' into jans-cedarling-14465
olehbozhok 30b5eea
ci(sigstore-verifier): rename the conformance workflow to the "Test: …
olehbozhok 356bb94
Merge branch 'main' into jans-cedarling-14465
olehbozhok File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| name: sigstore-verifier Conformance Scan and WASM Build | ||
|
|
||
|
moabu marked this conversation as resolved.
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - "jans-cedarling/sigstore-verifier/**" | ||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| conformance_scan: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Harden Runner | ||
| uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 | ||
| with: | ||
| egress-policy: audit | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| path: jans | ||
| - name: Checkout sigstore-conformance test assets | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| repository: sigstore/sigstore-conformance | ||
| # Pinned commit, not a branch — this is test-fixture data, not code we | ||
| # trust to execute, but pin it anyway for reproducible CI runs. | ||
| ref: 080de1d994486b318459dfb6cb0724a4f8d62f7b | ||
| path: sigstore-conformance | ||
| persist-credentials: false | ||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # stable | ||
| with: | ||
| toolchain: stable | ||
| - name: Cache Rust dependencies | ||
| uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | ||
| with: | ||
| workspaces: jans/jans-cedarling | ||
| # sigstore-verifier is a standalone, protobuf-free crate — no `protoc` | ||
| # needed here, unlike the rest of the jans-cedarling workspace. | ||
| - name: Run sigstore-verifier conformance scan | ||
| working-directory: jans/jans-cedarling | ||
| # tests/conformance_scan.rs is inert (silently skips) unless this env | ||
| # var is set — it's already exercised (as a no-op) by the main | ||
| # jans-cedarling test suite, this is what makes it do something. | ||
| env: | ||
| SIGSTORE_CONFORMANCE_DIR: ${{ github.workspace }}/sigstore-conformance/test/assets/bundle-verify | ||
| run: cargo test --locked -p sigstore-verifier --test conformance_scan -- --nocapture | ||
|
|
||
| # `wasm32-unknown-unknown` support is the reason this crate exists rather | ||
| # than a `sigstore-rs` dependency, and it is an acceptance criterion of | ||
| # issue #14465 — but nothing in CI built it for wasm. The workspace's other | ||
| # wasm steps are all scoped to `-p cedarling_wasm`, and no workspace crate | ||
| # depends on `sigstore-verifier`, so it got no coverage transitively either. | ||
| wasm_build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Harden Runner | ||
| uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 | ||
| with: | ||
| egress-policy: audit | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # stable | ||
| with: | ||
| toolchain: stable | ||
| targets: wasm32-unknown-unknown | ||
| - name: Cache Rust dependencies | ||
| uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | ||
| with: | ||
| workspaces: jans-cedarling | ||
| - name: Build sigstore-verifier for wasm32-unknown-unknown | ||
| working-directory: jans-cedarling | ||
| # `+stable` is required: jans-cedarling/rust-toolchain.toml pins 1.95.0, | ||
| # so plain `cargo` here would use that toolchain, while the step above | ||
| # installed the wasm target for stable — the build would fail with | ||
| # "can't find crate for `core`". test-cedarling.yml's wasm clippy step | ||
| # selects the toolchain the same way for the same reason. | ||
| run: cargo +stable build --locked -p sigstore-verifier --target wasm32-unknown-unknown | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following the new conventions please clearly name the workflow. It should be double quoted with its domain forexample “Test: ……."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved