Skip to content

Enable security scanning via NVIDIA/security-workflows suite - #2430

Open
gmanal wants to merge 1 commit into
NVIDIA:mainfrom
gmanal:enable-security-suite
Open

Enable security scanning via NVIDIA/security-workflows suite#2430
gmanal wants to merge 1 commit into
NVIDIA:mainfrom
gmanal:enable-security-suite

Conversation

@gmanal

@gmanal gmanal commented Aug 11, 2026

Copy link
Copy Markdown

Onboards cuVS to NVIDIA's centrally maintained security scanning via NVIDIA/security-workflows, pinned to v0.3.0.
Two layers, no new tooling for this repo to maintain:

  • Local (advisory)secret-scan-trufflehog pre-commit hook, self-installing, pinned by tag like the repo's other hooks.
  • CI (enforcing) — the security suite: one pinned reference fanning out to the Pulse secret scan (fails on verified/live secrets) and CodeQL SAST.

Both scans are enabled explicitly in the new workflow, and every scan in the suite is opt-in — scanners added upstream later won't switch themselves on here.

Changes

  • .github/workflows/security-suite.yml — on pushes to main, release/*, and copy-pr-bot pull-request/[0-9]+, matching build.yaml/pr.yaml. Uses this repo's permissions style (permissions: {} at workflow level, granted on the job) and the linux-amd64-cpu4 label already used by telemetry-summarize.
  • .pre-commit-config.yaml — add the hook, rev: v0.3.0.

SAST scope: python + actions. Both run under CodeQL build-mode: none, so no toolchain and no added build time. actions earns its place: 9 workflows, two on pull_request_target.

Notes for Reviewers

How I tested this

  • pre-commit run on both changed files — passes, including zizmor, yamllint, verify-copyright.
  • pre-commit run --all-files secret-scan-trufflehog — clean across the tree. (v0.3.0 excludes TruffleHog's Lob detector, which reads test_ + 35 chars as an API key and flagged pytest names as verified secrets elsewhere — hence this pin, not an earlier one.)

Call the centrally maintained security suite rather than wiring each scan
separately: one pinned reference runs the Pulse secret scan and CodeQL SAST.
Every scan in the suite is opt-in, so scanners added upstream later do not
switch themselves on here.

SAST analyzes python and actions. Both need no toolchain (build-mode none),
so they add no build cost and no dependency on the CUDA/conda toolchain.
actions matters here because labeler.yml and trigger-breaking-change-alert.yaml
run on pull_request_target. c-cpp, java-kotlin, rust and go all need a working
build to produce a database and are left out deliberately.

Add the secret-scan-trufflehog pre-commit hook as the local advisory layer;
the Pulse scan is the server-side enforcement layer.
@gmanal
gmanal requested review from a team as code owners August 11, 2026 14:19
@gmanal
gmanal requested a review from jameslamb August 11, 2026 14:19
@gmanal
gmanal marked this pull request as draft August 11, 2026 14:35
@copy-pr-bot

copy-pr-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

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 marked this pull request as ready for review August 12, 2026 05:30
@cjnolet cjnolet added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Aug 12, 2026

@jameslamb jameslamb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Left some comments for your consideration.

# strict — fail on any finding (verified or unverified)
# all — warn only; never fail the job on findings
secret-failure-policy: unverified
sast-languages: '["python","actions"]'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
sast-languages: '["python","actions"]'
sast-languages: '["actions","python"]'

Let's alphabetize this, please.

Also, I couldn't find documentation on the available options for this at https://github.com/NVIDIA/security-workflows ... are there more?

This repo has Bash, C++, Go, Java, and Rust code too.

Comment thread .pre-commit-config.yaml
Comment on lines +5 to +8
# Runs first so a leaked credential blocks the commit before any formatter runs.
# Self-installing: pre-commit downloads a pinned, checksum-verified trufflehog into
# the hook environment on first use. CI enforces the same class of finding via Pulse.
- repo: https://github.com/NVIDIA/security-workflows

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
# Runs first so a leaked credential blocks the commit before any formatter runs.
# Self-installing: pre-commit downloads a pinned, checksum-verified trufflehog into
# the hook environment on first use. CI enforces the same class of finding via Pulse.
- repo: https://github.com/NVIDIA/security-workflows
# Runs first so a leaked credential blocks the commit before any formatter runs.
- repo: https://github.com/NVIDIA/security-workflows

Let's remove this comment that explains how pre-commit works, please.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add this file to all the changed-files lists in https://github.com/NVIDIA/cuvs/blob/main/.github/workflows/pr.yaml (preserve alphabetical order).

We shouldn't need to trigger cuVS's expensive GPU-using CI on PRs that only change this file.

Comment on lines +5 to +7
# Pulse runs on Linux nv-gha-runners.
# Pinned to security-workflows v0.3.0.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
# Pulse runs on Linux nv-gha-runners.
# Pinned to security-workflows v0.3.0.

Let's please remove these comments that don't add information (they are obvious from the code) and are likely to become out of date as this configuration changes over time.

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

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants