ci: enable secret-scan-trufflehog pre-commit hook - #916
Open
mc-nv wants to merge 1 commit into
Open
Conversation
mc-nv
marked this pull request as ready for review
August 15, 2026 00:10
This was referenced Aug 15, 2026
Open
Open
This was referenced Aug 15, 2026
Greptile SummaryAdds the centrally maintained NVIDIA TruffleHog pre-commit hook, pinned to v0.3.0, ahead of the repository’s formatting hooks.
Confidence Score: 5/5The PR appears safe to merge, with no concrete changed-code failure established. The configuration adds a pinned secret-scanning hook without changing existing hooks or workflow settings, and the available repository evidence does not demonstrate a reachable build, runtime, or scanning-coverage defect caused by this change. Important Files Changed
Reviews (1): Last reviewed commit: "ci: enable secret-scan-trufflehog pre-co..." | Re-trigger Greptile |
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.
Description
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 here: a LobAPI key is
test_followed by 35 characters, so the detector matches ordinarypytest function names such as
test_gpu_conf_compute_attestation_report, andLob's verifier reports them as verified — the one result class this hook fails
on.
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:
ci: skip:block. That is prescribed for the hosted pre-commit.ci sandbox,which has no network access. No Triton repo uses pre-commit.ci — CI runs
pre-commit from
.github/workflows/pre-commit.yml— so it would be dead config.default_install_hook_typeschange. Activation is a developer action;changing that key would alter install behaviour for every hook in the repo,
not just this one. Tracked separately.
Changes
NVIDIA/security-workflowssecret-scan-trufflehog@v0.3.0as thefirst entry under
repos:.Affected Files
.pre-commit-config.yamlTest plan
pre-commit validate-config— passes.pre-commit run secret-scan-trufflehog --all-files— passes, with zeropre-existing verified secrets, so CI does not break on merge.
and executed, so the hook is functional rather than a silent no-op.
.github/workflows/pre-commit.ymlrunspre-commit run --filesagainst PR-modified paths only, never--all-files.Caveats
Editing the config alone scans nothing. Each contributor must run once per clone:
Without the second, the
pre-pushstage stays dormant.Related PRs
Also part of this rollout, on internal GitLab:
dl/dgx/tritonserver!1853anddl/dgx/tritonmodelanalyzer!181.Related Issues