Skip to content

Commit 422480a

Browse files
committed
[DOP-25330] Add SCA & SAST pipelines
1 parent 0ab3adb commit 422480a

1 file changed

Lines changed: 16 additions & 17 deletions

File tree

.gitlab-ci.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
11
stages:
2-
- sbom
3-
- security-scan
2+
- security
43

54
## -------------- Security Pipeline ---------------- ##
65

76
sbom-creation:
8-
stage: sbom
9-
rules:
10-
- if: $CI_PIPELINE_SOURCE == "web"
11-
when: always
12-
- if: $CI_COMMIT_REF_NAME =~ $CI_DEFAULT_BRANCH
13-
when: always
14-
- when: never
7+
stage: security
158
image:
16-
name: ${DEFAULT_IMAGE}:develop
9+
name: ${UV_IMAGE}
1710
entrypoint: ['']
1811
script:
19-
- uv pip install cyclonedx-bom
20-
- uv export --all-extras --no-dev --no-group test --no-group docs --link-mode=copy --format requirements.txt | cyclonedx-py requirements - > sbom.cyclonedx.json
12+
- uv export --all-extras --no-dev --no-group test --no-group docs --link-mode=copy --format cyclonedx1.5 > sbom.cyclonedx.json
2113
artifacts:
2214
paths:
2315
- sbom.cyclonedx.json
2416
expire_in: 1 days
17+
rules:
18+
- if: $CI_PIPELINE_SOURCE == "web"
19+
when: on_success
20+
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
21+
when: on_success
22+
- when: never
2523

2624
security-scan:
27-
stage: security-scan
25+
stage: security
2826
needs:
29-
- sbom-creation
27+
- job: sbom-creation
28+
artifacts: true
3029
trigger:
3130
include:
3231
- project: $SECURITY_PIPELINE_PROJECT
@@ -42,8 +41,8 @@ security-scan:
4241
APPSECHUB_SBOM_MASK: '*bom*.json'
4342
CUSTOM_SBOM_GENERATOR_JOB_NAME: sbom-creation
4443
rules:
45-
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
46-
when: always
4744
- if: $CI_PIPELINE_SOURCE == "web"
48-
when: always
45+
when: on_success
46+
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
47+
when: on_success
4948
- when: never

0 commit comments

Comments
 (0)