Add pulse OSS and STIG scan to internal gitlab CI#116
Add pulse OSS and STIG scan to internal gitlab CI#116maze88 merged 3 commits intoMellanox:masterfrom
Conversation
includes: - update_component_version_in_network_operator stage. - up to date and maintained STIG base image (from artifactory). - STIG-FIPS scripts for hardening. Signed-off-by: Michael Zeevi <mzeevi@nvidia.com>
…via gitlab CI Signed-off-by: Michael Zeevi <mzeevi@nvidia.com>
|
Thanks for your PR,
To skip the vendors CIs, Maintainers can use one of:
|
313590b to
b071729
Compare
Greptile SummaryThis PR adds Pulse OSS and STIG security scanning to the internal GitLab CI pipeline. The changes include:
Issues Found:
Confidence Score: 2/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Git as Git Tag Push
participant Build as build-image
participant OSS as pulse-scan-oss
participant STIG as pulse-scan-stig
participant Deploy as deploy stage
Git->>Build: Trigger on tag/branch push
Build->>Build: Validate variables
Build->>Build: Docker login to registries
Build->>Build: Fetch STIG scripts
Build->>Build: Fetch gov-ready policy
Build->>Build: Build & push image
Build->>OSS: Pass artifacts (build.env, policy)
OSS->>OSS: Run OSS scan
OSS->>STIG: Pass artifacts
STIG->>STIG: Run STIG scan
Note over OSS,STIG: Both scans allow_failure: true
|
There was a problem hiding this comment.
Additional Comments (2)
-
.gitlab-ci.yml, line 56 (link)logic: This line logs all validated variables including sensitive secrets (
GITHUB_TOKEN,GITLAB_TOKEN,ARTIFACTORY_TOKEN,NVCR_TOKEN,SSA_CLIENT_SECRET_PULSE_OSS,SSA_CLIENT_SECRET_PULSE_STIG) to the CI pipeline logs in plaintext, creating a critical security vulnerability. -
.gitlab-ci.yml, line 93 (link)logic: When running on branches (not tags),
$CI_COMMIT_TAGis empty, so this command will fail with an invalid regex pattern. The variable should be quoted or checked before use.
2 files reviewed, 2 comments
b071729 to
add1b87
Compare
There was a problem hiding this comment.
Additional Comments (1)
-
.gitlab-ci.yml, line 56 (link)logic: echoing secret values to CI logs exposes sensitive credentials like
SSA_CLIENT_SECRET_PULSE_OSSandSSA_CLIENT_SECRET_PULSE_STIG
2 files reviewed, 1 comment
|
add1b87 to
40d018b
Compare
There was a problem hiding this comment.
Additional Comments (2)
-
.gitlab-ci.yml, line 71-72 (link)logic: logging sensitive credentials (tokens, passwords, client secrets) to pipeline logs creates a security vulnerability
-
.gitlab-ci.yml, line 211 (link)logic:
NSPECT_IDis used but not validated in thebuild-imagejob'sbefore_scriptsection - add it to the validation loop (lines 52-77) to catch configuration issues early
2 files reviewed, 2 comments
40d018b to
94ffc29
Compare
There was a problem hiding this comment.
Additional Comments (2)
-
.gitlab-ci.yml, line 72-73 (link)logic: this validation prints the actual secret values to logs, which is a security issue
-
.gitlab-ci.yml, line 213 (link)logic:
PROGRAM_VERSIONwill be undefined when running on branches (not tags), sinceNSPECT_RELEASE_VERSIONis only set for tags. is this intentional since pulse scans only run on tags?
2 files reviewed, 2 comments
94ffc29 to
3984f43
Compare
There was a problem hiding this comment.
Additional Comments (1)
-
.gitlab-ci.yml, line 72-73 (link)logic: Security: Secrets logged to CI output. This prints sensitive credentials (
ARTIFACTORY_TOKEN,NVCR_TOKEN,GITLAB_TOKEN,GITHUB_TOKEN,SSA_CLIENT_SECRET_*) to CI logs, exposing them to anyone with log access.
2 files reviewed, 1 comment
Signed-off-by: Michael Zeevi <mzeevi@nvidia.com>
3984f43 to
c9bd87b
Compare
There was a problem hiding this comment.
Additional Comments (1)
-
.gitlab-ci.yml, line 72-73 (link)logic: Security Issue: This prints sensitive secrets (tokens, passwords) to CI logs in plain text. Variables like
ARTIFACTORY_TOKEN,NVCR_TOKEN,GITLAB_TOKEN,GITHUB_TOKEN, andSSA_CLIENT_SECRET_*will be exposed.Remove the echo statement or mask the output:
2 files reviewed, 1 comment
example run of pipeline: https://gitlab-master.nvidia.com/mzeevi/sriov-network-operator/-/pipelines/41067444