Skip to content

Commit 3c20ec5

Browse files
authored
Update README.md
1 parent 4a350c1 commit 3c20ec5

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

README.md

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -345,35 +345,6 @@ git push --force --all
345345
git push --force --tags
346346
```
347347

348-
## How to Initialize SLS Scan as an SDK
349-
350-
```typescript
351-
// Detector Config Interface
352-
export interface DetectorConfig {
353-
regex: string | Record<string, string>;
354-
keywords: string[];
355-
detectorType: string;
356-
group?: string[];
357-
}
358-
359-
import { redactSensitiveData } from "securelog-scan/dist/shared";
360-
361-
const secretRedactionResult = redactSensitiveData("Your API KEY here", {
362-
rawValue: "String you want to check for secrets here",
363-
maskedValue: "*", // that is what detected secrets should be replaced with
364-
visibleChars: 3, // how many characters should be visible among detected secrets
365-
366-
// An Array of DetectorConfig, example below
367-
customDetectors: [
368-
{
369-
regex: "\\b(FLWSECK-[0-9a-z]{32}-X)\\b",
370-
detectorType: "Flutterwave",
371-
keywords: ["FLWSECK-"],
372-
},
373-
],
374-
}); // returns {rawValue: "Your returned string with secrets redacted", secrets: ["Array of secrets that was found in string"]}
375-
```
376-
377348
# Contributing
378349

379350
Feel free to contribute to this project by opening issues or submitting pull requests. Contribute to [SECRET DETECTORS](./DETECTORS.md).

0 commit comments

Comments
 (0)