Skip to content

feat(security): add pre-commit config with TruffleHog secret scanning#67

Merged
williaby merged 1 commit into
mainfrom
feat/add-pre-commit-config
May 9, 2026
Merged

feat(security): add pre-commit config with TruffleHog secret scanning#67
williaby merged 1 commit into
mainfrom
feat/add-pre-commit-config

Conversation

@williaby
Copy link
Copy Markdown
Collaborator

@williaby williaby commented May 8, 2026

Summary

Add a baseline .pre-commit-config.yaml with file-quality hooks
(trailing-whitespace, end-of-file, large-file, merge-conflict, private-key)
and a TruffleHog secret-scanning hook scoped to staged files.

Run pre-commit install after pulling to activate the hooks locally.

See .claude/rules/pre-commit.md invariant PC-HOOK-STAGED-SCOPE for the
scope principle.

Why

Resolves observation #4 from ~/.claude/skill-observations/log.md.
Part of a fleet-wide TruffleHog rollout following the methodology in the
pre-commit-authoring skill and the PC-HOOK-STAGED-SCOPE invariant in
.claude/rules/pre-commit.md.

Generated with Claude Code

@williaby williaby enabled auto-merge (squash) May 8, 2026 17:27
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 8, 2026

Warning

Rate limit exceeded

@williaby has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 31 minutes and 28 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ea65a187-8362-4aba-a9ac-9e1c707a40f9

📥 Commits

Reviewing files that changed from the base of the PR and between 78ceedc and 6217f89.

📒 Files selected for processing (1)
  • .pre-commit-config.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/add-pre-commit-config

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

williaby added a commit that referenced this pull request May 9, 2026
)

* fix(compliance): cover pre-existing files in REUSE.toml

Add a new annotation block covering 1 files
that predated the centralized REUSE.toml coverage. These files were
flagged by `reuse lint` (Check REUSE Compliance workflow) but had no
matching path entry. Licensed CC0-1.0 to match the existing
configuration-files annotation pattern in this repo's REUSE.toml.

Unblocks the TruffleHog rollout PR #67 on this
repo (which was failing the Check REUSE Compliance gate due to these
pre-existing missing-info files, not because of the TruffleHog change).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(compliance): wrap instructional SPDX echoes in python-reuse.yml

Root cause of REUSE failure: shell echo statements like
`echo '# SPDX-License-Identifier: MIT'` in the workflow's summary step
were parsed by the REUSE tool as actual SPDX expressions, producing the
invalid value `MIT' >> $GITHUB_STEP_SUMMARY` and triggering both
"INVALID SPDX LICENSE EXPRESSIONS" and "MISSING LICENSING INFORMATION"
gates on the same file.

Wrap the instructional echoes with `# REUSE-IgnoreStart` /
`# REUSE-IgnoreEnd` comments per REUSE 3.3 spec. The existing global
`**` MIT annotation in REUSE.toml then applies to python-reuse.yml
without an override.

Revert the previous CC0-1.0 annotation block; reusable workflows
referenced via `uses:` are not redistributed, so the MIT default
applies. CC0 in this org is reserved for ML training-data contexts.

Verified: `reuse lint` passes locally with 125/125 files compliant
and 0 invalid SPDX expressions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Add a baseline `.pre-commit-config.yaml` with file-quality hooks
(trailing-whitespace, end-of-file, large-file, merge-conflict, private-key)
and a TruffleHog secret-scanning hook scoped to staged files.

Run `pre-commit install` after pulling to activate the hooks locally.

See `.claude/rules/pre-commit.md` invariant `PC-HOOK-STAGED-SCOPE` for the
scope principle.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@williaby williaby force-pushed the feat/add-pre-commit-config branch from 63c0b74 to 6217f89 Compare May 9, 2026 03:54
@williaby williaby merged commit a2dbdcd into main May 9, 2026
18 checks passed
@williaby williaby deleted the feat/add-pre-commit-config branch May 9, 2026 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant