@@ -404,6 +404,26 @@ public KicsRealtimeResults kicsRealtimeScan(@NonNull String fileSources, String
404404 return Execution .executeCommand (withConfigArguments (arguments ), logger , KicsRealtimeResults ::fromLine );
405405 }
406406
407+ public String ossRealtimeScan (@ NonNull String sourcePath , String ignoredFilePath )
408+ throws IOException , InterruptedException , CxException {
409+ this .logger .info ("Executing 'scan oss-realtime' command using the CLI." );
410+ this .logger .info ("Source: {} IgnoredFilePath: {}" , sourcePath , ignoredFilePath );
411+ List <String > arguments = new ArrayList <>();
412+ arguments .add (CxConstants .CMD_SCAN );
413+ arguments .add (CxConstants .SUB_CMD_OSS_REALTIME );
414+ arguments .add (CxConstants .SOURCE );
415+ arguments .add (sourcePath );
416+ if (StringUtils .isNotBlank (ignoredFilePath )) {
417+ arguments .add (CxConstants .IGNORED_FILE_PATH );
418+ arguments .add (ignoredFilePath );
419+ }
420+ return Execution .executeCommand (withConfigArguments (arguments ), logger , line -> line );
421+ }
422+
423+ public String ossRealtimeScan (@ NonNull String sourcePath )
424+ throws IOException , InterruptedException , CxException {
425+ return ossRealtimeScan (sourcePath , null );
426+ }
407427 public KicsRemediation kicsRemediate (@ NonNull String resultsFile , String kicsFile , String engine ,String similarityIds )
408428 throws IOException , InterruptedException , CxException {
409429 this .logger .info ("Executing 'remediation kics' command using the CLI." );
@@ -455,6 +475,18 @@ public boolean ideScansEnabled() throws CxException, IOException, InterruptedExc
455475 .orElse (false );
456476 }
457477
478+ public boolean aiMcpServerEnabled () throws CxException , IOException , InterruptedException {
479+ List <TenantSetting > tenantSettings = tenantSettings ();
480+ if (tenantSettings == null ) {
481+ throw new CxException (1 , "Unable to parse tenant settings" );
482+ }
483+ return tenantSettings .stream ()
484+ .filter (t -> t .getKey ().equals (CxConstants .AI_MCP_SERVER_KEY ))
485+ .findFirst ()
486+ .map (t -> Boolean .parseBoolean (t .getValue ()))
487+ .orElse (false );
488+ }
489+
458490 public List <TenantSetting > tenantSettings () throws CxException , IOException , InterruptedException {
459491 List <String > arguments = jsonArguments ();
460492
0 commit comments