Skip to content

chore: bootstrap .trufflehog.yml secrets scanning#39

Merged
KooshaPari merged 1 commit into
mainfrom
chore/governance-bootstrap-platformkit
May 2, 2026
Merged

chore: bootstrap .trufflehog.yml secrets scanning#39
KooshaPari merged 1 commit into
mainfrom
chore/governance-bootstrap-platformkit

Conversation

@KooshaPari
Copy link
Copy Markdown
Owner

@KooshaPari KooshaPari commented May 2, 2026

User description

Summary

  • Adds Phenotype org standard .trufflehog.yml (TruffleHog v2) for secrets scanning
  • PlatformKit is Go, so deny.toml not applicable

Test plan

  • Verify .trufflehog.yml is valid YAML
  • Confirm no false-positive secrets flagged by baseline scan

🤖 Generated with Claude Code


Note

Low Risk
Adds only a repository-level TruffleHog configuration file; no runtime or business logic changes. Risk is limited to potential CI/noise from scans due to include/exclude and rule thresholds.

Overview
Adds a new .trufflehog.yml using the Phenotype org standard to enable TruffleHog v2 secrets scanning.

Configures path exclusions (e.g., node_modules, build outputs, virtualenvs) and enables base64 (with entropy: 0.7) and detected rules over all files.

Reviewed by Cursor Bugbot for commit 94869fc. Bugbot is set up for automated code reviews on this repo. Configure here.


CodeAnt-AI Description

Add repository secrets scanning for checked-in credentials

What Changed

  • Adds a TruffleHog configuration file to scan the repository for secrets
  • Skips common build, cache, and dependency folders so scans stay focused on source files
  • Checks all files for detected secrets and base64-encoded secrets

Impact

✅ Earlier detection of leaked secrets
✅ Fewer false alerts from generated files
✅ Cleaner repository security checks

🔄 Retrigger CodeAnt AI Review

Details

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Adds Phenotype org standard TruffleHog v2 configuration for secrets
detection. Repo is Go (not Rust), so deny.toml not applicable.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 2, 2026 12:13
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 2, 2026

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 2, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Summary

