Skip to content

ci(secret): added google api key pattern te #46

ci(secret): added google api key pattern te

ci(secret): added google api key pattern te #46

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 'ghp_[A-Za-z0-9]{36}'
git secrets --add '([A-Za-z0-9]{32})\-([A-Za-z0-9]{16})\-([A-Za-z0-9]{24})'
git secrets --add 'xox[baprs]-([0-9A-Za-z]{10,48})'
git secrets --add 'SK[0-9a-fA-F]{32}'
git secrets --register-aws
- name: Scan for Secrets
run: |
git secrets --scan || (echo "Secrets detected in your push!"; exit 1)