Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions .github/workflows/codeql.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/security-suite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# CI security scanning via the NVIDIA/security-workflows suite: Pulse secret scan + 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.

name: Security Suite (Pulse + CodeQL)

on:
push:
branches:
- main
- ctk-next
- "pull-request/[0-9]+"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-on-${{ github.event_name }}-from-${{ github.ref_name }}
cancel-in-progress: true

# Caller must grant every permission the reusable workflow declares, including scans it disables.
permissions:
contents: read
id-token: write # OIDC -> Vault -> nvcr.io image pull
security-events: write # publish redacted SARIF to code scanning
actions: read

jobs:
security-suite:
name: Security Suite
# Pulse needs nv-gha-runners + Vault/nvcr vars; skip on forks.
if: github.repository == 'NVIDIA/cuda-python'
uses: NVIDIA/security-workflows/.github/workflows/security-suite.yml@09c4c130ba7bd14c5061ba8b66d3ebdf797de855
with:
enable-secret-scan: true
enable-sast-scan: true
secret-runs-on: linux-amd64-cpu4
# Set failure_policy explicitly so enforcement can't drift with upstream defaults.
# unverified — fail on verified/live secrets (183); warn on unverified (185) [default]
# strict — fail on any finding (verified or unverified)
# all — warn only; never fail the job on findings
secret-failure-policy: unverified
# Same analysis the retired codeql.yml performed: python, build-mode none, security-extended.
sast-languages: '["python"]'
10 changes: 9 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,20 @@ ci:
autoupdate_branch: ''
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
autoupdate_schedule: quarterly
skip: [lychee, check-precommit-installed]
skip: [lychee, check-precommit-installed, secret-scan-trufflehog]
submodules: false

# Please update the rev: SHAs below with this command:
# pre-commit autoupdate --freeze
repos:
# Runs first so a leaked credential blocks the commit before any formatter runs.
# Self-installing: the hook downloads a pinned, checksum-verified trufflehog on
# first use (no manual install). Skipped on pre-commit.ci; Pulse CI enforces server-side.
- repo: https://github.com/NVIDIA/security-workflows
rev: 09c4c130ba7bd14c5061ba8b66d3ebdf797de855 # frozen: v0.2.0
hooks:
- id: secret-scan-trufflehog

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: c60c980e561ed3e73101667fe8365c609d19a438 # frozen: v0.15.9
hooks:
Expand Down
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ commit` workflow. To resolve this, you can either:
2. Skip it by setting the environment variable `SKIP` to `lychee`. This would
be `$env:SKIP = "lychee"` in PowerShell or `set SKIP=lychee` in cmd.

## Secret Scanning

The `secret-scan-trufflehog` pre-commit hook scans staged files and installs TruffleHog on first run (use Git Bash on Windows). If it flags a secret, remove it before committing, or contact a maintainer if it's a false positive. Secrets are also scanned server-side in CI.


## Signing Your Work

Contributions to files licensed under Apache 2.0 must be certified under the
Expand Down
Loading