This PR adds .trufflehog.yml, a TruffleHog v2 configuration file implementing secrets scanning governance for PlatformKit. The change is infrastructure/governance-related, not code. The file complements the existing TruffleHog CI workflow (PR #38) and establishes Phenotype organization standards for the repository.

Status: ✅ Approve

The PR should merge as-is. It introduces no blocking issues and properly bootstraps secrets scanning governance.

Must Fix

None. YAML syntax is valid, and the configuration is sound.

Should Fix

None blocking, but consider:

  • The target/** exclusion pattern is Rust-specific. While harmless for this Go repository, it could be removed if PlatformKit will never contain Rust artifacts. However, keeping it is also reasonable for a polyrepo that may evolve.

Consider

Optional enhancements (not required for merge):

  • Add brief inline comments explaining the entropy: 0.7 threshold for the base64 rule to help future maintainers understand the sensitivity level
  • Consider documenting the baseline scan results mentioned in the PR test plan (though this may already be done in separate documentation)

Technical Validation

  • ✅ YAML structure is valid (v2 format with all required sections)
  • ✅ Exclusion patterns are appropriate for a polyrepo with Go, Python, and Node components
  • ✅ Rules configuration (base64 with entropy detection + TruffleHog's built-in detector) provides reasonable coverage
  • ✅ Complements the existing .github/workflows/trufflehog.yml workflow
  • ✅ Aligns with stated Phenotype organization standards
  • ✅ No security risks introduced; configuration reduces false positives appropriately

Walkthrough

A .trufflehog.yml configuration file is added with version 2, specifying secret scanning rules and exclusions for common build artifacts, dependencies, caches, and lock files across multiple ecosystems.

Changes

TruffleHog Configuration

Layer / File(s) Summary
Configuration
.trufflehog.yml
Configuration file added with version: 2, excluding common artifact directories (.git/**, target/**, node_modules/**, .venv/**, etc.), including all files for scanning, and enabling base64 (entropy: 0.7) and detected secret detection rules.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore: bootstrap .trufflehog.yml secrets scanning' directly and clearly describes the main change: adding TruffleHog configuration for secrets scanning.
Description check ✅ Passed The description is directly related to the changeset, explaining the purpose of the new configuration file, its context, and providing a test plan.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/governance-bootstrap-platformkit
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch chore/governance-bootstrap-platformkit

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
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

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

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 2, 2026

@KooshaPari KooshaPari merged commit 0b31ec5 into main May 2, 2026
10 of 13 checks passed
@KooshaPari KooshaPari deleted the chore/governance-bootstrap-platformkit branch May 2, 2026 12:14
@codeant-ai codeant-ai Bot added the size:S This PR changes 10-29 lines, ignoring generated files label May 2, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit 94869fc. Configure here.

Comment thread .trufflehog.yml
enabled: true
entropy: 0.7
- detected:
enabled: true
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Config file uses fabricated schema, entirely non-functional

High Severity

This .trufflehog.yml uses a config schema (version, exclude.paths, include.files, rules.base64.entropy, rules.detected) that doesn't match any version of TruffleHog — not the official Go version (trufflesecurity/trufflehog, which expects sources/detectors/notifiers), not TruffleHog v2 (CLI flags + JSON rules), and not trufflehog3 (.trufflehog3.yml with severity/no_entropy/no_pattern). Additionally, the CI workflow in .github/workflows/trufflehog.yml runs trufflehog github without a --config flag, and the official Go TruffleHog doesn't auto-detect .trufflehog.yml, so this file is entirely inert. The intended exclude paths and rules have no effect on secrets scanning.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 94869fc. Configure here.

Comment thread .trufflehog.yml
Comment on lines +16 to +25
include:
files:
- "*"

rules:
- base64:
enabled: true
entropy: 0.7
- detected:
enabled: true
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 Architect Review — HIGH

The repository adds a .trufflehog.yml v2 config (include/exclude and rules), but the CI workflow runs trufflehog github --only-verified --no-update without passing any config flag, so the new config is not actually applied to CI scans and scan behavior remains unchanged despite the stated intent.

Suggestion: Update the CI workflow to invoke TruffleHog in a way that consumes .trufflehog.yml (for example by adding an explicit --config .trufflehog.yml or using the appropriate subcommand), or clearly document that this file is only for local/manual scans so CI expectations match the org-standard policy.

Fix in Cursor | Fix in VSCode Claude

(Use Cmd/Ctrl + Click for best experience)

Prompt for AI Agent 🤖
This is an **Architect / Logical Review** comment left during a code review. These reviews are first-class, important findings — not optional suggestions. Do NOT dismiss this as a 'big architectural change' just because the title says architect review; most of these can be resolved with a small, localized fix once the intent is understood.

**Path:** .trufflehog.yml
**Line:** 16:25
**Comment:**
	*HIGH: The repository adds a `.trufflehog.yml` v2 config (include/exclude and rules), but the CI workflow runs `trufflehog github --only-verified --no-update` without passing any config flag, so the new config is not actually applied to CI scans and scan behavior remains unchanged despite the stated intent.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
If a suggested approach is provided above, use it as the authoritative instruction. If no explicit code suggestion is given, you MUST still draft and apply your own minimal, localized fix — do not punt back with 'no suggestion provided, review manually'. Keep the change as small as possible: add a guard clause, gate on a loading state, reorder an await, wrap in a conditional, etc. Do not refactor surrounding code or expand scope beyond the finding.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 2, 2026

CodeAnt AI finished reviewing your PR.

@KooshaPari KooshaPari review requested due to automatic review settings May 2, 2026 12:36
@KooshaPari KooshaPari restored the chore/governance-bootstrap-platformkit branch May 2, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant