Skip to content

Commit c76a8fe

Browse files
committed
gitguardian.yml
This is a generic GitHub Actions script for GitGuardian credential exposure scanning.
1 parent 8eda3b8 commit c76a8fe

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/gitguardian.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This is a generic GitHub Actions script for GitGuardian credential exposure scanning.
2+
3+
name: gitguardian
4+
# Controls when the workflow will run
5+
on:
6+
# Triggers the workflow on all pull request events and all pushes to the master branch
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
13+
jobs:
14+
# This workflow contains a single job named "gitguardian"
15+
gitguardian:
16+
# The type of runner that the job will run on
17+
runs-on: ubuntu-latest
18+
# Steps represent a sequence of tasks that will be executed as part of the job
19+
steps:
20+
- name: checkout
21+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
22+
uses: actions/checkout@v2
23+
with:
24+
fetch-depth: 0 # fetch all history so multiple commits can be scanned
25+
- name: scan
26+
uses: GitGuardian/gg-shield-action@master
27+
env:
28+
GITHUB_PUSH_BEFORE_SHA: ${{ github.event.before }}
29+
GITHUB_PUSH_BASE_SHA: ${{ github.event.base }}
30+
GITHUB_PULL_BASE_SHA: ${{ github.event.pull_request.base.sha }}
31+
GITHUB_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
32+
GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }}
33+
# Runs a single command using the runners shell
34+
- name: alert
35+
run: echo Scan is complete!
36+

0 commit comments

Comments
 (0)