@@ -168,13 +168,25 @@ export class CxWrapper {
168168 return await exec . executeCommands ( this . config . pathToExecutable , commands , CxConstants . SCAN_OSS ) ;
169169}
170170
171- async secretsScanResults ( sourceFile : string ) : Promise < CxCommandOutput > {
172- const commands : string [ ] = [ CxConstants . CMD_SCAN , CxConstants . CMD_SECRETS , CxConstants . SOURCE , sourceFile ] ;
173- commands . push ( ...this . initializeCommands ( false ) ) ;
174- const exec = new ExecutionService ( ) ;
175- return await exec . executeCommands ( this . config . pathToExecutable , commands , CxConstants . SCAN_SECRETS ) ;
171+ async secretsScanResults ( sourceFile : string , ignoredFilePath ?: string ) : Promise < CxCommandOutput > {
172+ const commands : string [ ] = [
173+ CxConstants . CMD_SCAN ,
174+ CxConstants . CMD_SECRETS ,
175+ CxConstants . SOURCE ,
176+ sourceFile
177+ ] ;
178+
179+ if ( ignoredFilePath ) {
180+ commands . push ( CxConstants . IGNORE__FILE_PATH ) ;
181+ commands . push ( ignoredFilePath ) ;
176182 }
177183
184+ commands . push ( ...this . initializeCommands ( false ) ) ;
185+
186+ const exec = new ExecutionService ( ) ;
187+ return await exec . executeCommands ( this . config . pathToExecutable , commands , CxConstants . SCAN_SECRETS ) ;
188+ }
189+
178190 async scanCancel ( id : string ) : Promise < CxCommandOutput > {
179191 const commands : string [ ] = [ CxConstants . CMD_SCAN , CxConstants . SUB_CMD_CANCEL , CxConstants . SCAN_ID , id ] ;
180192 commands . push ( ...this . initializeCommands ( false ) ) ;
0 commit comments