File tree Expand file tree Collapse file tree 1 file changed +0
-29
lines changed
Expand file tree Collapse file tree 1 file changed +0
-29
lines changed Original file line number Diff line number Diff line change @@ -345,35 +345,6 @@ git push --force --all
345345git 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
379350Feel free to contribute to this project by opening issues or submitting pull requests. Contribute to [SECRET DETECTORS](./DETECTORS.md).
You can’t perform that action at this time.
0 commit comments