Change state of applicability

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-01-02 15:04:11 +01:00
parent c60e19a7a8
commit 4ed3f5a067
105 changed files with 18351 additions and 284 deletions

View File

@@ -72,9 +72,10 @@ type (
Dark string `json:"dark"`
} `json:"logo,omitempty"`
Controls []struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
BestPractice *bool `json:"best_practice,omitempty"`
} `json:"controls"`
}
}
@@ -572,6 +573,10 @@ func (s FrameworkService) Import(
now := time.Now()
description := control.Description
bestPractice := true
if control.BestPractice != nil {
bestPractice = *control.BestPractice
}
control := &coredata.Control{
ID: controlID,
FrameworkID: frameworkID,
@@ -580,6 +585,7 @@ func (s FrameworkService) Import(
Name: control.Name,
Description: &description,
Status: coredata.ControlStatusIncluded,
BestPractice: bestPractice,
CreatedAt: now,
UpdatedAt: now,
}