ci: enable secret-scan-trufflehog pre-commit hook - #8929
Merged
Conversation
Greptile SummaryThis PR adds NVIDIA’s pinned TruffleHog secret-scanning hook as the first pre-commit repository entry.
Confidence Score: 5/5The PR appears safe to merge with no concrete changed-code defect identified. The change is limited to a valid pinned pre-commit hook entry, and the supplied validation and execution results directly address configuration, installation, scanning scope, and existing-tree compatibility. Important Files Changed
Reviews (1): Last reviewed commit: "ci: enable secret-scan-trufflehog pre-co..." | Re-trigger Greptile |
This was referenced Aug 15, 2026
Merged
Merged
Merged
Merged
Merged
Merged
Merged
This was referenced Aug 15, 2026
yinggeh
approved these changes
Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does the PR do?
Enables the NVIDIA
secret-scan-trufflehogpre-commit hook, pinned tov0.3.0,as the first entry under
repos:so scanning runs before any formatter rewritesthe working tree.
This adopts the centrally maintained hook published by
NVIDIA/security-workflowsrather than a hand-rolled TruffleHog invocation, so the scanner version and its
per-platform checksums are bumped in one reviewed place instead of 27.
v0.3.0is pinned deliberately. It installs the scanner inside pre-commit's ownPython environment — removing the shell installer, so Windows works without Git
Bash — and it adds
--exclude-detectors=lob. That exclusion matters for thisrepo in particular: a Lob API key is
test_followed by 35 characters, so thedetector matches ordinary pytest function names such as
test_gpu_conf_compute_attestation_report, and Lob's verifier reports them asverified — the one result class this hook fails on.
qa/is full of exactlythose names.
Behaviour: scans only the files pre-commit supplies (staged files at commit time,
the push range at push time), reports verified secrets only, and fails closed on
a finding.
Deliberately out of scope: no
ci: skip:block (that is for the hostedpre-commit.ci sandbox, which no Triton repo uses — CI runs pre-commit from
.github/workflows/pre-commit.yml), and nodefault_install_hook_typeschange(activation is a developer action, and that key would alter install behaviour for
every hook in the repo, not just this one).
Checklist
<commit_type>: <Title>Commit Type:
Check the conventional commit type
box here and add the label to the github PR.
Related PRs:
Also part of this rollout, on internal GitLab:
dl/dgx/tritonserver!1853anddl/dgx/tritonmodelanalyzer!181.Where should the reviewer start?
.pre-commit-config.yaml— the change is a four-line addition at the top ofrepos:. The reviewable decisions are the pinnedrevand the placement.Test plan:
pre-commit validate-config— passes.pre-commit run secret-scan-trufflehog --all-files— passes across the wholetree, with zero pre-existing verified secrets, so CI does not break on merge.
TruffleHog 3.95.9 confirmed installed into pre-commit's Python environment
and executed, so the hook is functional rather than a silent no-op.
Blast radius is bounded:
.github/workflows/pre-commit.ymlrunspre-commit run --filesagainst PR-modified paths only, never--all-files,so this does not turn every PR into a full-tree scan.
CI Pipeline ID:
Caveats:
Editing the config alone scans nothing. Each contributor must run once per clone:
Without the second, the
pre-pushstage stays dormant. Whether to make thatautomatic via
default_install_hook_typesis left to a follow-up, since itchanges install behaviour for all hooks.
Background
Triton repositories had no local secret-scanning control. A credential pasted
into a config, test fixture or CI fragment was only caught server-side, after it
had already reached the remote — at which point the only correct remedy is
rotation, not deletion.
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)