Skip to content

Commit

Permalink
docs(integrations): add CircleCI integration example
Browse files Browse the repository at this point in the history
Signed-off-by: Rogério Peixoto <[email protected]>
  • Loading branch information
rogeriopeixotocx committed May 4, 2021
1 parent 51f283a commit 83f6bae
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 1 deletion.
Binary file added docs/img/circleci-artifacts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/circleci-build.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/circleci-results.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Integrate KICS with:

- [Azure Pipelines](integrations_azurepipelines.md)
- [Bitbucket Pipelines](integrations_bitbucketpipelines.md)
- [CircleCI](integrations_circleci.md)
- [Github Actions](integrations_ghactions.md)
- [GitLab CI](integrations_gitlabci.md)
- [Jenkins](integrations_jenkins.md)
Expand Down
47 changes: 47 additions & 0 deletions docs/integrations_circleci.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Running KICS in CircleCI

You can integrate KICS into your CircleCI workflows.

This document provides you with an example on how to run KICS scans in a pipeline.

## Example setup with GitHub:

Enable CircleCI to access your personal profile or GitHub organization.

Create a `.circleci` directory in your project's root and place a `config.yaml` inside:

```yaml
version: 2.1
jobs:
kics:
docker:
- image: checkmarx/kics:latest-alpine
steps:
- checkout
- run:
name: Run KICS
command: |
/app/bin/kics scan -p ${PWD} -o ~/results.json --ci
- store_artifacts:
path: ~/results.json

workflows:
version: 2
build:
jobs:
# etc...
- kics

```

After running a pipeline you will be able to see the Run KICS step inside the workflow details:

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

Go to the artifacts tab to inspect the results:

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

The results will be displayed in plain text:

<img src="https://raw.githubusercontent.com/Checkmarx/kics/master/docs/img/circleci-results.png" width="850">
2 changes: 1 addition & 1 deletion docs/integrations_jenkins.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

You can integrate KICS into your Jenkins CI/CD pipelines.

This provides you the ability to run KICS scans in as a stage in your pipeline.
This provides you the ability to run KICS scans as a stage in your pipeline.

## Declarative pipelines:

Expand Down
20 changes: 20 additions & 0 deletions examples/circleci/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2.1
jobs:
kics:
docker:
- image: checkmarx/kics:latest-alpine
steps:
- checkout
- run:
name: Run KICS
command: |
/app/bin/kics scan -p ${PWD} -o ~/results.json --ci
- store_artifacts:
path: ~/results.json

workflows:
version: 2
build:
jobs:
# etc...
- kics

0 comments on commit 83f6bae

Please sign in to comment.