Skip to content
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

feat: Adds reader.post_validate method for CAWG validation support #976

Merged
merged 20 commits into from
Mar 18, 2025

Conversation

gpeacock
Copy link
Collaborator

@gpeacock gpeacock commented Mar 17, 2025

feat: Adds Reader PostValidate method + PostValidator trait.
feat: Rename PreliminaryClaim to PartialClaim
feat: put RemoteSigner behind v1_api
feat: adds builder.sign_file_async()
feat: Adds reader.post_validate_async _ AsyncPostValidator trait.
chore: Adds cawg.rs example for cawg sign and validate.
feat: adds cawg validate to c2patool
feat: adds CawgValidator for post validating cawg content.

This accepts an implentation of the PostValidate trait
It enables CAWG validation but can be used for other assertion types.
validation_results.add_status no longer requires a manifest_label.
manifest_assertions now use the unique assigned label rather than the base_label
Ingredients have a new label field for their assigned unique label
status_tracker has a new ingredient_uri method to return the ingredient_uri.
move DynamicAssertion declartions to the dynamic_assertion module.
Copy link

codecov bot commented Mar 17, 2025

Codecov Report

Attention: Patch coverage is 59.02778% with 177 lines in your changes missing coverage. Please review.

Project coverage is 78.55%. Comparing base (b86eb34) to head (70e8768).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
..._identity/src/identity_assertion/signer_payload.rs 4.41% 65 Missing ⚠️
cawg_identity/src/identity_assertion/assertion.rs 4.65% 41 Missing ⚠️
sdk/src/reader.rs 89.09% 23 Missing ⚠️
cawg_identity/src/x509/x509_signature_verifier.rs 10.00% 18 Missing ⚠️
cawg_identity/src/validator.rs 0.00% 14 Missing ⚠️
internal/status-tracker/src/status_tracker.rs 73.91% 6 Missing ⚠️
cli/src/main.rs 0.00% 3 Missing ⚠️
sdk/src/ingredient.rs 57.14% 3 Missing ⚠️
sdk/src/builder.rs 33.33% 2 Missing ⚠️
sdk/src/manifest_store.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #976      +/-   ##
==========================================
- Coverage   78.84%   78.55%   -0.30%     
==========================================
  Files         146      147       +1     
  Lines       35243    35569     +326     
==========================================
+ Hits        27787    27940     +153     
- Misses       7456     7629     +173     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@scouten-adobe scouten-adobe changed the title feat: Adds reader.post_validate method for CAWG validation support. feat: Adds reader.post_validate method for CAWG validation support Mar 17, 2025
@scouten-adobe scouten-adobe changed the title feat: Adds reader.post_validate method for CAWG validation support feat: Adds reader.post_validate method for CAWG validation support Mar 17, 2025
Copy link
Collaborator

@scouten-adobe scouten-adobe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple suggestions, but looking really good!

@gpeacock gpeacock requested a review from scouten-adobe March 18, 2025 15:29
PostValidatorAsync renamed to AsyncPostValidator for consistency
Uses correct cawg success code
@gpeacock gpeacock merged commit 462e54e into main Mar 18, 2025
31 of 33 checks passed
@gpeacock gpeacock deleted the gpeacock/post_validate branch March 18, 2025 18:29
This was referenced Mar 18, 2025
@scouten-adobe scouten-adobe mentioned this pull request Mar 18, 2025
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