Skip to content

ci: enable the Pulse vulnerability and malware scans in the Security … - #3239

Open
gmanal wants to merge 4 commits into
NVIDIA:mainfrom
gmanal:test/vuln-malware-onboarding
Open

gmanal wants to merge 4 commits into
NVIDIA:mainfrom
gmanal:test/vuln-malware-onboarding

Conversation

@gmanal

@gmanal gmanal commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Turns on enable-vuln-scan and enable-malware-scan, and moves every NVIDIA/security-workflows pin — the reusable suite and the secret-scan-trufflehog pre-commit hook — to 0659a2e36defdf66209a135d216f40a63b7aec94, the v0.5.0 release commit. That is the first release carrying either workflow.

The vulnerability scan starts report-only so a finding baseline can be built before it gates merges; scanner and transport errors still fail the job, and inventory writeback stays off. The malware scan keeps the upstream default of strict, where SUSPICIOUS blocks as well as MALICIOUS.

On main the vulnerability scan inspects installed wheels, because Detect cannot resolve cuda_core's CUDA-dependent build or cuda_python's dynamic setup.py from source; two new jobs build and collect them. Wheel mode is refused on pull-request/* mirrors, which instead scan source with those two packages excluded.

Both scans report to the same nSpect registration, because an nSpect ID identifies the repository rather than one scan. nspect-id reads the NSPECT_ID Actions variable — a reusable workflow's inputs cannot read secrets, so it must be a variable, not a secret — and an empty value fails the suite preflight rather than reporting to the wrong program.

No permission change: the suite's union is contents/actions read plus id-token and security-events write, all of which this caller already grants.

Both scans cross a Charon tunnel that authorizes per repository and per ref. charon!242 brings this repository's tenant to parity with the one the upstream workflows are tested against and grants main plus the pull-request/* mirrors; the prerequisites are summarised in ci/README.md.

Description

closes

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@github-actions github-actions Bot added the CI/CD CI/CD infrastructure label Oct 27, 2026
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review
Summary

Summary by CodeRabbit

  • New Features
    • Security checks include open-source vulnerability and malware scans alongside secret scanning and CodeQL analysis. Vulnerability findings do not fail the workflow; malware findings follow a strict failure policy.
  • Documentation
    • Added setup guidance for scan configuration and access permissions, including which checks require a secure tunnel and which branches must be authorized. Clarified that secret scanning and CodeQL analysis do not require the tunnel.

The workflow now builds and collects Python wheels on eligible main runs, then configures secret, SAST, vulnerability, and malware scans. The CI documentation describes the Charon tunnel, NSPECT_ID, authorized refs, and required routes.

Changes: Security Suite scans

Layer / File(s) Summary
Build and collect scan wheels
.github/workflows/security-suite.yml
On eligible main runs, the workflow builds Python 3.12 wheels and collects them with runtime dependency wheels into a python-wheels artifact.
Configure scans and document prerequisites
.github/workflows/security-suite.yml, .pre-commit-config.yaml, ci/README.md
The workflow updates the security-workflows pin to v0.5.0 and configures scan conditions, inputs, runners, and failure policies. The documentation lists Charon tunnel access, NSPECT_ID, authorized refs and routes, and the possible scanner-side 403 response.

Possibly related issues

  • NVIDIA/cuda-python#3313: This PR updates the security-workflows pin and enables Pulse scans, but does not establish that it resolves the issue’s checkout slowness or validates its findings, SARIF upload, and enforcement.

Suggested reviewers: rwgk

Change: Feature

Merge Risk: Low · previous review aff64

The scan configuration now restricts tunnel-backed scans to authorized refs and no longer falls back to a shared nSpect ID. Two CI robustness concerns remain. A wheel build failure on main would also skip the secret and SAST scans, and the dependency-collection step could fail on prerelease builds. Neither affects runtime code, and the second may not occur.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between aa743d9 and aff64b7.

Files selected for processing: 2
  • .github/workflows/security-suite.yml
  • .pre-commit-config.yaml

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@gmanal
gmanal force-pushed the test/vuln-malware-onboarding branch 2 times, most recently from 2f0e7cf to 538bef3 Compare October 27, 2026 07:36

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Major · important: Scope the nSpect fallback to this repository. · security-suite.yml:56

.github/workflows/security-suite.yml:56
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

important: Scope the nSpect fallback to this repository.

Line 56 applies NSPECT-ZY2K-Y1V8 to every caller when vars.NSPECT_ID is empty. The job condition also permits another repository to opt in through CI_CUSTOMIZATIONS_SECURITY_SUITE_ENABLED. The reusable workflow defines nspect-id as the calling repository's registration, so another repository can attribute both scan results to cuda-python's registration. Scope the fallback to NVIDIA/cuda-python and fail or skip when another repository has no NSPECT_ID. (raw.githubusercontent.com)

Source: Path instructions


Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 2f0e7cf and 538bef3.

Files selected for processing: 1
  • .github/workflows/security-suite.yml

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.

Comment thread .github/workflows/security-suite.yml Resolved
@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 538bef3 and aa743d9.

Files selected for processing: 1
  • .github/workflows/security-suite.yml

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

Comment thread .github/workflows/security-suite.yml Resolved
Comment thread .github/workflows/security-suite.yml Resolved
Comment thread .github/workflows/security-suite.yml Resolved
@leofang
leofang requested a review from kkraus14 October 27, 2026 23:14
@gmanal
gmanal marked this pull request as draft October 28, 2026 03:27
@copy-pr-bot

copy-pr-bot Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@gmanal
gmanal force-pushed the test/vuln-malware-onboarding branch from aa743d9 to 59e7442 Compare October 28, 2026 04:33
@gmanal

gmanal commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 59e7442

@gmanal

gmanal commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test bb07086

@gmanal

gmanal commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 5d8f919

@gmanal

gmanal commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 9a2dd68

@gmanal

gmanal commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test a3d6ace

@gmanal

gmanal commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 6b57543

@gmanal

gmanal commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 0202fd0

@gmanal

gmanal commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test a13567c

…Suite

Turns on enable-vuln-scan and enable-malware-scan and moves every
security-workflows pin -- the reusable suite and the secret-scan pre-commit
hook -- to the v0.5.0 release commit, the first release carrying either
workflow.

The vulnerability scan starts report-only so a finding baseline can be built
before it gates merges; scanner and transport errors still fail the job, and
inventory writeback stays off. The malware scan keeps the upstream default of
strict, where SUSPICIOUS blocks as well as MALICIOUS.

On main the vulnerability scan inspects installed wheels, because Detect
cannot resolve cuda_core's CUDA-dependent build or cuda_python's dynamic
setup.py from source; two new jobs build and collect them. Wheel mode is
refused on pull-request/* mirrors, which instead scan source with those two
packages excluded.

Both scans report to the same nSpect registration, because an nSpect ID
identifies the repository rather than one scan. nspect-id reads the NSPECT_ID
Actions variable -- a reusable workflow's inputs cannot read secrets -- and an
empty value fails the suite preflight rather than reporting to the wrong
program.

No permission change: the suite's union is contents/actions read plus id-token
and security-events write, all of which this caller already grants. Both scans
cross a Charon tunnel that authorizes per repository and per ref; the
prerequisites are summarised in ci/README.md.
@gmanal
gmanal force-pushed the test/vuln-malware-onboarding branch from a13567c to 1bd3b7d Compare November 3, 2026 11:04
@gmanal

gmanal commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 1bd3b7d

@gmanal

gmanal commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test aff64b7

@gmanal
gmanal marked this pull request as ready for review November 3, 2026 13:04
set -euo pipefail
mkdir wheelhouse
cp built/*.whl wheelhouse/
python -m pip download --only-binary=:all: --dest wheelhouse wheelhouse/*.whl

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Major · Stability & Availability · Quick win

important: Resolve dependencies against the built wheels.

pip download does not search wheelhouse for dependencies without --find-links. On a prerelease build, cuda-python requires the matching cuda-bindings version. If that version is not published, wheel collection fails despite having built it. Add --find-links wheelhouse so resolution can use the local wheels. (raw.githubusercontent.com)

As per path instructions, review “status and check behavior” for GitHub workflows.

Source: Path instructions

vars.CI_CUSTOMIZATIONS_SECURITY_SUITE_ENABLED == 'true'
uses: NVIDIA/security-workflows/.github/workflows/security-suite.yml@c736f0454dc99764a66af6b906adfcdfbf621985 # v0.4.0
!cancelled() &&
(needs.python-wheels.result == 'success' || github.ref != 'refs/heads/main') &&

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Major · Stability & Availability · Heavy lift

important: Keep independent scans running when wheel preparation fails.

On main, a failed python-wheels job makes this condition false. The entire reusable suite then skips, including the secret and SAST scans that do not use the wheels. Run those scans independently of wheel preparation, and gate only the wheel-dependent vulnerability scan on its success. (raw.githubusercontent.com)

As per path instructions, review “status and check behavior” for GitHub workflows.

Source: Path instructions

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD CI/CD infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants