Skip to content

Commit

Permalink
Bump version to v3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspervdj-luminal committed Jan 24, 2023
1 parent 41f52e8 commit 02b5674
Show file tree
Hide file tree
Showing 111 changed files with 194 additions and 175 deletions.
4 changes: 2 additions & 2 deletions .goreleaser.yml
Expand Up @@ -14,8 +14,8 @@ builds:
binary: regula
ldflags:
- -s -w
- -X github.com/fugue/regula/v2/pkg/version.Version={{.Tag}}
- -X github.com/fugue/regula/v2/pkg/version.GitCommit={{.ShortCommit}}
- -X github.com/fugue/regula/v3/pkg/version.Version={{.Tag}}
- -X github.com/fugue/regula/v3/pkg/version.GitCommit={{.ShortCommit}}
id: macos
goos: [darwin]
goarch: [amd64, arm64]
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,15 @@
# CHANGELOG

## v3.0.0 (2023-01-24)
### Added
* support for_each for resources in tf loader
### Changed
* switch to hcl_interpreter from policy-engine (#383)
* resources IDs for tf resources that have count set now use the `aws_s3_bucket.my_bucket[0]` format
### Fixed
* FG_R00252 should support arrays for condition values (#380)
* FG_R00329 has wrong property name (#368)

## v2.10.0 (2022-11-10)
### Added
* Support for .tf.json files - including those output by Terraform CDK's `cdktf synth` command.
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -10,8 +10,8 @@ REGO_RULES_SOURCE = $(shell find rego/rules -type f -name '*.rego')
GITCOMMIT = $(shell git rev-parse --short HEAD 2> /dev/null || true)
BUILD_TYPE ?= dev
define LDFLAGS
-X \"github.com/fugue/regula/v2/pkg/version.Version=$(VERSION)-$(BUILD_TYPE)\" \
-X \"github.com/fugue/regula/v2/pkg/version.GitCommit=$(GITCOMMIT)\"
-X \"github.com/fugue/regula/v3/pkg/version.Version=$(VERSION)-$(BUILD_TYPE)\" \
-X \"github.com/fugue/regula/v3/pkg/version.GitCommit=$(GITCOMMIT)\"
endef
CLI_BUILD = go build -ldflags="$(LDFLAGS) -s -w"
GO_BIN_DIR= $(shell go env GOPATH)/bin
Expand Down
9 changes: 9 additions & 0 deletions changes/v3.0.0.md
@@ -0,0 +1,9 @@
## v3.0.0 (2023-01-24)
### Added
* support for_each for resources in tf loader
### Changed
* switch to hcl_interpreter from policy-engine (#383)
* resources IDs for tf resources that have count set now use the `aws_s3_bucket.my_bucket[0]` format
### Fixed
* FG_R00252 should support arrays for condition values (#380)
* FG_R00329 has wrong property name (#368)
4 changes: 2 additions & 2 deletions cmd/flags.go
Expand Up @@ -20,8 +20,8 @@ import (
"path/filepath"
"strings"

"github.com/fugue/regula/v2/pkg/loader"
"github.com/fugue/regula/v2/pkg/reporter"
"github.com/fugue/regula/v3/pkg/loader"
"github.com/fugue/regula/v3/pkg/reporter"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down
4 changes: 2 additions & 2 deletions cmd/init.go
Expand Up @@ -20,8 +20,8 @@ import (
"os"
"path/filepath"

"github.com/fugue/regula/v2/pkg/loader"
"github.com/fugue/regula/v2/pkg/reporter"
"github.com/fugue/regula/v3/pkg/loader"
"github.com/fugue/regula/v3/pkg/reporter"
"github.com/manifoldco/promptui"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
Expand Down
4 changes: 2 additions & 2 deletions cmd/repl.go
Expand Up @@ -18,8 +18,8 @@ import (
"context"
_ "embed"

"github.com/fugue/regula/v2/pkg/loader"
"github.com/fugue/regula/v2/pkg/rego"
"github.com/fugue/regula/v3/pkg/loader"
"github.com/fugue/regula/v3/pkg/rego"

"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Expand Up @@ -19,7 +19,7 @@ import (
"os"
"time"

"github.com/fugue/regula/v2/pkg/rego"
"github.com/fugue/regula/v3/pkg/rego"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/run.go
Expand Up @@ -21,9 +21,9 @@ import (
"os"
"path/filepath"

"github.com/fugue/regula/v2/pkg/loader"
"github.com/fugue/regula/v2/pkg/rego"
"github.com/fugue/regula/v2/pkg/reporter"
"github.com/fugue/regula/v3/pkg/loader"
"github.com/fugue/regula/v3/pkg/rego"
"github.com/fugue/regula/v3/pkg/reporter"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down
8 changes: 4 additions & 4 deletions cmd/runconfig.go
Expand Up @@ -20,10 +20,10 @@ import (
"os"
"path/filepath"

"github.com/fugue/regula/v2/pkg/fugue"
"github.com/fugue/regula/v2/pkg/loader"
"github.com/fugue/regula/v2/pkg/rego"
"github.com/fugue/regula/v2/pkg/reporter"
"github.com/fugue/regula/v3/pkg/fugue"
"github.com/fugue/regula/v3/pkg/loader"
"github.com/fugue/regula/v3/pkg/rego"
"github.com/fugue/regula/v3/pkg/reporter"
"github.com/sirupsen/logrus"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/showconfigrego.go
Expand Up @@ -18,8 +18,8 @@ import (
"context"
"fmt"

"github.com/fugue/regula/v2/pkg/fugue"
"github.com/fugue/regula/v2/pkg/rego"
"github.com/fugue/regula/v3/pkg/fugue"
"github.com/fugue/regula/v3/pkg/rego"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/showcustomrule.go
Expand Up @@ -18,8 +18,8 @@ import (
"context"
"fmt"

"github.com/fugue/regula/v2/pkg/fugue"
"github.com/fugue/regula/v2/pkg/rego"
"github.com/fugue/regula/v3/pkg/fugue"
"github.com/fugue/regula/v3/pkg/rego"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/showinput.go
Expand Up @@ -18,7 +18,7 @@ import (
"encoding/json"
"fmt"

"github.com/fugue/regula/v2/pkg/loader"
"github.com/fugue/regula/v3/pkg/loader"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/showscanview.go
Expand Up @@ -20,9 +20,9 @@ import (
"os"
"path/filepath"

"github.com/fugue/regula/v2/pkg/loader"
"github.com/fugue/regula/v2/pkg/rego"
"github.com/fugue/regula/v2/pkg/reporter"
"github.com/fugue/regula/v3/pkg/loader"
"github.com/fugue/regula/v3/pkg/rego"
"github.com/fugue/regula/v3/pkg/reporter"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/test.go
Expand Up @@ -18,8 +18,8 @@ import (
"context"
_ "embed"

"github.com/fugue/regula/v2/pkg/loader"
"github.com/fugue/regula/v2/pkg/rego"
"github.com/fugue/regula/v3/pkg/loader"
"github.com/fugue/regula/v3/pkg/rego"

"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Expand Up @@ -17,7 +17,7 @@ package cmd
import (
"fmt"

"github.com/fugue/regula/v2/pkg/version"
"github.com/fugue/regula/v3/pkg/version"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/write_test_inputs.go
Expand Up @@ -19,8 +19,8 @@ import (
_ "embed"
"os"

"github.com/fugue/regula/v2/pkg/loader"
"github.com/fugue/regula/v2/pkg/rego"
"github.com/fugue/regula/v3/pkg/loader"
"github.com/fugue/regula/v3/pkg/rego"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
@@ -1,4 +1,4 @@
module github.com/fugue/regula/v2
module github.com/fugue/regula/v3

go 1.17

Expand Down
2 changes: 1 addition & 1 deletion main.go
Expand Up @@ -15,7 +15,7 @@
package main

import (
"github.com/fugue/regula/v2/cmd"
"github.com/fugue/regula/v3/cmd"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Expand Up @@ -60,7 +60,7 @@ markdown_extensions:
site_url: https://regula.dev
edit_uri: blob/master/docs/src/
extra:
version: v2.10.0
version: v3.0.0
social:
- icon: fontawesome/solid/globe
link: https://www.fugue.co
Expand Down
22 changes: 11 additions & 11 deletions pkg/fugue/client.go
Expand Up @@ -26,17 +26,17 @@ import (
"path/filepath"
"strings"

"github.com/fugue/regula/v2/pkg/loader"
"github.com/fugue/regula/v2/pkg/rego"
"github.com/fugue/regula/v2/pkg/reporter"
"github.com/fugue/regula/v2/pkg/rule_waivers"
"github.com/fugue/regula/v2/pkg/swagger/client"
apiclient "github.com/fugue/regula/v2/pkg/swagger/client"
"github.com/fugue/regula/v2/pkg/swagger/client/environments"
"github.com/fugue/regula/v2/pkg/swagger/client/rule_bundles"
waivers "github.com/fugue/regula/v2/pkg/swagger/client/rule_waivers"
"github.com/fugue/regula/v2/pkg/swagger/models"
"github.com/fugue/regula/v2/pkg/version"
"github.com/fugue/regula/v3/pkg/loader"
"github.com/fugue/regula/v3/pkg/rego"
"github.com/fugue/regula/v3/pkg/reporter"
"github.com/fugue/regula/v3/pkg/rule_waivers"
"github.com/fugue/regula/v3/pkg/swagger/client"
apiclient "github.com/fugue/regula/v3/pkg/swagger/client"
"github.com/fugue/regula/v3/pkg/swagger/client/environments"
"github.com/fugue/regula/v3/pkg/swagger/client/rule_bundles"
waivers "github.com/fugue/regula/v3/pkg/swagger/client/rule_waivers"
"github.com/fugue/regula/v3/pkg/swagger/models"
"github.com/fugue/regula/v3/pkg/version"
"github.com/go-openapi/runtime"
httptransport "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
Expand Down
10 changes: 5 additions & 5 deletions pkg/fugue/customrules.go
Expand Up @@ -19,11 +19,11 @@ import (
"fmt"
"strings"

"github.com/fugue/regula/v2/pkg/rego"
"github.com/fugue/regula/v2/pkg/regotools/doublequote"
"github.com/fugue/regula/v2/pkg/regotools/metadoc"
"github.com/fugue/regula/v2/pkg/swagger/client/custom_rules"
"github.com/fugue/regula/v2/pkg/swagger/models"
"github.com/fugue/regula/v3/pkg/rego"
"github.com/fugue/regula/v3/pkg/regotools/doublequote"
"github.com/fugue/regula/v3/pkg/regotools/metadoc"
"github.com/fugue/regula/v3/pkg/swagger/client/custom_rules"
"github.com/fugue/regula/v3/pkg/swagger/models"
"github.com/sirupsen/logrus"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/fugue/upload.go
Expand Up @@ -21,8 +21,8 @@ import (
"fmt"
"net/http"

"github.com/fugue/regula/v2/pkg/reporter"
"github.com/fugue/regula/v2/pkg/swagger/client/scans"
"github.com/fugue/regula/v3/pkg/reporter"
"github.com/fugue/regula/v3/pkg/swagger/client/scans"
"github.com/sirupsen/logrus"
)

Expand Down
12 changes: 6 additions & 6 deletions pkg/loader/base.go
Expand Up @@ -19,12 +19,12 @@ import (
"strings"
)

//go:generate mockgen -destination=../mocks/mock_iacconfiguration.go -package=mocks github.com/fugue/regula/v2/pkg/loader IACConfiguration
//go:generate mockgen -destination=../mocks/mock_configurationdetector.go -package=mocks github.com/fugue/regula/v2/pkg/loader ConfigurationDetector
//go:generate mockgen -destination=../mocks/mock_inputpath.go -package=mocks github.com/fugue/regula/v2/pkg/loader InputPath
//go:generate mockgen -destination=../mocks/mock_inputdirectory.go -package=mocks github.com/fugue/regula/v2/pkg/loader InputDirectory
//go:generate mockgen -destination=../mocks/mock_inputfile.go -package=mocks github.com/fugue/regula/v2/pkg/loader InputFile
//go:generate mockgen -destination=../mocks/mock_loadedconfigurations.go -package=mocks github.com/fugue/regula/v2/pkg/loader LoadedConfigurations
//go:generate mockgen -destination=../mocks/mock_iacconfiguration.go -package=mocks github.com/fugue/regula/v3/pkg/loader IACConfiguration
//go:generate mockgen -destination=../mocks/mock_configurationdetector.go -package=mocks github.com/fugue/regula/v3/pkg/loader ConfigurationDetector
//go:generate mockgen -destination=../mocks/mock_inputpath.go -package=mocks github.com/fugue/regula/v3/pkg/loader InputPath
//go:generate mockgen -destination=../mocks/mock_inputdirectory.go -package=mocks github.com/fugue/regula/v3/pkg/loader InputDirectory
//go:generate mockgen -destination=../mocks/mock_inputfile.go -package=mocks github.com/fugue/regula/v3/pkg/loader InputFile
//go:generate mockgen -destination=../mocks/mock_loadedconfigurations.go -package=mocks github.com/fugue/regula/v3/pkg/loader LoadedConfigurations

// stdIn is the path used for stdin.
const stdIn = "<stdin>"
Expand Down
6 changes: 3 additions & 3 deletions pkg/loader/cfn_test.go
Expand Up @@ -18,9 +18,9 @@ import (
"encoding/json"
"testing"

"github.com/fugue/regula/v2/pkg/loader"
inputs "github.com/fugue/regula/v2/pkg/loader/test_inputs"
"github.com/fugue/regula/v2/pkg/mocks"
"github.com/fugue/regula/v3/pkg/loader"
inputs "github.com/fugue/regula/v3/pkg/loader/test_inputs"
"github.com/fugue/regula/v3/pkg/mocks"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/loader/input.go
Expand Up @@ -19,7 +19,7 @@ import (
"os"
"path/filepath"

"github.com/fugue/regula/v2/pkg/git"
"github.com/fugue/regula/v3/pkg/git"
)

type directory struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/loader/loadpaths.go
Expand Up @@ -23,7 +23,7 @@ import (

"github.com/sirupsen/logrus"

"github.com/fugue/regula/v2/pkg/git"
"github.com/fugue/regula/v3/pkg/git"
)

type LoadPathsOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/loader/loadpaths_test.go
Expand Up @@ -17,7 +17,7 @@ package loader_test
import (
"testing"

"github.com/fugue/regula/v2/pkg/loader"
"github.com/fugue/regula/v3/pkg/loader"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/loader/tf_test.go
Expand Up @@ -21,7 +21,7 @@ import (
"path/filepath"
"testing"

"github.com/fugue/regula/v2/pkg/git"
"github.com/fugue/regula/v3/pkg/git"

"github.com/stretchr/testify/assert"
)
Expand Down
6 changes: 3 additions & 3 deletions pkg/loader/tfplan_test.go
Expand Up @@ -17,9 +17,9 @@ package loader_test
import (
"testing"

"github.com/fugue/regula/v2/pkg/loader"
inputs "github.com/fugue/regula/v2/pkg/loader/test_inputs"
"github.com/fugue/regula/v2/pkg/mocks"
"github.com/fugue/regula/v3/pkg/loader"
inputs "github.com/fugue/regula/v3/pkg/loader/test_inputs"
"github.com/fugue/regula/v3/pkg/mocks"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/mocks/mock_configurationdetector.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkg/mocks/mock_iacconfiguration.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 02b5674

Please sign in to comment.