forked from kubescape/kubescape
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fixed flaky loop(cautils): loadpolicy getter We should not inject pointers to the variable iterated over by the "range" operator. Signed-off-by: Frédéric BIDON <[email protected]> * fixed more flaky pointers in loops (registryadaptors, opaprocessor) Signed-off-by: Frédéric BIDON <[email protected]> * fixed more flaky pointers in loops (resultshandling) Signed-off-by: Frédéric BIDON <[email protected]> * enabled golangci linter in CI Signed-off-by: Frédéric BIDON <[email protected]> * fixed linting issues with minimal linters config Signed-off-by: Frédéric BIDON <[email protected]> * bump go version to 1.19 * English and typos * Support AKS parser (kubescape#994) * support GKE parser * update go mod * support GKE parser * update go mod * update k8s-interface pkg * Added KS desgin.drawio * revert k8s.io to v0.25.3 * ran go mod tidy * update sign-up url * [wip] Adding CreateAccount support * revert to docs URL * update opa-utils pkg * Print attack tree (optional, with argument) (kubescape#997) * Print attack tree with the argument Signed-off-by: Frédéric BIDON <[email protected]> Co-authored-by: Frédéric BIDON <[email protected]> Co-authored-by: Frédéric BIDON <[email protected]> Co-authored-by: Oshrat Nir <[email protected]> Co-authored-by: Amir Malka <[email protected]> Co-authored-by: David Wertenteil <[email protected]>
- Loading branch information
1 parent
08e7108
commit b4bdf4d
Showing
44 changed files
with
1,049 additions
and
289 deletions.
There are no files selected for viewing
This file contains 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,54 @@ | ||
name: golangci-lint | ||
on: | ||
push: | ||
branches: | ||
- dev | ||
pull_request: | ||
types: [ edited, opened, synchronize, reopened ] | ||
branches: [ master, dev ] | ||
paths-ignore: | ||
- '**.yaml' | ||
- '**.md' | ||
permissions: | ||
contents: read | ||
# Optional: allow read access to pull request. Use with `only-new-issues` option. | ||
pull-requests: read | ||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Install libgit2 | ||
run: make libgit2 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version | ||
version: latest | ||
|
||
# Optional: working directory, useful for monorepos | ||
# working-directory: somedir | ||
|
||
# Optional: golangci-lint command line arguments. | ||
# args: --issues-exit-code=0 | ||
args: --timeout 10m --build-tags=static | ||
#--new-from-rev dev | ||
|
||
# Optional: show only new issues if it's a pull request. The default value is `false`. | ||
only-new-issues: true | ||
|
||
# Optional: if set to true then the all caching functionality will be complete disabled, | ||
# takes precedence over all other caching options. | ||
# skip-cache: true | ||
|
||
# Optional: if set to true then the action don't cache or restore ~/go/pkg. | ||
# skip-pkg-cache: true | ||
|
||
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build. | ||
# skip-build-cache: true |
This file contains 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 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 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 |
---|---|---|
|
@@ -5,4 +5,5 @@ | |
*.pyc* | ||
.idea | ||
.history | ||
ca.srl | ||
ca.srl | ||
*.out |
This file contains 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,58 @@ | ||
linters-settings: | ||
govet: | ||
check-shadowing: true | ||
dupl: | ||
threshold: 200 | ||
goconst: | ||
min-len: 3 | ||
min-occurrences: 2 | ||
gocognit: | ||
min-complexity: 65 | ||
|
||
linters: | ||
enable: | ||
- gosec | ||
- staticcheck | ||
- nolintlint | ||
disable: | ||
# temporarily disabled | ||
- varcheck | ||
- ineffassign | ||
- unused | ||
- typecheck | ||
- errcheck | ||
- govet | ||
- gosimple | ||
- deadcode | ||
- gofmt | ||
- goimports | ||
- bodyclose | ||
- dupl | ||
- gocognit | ||
- gocritic | ||
- goimports | ||
- nakedret | ||
- revive | ||
- stylecheck | ||
- unconvert | ||
- unparam | ||
#- forbidigo # <- see later | ||
# should remain disabled | ||
- maligned | ||
- lll | ||
- gochecknoinits | ||
- gochecknoglobals | ||
issues: | ||
exclude-rules: | ||
- linters: | ||
- revive | ||
text: "var-naming" | ||
- linters: | ||
- revive | ||
text: "type name will be used as (.+?) by other packages, and that stutters" | ||
- linters: | ||
- stylecheck | ||
text: "ST1003" | ||
run: | ||
skip-dirs: | ||
- git2go |
This file contains 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 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM golang:1.18-alpine as builder | ||
FROM golang:1.19-alpine as builder | ||
|
||
ARG image_version | ||
ARG client | ||
|
This file contains 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 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 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 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 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
Oops, something went wrong.