Skip to content

ci(secret): added google api key pattern test #42

ci(secret): added google api key pattern test

ci(secret): added google api key pattern test #42

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 'AIza[A-Za-z0-9_-]{35}'
git secrets --register-aws
- name: Scan for Secrets
run: |
git secrets --scan || (echo "Secrets detected in your push!"; exit 1)