-
Notifications
You must be signed in to change notification settings - Fork 7
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
Priyanshuthapliyal2005
wants to merge
13
commits into
veraison:main
Choose a base branch
from
Priyanshuthapliyal2005:coswidtemplate
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 2 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
149da4f
Update CoSWID templates and schema to comply with RFC 9393
Priyanshuthapliyal2005 c373684
Add CoSWID template format documentation and examples
Priyanshuthapliyal2005 71de91f
Add CoSWID command suite for manipulation, creation, display, and va…
Priyanshuthapliyal2005 de4d815
Update module path to reflect new repository ownership and adjust imp…
Priyanshuthapliyal2005 016fe2b
Update mock dependencies and add mock implementation for ISubmitter i…
Priyanshuthapliyal2005 3db332a
Update mock dependency import path for corimSubmit_test.go
Priyanshuthapliyal2005 8526aa4
Remove mock ISubmitter implementation and update .gitignore to exclud…
Priyanshuthapliyal2005 696472c
Refactor CoSWID command suite for improved structure and clarity
Priyanshuthapliyal2005 fb1ceb8
Add CoSWID templates and enhance display and validation commands
Priyanshuthapliyal2005 09688b2
Update mock dependency import path in corimSubmit_test.go
Priyanshuthapliyal2005 7243763
Enhance error handling for required flags in coswidCreate and improve…
Priyanshuthapliyal2005 42726c2
Update CoSWID templates to include tag ID and version, and refine ent…
Priyanshuthapliyal2005 1a8cf0b
Implement CoSWID command and add comprehensive tests for creation, di…
Priyanshuthapliyal2005 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 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,210 @@ | ||||||
# CoSWID Template Format | ||||||
|
||||||
## Introduction | ||||||
**CoSWID stands for Concise Software Identification Tag, a structured format for representing software identification information in a compact manner.** | ||||||
**CoSWID is designed to facilitate software identification in various contexts, including software inventory management, compliance verification, and security assessments.** | ||||||
|
||||||
## Conceptual Overview | ||||||
### What Is CoSWID? | ||||||
**CoSWID is a data model that captures essential attributes of software identification, which might include:** | ||||||
|
||||||
- **Tag ID:** A unique identifier for the software. | ||||||
- **Tag Version:** The version of the CoSWID. | ||||||
- **Software Name:** The name of the software being identified. | ||||||
- **Profile:** A URI that identifies the specification or profile associated with the CoSWID. | ||||||
- **Validity:** The time period during which the CoSWID is considered valid. | ||||||
- **Entity:** Metadata describing organizations or roles involved in the software's lifecycle. | ||||||
- **Links:** References to related resources or manifests. | ||||||
|
||||||
### CoSWID in Software Management | ||||||
**In software management contexts, CoSWID provides a standardized way to represent software components, allowing for:** | ||||||
|
||||||
- **Efficient Identification:** Compact representation of software metadata. | ||||||
- **Interoperability:** Compatibility with existing software identification standards. | ||||||
- **Enhanced Security:** Facilitating trust and verification processes in software supply chains. | ||||||
|
||||||
## Template Structure | ||||||
**A CoSWID template is typically represented in JSON for human-friendly editing.** | ||||||
**At a minimum, it includes tag-id (a unique identifier).** | ||||||
**Optional fields like tag-version, software-name, profile, validity, entity, and link provide deeper context:** | ||||||
|
||||||
```json | ||||||
{ | ||||||
"tag-id": "<uuid>", | ||||||
"tag-version": <integer>, | ||||||
"software-name": "<software-name>", | ||||||
"profile": "<profile-uri>", | ||||||
"validity": { | ||||||
"not-before": "<datetime>", | ||||||
"not-after": "<datetime>" | ||||||
}, | ||||||
"entity": [ ... ], | ||||||
"link": [ ... ] | ||||||
} | ||||||
``` | ||||||
|
||||||
## Top-Level Fields | ||||||
- **tag-id (String/UUID):** A globally unique identifier for the CoSWID. | ||||||
- **tag-version (Integer):** The version of the CoSWID. | ||||||
- **software-name (String):** The name of the software being identified. | ||||||
- **profile (String, optional):** A URI referencing a particular standard or specification. | ||||||
- **validity (Object, optional):** A time window (not-before / not-after) during which the CoSWID is valid. | ||||||
- **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 | ||||||
### Tag ID | ||||||
- **Type:** String (UUID) | ||||||
- **Description:** A unique identifier for the CoSWID. | ||||||
- **Example:** "123e4567-e89b-12d3-a456-426614174000" | ||||||
|
||||||
### Tag Version | ||||||
- **Type:** Integer | ||||||
- **Description:** The version of the CoSWID. | ||||||
- **Example:** 0 | ||||||
|
||||||
### Software Name | ||||||
- **Type:** String | ||||||
- **Description:** The name of the software being identified. | ||||||
- **Example:** "Example Software" | ||||||
|
||||||
### Profile | ||||||
- **Type:** String (URI) | ||||||
- **Description:** A URI that identifies the specification or profile associated with the CoSWID. | ||||||
- **Example:** "http://example.com/cosmid/profile/1" | ||||||
|
||||||
### 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 | ||||||
Comment on lines
+76
to
+90
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason you chose to not give a complete example for these? |
||||||
- **Type:** Array of Objects | ||||||
- **Purpose:** References to related resources or manifests. | ||||||
- **Fields:** | ||||||
- **href:** A URI pointing to the related resource. | ||||||
- **thumbprint:** An object containing hash information for integrity verification. | ||||||
- **hash-alg-id:** The identifier for the hash algorithm used. | ||||||
- **hash-value:** The computed hash value. | ||||||
|
||||||
## Additional Files Overview | ||||||
### coswid-example.json | ||||||
- **Purpose:** Provides a basic example of a CoSWID structure. | ||||||
- **Key Fields:** | ||||||
- **tag-id:** "123e4567-e89b-12d3-a456-426614174000" | ||||||
- **software-name:** "Example Software" | ||||||
- **validity:** Specifies the valid time frame. | ||||||
|
||||||
### coswid-full.json | ||||||
- **Purpose:** Contains a comprehensive CoSWID structure with additional fields. | ||||||
- **Key Fields:** | ||||||
- **Includes all fields from coswid-example.json plus:** | ||||||
- **link:** References to related resources with thumbprint for integrity. | ||||||
|
||||||
### coswid-meta-full.json | ||||||
- **Purpose:** Contains metadata related to the signing of the CoSWID. | ||||||
- **Key Fields:** | ||||||
- **signer:** Information about the entity that signed the CoSWID. | ||||||
- **validity:** Similar to the main CoSWID, indicating the validity period. | ||||||
|
||||||
### coswid-meta-mini.json | ||||||
- **Purpose:** A simplified version of the metadata file. | ||||||
- **Key Fields:** | ||||||
- **signer:** Basic information about the signing entity without detailed validity. | ||||||
|
||||||
### coswid-schema.json | ||||||
- **Purpose:** Defines the JSON schema for validating CoSWID files. | ||||||
- **Key Features:** | ||||||
- **Specifies the structure and types of each field in the CoSWID.** | ||||||
- **Ensures compliance with the CoSWID format.** | ||||||
|
||||||
## Detailed Field Descriptions | ||||||
### Validity Object | ||||||
- **Fields:** | ||||||
- **not-before:** The date and time when the CoSWID becomes valid. | ||||||
- **not-after:** The date and time when the CoSWID expires. | ||||||
|
||||||
### Entity Array | ||||||
- **Example:** | ||||||
```json | ||||||
"entity": [ | ||||||
{ | ||||||
"entity-name": "Example Ltd.", | ||||||
"reg-id": "https://example.com", | ||||||
"role": ["tag-creator"] | ||||||
} | ||||||
] | ||||||
``` | ||||||
|
||||||
### Link Array | ||||||
- **Example:** | ||||||
```json | ||||||
"link": [ | ||||||
{ | ||||||
"href": "https://parent.example/rims/ccb3aa85-61b4-40f1-848e-02ad6e8a254b", | ||||||
"thumbprint": { | ||||||
"hash-alg-id": 1, | ||||||
"hash-value": "5Fty9cDAtXLbTY06t+l/No/3TmI0eoJN7LZ6hOUiTXU=" | ||||||
} | ||||||
} | ||||||
] | ||||||
``` | ||||||
|
||||||
## Use Cases | ||||||
### Software Inventory Management | ||||||
- **Description:** CoSWID can be used to maintain an accurate inventory of software assets within an organization. | ||||||
- **Benefits:** | ||||||
- **Simplifies tracking of software versions and compliance.** | ||||||
- **Enhances visibility into software usage and licensing.** | ||||||
|
||||||
### Compliance Verification | ||||||
- **Description:** Organizations can use CoSWID to demonstrate compliance with software licensing and regulatory requirements. | ||||||
- **Benefits:** | ||||||
- **Provides a clear audit trail of software identification.** | ||||||
- **Facilitates easier reporting and verification processes.** | ||||||
|
||||||
### Security Assessments | ||||||
- **Description:** CoSWID aids in assessing the security posture of software components. | ||||||
- **Benefits:** | ||||||
- **Enables identification of vulnerabilities in software dependencies.** | ||||||
- **Supports risk management and mitigation strategies.** | ||||||
|
||||||
## Best Practices | ||||||
### Consistent Use of UUIDs | ||||||
- **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.** | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
### Validation Against Schema | ||||||
- **Validate CoSWID files against the provided JSON schema to ensure compliance with the expected format.** | ||||||
|
||||||
## Conclusion | ||||||
**The CoSWID template format provides a robust framework for software identification, ensuring that essential metadata is captured in a standardized manner.** | ||||||
**By adhering to this structure, organizations can enhance their software management practices, improve compliance, and facilitate better security measures.** | ||||||
|
||||||
**For further details, please refer to the official CoSWID specification or the relevant documentation associated with this repository.** | ||||||
|
||||||
## References | ||||||
- [**CoSWID Specification**](https://datatracker.ietf.org/doc/rfc9393/) | ||||||
|
||||||
## Visual Overview | ||||||
```mermaid | ||||||
graph TD; | ||||||
A[CoSWID Template] --> B[Tag ID]; | ||||||
A --> C[Tag Version]; | ||||||
A --> D[Software Name]; | ||||||
A --> E[Profile]; | ||||||
A --> F[Validity]; | ||||||
A --> G[Entity]; | ||||||
A --> H[Link]; | ||||||
``` |
This file contains 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,17 @@ | ||
{ | ||
"tag-id": "123e4567-e89b-12d3-a456-426614174000", | ||
"tag-version": 0, | ||
"software-name": "Example Software", | ||
"profile": "http://example.com/cosmid/profile/1", | ||
"validity": { | ||
"not-before": "2023-01-01T00:00:00Z", | ||
"not-after": "2025-01-01T00:00:00Z" | ||
}, | ||
"entity": [ | ||
{ | ||
"entity-name": "Example Ltd.", | ||
"reg-id": "https://example.com", | ||
"role": ["tag-creator"] | ||
} | ||
] | ||
} |
This file contains 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,26 @@ | ||
{ | ||
"tag-id": "123e4567-e89b-12d3-a456-426614174000", | ||
"tag-version": 0, | ||
"software-name": "Example Software", | ||
"profile": "http://example.com/cosmid/profile/1", | ||
"validity": { | ||
"not-before": "2023-01-01T00:00:00Z", | ||
"not-after": "2025-01-01T00:00:00Z" | ||
}, | ||
"entity": [ | ||
{ | ||
"entity-name": "Example Ltd.", | ||
"reg-id": "https://example.com", | ||
"role": ["tag-creator"] | ||
} | ||
], | ||
"link": [ | ||
{ | ||
"href": "https://parent.example/rims/ccb3aa85-61b4-40f1-848e-02ad6e8a254b", | ||
"thumbprint": { | ||
"hash-alg-id": 1, | ||
"hash-value": "5Fty9cDAtXLbTY06t+l/No/3TmI0eoJN7LZ6hOUiTXU=" | ||
} | ||
} | ||
] | ||
} |
This file contains 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,15 @@ | ||
{ | ||
"signer": { | ||
"entity-name": "Example Ltd signing key", | ||
"reg-id": "https://example.com", | ||
"role": ["tag-creator"], | ||
"thumbprint": { | ||
"hash-alg-id": 1, | ||
"hash-value": "dGVzdGhhc2g=" | ||
} | ||
}, | ||
"validity": { | ||
"not-before": "2023-01-01T00:00:00Z", | ||
"not-after": "2025-01-01T00:00:00Z" | ||
} | ||
} |
This file contains 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,6 @@ | ||
{ | ||
"signer": { | ||
"entity-name": "Example Ltd signing key", | ||
"role": ["tag-creator"] | ||
} | ||
} |
Oops, something went wrong.
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.
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.