Compare commits

...

4 commits

Author SHA1 Message Date
Rob Jackson
5b9c48031d Merge branch 'iac-kics-sast' into 'main'
Added KICS IaC Scanner to Readme and YAML

See merge request components/sast!23
2025-05-14 08:45:55 -04:00
Rob Jackson
7626afb520 image tag to 6 and replacing image prefix/suffix with simple image 2025-05-14 08:45:50 -04:00
Rob Jackson
f09ec4e3de Apply 1 suggestion(s) to 1 file(s)
Co-authored-by: Julian Thome <jthome@gitlab.com>
2025-05-14 08:36:25 -04:00
Rob Jackson
fb90f914d7 Added KICS IaC Scanner to Readme and YAML 2025-04-14 17:01:13 -04:00
2 changed files with 47 additions and 1 deletions

View file

@ -12,7 +12,8 @@ keyword.
```yaml
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`.

View file

@ -0,0 +1,45 @@
# 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: ""
analyzer_image:
default: "$CI_TEMPLATE_REGISTRY_HOST/security-products"
search_max_depth:
default: 4
image_tag:
default: 6
---
iac-sast:
stage: $[[ inputs.stage ]]
artifacts:
access: 'developer'
reports:
sast: gl-sast-report.json
rules:
- when: never
# `rules` must be overridden explicitly by each child job
# see https://gitlab.com/gitlab-org/gitlab/-/issues/218444
variables:
SEARCH_MAX_DEPTH: $[[ inputs.search_max_depth ]]
allow_failure: true
script:
- /analyzer run
kics-iac-sast:
extends: iac-sast
image:
name: "$[[ inputs.analyzer_image ]]/kics:$[[ inputs.image_tag ]]"
rules:
- if: $SAST_DISABLED == 'true' || $SAST_DISABLED == '1'
when: never
- if: $[[ inputs.excluded_analyzers ]] =~ /kics/
when: never
- if: $CI_COMMIT_BRANCH