Repository navigation
ci: enable the Pulse vulnerability and malware scans in the Security … #3239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,10 +2,12 @@ | |
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # CI security scanning via the NVIDIA/security-workflows suite: Pulse secret scan + CodeQL SAST. | ||
| # CI security scanning via the NVIDIA/security-workflows suite: Pulse secret scan, | ||
| # Pulse OSS vulnerability scan (SCA), Pulse malware scan, and CodeQL SAST. | ||
| # Pulse runs on Linux nv-gha-runners (Docker image + OIDC/Vault) — Linux-only by design. | ||
| # The local secret-scan-trufflehog pre-commit hook is cross-platform (Linux/macOS/Windows). | ||
| # Pinned to a reviewed commit SHA. | ||
| # The vulnerability and malware scans cross a Charon tunnel; see ci/README.md. | ||
|
|
||
| name: Security Suite (Pulse + CodeQL) | ||
|
|
||
|
|
@@ -36,9 +38,11 @@ jobs: | |
| if: >- | ||
| github.repository == 'NVIDIA/cuda-python' || | ||
| vars.CI_CUSTOMIZATIONS_SECURITY_SUITE_ENABLED == 'true' | ||
| uses: NVIDIA/security-workflows/.github/workflows/security-suite.yml@c736f0454dc99764a66af6b906adfcdfbf621985 # v0.4.0 | ||
| uses: NVIDIA/security-workflows/.github/workflows/security-suite.yml@2194c521256bb3a7bf6fa36add89d9ce3db17c9a # test/vuln-malware-onboarding | ||
| with: | ||
| enable-secret-scan: true | ||
| enable-vuln-scan: true | ||
| enable-malware-scan: true | ||
| enable-sast-scan: true | ||
| secret-runs-on: linux-amd64-cpu4 | ||
| # Set failure_policy explicitly so enforcement can't drift with upstream defaults. | ||
|
|
@@ -48,3 +52,15 @@ jobs: | |
| secret-failure-policy: unverified | ||
| # Same analysis the retired codeql.yml performed: python, build-mode none, security-extended. | ||
| sast-languages: '["python"]' | ||
| # Literal fallback until the NSPECT_ID variable is provisioned on this repository. | ||
| nspect-id: ${{ vars.NSPECT_ID || 'NSPECT-ZY2K-Y1V8' }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. important: Do not use cuda-python's nSpect ID as the fallback for alternate repositories. If |
||
| vuln-runs-on: linux-amd64-cpu4 | ||
| # Diagnostic trial, not a settled choice: the buildless scan can't resolve this graph because | ||
| # Detect's setuptools and uv detectors both need the project installed. Revert if it doesn't help. | ||
| vuln-build: true | ||
|
Comment on lines
+58
to
+60
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. critical: Do not enable build mode for untrusted pull-request mirrors with OIDC and Charon access. The workflow scans As per path instructions, this crosses the security boundary between untrusted pull-request content and internal services. Source: Path instructions |
||
| # report-only (default) — findings warn; fail-on-vulnerability — any finding fails. Errors always fail. | ||
| vuln-failure-policy: report-only | ||
| vuln-upload-report: true | ||
| malware-runs-on: linux-amd64-cpu4 | ||
| # strict (default) — SUSPICIOUS fails too; malicious-only — it only warns. MALICIOUS always fails. | ||
| malware-failure-policy: strict | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
important: Restrict tunnel-backed scans to authorized refs.
Lines 44-45 enable the scans for
workflow_dispatch, but that event has no branch filter and the job condition does not checkgithub.ref_name. A manual run from another branch starts the Charon-backed scans. The documented tenant authorization coversmain,ctk-next, andpull-request/*; an unlisted ref returns403, and scanner or transport errors fail the job. Add the authorized-ref condition tosecurity-suite.if, or removeworkflow_dispatch. (raw.githubusercontent.com)Source: Path instructions