Skip to content

Commit 9ee69df

Browse files
alpslaclaude
andcommitted
fix(orchestrators): Run Semgrep for ALL tiers in Step 3
SESSION 113: PRO tier was missing Semgrep because Session 34 optimization was incomplete - scan-fix-executor never ran Semgrep in Step 5.5. Fixed Java and Python orchestrators to match TypeScript (which had this fix). Updated base orchestrator comments to reflect the fix. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 08b0613 commit 9ee69df

4 files changed

Lines changed: 35 additions & 40 deletions

File tree

docs/sample-reports/v9-petclinic-pr950-session113-BASIC.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
**Organization:** spring-projects
99
**Source Branch:** pr-950
1010
**Target Branch:** main
11-
**Analysis Date:** January 20, 2026 at 10:28 PM EST (1m 33s)
11+
**Analysis Date:** January 20, 2026 at 10:49 PM EST (1m 20s)
1212
**Repository Size:** 151 files
1313
**Report Tier:** 📋 Basic | 3,712 lines
1414
**Analyzer Version:** 9.0.0
@@ -22,7 +22,7 @@
2222

2323
## Analysis Performance
2424

25-
**Total Duration:** 1m 33s
25+
**Total Duration:** 1m 20s
2626

2727
## 📊 Executive Summary
2828

@@ -110,7 +110,7 @@
110110
- AI-analyzed groups: 21
111111
- Cost-optimized analysis: 93.7% reduction
112112
- Coverage: 100% of detected issues
113-
- Duration: 1m 33s
113+
- Duration: 1m 20s
114114

115115
---
116116

@@ -162,7 +162,7 @@ Review high-priority issues by category to maximize impact.
162162

163163
### 📈 Trends & Recommendations
164164

165-
🚀 **Easy Fixes Available**: 327 issues (99%) can be auto-fixed using your IDE or linter.
165+
🚀 **Easy Fixes Available**: 330 issues (100%) can be auto-fixed using your IDE or linter.
166166

167167
1. **Immediate Action**: 1 blocking issues (1 high) require review before deployment
168168
2. **Security Posture**: Security practices are adequate
@@ -1453,7 +1453,7 @@ This issue appears in **1 file** across your codebase.
14531453

14541454
## 🛠️ Auto-Fixing CheckStyle Issues
14551455

1456-
**Good news! All 328 CheckStyle issues can be fixed automatically!**
1456+
**Good news! All 327 CheckStyle issues can be fixed automatically!**
14571457

14581458
### Option 1: Using Google Java Format
14591459

@@ -1655,11 +1655,11 @@ mvn spotless:check # Verify (use in CI)
16551655

16561656
### 📚 Phase 3: Code Style & Formatting (Optional)
16571657

1658-
**330 style/formatting issues** can be addressed to improve code consistency.
1658+
**329 style/formatting issues** can be addressed to improve code consistency.
16591659

