Can we scan forks and external contributors?
Yes. Run PR-stage checks read-only on forks; keep write actions disabled.
.jpg)
A strong setup ensures that potential leaks never reach main.
/audit/secrets-check.md) for compliance proof.1️⃣ Enable PR checks.
2️⃣ Turn on Secrets/PII rule set in your reviewer.
3️⃣ Trigger events: pull_request opened, synchronized, reopened.
4️⃣ Add a repo policy file (e.g., .optibot.yml).
5️⃣ Protect branches: require “Secrets Check” before merge.
Start read-only with comments/checks only. Then optionally enable “open fix PR” mode for bots with human approval.
# .optibot.yml
secrets_scan:
enabled: true
paths_include: ["**/*"]
paths_exclude: ["**/*.png","**/*.jpg","dist/**","node_modules/**","vendor/**"]
patterns_block:
- "AWS_ACCESS_KEY_ID"
- "AWS_SECRET_ACCESS_KEY"
- "-----BEGIN PRIVATE KEY-----"
- "GITHUB_TOKEN"
pii_block:
- "email"
- "credit_card"
severity_gate: "high"
allowlist:
files: [".env.example"]
regexes: ["FAKE|DUMMY|PLACEHOLDER"]
fix_pr:
enabled: false
branch_prefix: "bot/fixes/"
require_human_approval: true
reporting:
mode: "checks_first"
summary_file: "/audit/secrets-check.md"
Finding: Hard-coded token
File: config/__init__.py:87
Reason: Secret pattern (AWS_SECRET_ACCESS_KEY) matched; not allowlisted
Evidence: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
Action: Suggested change → use ENV var; offered fix PR
Actor: @reviewer-bot • 2025-08-16T14:22Z
Status: Merge blocked (Secrets Check)
Rule ID + diff link = fast verification. Roll many hits into one Check; only must-fix becomes a comment.
When enabled, the bot opens bot/fixes/... with:
.gitignore/path updates if needed.