Skip to content

Commit 21454ad

Browse files
Merge branch 'master' into feat/resource_info_gdm
2 parents aa79fc9 + f4ed3d0 commit 21454ad

257 files changed

Lines changed: 1723 additions & 374 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ examples
88
.editorconfig
99
.gitignore
1010
.golangci.yml
11-
.goreleaser.nightly.yml
12-
.goreleaser.yml
11+
release/.goreleaser.nightly.yml
12+
release/.goreleaser.yml
1313
cx.configuration
1414
docker-compose.yml
1515
mkdocs.yml
1616
sonar-project.properties
1717
*.sarif
1818
*.zip
1919
Dockerfile
20-
Dockerfile.*
20+
docker
2121
assets/queries/**/test
2222
assets/template

.github/workflows/go-e2e.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
matrix:
1313
go-version: [1.18.x]
1414
os: [ubuntu-latest]
15-
kics-docker: ["Dockerfile", "Dockerfile.ubi8"]
15+
kics-docker: ["Dockerfile", "docker/Dockerfile.ubi8"]
1616
runs-on: ${{ matrix.os }}
1717
steps:
1818
- name: Cancel Previous Runs
@@ -93,9 +93,12 @@ jobs:
9393
go mod tidy
9494
go build
9595
./e2e-report -test-path ${CWD} -test-name results.json -report-path ${CWD} -report-name e2e-report.html
96+
- name: Get docker name
97+
run: |
98+
DOCKER_NAME=$(echo ${{ matrix.kics-docker }} | sed 's/\//-/')
9699
- name: Archive test report
97100
if: always()
98101
uses: actions/upload-artifact@v2
99102
with:
100-
name: e2e-tests-report-${{ matrix.kics-docker }}
103+
name: e2e-tests-report-$DOCKER_NAME
101104
path: e2e-report.html

.github/workflows/release-apispec.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ jobs:
3636
with:
3737
go-version: 1.18.x
3838
- name: Run GoReleaser
39-
uses: goreleaser/goreleaser-action@v2.9.1
39+
uses: goreleaser/goreleaser-action@v3.0.0
4040
with:
4141
version: v0.160.0
42-
args: release --rm-dist --snapshot --skip-validate --config="./.goreleaser-apispec.yml"
42+
args: release --rm-dist --snapshot --skip-validate --config="./release/.goreleaser-apispec.yml"
4343
env:
4444
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4545
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
@@ -141,7 +141,7 @@ jobs:
141141
with:
142142
context: .
143143
push: true
144-
file: ./Dockerfile.apispec
144+
file: ./docker/Dockerfile.apispec
145145
tags: checkmarx/kics:apispec,checkmarx/kics:apispec-alpine
146146
build-args: |
147147
VERSION=apipsec-${{ steps.shorthash.outputs.sha8 }}
@@ -153,7 +153,7 @@ jobs:
153153
uses: docker/build-push-action@v3.0.0
154154
with:
155155
context: .
156-
file: ./Dockerfile.apispec.debian
156+
file: ./docker/Dockerfile.apispec.debian
157157
push: true
158158
tags: checkmarx/kics:apispec-debian,checkmarx/kics:apispec-debian-latest
159159
build-args: |

.github/workflows/release-dkr-image-for-tag.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ jobs:
8181
SENTRY_DSN=${{ secrets.SENTRY_DSN }}
8282
DESCRIPTIONS_URL=${{ secrets.DESCRIPTIONS_URL }}
8383
- name: Push debian to Docker Hub
84-
if: ${{ hashFiles('Dockerfile.debian') }} != ""
84+
if: ${{ hashFiles('./docker/Dockerfile.debian') }} != ""
8585
id: build_debian
8686
uses: docker/build-push-action@v3.0.0
8787
with:
8888
context: .
89-
file: ./Dockerfile.debian
89+
file: ./docker/Dockerfile.debian
9090
push: true
9191
platforms: linux/amd64,linux/arm64
9292
tags: ${{ steps.prep.outputs.debian_tags }}
@@ -96,12 +96,12 @@ jobs:
9696
SENTRY_DSN=${{ secrets.SENTRY_DSN }}
9797
DESCRIPTIONS_URL=${{ secrets.DESCRIPTIONS_URL }}
9898
- name: Push ubi8 to Docker Hub
99-
if: ${{ hashFiles('Dockerfile.ubi8') }} != ""
99+
if: ${{ hashFiles('./docker/Dockerfile.ubi8') }} != ""
100100
id: build_ubi8
101101
uses: docker/build-push-action@v3.0.0
102102
with:
103103
context: .
104-
file: ./Dockerfile.ubi8
104+
file: ./docker/Dockerfile.ubi8
105105
push: true
106106
platforms: linux/amd64
107107
tags: ${{ steps.prep.outputs.ubi8_tags }}

