Commit 22b69a8
AIML-230: Harden coding standards and practices [STACKED] (#29)
* Fix mcp-6bs: Change list_vulns_by_app tools to use appID parameter
Changes two tools to accept appID instead of app_name for consistency
with AIML-189 standardization:
- list_vulns_by_app_and_metadata: Renamed method to
listVulnsByAppIdAndSessionMetadata, removed SDKHelper lookup
- list_vulns_by_app_latest_session: Renamed method to
listVulnsByAppIdForLatestSession, removed SDKHelper lookup
Both tools now:
- Accept appID parameter directly
- Have updated @tool descriptions mentioning list_applications_with_name
- Skip application name lookup for better performance
- Are consistent with all other application-level tools
Tests updated to use appID. All tests passing.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update test plan files to use appID parameter
Fixed test plan documentation for list_vulns_by_app tools to use
appID parameter instead of app_name, matching the code changes in
mcp-6bs.
This was causing Copilot to cache the old parameter name and fail
when calling these tools.
Changes:
- test-plan-list_vulns_by_app_and_metadata.md: Updated all references
from app_name to appID
- test-plan-list_vulns_by_app_latest_session.md: Updated all references
from app_name to appID
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Remove test plan files from git tracking
These test plan files are development/testing documentation that should
not be committed to the repository. They are now ignored via .gitignore.
The files are preserved locally for development use but won't be tracked
in version control.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add coding standards section to CLAUDE.md
Documents Java coding conventions for the project:
- Prefer var for local variables when type is obvious
- Use isEmpty() instead of size() comparisons for collections
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add Spotless Maven plugin with Google Java Format (AIML-230)
- Added spotless-maven-plugin 2.43.0 to pom.xml
- Configured with Google Java Format 1.26.0 matching aiml-services standards
- Enabled automatic enforcement via validate phase
- Formatted entire codebase (96 Java files)
- Updated CLAUDE.md with Spotless commands and usage notes
Configuration:
- Google Java Format style with import reordering
- Long string reflowing enabled
- Javadoc formatting enabled
- Runs automatically on every build (mvn compile/test/install)
All tests pass: 250 tests, 0 failures, 0 errors
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Refactor codebase to use var keyword for local variables (AIML-230)
Applied var keyword throughout the codebase where type is obvious from
right-hand side, following CLAUDE.md coding standards.
Changes:
- Service classes: 70 var replacements
- ADRService (9), AssessService (42), RouteCoverageService (7),
SCAService (6), SastService (6)
- Data/mapper/utils: 13 var replacements
- AttackSummary, VulnerabilityMapper, PaginationHandler, hint classes
- SDK extension classes: 29 var replacements
- SDKExtension (13), SDKHelper (16)
- Test classes: 437 var replacements
- Unit tests (386): All *Test.java files
- Integration tests (51): All *IntegrationTest.java files
Total: 549 var replacements across 34 files
Rules applied:
✅ Use var when type is obvious from constructor/method call
✅ Use var for mock objects and ArgumentCaptors
✅ Use var for collections with explicit type parameters
❌ Do NOT use var for numeric literals
❌ Do NOT use var for null assignments
❌ Do NOT use var when type would be ambiguous
All 224 unit tests pass (0 failures, 0 errors)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Document no wildcard imports coding standard (AIML-230)
Add coding standard to CLAUDE.md requiring explicit imports only.
Wildcard imports (import package.*) are not allowed to improve
code clarity and maintainability.
* Convert wildcard imports to explicit imports (AIML-230)
Replace all wildcard imports with explicit imports in main source files
per CLAUDE.md coding standards. Static wildcard imports in test files
remain unchanged as they follow standard test code conventions.
Changes:
- SDKExtension.java: 1 wildcard → 5 explicit imports
- AssessService.java: 3 wildcards → 19 explicit imports
- VulnerabilityFilterParams.java: 1 wildcard → 6 explicit imports
Verified: mvn test passes (218 tests, 0 failures)
* Fix spelling: rename sdkexstension to sdkextension (AIML-230)
Correct package name spelling from 'sdkexstension' to 'sdkextension'
throughout the codebase. Used git mv to preserve file history.
Changes:
- Renamed 49 Java files (package directories)
- Updated package declarations in all moved files
- Updated imports in 23 files that reference the package
- Updated documentation (CLAUDE.md, plans)
Verified: All 250 tests pass, compilation successful
* Fix formatting after rebase
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 4d33882 commit 22b69a8
File tree
152 files changed
+22404
-16188
lines changed- plans
- src
- main/java/com/contrast/labs/ai/mcp/contrast
- data
- hints
- mapper
- sdkexstension
- data
- adr
- application
- routecoverage
- sca
- sessionmetadata
- sdkextension
- data
- adr
- application
- routecoverage
- sca
- sessionmetadata
- utils
- test/java/com/contrast/labs/ai/mcp/contrast
- data
- hints
- mapper
- sdkexstension
- data/adr
- sdkextension
- data/adr
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
152 files changed
+22404
-16188
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
| |||
12 | 10 | | |
13 | 11 | | |
14 | 12 | | |
15 | | - | |
16 | 13 | | |
17 | | - | |
18 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 43 | + | |
46 | 44 | | |
47 | | - | |
| 45 | + | |
48 | 46 | | |
49 | 47 | | |
50 | 48 | | |
| |||
64 | 62 | | |
65 | 63 | | |
66 | 64 | | |
67 | | - | |
| 65 | + | |
68 | 66 | | |
69 | 67 | | |
70 | | - | |
71 | | - | |
72 | | - | |
| 68 | + | |
| 69 | + | |
73 | 70 | | |
74 | 71 | | |
75 | 72 | | |
76 | 73 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
85 | 78 | | |
86 | 79 | | |
87 | 80 | | |
88 | 81 | | |
89 | 82 | | |
| 83 | + | |
90 | 84 | | |
91 | 85 | | |
92 | 86 | | |
| |||
97 | 91 | | |
98 | 92 | | |
99 | 93 | | |
100 | | - | |
101 | 94 | | |
102 | 95 | | |
103 | 96 | | |
| |||
136 | 129 | | |
137 | 130 | | |
138 | 131 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | 132 | | |
156 | 133 | | |
157 | 134 | | |
| |||
225 | 202 | | |
226 | 203 | | |
227 | 204 | | |
228 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
229 | 208 | | |
230 | 209 | | |
231 | 210 | | |
| |||
580 | 559 | | |
581 | 560 | | |
582 | 561 | | |
583 | | - | |
| 562 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
0 commit comments