@@ -4,6 +4,10 @@ branding:
4
4
icon : " check-square"
5
5
color : " purple"
6
6
inputs :
7
+ version :
8
+ description : " Specify the Bearer version to use. This must match a Bearer release name."
9
+ required : false
10
+ default : " "
7
11
scanner :
8
12
description : " Specify the comma separated scanners e.g. --scanner secrets,sast"
9
13
required : false
@@ -31,15 +35,28 @@ inputs:
31
35
outputs :
32
36
rule_breaches :
33
37
description : " Details of any rule breaches that occur"
38
+ value : ${{ steps.run.outputs.rule_breaches }}
34
39
exit_code :
35
40
description : " exit code from binary"
41
+ value : ${{ steps.run.outputs.exit_code }}
36
42
runs :
37
- using : " docker"
38
- image : " Dockerfile"
39
- args :
40
- - " --scanner=${{ inputs.scanner }}"
41
- - " --config-file=${{ inputs.config-file }}"
42
- - " --only-rule=${{ inputs.only-rule }}"
43
- - " --skip-rule=${{ inputs.skip-rule }}"
44
- - " --skip-path=${{ inputs.skip-path }}"
45
- - " --severity=${{ inputs.severity }}"
43
+ using : " composite"
44
+ steps :
45
+ - shell : bash
46
+ run : |
47
+ VERSION="${{ inputs.version }}"
48
+ if [[ ! -z "$VERSION" ]]; then
49
+ VERSION="v${VERSION#v}"
50
+ fi
51
+
52
+ curl -sfL https://raw.githubusercontent.com/Bearer/bearer/main/contrib/install.sh | sh -s -- -b "$RUNNER_TEMP" "$VERSION"
53
+ - id : run
54
+ shell : bash
55
+ run : |
56
+ $GITHUB_ACTION_PATH/entrypoint.sh \
57
+ "--scanner=${{ inputs.scanner }}" \
58
+ "--config-file=${{ inputs.config-file }}" \
59
+ "--only-rule=${{ inputs.only-rule }}" \
60
+ "--skip-rule=${{ inputs.skip-rule }}" \
61
+ "--skip-path=${{ inputs.skip-path }}" \
62
+ "--severity=${{ inputs.severity }}"
0 commit comments