Skip to content

Commit

Permalink
Merge pull request #352 from warpkwd/bsi_tm_ci
Browse files Browse the repository at this point in the history
Add timecheck to bsi timestamp
  • Loading branch information
viveksahu26 authored Nov 13, 2024
2 parents b82f436 + 9748753 commit bb27163
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/compliance/bsi.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,13 @@ func bsiCreator(doc sbom.Document) *db.Record {
}

func bsiTimestamp(doc sbom.Document) *db.Record {
score := 0.0
result := doc.Spec().GetCreationTimestamp()
result, score := "", 0.0

if result != "" {
score = 10.0
if result = doc.Spec().GetCreationTimestamp(); result != "" {
if _, isTimeCorrect := common.CheckTimestamp(result); isTimeCorrect {
score = 10.0
}
}

return db.NewRecordStmt(SBOM_TIMESTAMP, "doc", result, score, "")
}

Expand Down

0 comments on commit bb27163

Please sign in to comment.