forked from secret-scanner/action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
50 lines (48 loc) · 1.64 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: 'Secret Scanner'
author: 'GarnerCorp'
description: 'Scan for secrets in a repository'
branding:
icon: 'eye'
color: 'orange'
inputs:
detect_secrets_version:
description: 'The version of Yelp/detect-secrets to use'
required: false
default: '1.3.0'
detect_secret_additional_args:
description: 'Extra arguments to pass to the detect-secret binary'
required: false
default: ''
baseline_file:
description: "A path to the baseline secrets file"
required: false
default: .secrets.baseline
python_version:
description: "The version of python to use"
required: false
default: '3.10.4'
exclude_files_path:
description: "A path to the files containing things to exclude"
required: false
default: ".github/actions/secret-scanner"
runs:
using: 'composite'
steps:
- name: Set-up python
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python_version }}
- name: Install detect-secrets
shell: bash
run: pip install detect-secrets[gibberish]=="$DETECT_SECRET_VERSION"
env:
DETECT_SECRET_VERSION: ${{ inputs.detect_secrets_version }}
- name: Check for secrets
shell: bash
run: $GITHUB_ACTION_PATH/detect-new-secrets.sh
env:
BASELINE_FILE: ${{ inputs.baseline_file }}
DETECT_SECRET_ADDITIONAL_ARGS: ${{ inputs.detect_secret_additional_args }}
EXCLUDE_FILES_PATH: ${{ inputs.exclude_files_path }}/excluded_files.patterns
EXCLUDE_SECRETS_PATH: ${{ inputs.exclude_files_path }}/excluded_secrets.patterns
EXCLUDE_LINES_PATH: ${{ inputs.exclude_files_path }}/excluded_lines.patterns