Skip to content

Commit

Permalink
feat: 3.0.21
Browse files Browse the repository at this point in the history
  • Loading branch information
iamnasirudeen committed Jan 25, 2025
1 parent 6ebb97f commit 415b3e5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "securelog-scan",
"version": "3.0.20",
"version": "3.0.21",
"description": "A CLI tool to scan codebases for potential secrets.",
"main": "dist/index.js",
"author": {
Expand Down
22 changes: 17 additions & 5 deletions src/shared/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ const API_BASE_URL = "https://api.securelog.com";

const validateRequestApiKey = async (apikey: string) => {
try {
const { data } = await axios.get(`${API_BASE_URL}/auth`);
await axios.get(`${API_BASE_URL}/auth`, {
headers: {
"x-api-key": apikey,
},
});
} catch (error) {
throw new Error("Invalid API Key");
}
Expand Down Expand Up @@ -80,10 +84,18 @@ export const redactSensitiveData = async (
await maskAndRedactSensitiveData(options);

try {
await axios.post(`${API_BASE_URL}/log-redacted-secret`, {
rawValue: redactedValues,
secrets,
});
await axios.post(
`${API_BASE_URL}/log-redacted-secret`,
{
rawValue: redactedValues,
secrets,
},
{
headers: {
"x-api-key": apiKey,
},
}
);
} catch (error) {
console.log("Error occured logging secrets");
}
Expand Down

0 comments on commit 415b3e5

Please sign in to comment.