Skip to content

Commit

Permalink
add sbom struct
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Taylor <[email protected]>
  • Loading branch information
sbtaylor15 committed Oct 11, 2023
1 parent b7a2351 commit ea6bf4e
Show file tree
Hide file tree
Showing 5 changed files with 930 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

# Upload MegaLinter artifacts
- name: Archive production artifacts
if: ${{ success() }} || ${{ failure() }}
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v3
with:
name: MegaLinter reports
Expand Down
16 changes: 16 additions & 0 deletions model/sbom.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Package model - SBOM defines the struct and handles marshaling/unmarshaling the struct to/from NFT Storage.
package model

import "encoding/json"

// SBOM defines a CycloneDX SBOM in JSON format
type SBOM struct {
Key string `json:"_key,omitempty"`
ObjType string `json:"objtype,omitempty"`
Content json.RawMessage `json:"content"`
}

// NewSBOM is the contructor that sets the appropriate default values
func NewSBOM() *SBOM {
return &SBOM{ObjType: "SBOM"}
}
Loading

0 comments on commit ea6bf4e

Please sign in to comment.