mirror of
https://gitlab.com/components/sast.git
synced 2025-06-30 15:38:29 +02:00
Merge branch 'iac-kics-sast' into 'main'
Added KICS IaC Scanner See merge request components/sast!23
This commit is contained in:
commit
4b2733b8f2
2 changed files with 42 additions and 1 deletions
|
@ -12,7 +12,8 @@ keyword.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
include:
|
include:
|
||||||
- component: gitlab.com/components/sast/sast@<VERSION>
|
- component: gitlab.com/components/sast/sast@<VERSION> # To include SAST Scanning
|
||||||
|
- component: gitlab.com/components/sast/iac-kics-sast@<VERSION> # To include IaC Scanning
|
||||||
```
|
```
|
||||||
|
|
||||||
where `<VERSION>` is the latest released tag or `main`.
|
where `<VERSION>` is the latest released tag or `main`.
|
||||||
|
|
40
templates/iac-kics-sast.yml
Normal file
40
templates/iac-kics-sast.yml
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
# Component created based on GitLab's IAC SAST Scanning template
|
||||||
|
# Read more about this feature here: https://docs.gitlab.com/ee/user/application_security/iac_scanning/
|
||||||
|
|
||||||
|
spec:
|
||||||
|
inputs:
|
||||||
|
stage:
|
||||||
|
default: test
|
||||||
|
excluded_paths:
|
||||||
|
default: "spec, test, tests, tmp"
|
||||||
|
excluded_analyzers:
|
||||||
|
default: ""
|
||||||
|
image_prefix:
|
||||||
|
default: "$CI_TEMPLATE_REGISTRY_HOST/security-products"
|
||||||
|
image_suffix:
|
||||||
|
dafault: ""
|
||||||
|
search_max_depth:
|
||||||
|
default: 4
|
||||||
|
image_tag:
|
||||||
|
default: 6
|
||||||
|
|
||||||
|
---
|
||||||
|
kics-iac-sast:
|
||||||
|
stage: $[[ inputs.stage ]]
|
||||||
|
image:
|
||||||
|
name: "$[[ inputs.image_prefix ]]/kics:$[[ inputs.image_tag ]]$[[ inputs.image_suffix ]]"
|
||||||
|
variables:
|
||||||
|
SEARCH_MAX_DEPTH: $[[ inputs.search_max_depth ]]
|
||||||
|
script:
|
||||||
|
- /analyzer run
|
||||||
|
artifacts:
|
||||||
|
access: 'developer'
|
||||||
|
reports:
|
||||||
|
sast: gl-sast-report.json
|
||||||
|
allow_failure: true
|
||||||
|
rules:
|
||||||
|
- if: $SAST_DISABLED == 'true' || $SAST_DISABLED == '1'
|
||||||
|
when: never
|
||||||
|
- if: $[[ inputs.excluded_analyzers ]] =~ /kics/
|
||||||
|
when: never
|
||||||
|
- if: $CI_COMMIT_BRANCH
|
Loading…
Add table
Add a link
Reference in a new issue