.github/workflows/release-dkr-image.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
uses: docker/build-push-action@v3.0.0
6666
with:
6767
context: .
68-
file: ./Dockerfile.debian
68+
file: ./docker/Dockerfile.debian
6969
push: true
7070
platforms: linux/amd64,linux/arm64
7171
tags: checkmarx/kics:debian,checkmarx/kics:${{ steps.get-version.outputs.version }}-debian
@@ -79,7 +79,7 @@ jobs:
7979
uses: docker/build-push-action@v3.0.0
8080
with:
8181
context: .
82-
file: ./Dockerfile.ubi8
82+
file: ./docker/Dockerfile.ubi8
8383
push: true
8484
tags: checkmarx/kics:ubi8,checkmarx/kics:${{ steps.get-version.outputs.version }}-ubi8
8585
platforms: linux/amd64

.github/workflows/release-nightly.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ jobs:
5353
with:
5454
go-version: 1.18.x
5555
- name: Run GoReleaser
56-
uses: goreleaser/goreleaser-action@v2.9.1
56+
uses: goreleaser/goreleaser-action@v3.0.0
5757
with:
5858
version: v0.160.0
59-
args: release --rm-dist --snapshot --skip-validate --config="./.goreleaser-nightly.yml"
59+
args: release --rm-dist --snapshot --skip-validate --config="./release/.goreleaser-nightly.yml"
6060
env:
6161
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6262
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
@@ -175,7 +175,7 @@ jobs:
175175
uses: docker/build-push-action@v3.0.0
176176
with:
177177
context: .
178-
file: ./Dockerfile.debian
178+
file: ./docker/Dockerfile.debian
179179
push: true
180180
platforms: linux/amd64,linux/arm64
181181
tags: checkmarx/kics:nightly-debian
@@ -188,7 +188,7 @@ jobs:
188188
uses: docker/build-push-action@v3.0.0
189189
with:
190190
context: .
191-
file: ./Dockerfile.ubi8
191+
file: ./docker/Dockerfile.ubi8
192192
push: true
193193
tags: checkmarx/kics:nightly-ubi8
194194
platforms: linux/amd64

.github/workflows/update-install-script.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
run: |
4242
#!/usr/bin/env python3
4343
import ruamel.yaml
44-
with open('.goreleaser.yml', 'r') as file:
44+
with open('./docker/.goreleaser.yml', 'r') as file:
4545
file_obj = ruamel.yaml.load(file, Loader=ruamel.yaml.RoundTripLoader)
4646
del file_obj['brews']
4747
file_content = ruamel.yaml.dump(file_obj, Dumper=ruamel.yaml.RoundTripDumper)

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ HEALTHCHECK CMD wget -q --method=HEAD localhost/system-status.txt
3333
# Runtime image
3434
# Ignore no User Cmd since KICS container is stopped afer scan
3535
# kics-scan ignore-line
36-
FROM alpine:3.15.4
36+
FROM alpine:3.16.0
3737

3838
# Install Terraform and Terraform plugins
3939
RUN wget https://releases.hashicorp.com/terraform/1.1.3/terraform_1.1.3_linux_amd64.zip \
@@ -47,7 +47,7 @@ RUN wget https://releases.hashicorp.com/terraform/1.1.3/terraform_1.1.3_linux_am
4747
&& unzip terraform-provider-aws_3.72.0_linux_amd64.zip && rm terraform-provider-aws_3.72.0_linux_amd64.zip \
4848
&& mkdir ~/.terraform.d && mkdir ~/.terraform.d/plugins && mkdir ~/.terraform.d/plugins/linux_amd64 && mv terraform-provider-aws_v3.72.0_x5 terraform-provider-google_v4.10.0_x5 terraform-provider-azurerm_v2.95.0_x5 ~/.terraform.d/plugins/linux_amd64 \
4949
&& apk add --no-cache \
50-
git=2.34.2-r0
50+
git=2.36.1-r0
5151

5252
# Copy built binary to the runtime container
5353
# Vulnerability fixed in latest version of KICS remove when gh actions version is updated

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ dkr-compose: ## build docker image and runs docker-compose up
172172

173173
.PHONY: dkr-build-antlr
174174
dkr-build-antlr: ## build ANTLRv4 docker image and generate parser based on given grammar
175-
@docker build -t antlr4-generator:dev -f Dockerfile.antlr .
175+
@docker build -t antlr4-generator:dev -f ./docker/Dockerfile.antlr .
176176
@docker run --rm -u $(id -u ${USER}):$(id -g ${USER}) -v $(pwd)/pkg/parser/jsonfilter:/work -it antlr4-generator:dev
177177

178178
.PHONY: release

assets/queries/ansible/aws/memcached_disabled/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "2d55ef88-b616-4890-b822-47f280763e89",
33
"queryName": "Memcached Disabled",
4-
"severity": "HIGH",
4+
"severity": "MEDIUM",
55
"category": "Encryption",
66
"descriptionText": "Check if the Memcached is disabled on the ElastiCache",
77
"descriptionUrl": "https://docs.ansible.com/ansible/latest/collections/community/aws/elasticache_module.html#parameter-engine",

0 commit comments

Comments
 (0)