You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* WIP: implement validating with default policies
Need to handle the error throwing when unable to fetch metadata feilds from the defaultpolicies
Signed-off-by: Santosh <ksantosh@intelops.dev>
* WIP: Improved logging individual policy errors
Signed-off-by: Santosh <ksantosh@intelops.dev>
* WIP: Removed all the error which were showing even with correct validation results
Signed-off-by: Santosh <ksantosh@intelops.dev>
* WIP: Fetching policies using .env file
This method would require to supply the '.env' file to users, without
which the command will fail with error: Error reading .env file
Another approach could be to store all the ociURLs in a const and refer
them to pull default policies.
Signed-off-by: Santosh <ksantosh@intelops.dev>
* Update: Validation with default policies forinfrafile and terraform files
Added examples for using default policies. Updated the logic for adding the source annotation for creating a OCI artifact
Signed-off-by: Santosh <ksantosh@intelops.dev>
* Update ValidateWithRego() to validate with new format of Rego policy
Signed-off-by: Santosh <ksantosh@intelops.dev>
* Update URLs for default policies
Signed-off-by: Santosh <ksantosh@intelops.dev>
* fix failing tests
Signed-off-by: Santosh <ksantosh@intelops.dev>
---------
Signed-off-by: Santosh <ksantosh@intelops.dev>
Copy file name to clipboardExpand all lines: cmd/regoval_dockerfileval.go
+45-8
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,10 @@
1
1
package cmd
2
2
3
3
import (
4
+
"fmt"
5
+
"os"
6
+
7
+
"github.com/intelops/genval/pkg/oci"
4
8
"github.com/intelops/genval/pkg/utils"
5
9
"github.com/intelops/genval/pkg/validate"
6
10
log "github.com/sirupsen/logrus"
@@ -20,9 +24,9 @@ func init() {
20
24
log.Fatalf("Error marking flag as required: %v", err)
21
25
}
22
26
dockerfilevalCmd.Flags().StringVarP(&dockerfilevalArgs.policy, "policy", "p", "", "Path for the Rego policy file, polciy can be passed from either Local or from remote URL")
Copy file name to clipboardExpand all lines: cmd/regoval_infrafile.go
+38-6
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,10 @@
1
1
package cmd
2
2
3
3
import (
4
+
"fmt"
5
+
"os"
6
+
7
+
"github.com/intelops/genval/pkg/oci"
4
8
"github.com/intelops/genval/pkg/validate"
5
9
log "github.com/sirupsen/logrus"
6
10
"github.com/spf13/cobra"
@@ -20,9 +24,6 @@ func init() {
20
24
}
21
25
22
26
infrafileCmd.Flags().StringVarP(&infrafileArgs.policy, "policy", "p", "", "Path for the CEL policy file, polciy can be passed from either Local or from remote URL")
Copy file name to clipboardExpand all lines: cmd/regoval_terraform.go
+37-7
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,10 @@
1
1
package cmd
2
2
3
3
import (
4
+
"fmt"
5
+
"os"
6
+
7
+
"github.com/intelops/genval/pkg/oci"
4
8
"github.com/intelops/genval/pkg/parser"
5
9
"github.com/intelops/genval/pkg/validate"
6
10
log "github.com/sirupsen/logrus"
@@ -20,10 +24,6 @@ func init() {
20
24
log.Fatalf("Error marking flag as required: %v", err)
21
25
}
22
26
terraformCmd.Flags().StringVarP(&terraformArgs.policy, "policy", "p", "", "Path for the Rego policy file, polciy can be passed from either Local or from remote URL")
0 commit comments