Skip to content

ci(secret): added files pattern #54

ci(secret): added files pattern

ci(secret): added files pattern #54

name: git-secrets-check
on:
push:
branches:
- '**'
pull_request:
jobs:
secrets-scan:
name: Scan for Secrets
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install git-secrets
run: |
sudo apt-get update
sudo apt-get install -y git
git clone https://github.com/awslabs/git-secrets.git
cd git-secrets && sudo make install
- name: Configure git-secrets
run: |
git secrets --install
git secrets --add-provider -- cat helper/secret-patterns.txt
git secrets --register-aws
- name: Scan for Secrets
run: |
git diff --cached --name-only | grep -E '\.(tsx|ts)$' | xargs git secrets --scan || (echo "Secrets detected in your push!"; exit 1)