diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go index c244906a..c6e83cad 100644 --- a/pkg/spec/spec.go +++ b/pkg/spec/spec.go @@ -1,7 +1,7 @@ package spec import ( - "github.com/aquasecurity/trivy-checks/specs" + "github.com/aquasecurity/trivy-checks/pkg/specs" ) // Loader access compliance specs diff --git a/specs/compliance/aws-cis-1.2.yaml b/pkg/specs/compliance/aws-cis-1.2.yaml similarity index 100% rename from specs/compliance/aws-cis-1.2.yaml rename to pkg/specs/compliance/aws-cis-1.2.yaml diff --git a/specs/compliance/aws-cis-1.4.yaml b/pkg/specs/compliance/aws-cis-1.4.yaml similarity index 100% rename from specs/compliance/aws-cis-1.4.yaml rename to pkg/specs/compliance/aws-cis-1.4.yaml diff --git a/specs/compliance/docker-cis.yaml b/pkg/specs/compliance/docker-cis.yaml similarity index 100% rename from specs/compliance/docker-cis.yaml rename to pkg/specs/compliance/docker-cis.yaml diff --git a/specs/compliance/eks-cis-1.4.yaml b/pkg/specs/compliance/eks-cis-1.4.yaml similarity index 100% rename from specs/compliance/eks-cis-1.4.yaml rename to pkg/specs/compliance/eks-cis-1.4.yaml diff --git a/specs/compliance/k8s-cis-1.23.yaml b/pkg/specs/compliance/k8s-cis-1.23.yaml similarity index 100% rename from specs/compliance/k8s-cis-1.23.yaml rename to pkg/specs/compliance/k8s-cis-1.23.yaml diff --git a/specs/compliance/k8s-nsa-1.0.yaml b/pkg/specs/compliance/k8s-nsa-1.0.yaml similarity index 100% rename from specs/compliance/k8s-nsa-1.0.yaml rename to pkg/specs/compliance/k8s-nsa-1.0.yaml diff --git a/specs/compliance/k8s-pss-baseline.yaml b/pkg/specs/compliance/k8s-pss-baseline.yaml similarity index 100% rename from specs/compliance/k8s-pss-baseline.yaml rename to pkg/specs/compliance/k8s-pss-baseline.yaml diff --git a/specs/compliance/k8s-pss-restricted.yaml b/pkg/specs/compliance/k8s-pss-restricted.yaml similarity index 100% rename from specs/compliance/k8s-pss-restricted.yaml rename to pkg/specs/compliance/k8s-pss-restricted.yaml diff --git a/specs/loader.go b/pkg/specs/loader.go similarity index 88% rename from specs/loader.go rename to pkg/specs/loader.go index 1cbefbb0..6e131d0a 100644 --- a/specs/loader.go +++ b/pkg/specs/loader.go @@ -14,20 +14,20 @@ const ComplianceFolder = "compliance" var ( //go:embed compliance - complainceFS embed.FS + complianceFS embed.FS ) var complianceSpecMap map[string]string // Load compliance specs func init() { - dir, _ := complainceFS.ReadDir(ComplianceFolder) + dir, _ := complianceFS.ReadDir(ComplianceFolder) complianceSpecMap = make(map[string]string, 0) for _, r := range dir { if !strings.Contains(r.Name(), ".yaml") { continue } - file, err := complainceFS.Open(fmt.Sprintf("%s/%s", ComplianceFolder, r.Name())) + file, err := complianceFS.Open(fmt.Sprintf("%s/%s", ComplianceFolder, r.Name())) if err != nil { panic(err) } diff --git a/specs/loader_test.go b/pkg/specs/loader_test.go similarity index 100% rename from specs/loader_test.go rename to pkg/specs/loader_test.go