@@ -75,6 +75,13 @@ export class CxWrapper {
7575 return list ;
7676 }
7777
78+ async authValidate ( ) : Promise < CxCommandOutput > {
79+ const commands : string [ ] = [ CxConstants . CMD_AUTH , CxConstants . SUB_CMD_VALIDATE ] ;
80+ commands . push ( ...this . initializeCommands ( false ) ) ;
81+ let exec = new ExecutionService ( ) ;
82+ return await exec . executeCommands ( this . config . pathToExecutable , commands ) ;
83+ }
84+
7885 async scanCreate ( params : ParamTypeMap ) : Promise < CxCommandOutput > {
7986 const commands : string [ ] = [ CxConstants . CMD_SCAN , CxConstants . SUB_CMD_CREATE ] ;
8087 commands . push ( ...this . initializeCommands ( true ) ) ;
@@ -99,13 +106,6 @@ export class CxWrapper {
99106 return await exec . executeCommands ( this . config . pathToExecutable , commands , CxConstants . SCAN_TYPE ) ;
100107 }
101108
102- async authValidate ( ) : Promise < CxCommandOutput > {
103- const commands : string [ ] = [ CxConstants . CMD_AUTH , CxConstants . SUB_CMD_VALIDATE ] ;
104- commands . push ( ...this . initializeCommands ( false ) ) ;
105- let exec = new ExecutionService ( ) ;
106- return await exec . executeCommands ( this . config . pathToExecutable , commands ) ;
107- }
108-
109109 async scanShow ( id : string ) : Promise < CxCommandOutput > {
110110 const commands : string [ ] = [ CxConstants . CMD_SCAN , CxConstants . SUB_CMD_SHOW , CxConstants . SCAN_ID , id ] ;
111111 commands . push ( ...this . initializeCommands ( true ) ) ;
@@ -145,6 +145,20 @@ export class CxWrapper {
145145 return await exec . executeCommands ( this . config . pathToExecutable , commands , CxConstants . PROJECT_TYPE ) ;
146146 }
147147
148+ async triageShow ( projectId : string , similarityId : string , scanType : string ) : Promise < CxCommandOutput > {
149+ const commands : string [ ] = [ CxConstants . CMD_TRIAGE , CxConstants . SUB_CMD_SHOW , CxConstants . PROJECT_ID , projectId , CxConstants . SIMILARITY_ID , similarityId , CxConstants . SCAN_TYPES_SUB_CMD , scanType ] ;
150+ commands . push ( ...this . initializeCommands ( true ) ) ;
151+ const exec = new ExecutionService ( ) ;
152+ return await exec . executeCommands ( this . config . pathToExecutable , commands , CxConstants . PREDICATE_TYPE ) ;
153+ }
154+
155+ async triageUpdate ( projectId : string , similarityId : string , scanType : string , state : string , comment : string , severity : string ) : Promise < CxCommandOutput > {
156+ const commands : string [ ] = [ CxConstants . CMD_TRIAGE , CxConstants . SUB_CMD_UPDATE , CxConstants . PROJECT_ID , projectId , CxConstants . SIMILARITY_ID , similarityId , CxConstants . SCAN_TYPE , scanType , CxConstants . STATE , state , CxConstants . COMMENT , comment , CxConstants . SEVERITY , severity ] ;
157+ commands . push ( ...this . initializeCommands ( false ) ) ;
158+ const exec = new ExecutionService ( ) ;
159+ return await exec . executeCommands ( this . config . pathToExecutable , commands ) ;
160+ }
161+
148162 async getResultsList ( scanId : string ) {
149163 const exec = new ExecutionService ( ) ;
150164 const fileName = new Date ( ) . getTime ( ) . toString ( ) ;
0 commit comments