-
Notifications
You must be signed in to change notification settings - Fork 0
feat: first implementation #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4bd3ea8
feat: first implementation
gusfcarvalho 7259628
fix: bugs here and there
gusfcarvalho 1a342fa
fix: copilot issues related to code
gusfcarvalho baf7c2d
fix: copilot issues
gusfcarvalho 8e4ecdb
feat: copilot ifxes
gusfcarvalho eb8940c
fix: copilot issues
gusfcarvalho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: Build and Upload Artifacts | ||
|
|
||
| on: | ||
| workflow_call: | ||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-go@v5 | ||
| - name: Run GoReleaser | ||
| uses: goreleaser/goreleaser-action@v6 | ||
| with: | ||
| # 'latest', 'nightly', or a semver | ||
| version: '~> v2' | ||
| args: release --clean | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Install gooci cli | ||
| run: go install github.com/compliance-framework/gooci@latest | ||
gusfcarvalho marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - name: Authenticate gooci cli | ||
| run: gooci login ghcr.io --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} | ||
| - name: gooci Upload Version | ||
| run: gooci upload dist/ ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{github.ref_name}} | ||
| - name: gooci Upload Latest | ||
| if: "!github.event.release.prerelease" | ||
| run: gooci upload dist/ ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| name: Push | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - '*' | ||
|
|
||
| jobs: | ||
| test: | ||
| permissions: | ||
| contents: read | ||
| uses: ./.github/workflows/test.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| name: New Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - '*' | ||
|
|
||
| jobs: | ||
| release: | ||
| permissions: | ||
| packages: write | ||
| contents: write | ||
| uses: ./.github/workflows/build-and-upload.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| name: Go Test | ||
|
|
||
| on: | ||
| workflow_call: | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-go@v5 | ||
gusfcarvalho marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - name: Test | ||
| run: go test ./... | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| policies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # The help target prints out all targets with their descriptions organized | ||
| # beneath their categories. The categories are represented by '##@' and the | ||
| # target descriptions by '##'. The awk commands is responsible for reading the | ||
| # entire set of makefiles included in this invocation, looking for lines of the | ||
| # file as xyz: ## something, and then pretty-format the target and help. Then, | ||
| # if there's a line with ##@ something, that gets pretty-printed as a category. | ||
| # More info on the usage of ANSI catalog characters for terminal formatting: | ||
| # https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters | ||
| # More info on the awk command: | ||
| # http://linuxcommand.org/lc3_adv_awk.php | ||
|
|
||
| # Check if OPA CLI is installed | ||
| OPA := $(shell command -v opa 2> /dev/null) | ||
| ifeq ($(OPA),) | ||
| $(error "opa CLI not found. Please install it: https://www.openpolicyagent.org/docs/latest/cli/") | ||
gusfcarvalho marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| endif | ||
gusfcarvalho marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
gusfcarvalho marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ##@ Help | ||
| help: ## Display this concise help, ie only the porcelain target | ||
| @awk 'BEGIN {FS = ":.*##"; printf "\033[1mUsage\033[0m\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-30s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) | ||
|
|
||
| help-all: ## Display all help items, ie including plumbing targets | ||
| @awk 'BEGIN {FS = ":.*#"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?#/ { printf " \033[36m%-25s\033[0m %s\n", $$1, $$2 } /^#@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) | ||
|
|
||
|
|
||
|
|
||
|
|
||
| # Bundle the policies into a tarball for OCI registry | ||
| clean: # Cleanup build artifacts | ||
| @rm -rf dist/* | ||
|
|
||
| build: clean ## Build the policy bundle | ||
gusfcarvalho marked this conversation as resolved.
Show resolved
Hide resolved
gusfcarvalho marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| @mkdir -p dist/ | ||
| @go build -o dist/plugin main.go | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| module github.com/compliance-framework/plugin-cloud-custodian | ||
|
|
||
| go 1.25.7 | ||
|
|
||
| require ( | ||
| github.com/compliance-framework/agent v0.2.1 | ||
| github.com/hashicorp/go-hclog v1.6.3 | ||
| github.com/hashicorp/go-plugin v1.7.0 | ||
| github.com/mitchellh/mapstructure v1.5.0 | ||
| gopkg.in/yaml.v3 v3.0.1 | ||
| ) | ||
|
|
||
| require ( | ||
| github.com/OneOfOne/xxhash v1.2.8 // indirect | ||
| github.com/agnivade/levenshtein v1.2.0 // indirect | ||
| github.com/beorn7/perks v1.0.1 // indirect | ||
| github.com/cespare/xxhash/v2 v2.3.0 // indirect | ||
| github.com/compliance-framework/api v0.4.4 // indirect | ||
| github.com/defenseunicorns/go-oscal v0.6.3 // indirect | ||
| github.com/fatih/color v1.18.0 // indirect | ||
| github.com/go-ini/ini v1.67.0 // indirect | ||
| github.com/go-logr/logr v1.4.3 // indirect | ||
| github.com/go-logr/stdr v1.2.2 // indirect | ||
| github.com/go-viper/mapstructure/v2 v2.3.0 // indirect | ||
| github.com/gobwas/glob v0.2.3 // indirect | ||
| github.com/golang/protobuf v1.5.4 // indirect | ||
| github.com/google/uuid v1.6.0 // indirect | ||
| github.com/gorilla/mux v1.8.1 // indirect | ||
| github.com/hashicorp/yamux v0.1.2 // indirect | ||
| github.com/mattn/go-colorable v0.1.14 // indirect | ||
| github.com/mattn/go-isatty v0.0.20 // indirect | ||
| github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect | ||
| github.com/oklog/run v1.2.0 // indirect | ||
| github.com/open-policy-agent/opa v1.0.0 // indirect | ||
| github.com/prometheus/client_golang v1.20.5 // indirect | ||
| github.com/prometheus/client_model v0.6.1 // indirect | ||
| github.com/prometheus/common v0.57.0 // indirect | ||
| github.com/prometheus/procfs v0.15.1 // indirect | ||
| github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect | ||
| github.com/sirupsen/logrus v1.9.3 // indirect | ||
| github.com/tchap/go-patricia/v2 v2.3.1 // 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.2.0 // indirect | ||
| go.opentelemetry.io/auto/sdk v1.1.0 // indirect | ||
| go.opentelemetry.io/otel v1.37.0 // indirect | ||
| go.opentelemetry.io/otel/metric v1.37.0 // indirect | ||
| go.opentelemetry.io/otel/sdk v1.37.0 // indirect | ||
| go.opentelemetry.io/otel/trace v1.37.0 // indirect | ||
| golang.org/x/net v0.43.0 // indirect | ||
| golang.org/x/sys v0.35.0 // indirect | ||
| golang.org/x/text v0.28.0 // indirect | ||
| google.golang.org/genproto/googleapis/rpc v0.0.0-20250826171959-ef028d996bc1 // indirect | ||
| google.golang.org/grpc v1.75.0 // indirect | ||
| google.golang.org/protobuf v1.36.8 // indirect | ||
| sigs.k8s.io/yaml v1.4.0 // indirect | ||
| ) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.