chore: improve secretlint performance by adding ignore patterns#96
chore: improve secretlint performance by adding ignore patterns#96marcusquinn merged 2 commits intomainfrom
Conversation
- Add python-env, .osgrep, .scannerwork to .secretlintignore - Increase Docker timeout from 30s to 60s - Add t063 task to TODO.md Fixes scanning 19,790 files (572MB) down to ~230 files. Resolves 60+ minute hangs when running linters-local.sh.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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. 📒 Files selected for processing (4)
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 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. Comment |
Summary of ChangesHello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical performance bottleneck in the Secretlint scanning process by introducing targeted ignore patterns for large, irrelevant directories and files. These changes drastically reduce the scan duration from over an hour to mere seconds, thereby streamlining the local development workflow and ensuring the linter remains effective without causing significant delays. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Wed Jan 14 19:26:21 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
There was a problem hiding this comment.
Code Review
This pull request significantly improves the performance of secretlint by adding necessary ignore patterns, which is a great fix. My review includes a couple of suggestions for further improvement. In linters-local.sh, I've recommended using a variable for the Docker timeout to enhance maintainability. For TODO.md, I've identified a missing closing comment tag and outdated summary data, providing a suggestion to correct both issues.
.agent/scripts/linters-local.sh
Outdated
| print_info "Secretlint: Using Docker for scan (60s timeout)..." | ||
| # Use gtimeout (macOS) or timeout (Linux) to prevent Docker from hanging | ||
| local timeout_cmd="" | ||
| if command -v gtimeout &> /dev/null; then | ||
| timeout_cmd="gtimeout 30" | ||
| timeout_cmd="gtimeout 60" | ||
| elif command -v timeout &> /dev/null; then | ||
| timeout_cmd="timeout 30" | ||
| timeout_cmd="timeout 60" | ||
| fi |
There was a problem hiding this comment.
To improve maintainability and avoid repetition, consider defining the timeout value in a variable. This avoids repeating the magic number 60 and makes it easier to update in the future.
| print_info "Secretlint: Using Docker for scan (60s timeout)..." | |
| # Use gtimeout (macOS) or timeout (Linux) to prevent Docker from hanging | |
| local timeout_cmd="" | |
| if command -v gtimeout &> /dev/null; then | |
| timeout_cmd="gtimeout 30" | |
| timeout_cmd="gtimeout 60" | |
| elif command -v timeout &> /dev/null; then | |
| timeout_cmd="timeout 30" | |
| timeout_cmd="timeout 60" | |
| fi | |
| local secretlint_timeout=60 | |
| print_info "Secretlint: Using Docker for scan (${secretlint_timeout}s timeout)..." | |
| # Use gtimeout (macOS) or timeout (Linux) to prevent Docker from hanging | |
| local timeout_cmd="" | |
| if command -v gtimeout &> /dev/null; then | |
| timeout_cmd="gtimeout ${secretlint_timeout}" | |
| elif command -v timeout &> /dev/null; then | |
| timeout_cmd="timeout ${secretlint_timeout}" | |
| fi |
TODO.md
Outdated
| <!--TOON:summary{total,pending,in_progress,in_review,done,declined,total_est,total_actual,blocked_count,ready_count}: | ||
| 56,45,0,0,26,0,28d3h,16h50m,0,45 |
There was a problem hiding this comment.
This TOON:summary block is missing its closing --> tag, which will likely break parsing tools.
Additionally, the summary data seems stale. With task t063 added and completed, the total and done counts should be updated. It looks like total should be 57 and done should be 27. Please update the summary line and add the closing tag.
| <!--TOON:summary{total,pending,in_progress,in_review,done,declined,total_est,total_actual,blocked_count,ready_count}: | |
| 56,45,0,0,26,0,28d3h,16h50m,0,45 | |
| <!--TOON:summary{total,pending,in_progress,in_review,done,declined,total_est,total_actual,blocked_count,ready_count}: | |
| 57,45,0,0,27,0,28d3h30m,16h50m,0,45 | |
| --> |
🤖 Augment PR SummarySummary: Improves Secretlint scan performance by expanding 🤖 Was this summary useful? React with 👍 or 👎 |
|
@alex-solovyev - This PR was split from #92 (your original contribution). It contains the secretlint performance improvements. Would appreciate your review! |
- Use variable for secretlint timeout (maintainability) - Fix TODO.md TOON summary: add closing tag, update counts
|
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Wed Jan 14 19:31:15 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |



Summary
.secretlintignorebun.lockto.gitignoreto maintain subset rule (.secretlintignore⊆.gitignore)linters-local.shProblem
Secretlint was scanning 19,790 files (572MB) including python-env binaries, causing 60+ minute hangs when running
linters-local.sh.Solution
Added missing ignore patterns that mirror
.gitignoreentries. Result: ~230 files scanned in seconds.Split from #92
This was originally part of #92 but split out to keep that PR focused on the core bug fix (jq output suppression).