Skip to content

Commit 6a0e4ee

Browse files
committed
Add author and created at for sbom
Signed-off-by: vijaycel <[email protected]>
1 parent a7ba5ef commit 6a0e4ee

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

lib/bom_builder.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# Copyright (c) OWASP Foundation. All Rights Reserved.
2222
#
2323
# frozen_string_literal: true
24+
2425
require 'bundler'
2526
require 'fileutils'
2627
require 'json'
@@ -172,7 +173,8 @@ def self.specs_list
172173
end
173174
end
174175

175-
object.author = gem['authors']
176+
object.authors = gem['authors']
177+
object.created_at = gem['created_at']
176178
object.description = gem['summary']
177179
object.hash = gem['sha']
178180
@gems.push(object)

lib/bom_component.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ def initialize(gem)
99
@description = gem['description']
1010
@hash = gem['hash']
1111
@purl = gem['purl']
12+
@authors = gem['authors']
13+
@created_at = gem['created_at']
1214
@gem = gem
1315
end
1416

@@ -18,6 +20,8 @@ def hash_val
1820
"name": @name,
1921
"version": @version,
2022
"description": @description,
23+
"authors": @authors,
24+
"created_at": @created_at,
2125
"purl": @purl,
2226
"hashes": [
2327
"alg": HASH_ALG,

0 commit comments

Comments
 (0)