-
Notifications
You must be signed in to change notification settings - Fork 20
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/bsi2 add signature field #360
Merged
riteshnoronha
merged 11 commits into
interlynk-io:main
from
viveksahu26:feat/bsi2_add_signature_field
Dec 30, 2024
Merged
Feat/bsi2 add signature field #360
riteshnoronha
merged 11 commits into
interlynk-io:main
from
viveksahu26:feat/bsi2_add_signature_field
Dec 30, 2024
Conversation
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
15235a5
to
df07d66
Compare
@viveksahu26 please remove all log statements. Then we can merge this. |
Signed-off-by: Vivek Kumar Sahu <[email protected]>
Signed-off-by: Vivek Kumar Sahu <[email protected]>
Signed-off-by: Vivek Kumar Sahu <[email protected]>
… hack Signed-off-by: Vivek Kumar Sahu <[email protected]>
Signed-off-by: Vivek Kumar Sahu <[email protected]>
Signed-off-by: Vivek Kumar Sahu <[email protected]>
Signed-off-by: Vivek Kumar Sahu <[email protected]>
Signed-off-by: Vivek Kumar Sahu <[email protected]>
Signed-off-by: Vivek Kumar Sahu <[email protected]>
Signed-off-by: Vivek Kumar Sahu <[email protected]>
4196120
to
e08bef9
Compare
Signed-off-by: Vivek Kumar Sahu <[email protected]>
riteshnoronha
approved these changes
Dec 30, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
part of #329
This PR add support for supporting BSI:2.0 sbom new fields such as signature. It supports external and internal signature verification.
For the external signature verification:
$ go run main.go compliance --bsi-v2 samples/signature-test-data/SPDXJSONExample-v2.3.spdx.json --sig samples/signature-test-data/sbom.sig --pub samples/signature-test-data/public_key.pem
You can also confirm the verification process via
openssl
tool too:$ openssl dgst -sha256 -verify samples/signature-test-data/public_key.pem -signature samples/signature-test-data/sbom.sig samples/signature-test-data/SPDXJSONExample-v2.3.spdx.json
For the internal signature verification:
$ go run main.go compliance --bsi-v2 samples/signature-test-data/stree-cdxgen-signed-sbom.cdx.json
NOTE: In this case, just for cross verification, for now, we are writing signature(file name default:
extracted_signature.bin
, public key(file name default:extracted_public_key.pem
) and standalone sbom(filename default:standalone_sbom.json
) in the local directory, so that one can cross verify it viaopenssl
tool also, like:$ openssl dgst -sha256 -verify extracted_public_key.pem -signature extracted_signature.bin standalone_sbom.json
This
stree-cdxgen-signed-sbom.cdx.json
SBOM contains signature and public key. So, sbomqs internally extract the signature and public key into a file, as well as also extract the standalone SBOM by removing signature section and then verifies it.