Skip to content

Commit

Permalink
add cd "$(dirname "$0")"
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiechayes committed Sep 28, 2023
1 parent 494b661 commit c8517ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/guard-api-key-leak.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,5 @@ jobs:
# required to avoid `Usage Error: Environment variable not found (NPM_TOKEN)`
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: List directories sanity Check
run: find . -type d -print

- name: Detect API key leaks
run: ./guard-api-key-leak.sh
working-directory: ./generator/konfig-dash/bash-scripts
run: ./generator/konfig-dash/bash-scripts/guard-api-key-leak.sh
2 changes: 2 additions & 0 deletions generator/konfig-dash/bash-scripts/guard-api-key-leak.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash

# get the api keys from api-keys.ts
cd "$(dirname "$0")"

keyFile="../api/src/lib/api-keys.ts"
apiKeys=($(grep -oE '[A-Za-z0-9]{32}:' "$keyFile" | sed 's/://'))

Expand Down

0 comments on commit c8517ee

Please sign in to comment.