Skip to content

Commit

Permalink
Add author and created at for sbom
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaycel committed Jul 14, 2022
1 parent a7ba5ef commit 3914f70
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/bom_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# Copyright (c) OWASP Foundation. All Rights Reserved.
#
# frozen_string_literal: true

require 'bundler'
require 'fileutils'
require 'json'
Expand Down Expand Up @@ -172,7 +173,8 @@ def self.specs_list
end
end

object.author = gem['authors']
object.authors = gem['authors']
object.created_at = gem['created_at']
object.description = gem['summary']
object.hash = gem['sha']
@gems.push(object)
Expand Down
4 changes: 4 additions & 0 deletions lib/bom_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ def initialize(gem)
@description = gem['description']
@hash = gem['hash']
@purl = gem['purl']
@authors = gem['authors']
@created_at = gem['created_at']
@gem = gem
end

Expand All @@ -18,6 +20,8 @@ def hash_val
"name": @name,
"version": @version,
"description": @description,
"authors": @authors,
"created_at": @created_at,
"purl": @purl,
"hashes": [
"alg": HASH_ALG,
Expand Down

0 comments on commit 3914f70

Please sign in to comment.