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 <[email protected]>
* WIP: Improved logging individual policy errors
Signed-off-by: Santosh <[email protected]>
* WIP: Removed all the error which were showing even with correct validation results
Signed-off-by: Santosh <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* Update ValidateWithRego() to validate with new format of Rego policy
Signed-off-by: Santosh <[email protected]>
* Update URLs for default policies
Signed-off-by: Santosh <[email protected]>
* fix failing tests
Signed-off-by: Santosh <[email protected]>
---------
Signed-off-by: Santosh <[email protected]>
Copy file name to clipboardExpand all lines: cmd/regoval_dockerfileval.go
+45-8Lines changed: 45 additions & 8 deletions
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-6Lines changed: 38 additions & 6 deletions
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-7Lines changed: 37 additions & 7 deletions
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