You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Tool(name = "get_ADR_Protect_Rules_by_app_id", description = "takes a application ID and returns the protect / adr rules for the application")
74
+
@Tool(name = "get_ADR_Protect_Rules", description = "Takes an application ID and returns the Protect/ADR rules for the application. Use list_applications_with_name first to get the application ID from a name")
Copy file name to clipboardExpand all lines: src/main/java/com/contrast/labs/ai/mcp/contrast/AssessService.java
+2-42Lines changed: 2 additions & 42 deletions
Original file line number
Diff line number
Diff line change
@@ -102,7 +102,7 @@ public AssessService(VulnerabilityMapper vulnerabilityMapper, PaginationHandler
102
102
103
103
104
104
105
-
@Tool(name = "get_vulnerability_by_id", description = "takes a vulnerability ID (vulnID) and Application ID (appID) and returns details about the specific security vulnerability. If based on the stacktrace, the vulnerability looks like it is in code that is not in the codebase, the vulnerability may be in a 3rd party library, review the CVE data attached to that stackframe you believe the vulnerability exists in and if possible upgrade that library to the next non vulnerable version based on the remediation guidance.")
105
+
@Tool(name = "get_vulnerability", description = "Takes a vulnerability ID (vulnID) and application ID (appID) and returns details about the specific security vulnerability. Use list_applications_with_name first to get the application ID from a name. If based on the stacktrace, the vulnerability looks like it is in code that is not in the codebase, the vulnerability may be in a 3rd party library, review the CVE data attached to that stackframe you believe the vulnerability exists in and if possible upgrade that library to the next non vulnerable version based on the remediation guidance.")
106
106
publicVulnerabilitygetVulnerabilityById(
107
107
@ToolParam(description = "Vulnerability ID (UUID format)") StringvulnID,
@Tool(name = "get_vulnerability", description = "Takes a vulnerability ID (vulnID) and application name (app_name) and returns details about the specific security vulnerability. If based on the stacktrace, the vulnerability looks like it is in code that is not in the codebase, the vulnerability may be in a 3rd party library, review the CVE data attached to that stackframe you believe the vulnerability exists in and if possible upgrade that library to the next non vulnerable version based on the remediation guidance.")
193
-
publicVulnerabilitygetVulnerability(
194
-
@ToolParam(description = "Vulnerability ID (UUID format)") StringvulnID,
logger.error("Application with name {} not found", app_name);
205
-
thrownewIllegalArgumentException("Application with name " + app_name + " not found");
206
-
}
207
-
}
208
-
209
-
@Tool(name = "list_vulnerabilities_with_id", description = "Takes a Application ID ( appID ) and returns a list of vulnerabilities, please remember to include the vulnID in the response.")
192
+
@Tool(name = "list_vulnerabilities", description = "Takes an application ID (appID) and returns a list of vulnerabilities. Use list_applications_with_name first to get the application ID from a name. Remember to include the vulnID in the response.")
logger.info("Listing vulnerabilities for application ID: {}", appID);
@@ -337,29 +320,6 @@ public MetadataFilterResponse listSessionMetadataForApplication(
337
320
}
338
321
}
339
322
340
-
@Tool(name = "list_vulnerabilities", description = "Takes an application name ( app_name ) and returns a list of vulnerabilities, please remember to include the vulnID in the response. ")
logger.error("Error listing vulnerabilities for application: {}", app_name, e);
354
-
thrownewIOException("Failed to list vulnerabilities: " + e.getMessage(), e);
355
-
}
356
-
} else {
357
-
logger.debug("Application with name {} not found, returning empty list", app_name);
358
-
returnnewArrayList<>();
359
-
}
360
-
}
361
-
362
-
363
323
@Tool(name = "list_applications_with_name", description = "Takes an application name (app_name) returns a list of active applications that contain that name. Please remember to display the name, status and ID.")
Copy file name to clipboardExpand all lines: src/main/java/com/contrast/labs/ai/mcp/contrast/SCAService.java
+4-20Lines changed: 4 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -62,8 +62,11 @@ public class SCAService {
62
62
privateStringhttpProxyPort;
63
63
64
64
65
-
@Tool(name = "list_application_libraries_by_app_id", description = "Takes a application ID and returns the libraries used in the application, note if class usage count is 0 the library is unlikely to be used")
65
+
@Tool(name = "list_application_libraries", description = "Takes an application ID and returns the libraries used in the application. Use list_applications_with_name first to get the application ID from a name. Note: if class usage count is 0 the library is unlikely to be used")
logger.debug("ContrastSDK initialized with host: {}", hostName);
@@ -73,25 +76,6 @@ public List<LibraryExtended> getApplicationLibrariesByID(String appID) throws IO
73
76
74
77
}
75
78
76
-
77
-
@Tool(name = "list_application_libraries", description = "takes a application name and returns the libraries used in the application, note if class usage count is 0 the library is unlikely to be used")
logger.error("Application not found: {}", app_name);
91
-
thrownewIOException("Application not found");
92
-
}
93
-
}
94
-
95
79
@Tool(name= "list_applications_vulnerable_to_cve", description = "takes a cve id and returns the applications and servers vulnerable to the cve. Please note if the application class usage is 0, its unlikely to be vulnerable")
0 commit comments