16601660
| Tool | Issues | Reference |
16611661
|------|--------|----------|
1662-
| Checkstyle | 328 | [📚 Checkstyle Rules Reference](https://checkstyle.org/checks.html) |
1662+
| Checkstyle | 327 | [📚 Checkstyle Rules Reference](https://checkstyle.org/checks.html) |
16631663
| PMD | 1 | [📚 PMD Rules Reference](https://pmd.github.io/latest/pmd_rules_java.html) |
16641664
| semgrep | 1 | See tool documentation |
16651665

@@ -1795,22 +1795,22 @@ instant, proven solutions for common issues.
17951795
17961796
| Tool | Issues Found | Duration | Status |
17971797
|------|--------------|----------|--------|
1798-
| checkstyle | 327 | 6.5s | 🔍 Found |
1799-
| semgrep | 2 | 23.4s | 🔍 Found |
1800-
| pmd | 1 | 6.4s | 🔍 Found |
1801-
| spotbugs | 0 | 12.6s | ✅ Clean |
1802-
| checkov | 0 | 11.1s | ✅ Clean |
1803-
| trivy | 0 | 2.7s | ✅ Clean |
1804-
| grype | 0 | 2.0s | ✅ Clean |
1798+
| checkstyle | 327 | 2.7s | 🔍 Found |
1799+
| semgrep | 2 | 22.9s | 🔍 Found |
1800+
| pmd | 1 | 2.3s | 🔍 Found |
1801+
| checkov | 0 | 9.7s | ✅ Clean |
1802+
| spotbugs | 0 | 7.4s | ✅ Clean |
1803+
| grype | 0 | 2.1s | ✅ Clean |
1804+
| trivy | 0 | 1.8s | ✅ Clean |
18051805
| dependency-check | 0 | 1.2s | ✅ Clean |
1806-
| gitleaks | 0 | 0.3s | ✅ Clean |
1806+
| gitleaks | 0 | 0.5s | ✅ Clean |
18071807
| jdepend | 0 | 0.2s | ✅ Clean |
18081808
| spectral | 0 | 0.0s | ✅ Clean |
18091809
| graphql-cop | 0 | 0.0s | ✅ Clean |
18101810
18111811
### System Information
18121812
- **Analyzer Version:** 9.0.0
1813-
- **Analysis Date:** 1/20/2026, 10:28:21 PM
1813+
- **Analysis Date:** 1/20/2026, 10:49:04 PM
18141814
- **Report Format:** Grouped (Compact with 99.8% cost reduction)
18151815
- **Issue Grouping:** Enabled unique issue types
18161816
@@ -1829,7 +1829,7 @@ Just one small issue to fix before we can merge. You've got this! 💪
18291829
- **Total Issues:** 331 (21 unique types)
18301830
- **Blocking Issues:** 1 ⛔
18311831
- **Resolved Issues:** 1 🎉
1832-
- **Analysis Time:** 78.1s
1832+
- **Analysis Time:** 69.5s
18331833
18341834
### ⛔ Blocking Issues
18351835
Please fix these before merge:
@@ -1858,7 +1858,7 @@ Please fix these before merge:
18581858
**✨ Best for IDEs**: Apply ALL 331 fixes with 1 click!
18591859
18601860
**Download**: `codequal-lsp-actions.json`
1861-
- URL: [Download LSP file](https://ftjhmbbcuqjqmmbaymqb.supabase.co/storage/v1/object/public/v9-attachments/spring-petclinic.git-pr950-1768966101764/codequal-lsp-actions.json)
1861+
- URL: [Download LSP file](https://ftjhmbbcuqjqmmbaymqb.supabase.co/storage/v1/object/public/v9-attachments/spring-petclinic.git-pr950-1768967344852/codequal-lsp-actions.json)
18621862
- Works with: Cursor, VSCode, IntelliJ, any LSP-compatible IDE
18631863
18641864
**How LSP Works**:
@@ -1935,7 +1935,7 @@ When you click "Apply Fix" in your IDE:
19351935
### 📋 Method 2: SARIF Report (Best for GitHub Code Scanning)
19361936
19371937
**Download**: `codequal-sarif-report.json`
1938-
- URL: [Download SARIF file](https://ftjhmbbcuqjqmmbaymqb.supabase.co/storage/v1/object/public/v9-attachments/spring-petclinic.git-pr950-1768966101764/codequal-sarif-report.json)
1938+
- URL: [Download SARIF file](https://ftjhmbbcuqjqmmbaymqb.supabase.co/storage/v1/object/public/v9-attachments/spring-petclinic.git-pr950-1768967344852/codequal-sarif-report.json)
19391939
- Works with: GitHub Code Scanning, CI/CD pipelines, VSCode/Cursor (with extension)
19401940
19411941
**For GitHub Code Scanning**:
@@ -1957,7 +1957,7 @@ When you click "Apply Fix" in your IDE:
19571957
### 🦊 Method 3: Code Climate / GitLab Code Quality
19581958
19591959
**Download**: `codequal-gitlab-codequality.json`
1960-
- URL: [Download Code Climate file](https://ftjhmbbcuqjqmmbaymqb.supabase.co/storage/v1/object/public/v9-attachments/spring-petclinic.git-pr950-1768966101764/codequal-gitlab-codequality.json)
1960+
- URL: [Download Code Climate file](https://ftjhmbbcuqjqmmbaymqb.supabase.co/storage/v1/object/public/v9-attachments/spring-petclinic.git-pr950-1768967344852/codequal-gitlab-codequality.json)
19611961
- Works with: GitLab CI/CD, GitHub Actions (via Code Climate), Jenkins, CircleCI
19621962
- Format: Code Climate (industry standard)
19631963
@@ -1990,7 +1990,7 @@ When you click "Apply Fix" in your IDE:
19901990
19911991
## 🔗 Additional Files
19921992
1993-
📦 **Manifest file**: [all-issues-manifest.json](https://ftjhmbbcuqjqmmbaymqb.supabase.co/storage/v1/object/public/v9-attachments/spring-petclinic.git-pr950-1768966101764/all-issues-manifest.json)
1993+
📦 **Manifest file**: [all-issues-manifest.json](https://ftjhmbbcuqjqmmbaymqb.supabase.co/storage/v1/object/public/v9-attachments/spring-petclinic.git-pr950-1768967344852/all-issues-manifest.json)
19941994
- Contains: All 331 issues with fix patterns
19951995
- **Use this if**: LSP approach doesn't work in your IDE
19961996
- **Works with**: AI assistants (Cursor Chat, GitHub Copilot, Claude)
@@ -2002,4 +2002,4 @@ When you click "Apply Fix" in your IDE:
20022002
---
20032003
20042004
*Generated by CodeQual V9 - Grouped Report Format (Bug #34 Lazy Loading)*
2005-
*2026-01-21T03:28:37.138Z*
2005+
*2026-01-21T03:49:18.601Z*

packages/agents/src/two-branch/tools/base-tool-orchestrator.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ export interface OrchestrationOptions {
127127
changedFiles?: string[];
128128
semgrepJobs?: number; // Override Semgrep --jobs flag (default: 2, can be 4 for full CPU usage)
129129
/**
130-
* SESSION 34 OPTIMIZATION: User subscription tier
130+
* User subscription tier
131131
*
132-
* BASIC tier: Run Semgrep in Step 3, skip Step 5.5 (use cached data + AI for descriptions)
133-
* PRO tier: Skip Semgrep in Step 3, run scan+fix combined in Step 5.5
132+
* SESSION 34 FIX: Semgrep now runs for ALL tiers in Step 3
133+
* (Original PRO tier optimization was incomplete - scan-fix-executor never ran Semgrep)
134134
*/
135135
userTier?: 'basic' | 'pro';
136136
}
@@ -176,9 +176,8 @@ export abstract class BaseToolOrchestrator {
176176
* Get list of tools to run based on analysis mode
177177
* Language-specific orchestrators use this to map mode to their tools
178178
*
179-
* SESSION 34 OPTIMIZATION: userTier parameter for Semgrep skip logic
180-
* - BASIC tier: Run Semgrep here (Step 3), skip in Step 5.5
181-
* - PRO tier: Skip Semgrep here, run scan+fix combined in Step 5.5
179+
* SESSION 34 FIX: Semgrep runs for ALL tiers in Step 3
180+
* (userTier still passed for future tier-specific features)
182181
*/
183182
protected abstract getToolsToRun(
184183
mode: AnalysisMode,

packages/agents/src/two-branch/tools/java/java-tool-orchestrator.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -303,13 +303,11 @@ export class JavaToolOrchestrator extends BaseToolOrchestrator {
303303
}
304304

305305
// Semgrep - Security analysis
306-
// SESSION 34 OPTIMIZATION:
307-
// - BASIC tier (default): Run Semgrep here (Step 3), skip Step 5.5
308-
// - PRO tier: Skip Semgrep here, run scan+fix combined in Step 5.5
306+
// SESSION 34 FIX: Always run Semgrep in Step 3 for all tiers
307+
// The PRO tier optimization was incomplete - scan-fix-executor doesn't run Semgrep,
308+
// so skipping here meant PRO tier missed security scanning entirely!
309309
if (this.config.semgrep.enabled && shouldJavaToolRun('semgrep', mode)) {
310-
if (userTier !== 'pro') {
311-
tools.push('semgrep');
312-
}
310+
tools.push('semgrep');
313311
}
314312

315313
// Checkstyle - Only in thorough/complete modes

packages/agents/src/two-branch/tools/python/python-tool-orchestrator.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,11 @@ export class PythonToolOrchestrator extends BaseToolOrchestrator {
261261
}
262262

263263
// Semgrep - Security analysis
264-
// SESSION 34 OPTIMIZATION:
265-
// - BASIC tier (default): Run Semgrep here (Step 3), skip Step 5.5
266-
// - PRO tier: Skip Semgrep here, run scan+fix combined in Step 5.5
264+
// SESSION 34 FIX: Always run Semgrep in Step 3 for all tiers
265+
// The PRO tier optimization was incomplete - scan-fix-executor doesn't run Semgrep,
266+
// so skipping here meant PRO tier missed security scanning entirely!
267267
if (this.config.semgrep.enabled && shouldPythonToolRun('semgrep', mode)) {
268-
if (userTier !== 'pro') {
269-
tools.push('semgrep');
270-
}
268+
tools.push('semgrep');
271269
}
272270

273271
// SESSION 57 Part 4: pydeps for architecture/dependency analysis

0 commit comments

Comments
 (0)