Skip to content
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

update(KICS repository root): reduced the number of code files #5325

Merged
merged 7 commits into from
May 23, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ examples
.editorconfig
.gitignore
.golangci.yml
.goreleaser.nightly.yml
.goreleaser.yml
release/.goreleaser.nightly.yml
release/.goreleaser.yml
cx.configuration
docker-compose.yml
mkdocs.yml
sonar-project.properties
*.sarif
*.zip
Dockerfile
Dockerfile.*
docker
assets/queries/**/test
assets/template
7 changes: 4 additions & 3 deletions .github/workflows/go-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
matrix:
go-version: [1.17.x]
os: [ubuntu-latest]
kics-docker: ["Dockerfile", "Dockerfile.ubi8"]
kics-docker: ["Dockerfile", "docker/Dockerfile.ubi8"]
kics-docker-name: ["Dockerfile", "Dockerfile.ubi8"]
runs-on: ${{ matrix.os }}
steps:
- name: Cancel Previous Runs
Expand Down Expand Up @@ -97,5 +98,5 @@ jobs:
if: always()
uses: actions/upload-artifact@v2
with:
name: e2e-tests-report-${{ matrix.kics-docker }}
path: e2e-report.html
name: e2e-tests-report-${{ matrix.kics-docker-name }}
path: e2e-report.html
6 changes: 3 additions & 3 deletions .github/workflows/release-apispec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
uses: goreleaser/[email protected]
with:
version: v0.160.0
args: release --rm-dist --snapshot --skip-validate --config="./.goreleaser-apispec.yml"
args: release --rm-dist --snapshot --skip-validate --config="./release/.goreleaser-apispec.yml"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
with:
context: .
push: true
file: ./Dockerfile.apispec
file: ./docker/Dockerfile.apispec
tags: checkmarx/kics:apispec,checkmarx/kics:apispec-alpine
build-args: |
VERSION=apipsec-${{ steps.shorthash.outputs.sha8 }}
Expand All @@ -153,7 +153,7 @@ jobs:
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile.apispec.debian
file: ./docker/Dockerfile.apispec.debian
push: true
tags: checkmarx/kics:apispec-debian,checkmarx/kics:apispec-debian-latest
build-args: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-dkr-image-for-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ jobs:
SENTRY_DSN=${{ secrets.SENTRY_DSN }}
DESCRIPTIONS_URL=${{ secrets.DESCRIPTIONS_URL }}
- name: Push debian to Docker Hub
if: ${{ hashFiles('Dockerfile.debian') }} != ""
if: ${{ hashFiles('./docker/Dockerfile.debian') }} != ""
id: build_debian
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile.debian
file: ./docker/Dockerfile.debian
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.prep.outputs.debian_tags }}
Expand All @@ -96,12 +96,12 @@ jobs:
SENTRY_DSN=${{ secrets.SENTRY_DSN }}
DESCRIPTIONS_URL=${{ secrets.DESCRIPTIONS_URL }}
- name: Push ubi8 to Docker Hub
if: ${{ hashFiles('Dockerfile.ubi8') }} != ""
if: ${{ hashFiles('./docker/Dockerfile.ubi8') }} != ""
id: build_ubi8
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile.ubi8
file: ./docker/Dockerfile.ubi8
push: true
platforms: linux/amd64
tags: ${{ steps.prep.outputs.ubi8_tags }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-dkr-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile.debian
file: ./docker/Dockerfile.debian
push: true
platforms: linux/amd64,linux/arm64
tags: checkmarx/kics:debian,checkmarx/kics:${{ steps.get-version.outputs.version }}-debian
Expand All @@ -79,7 +79,7 @@ jobs:
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile.ubi8
file: ./docker/Dockerfile.ubi8
push: true
tags: checkmarx/kics:ubi8,checkmarx/kics:${{ steps.get-version.outputs.version }}-ubi8
platforms: linux/amd64
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
uses: goreleaser/[email protected]
with:
version: v0.160.0
args: release --rm-dist --snapshot --skip-validate --config="./.goreleaser-nightly.yml"
args: release --rm-dist --snapshot --skip-validate --config="./release/.goreleaser-nightly.yml"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile.debian
file: ./docker/Dockerfile.debian
push: true
platforms: linux/amd64,linux/arm64
tags: checkmarx/kics:nightly-debian
Expand All @@ -188,7 +188,7 @@ jobs:
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile.ubi8
file: ./docker/Dockerfile.ubi8
push: true
tags: checkmarx/kics:nightly-ubi8
platforms: linux/amd64
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-install-script.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: |
#!/usr/bin/env python3
import ruamel.yaml
with open('.goreleaser.yml', 'r') as file:
with open('./docker/.goreleaser.yml', 'r') as file:
file_obj = ruamel.yaml.load(file, Loader=ruamel.yaml.RoundTripLoader)
del file_obj['brews']
file_content = ruamel.yaml.dump(file_obj, Dumper=ruamel.yaml.RoundTripDumper)
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ dkr-compose: ## build docker image and runs docker-compose up

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

.PHONY: release
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/dockerhub.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ When using [UBI8](https://catalog.redhat.com) based image, the KICS process will
docker run -it -u $UID:$GID -v $PWD:/path checkmarx/kics:ubi8 scan -p /path/assets/queries/dockerfile -o /path -v
```

Another option is [rebuilding the dockerfile](https://github.com/Checkmarx/kics/blob/master/Dockerfile.ubi8) providing build arguments e.g: `--build-arg UID=999 --build-arg GID=999 --build-arg KUSER=myuser --build-arg KUSER=mygroup`
Another option is [rebuilding the dockerfile](https://github.com/Checkmarx/kics/blob/master/docker/Dockerfile.ubi8) providing build arguments e.g: `--build-arg UID=999 --build-arg GID=999 --build-arg KUSER=myuser --build-arg KUSER=mygroup`

## CLI Options

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ When using [UBI8](https://catalog.redhat.com) based image, the KICS process will
docker run -it -u $UID:$GID -v $PWD:/path checkmarx/kics:ubi8 scan -p /path/assets/queries/dockerfile -o /path -v
```

Another option is [rebuilding the dockerfile](https://github.com/Checkmarx/kics/blob/master/Dockerfile.ubi8) providing build arguments e.g: `--build-arg UID=999 --build-arg GID=999 --build-arg KUSER=myuser --build-arg KUSER=mygroup`
Another option is [rebuilding the dockerfile](https://github.com/Checkmarx/kics/blob/master/docker/Dockerfile.ubi8) providing build arguments e.g: `--build-arg UID=999 --build-arg GID=999 --build-arg KUSER=myuser --build-arg KUSER=mygroup`

#### Build from Sources

Expand Down
6 changes: 3 additions & 3 deletions docs/integrations_jenkins.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ This provides you the ability to run KICS scans as a stage in your pipeline.

## Declarative pipelines:

Create a new pipeline clicking on **New Item** on the left menu bar, then fill in the name of your pipeline and select the option "pipeline":
Create a new pipeline by clicking on **New Item** on the left menu bar, then fill in the name of your pipeline and select the option "pipeline":

<img src="https://raw.githubusercontent.com/Checkmarx/kics/master/docs/img/jenkins-creating-pipeline.png" width="850">

Paste one of the pipeline examples bellow:
Paste one of the pipeline examples below:

<img src="https://raw.githubusercontent.com/Checkmarx/kics/master/docs/img/jenkins-paste-pipeline.png" width="850">

Expand All @@ -24,7 +24,7 @@ Click on the build number to download the reports stored as artifacts.

### Using Docker

The following pipeline uses KICS docker image to scan a project and publishes the HTML report in Jenkins.
The following pipeline uses the KICS docker image to scan a project and publishes the HTML report in Jenkins.

Plugins required:

Expand Down
2 changes: 1 addition & 1 deletion docs/release_checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

1. Check for any `update-queries-docs` pull requests open, review and merge if any
2. Prepare release (run prepare-release action)
3. Use prepare release pull request (`docs: preparing for release`) to bump UBI8 image version label in the [Dockerfile.ubi8](https://github.com/Checkmarx/kics/blob/master/Dockerfile.ubi8) and [index.md](https://github.com/Checkmarx/kics/blob/master/docs/index.md)
3. Use prepare release pull request (`docs: preparing for release`) to bump UBI8 image version label in the [Dockerfile.ubi8](https://github.com/Checkmarx/kics/blob/master/docker/Dockerfile.ubi8) and [index.md](https://github.com/Checkmarx/kics/blob/master/docs/index.md)
4. Review and merge prepare-release pull-request
5. Create and push a new version git tag
- Be sure you configure [commit signature verification](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.