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

Update CoSWID templates and schema to comply with RFC 9393 #25

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

Priyanshuthapliyal2005
Copy link
Contributor

Pull Request Description
This PR introduces the following changes to the CoSWID templates and schema to ensure compliance with RFC 9393:

Added coswid-meta-mini.json:

Added entity-name and role fields to match the entity-entry map structure.
Added coswid-meta-full.json:

Added entity-name, reg-id, role, and thumbprint fields to match the entity-entry map structure.
Retained the validity field for metadata.
Added coswid-example.json:

Added tag-id, tag-version, software-name, profile, validity, and entity fields to match the concise-swid-tag map structure.
Added coswid-full.json:

Added tag-id, tag-version, software-name, profile, validity, entity, and link fields to match the concise-swid-tag map structure.
Added coswid-schema.json:

Added properties for tag-id, tag-version, corpus, patch, supplemental, software-name, software-version, version-scheme, media, software-meta, entity, link, payload, and evidence to match the concise-swid-tag map structure.
Ensured the schema conforms to the CDDL specification provided in RFC 9393.
fix #19

- **entity (Array, optional):** An array of organizations or roles involved in the software's lifecycle.
- **link (Array, optional):** References to related resources or manifests.

## Key Components
Copy link
Collaborator

Choose a reason for hiding this comment

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

The term "key components" is overloaded and hard to disambiguate which you mean. Do you mean to provide an incomplete description of what you think are "key" (important) components? Do you mean to provide the full drill-down of the substructure of the top-level fields?

If it's the former, that is a lot to do in one PR, and if it's the latter, I would think you'd need to reference an issue to fill in the remaining fields.

Comment on lines +76 to +90
### Validity
- **Type:** Object
- **Fields:**
- **not-before:** The earliest valid timestamp for using this CoSWID.
- **not-after:** The expiry timestamp after which the CoSWID is invalid.

### Entity
- **Type:** Array of Objects
- **Purpose:** Identifies the organizations or individuals related to the software.
- **Fields:**
- **entity-name:** Human-readable name of the entity.
- **reg-id:** A registration/domain identifier (e.g., https://example.com).
- **role:** Array of roles (e.g., [ "tag-creator" ]).

### Link
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any reason you chose to not give a complete example for these?

- **Always use UUIDs for tag-id to ensure uniqueness across different systems.**

### Regular Updates
- **Keep the CoSWID files updated with the latest software versions and metadata.**
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- **Keep the CoSWID files updated with the latest software versions and metadata.**
- **Keep the CoSWID files updated with the latest software versions and metadata (e.g., by generating the CoSWID at build time).**

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is too big to add without a test. Please add unit tests that your examples all satisfy the schema. I would much prefer validating against the CDDL that is directly from RFC9393, since CDDL works for both CBOR and JSON objects. See examples of CDDL validation in cddl_check_template https://github.com/ietf-rats-wg/draft-ietf-rats-corim/blob/main/cddl/Makefile

@Priyanshuthapliyal2005 Priyanshuthapliyal2005 marked this pull request as draft January 7, 2025 16:29
@Priyanshuthapliyal2005 Priyanshuthapliyal2005 force-pushed the coswidtemplate branch 3 times, most recently from 9afb2e4 to 2a6b379 Compare January 11, 2025 13:37
… directory walking error reporting in coswidDisplay

Signed-off-by: Priyanshu Thapliyal <[email protected]>
…splay, and validation functionalities

Signed-off-by: Priyanshu Thapliyal <[email protected]>
@Priyanshuthapliyal2005
Copy link
Contributor Author

@deeglaze @thomas-fossati Could you please review the current structure of the files and directories in this pr? The subcommands, unit tests, and documentation are still a work in progress, but I would appreciate your thoughts on the overall setup so far.

@deeglaze
Copy link
Collaborator

@deeglaze @thomas-fossati Could you please review the current structure of the files and directories in this pr? The subcommands, unit tests, and documentation are still a work in progress, but I would appreciate your thoughts on the overall setup so far.

If you want feedback on a setup, I'd say first create an issue that describes the problem you're trying to solve so we can discuss design in the issue. This PR is simply too big and full of uncommittable test code to adequately review.

@Priyanshuthapliyal2005
Copy link
Contributor Author

Priyanshuthapliyal2005 commented Jan 14, 2025

@deeglaze @thomas-fossati Could you please review the current structure of the files and directories in this pr? The subcommands, unit tests, and documentation are still a work in progress, but I would appreciate your thoughts on the overall setup so far.

If you want feedback on a setup, I'd say first create an issue that describes the problem you're trying to solve so we can discuss design in the issue. This PR is simply too big and full of uncommittable test code to adequately review.

I am thinking of breaking this PR into new PRs for their respective issues #28, #27, #26, and #29. Should I do that?

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.

[Migrated] Add CoSWID template
2 participants