@@ -205,8 +205,8 @@ export class CxWrapper {
205205 return exec . executeResultsCommandsFile ( scanId , CxConstants . FORMAT_HTML , CxConstants . FORMAT_HTML_FILE , commands , this . config . pathToExecutable , fileName ) ;
206206 }
207207
208- async getResults ( scanId : string , resultType : string , outputFileName : string , outputFilePath : string ) {
209- const commands = this . resultsShow ( scanId , resultType , outputFileName , outputFilePath )
208+ async getResults ( scanId : string , resultType : string , outputFileName : string , outputFilePath : string , agent ?: string | null ) {
209+ const commands = this . resultsShow ( scanId , resultType , outputFileName , outputFilePath , agent )
210210 const exec = new ExecutionService ( ) ;
211211 return await exec . executeCommands ( this . config . pathToExecutable , commands ) ;
212212 }
@@ -218,7 +218,7 @@ export class CxWrapper {
218218 return await exec . executeCommands ( this . config . pathToExecutable , commands , CxConstants . CODE_BASHING_TYPE ) ;
219219 }
220220
221- resultsShow ( scanId : string , reportFormat : string , outputFileName : string , outputPath : string ) : string [ ] {
221+ resultsShow ( scanId : string , reportFormat : string , outputFileName : string , outputPath : string , agent ?: string | null ) : string [ ] {
222222 const commands : string [ ] = [ CxConstants . CMD_RESULT , CxConstants . SUB_CMD_SHOW , CxConstants . SCAN_ID , scanId , CxConstants . REPORT_FORMAT , reportFormat ] ;
223223 if ( outputFileName ) {
224224 commands . push ( CxConstants . OUTPUT_NAME ) ;
@@ -228,6 +228,10 @@ export class CxWrapper {
228228 commands . push ( CxConstants . OUTPUT_PATH ) ;
229229 commands . push ( outputPath ) ;
230230 }
231+ if ( agent ) {
232+ commands . push ( CxConstants . AGENT ) ;
233+ commands . push ( agent ) ;
234+ }
231235 commands . push ( ...this . initializeCommands ( false ) ) ;
232236 return commands ;
233237 }
0 commit comments