File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed
Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " securelog-scan" ,
3- "version" : " 3.0.20 " ,
3+ "version" : " 3.0.21 " ,
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 @@ -16,7 +16,11 @@ const API_BASE_URL = "https://api.securelog.com";
1616
1717const validateRequestApiKey = async ( apikey : string ) => {
1818 try {
19- const { data } = await axios . get ( `${ API_BASE_URL } /auth` ) ;
19+ await axios . get ( `${ API_BASE_URL } /auth` , {
20+ headers : {
21+ "x-api-key" : apikey ,
22+ } ,
23+ } ) ;
2024 } catch ( error ) {
2125 throw new Error ( "Invalid API Key" ) ;
2226 }
@@ -80,10 +84,18 @@ export const redactSensitiveData = async (
8084 await maskAndRedactSensitiveData ( options ) ;
8185
8286 try {
83- await axios . post ( `${ API_BASE_URL } /log-redacted-secret` , {
84- rawValue : redactedValues ,
85- secrets,
86- } ) ;
87+ await axios . post (
88+ `${ API_BASE_URL } /log-redacted-secret` ,
89+ {
90+ rawValue : redactedValues ,
91+ secrets,
92+ } ,
93+ {
94+ headers : {
95+ "x-api-key" : apiKey ,
96+ } ,
97+ }
98+ ) ;
8799 } catch ( error ) {
88100 console . log ( "Error occured logging secrets" ) ;
89101 }
You can’t perform that action at this time.
0 commit comments