Skip to content

Commit bb27163

Browse files
authored
Merge pull request #352 from warpkwd/bsi_tm_ci
Add timecheck to bsi timestamp
2 parents b82f436 + 9748753 commit bb27163

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pkg/compliance/bsi.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,13 @@ func bsiCreator(doc sbom.Document) *db.Record {
295295
}
296296

297297
func bsiTimestamp(doc sbom.Document) *db.Record {
298-
score := 0.0
299-
result := doc.Spec().GetCreationTimestamp()
298+
result, score := "", 0.0
300299

301-
if result != "" {
302-
score = 10.0
300+
if result = doc.Spec().GetCreationTimestamp(); result != "" {
301+
if _, isTimeCorrect := common.CheckTimestamp(result); isTimeCorrect {
302+
score = 10.0
303+
}
303304
}
304-
305305
return db.NewRecordStmt(SBOM_TIMESTAMP, "doc", result, score, "")
306306
}
307307

0 commit comments

Comments
 (0)