Skip to content

Commit

Permalink
Merge pull request #107 from weaveworks/dev
Browse files Browse the repository at this point in the history
release version v1.2.0
  • Loading branch information
Ahmed El-Sayed authored Sep 29, 2022
2 parents d45b3bd + f5c4745 commit cedd4ab
Show file tree
Hide file tree
Showing 13 changed files with 857 additions and 61 deletions.
5 changes: 5 additions & 0 deletions api/v2beta1/policy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ type PolicySpec struct {
// +optional
// Standards is a list of policy standards that this policy falls under
Standards []PolicyStandard `json:"standards"`
//+optional
//+kubebuilder:default:=kubernetes
//+kubebuilder:validation:Enum=kubernetes;terraform
// Provider policy provider, can be kubernetes, terraform
Provider string `json:"provider"`
}

type PolicySetFilters struct {
Expand Down
7 changes: 7 additions & 0 deletions config/crd/bases/pac.weave.works_policies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ spec:
- type
type: object
type: array
provider:
default: kubernetes
description: Provider policy provider, can be kubernetes, terraform
enum:
- kubernetes
- terraform
type: string
severity:
description: Severity is a measure of the impact of that policy, can
be low, medium or high
Expand Down
7 changes: 7 additions & 0 deletions configuration/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ type AuditConfig struct {
Interval uint
}

type TerraformConfig struct {
Enabled bool
Sinks SinksConfig
PolicySet string
}

type Config struct {
KubeConfigFile string
AccountID string
Expand All @@ -73,6 +79,7 @@ type Config struct {

Admission AdmissionConfig
Audit AuditConfig
Terraform TerraformConfig
}

func GetAgentConfiguration(filePath string) Config {
Expand Down
35 changes: 18 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ require (
github.com/MagalixTechnologies/channel v1.1.0
github.com/MagalixTechnologies/core/logger v1.0.4
github.com/MagalixTechnologies/core/packet v1.0.1
github.com/MagalixTechnologies/policy-core v1.1.1
github.com/MagalixTechnologies/policy-core v1.1.4-0.20220905094853-05b9bb3e692f
github.com/MagalixTechnologies/uuid-go v0.0.0-20210127133914-f8f07f7ab96e
github.com/elastic/go-elasticsearch/v7 v7.17.1
github.com/fluxcd/pkg/runtime v0.13.1
github.com/go-logr/logr v1.2.2
github.com/go-logr/logr v1.2.3
github.com/golang/mock v1.6.0
github.com/golang/snappy v0.0.4
github.com/pkg/errors v0.9.1
github.com/spf13/viper v1.10.0
github.com/stretchr/testify v1.7.1
github.com/stretchr/testify v1.8.0
github.com/urfave/cli/v2 v2.3.0
github.com/weaveworks/policy-agent/api v0.0.0
go.uber.org/zap v1.19.1
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f
k8s.io/api v0.23.5
k8s.io/apimachinery v0.23.5
k8s.io/client-go v0.23.4
Expand All @@ -34,41 +34,41 @@ require (
require (
github.com/MagalixTechnologies/opa-core v1.0.12 // indirect
github.com/OneOfOne/xxhash v1.2.8 // indirect
github.com/agnivade/levenshtein v1.0.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 // indirect
github.com/go-logr/zapr v1.2.0 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.2.0 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-retryablehttp v0.6.8 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kr/pretty v0.2.1 // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/open-policy-agent/opa v0.37.1 // indirect
github.com/open-policy-agent/opa v0.42.2 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_golang v1.12.2 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
Expand All @@ -80,24 +80,25 @@ require (
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/vektah/gqlparser/v2 v2.4.5 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/yashtewari/glob-intersection v0.0.0-20180916065949-5c77d914dd0b // indirect
github.com/yashtewari/glob-intersection v0.1.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/net v0.0.0-20211215060638-4ddde0e984e9 // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.66.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.23.4 // indirect
k8s.io/component-base v0.23.4 // indirect
k8s.io/klog/v2 v2.30.0 // indirect
Expand Down
Loading

0 comments on commit cedd4ab

Please sign in to comment.