forked from Samsung/CredSweeper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
42 lines (42 loc) · 1.25 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
name: "CredSweeper action"
description: "CredSweeper checks files"
author: "[email protected]"
branding:
icon: "terminal"
color: "gray-dark"
inputs:
python_version:
description: "Python Version. 3.10 - default"
default: "3.10"
required: false
path:
description: "Path to scan"
required: true
report:
description: "CredSweeper report in JSON format"
default: "output.json"
required: false
args:
description: "CredSweeper auxiliary arguments"
default: "--banner --log INFO"
required: false
runs:
using: "composite"
steps:
- id: setup-python
name: Setup Python
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 - 2025.01.28
with:
python-version: ${{ inputs.python_version }}
- id: credsweeper-install
name: Install CredSweeper
shell: bash
run: python -m pip install credsweeper
- id: credsweeper-run
name: CredSweeper run
shell: bash
run: python -m credsweeper ${{ inputs.args }} --path ${{ inputs.path }} --save-json ${{ inputs.report }}
- id: check-output
name: Check output
shell: bash
run: python -c "import json; import sys; sys.exit(1 if json.load(open('${{ inputs.report }}')) else 0)"