Skip to content

Commit

Permalink
fixed failures
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdip-b committed Sep 17, 2024
1 parent 1c07dd2 commit bcce5b5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion apps/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"fs": "0.0.1-security",
"glob": "^11.0.0",
"nodemon": "^3.1.4",
"secret-scan": "workspace:*",
"@keyshade/secret-scan": "workspace:*",
"socket.io-client": "^4.7.5",
"typescript": "^5.5.2"
},
Expand Down
7 changes: 5 additions & 2 deletions apps/cli/src/commands/scan.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { execSync } from 'child_process'
import { readFileSync, statSync } from 'fs'
import { globSync } from 'glob'
import path from 'path'
import secretDetector from 'secret-scan'
import secretDetector from '@keyshade/secret-scan'
// eslint-disable-next-line @typescript-eslint/no-var-requires
const colors = require('colors/safe')

Expand Down Expand Up @@ -83,7 +83,10 @@ export default class ScanCommand extends BaseCommand {
skipNextLine = true
return
}
const { found, regex } = secretDetector.detect(line)
const { found, regex } = secretDetector.detect(line) as {
found: boolean
regex: RegExp
}
if (found) {
const matched = line.match(regex)
const highlightedLine = line
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,10 @@
"build:api": "pnpm db:generate-types && turbo run build --filter=api",
"build:web": "turbo run build --filter=web",
"build:platform": "turbo run build --filter=platform",
"build:cli": "pnpm build:api-client && turbo run build --filter=cli",
"build:cli": "pnpm build:secret-scan && pnpm build:api-client && turbo run build --filter=cli",
"build:api-client": "turbo run --filter=api-client build",
"build:schema": "pnpm run --filter=schema build",
"build:secret-scan": "turbo run build --filter=secret-scan",
"start": "turbo run start",
"start:api": "turbo run start --filter=api",
"start:web": "turbo run start --filter=web",
Expand Down
2 changes: 1 addition & 1 deletion packages/secret-scan/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "secret-scan",
"name": "@keyshade/secret-scan",
"version": "1.0.0",
"description": "Do static analysis of a string to find secrets",
"main": "dist/index.js",
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bcce5b5

Please sign in to comment.