File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed
Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " securelog-scan" ,
3- "version" : " 3.0.14 " ,
3+ "version" : " 3.0.15 " ,
44 "description" : " A CLI tool to scan codebases for potential secrets." ,
55 "main" : " dist/index.js" ,
66 "author" : {
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ export const processPossibleSecretsInString = async (
5454 detectors . map ( async ( detector ) => {
5555 const { scan } = detector ;
5656 const scanResponse = await scan ( false , rawValue ) ;
57- if ( scanResponse ) {
57+ if ( scanResponse && scanResponse . rawValue ) {
5858 modifiedValue = modifiedValue . replaceAll (
5959 scanResponse . rawValue as string ,
6060 maskString ( scanResponse . rawValue as string , {
@@ -96,7 +96,7 @@ const processPossibleSecrets = async (
9696 detectors . map ( async ( detector ) => {
9797 const { scan } = detector ;
9898 const scanResponse = await scan ( verify , trimmedFile ) ;
99- if ( scanResponse ) {
99+ if ( scanResponse && scanResponse . rawValue ) {
100100 const line = scanResponse . position
101101 ? getLineNumber ( trimmedFile , scanResponse . position )
102102 : 1 ;
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ const scanLineForSecrets = async (
5757 const { scan } = detector ;
5858 const scanResponse = await scan ( verify , line ) ;
5959
60- if ( scanResponse ) {
60+ if ( scanResponse && scanResponse . rawValue ) {
6161 EventManager . emitNewSecret ( {
6262 ...scanResponse ,
6363 filePath,
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export const redactSensitiveData = async (options: ScanStringOptions) => {
1616 detectors . map ( async ( detector ) => {
1717 const { scan } = detector ;
1818 const scanResponse = await scan ( false , options . rawValue as string ) ;
19- if ( scanResponse ) {
19+ if ( scanResponse && scanResponse . rawValue ) {
2020 modifiedValue = modifiedValue ?. replaceAll (
2121 scanResponse . rawValue as string ,
2222 maskString ( scanResponse . rawValue as string , {
@@ -40,7 +40,7 @@ export const scanStringAndReturnJson = async (options: ScanStringOptions) => {
4040 detectors . map ( async ( detector ) => {
4141 const { scan } = detector ;
4242 const scanResponse = await scan ( false , options . rawValue as string ) ;
43- if ( scanResponse ) {
43+ if ( scanResponse && scanResponse . rawValue ) {
4444 return scanResponse ;
4545 }
4646 } )
You can’t perform that action at this time.
0 commit comments