Skip to content

Commit adb16bf

Browse files
authored
[DOP-25330] Add SCA pipeline
1 parent 81c5d23 commit adb16bf

1 file changed

Lines changed: 28 additions & 5 deletions

File tree

.gitlab-ci.yml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,41 @@
11
stages:
2+
- sbom
23
- security-scan
34

45
## -------------- Security Pipeline ---------------- ##
56

6-
security-scan:
7+
sbom-creation:
8+
stage: sbom
79
rules:
8-
- if: $CI_COMMIT_REF_NAME =~ /(develop)/
10+
- if: $CI_PIPELINE_SOURCE == "web"
11+
when: manual
12+
- if: $CI_COMMIT_REF_NAME =~ $CI_DEFAULT_BRANCH
913
when: always
14+
image:
15+
name: ${DEFAULT_IMAGE}:develop
16+
entrypoint: ['']
17+
script:
18+
- uv pip install cyclonedx-bom
19+
- uv export --all-extras --no-dev --no-group test --no-group docs --link-mode=copy --format requirements.txt | cyclonedx-py requirements - > sbom.cyclonedx.json
20+
artifacts:
21+
paths:
22+
- sbom.cyclonedx.json
23+
expire_in: 1 days
24+
25+
security-scan:
1026
stage: security-scan
27+
needs:
28+
- sbom-creation
1129
trigger:
1230
include:
13-
- project: 'devsecops3000Pro/public/pipelines/security-pipeline'
14-
file: 'security_pipeline.yaml'
15-
ref: 'master'
31+
- project: $SECURITY_PIPELINE_PROJECT
32+
file: security_pipeline.yaml
33+
ref: $SECURITY_PIPELINE_REF
1634
forward:
1735
pipeline_variables: true
1836
yaml_variables: true
37+
rules:
38+
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
39+
when: always
40+
- if: $CI_PIPELINE_SOURCE == "web"
41+
when: always

0 commit comments

Comments
 (0)