@@ -93,26 +93,40 @@ runs:
93
93
- id : run
94
94
shell : bash
95
95
env :
96
+ BEARER_SCANNER : ${{ inputs.scanner }}
97
+ BEARER_CONFIG_FILE : ${{ inputs.config-file }}
98
+ BEARER_IGNORE_FILE : ${{ inputs.bearer-ignore-file }}
99
+ BEARER_ONLY_RULE : ${{ inputs.only-rule }}
100
+ BEARER_SKIP_RULE : ${{ inputs.skip-rule }}
101
+ BEARER_SKIP_PATH : ${{ inputs.skip-path }}
102
+ BEARER_EXCLUDE_FINGERPRINT : ${{ inputs.exclude-fingerprint }}
103
+ BEARER_FORMAT : ${{ inputs.format }}
104
+ BEARER_OUTPUT : ${{ inputs.output }}
105
+ BEARER_EXIT_CODE : ${{ inputs.exit-code }}
106
+ BEARER_SEVERITY : ${{ inputs.severity }}
107
+ BEARER_API_KEY : ${{ inputs.api-key }}
108
+ BEARER_QUIET : ${{ inputs.quiet }}
109
+ BEARER_HIDE_PROGRESS_BAR : ${{ inputs.hide-progress-bar }}
96
110
SHA : ${{ github.event.pull_request.head.sha || github.sha }}
97
111
PR_NUMBER : ${{ github.event.pull_request.number }}
98
112
CURRENT_BRANCH : ${{ github.head_ref }}
99
113
DIFF_BASE_BRANCH : ${{ fromJSON(inputs.diff) && github.base_ref || '' }}
100
114
DEFAULT_BRANCH : ${{ github.event.repository.default_branch }}
101
115
GITHUB_TOKEN : ${{ github.token }}
102
116
run : |
103
- $GITHUB_ACTION_PATH/entrypoint.sh \
104
- "--scanner= ${{ inputs.scanner }}" \
105
- "--config-file=${{ inputs.config-file }}" \
106
- "--bearer-ignore-file=${{ inputs.bearer-ignore-file }}" \
107
- "--only-rule=${{ inputs.only-rule }}" \
108
- "--skip-rule=${{ inputs.skip-rule }}" \
109
- "--skip-path=${{ inputs.skip-path }}" \
110
- "--exclude-fingerprint=${{ inputs.exclude-fingerprint }}" \
111
- "--format=${{ inputs.format }}" \
112
- "--output=${{ inputs.output }}" \
113
- "--exit-code=${{ inputs.exit-code }}" \
114
- "--severity=${{ inputs.severity }}" \
115
- "--api-key=${{ inputs.api-key }}" \
116
- "--quiet=${{ inputs.quiet }}" \
117
- "--hide-progress-bar=${{ inputs.hide-progress-bar }}" \
118
- "--path=${{ inputs.path }}"
117
+ set +e
118
+ RULE_BREACHES=`$RUNNER_TEMP/bearer scan " ${{ inputs.path }}"`
119
+ SCAN_EXIT_CODE=$?
120
+ set -e
121
+
122
+ echo "::debug::$RULE_BREACHES"
123
+
124
+ EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
125
+
126
+ echo "rule_breaches<<$EOF" >> $GITHUB_OUTPUT
127
+ echo "$RULE_BREACHES" >> $GITHUB_OUTPUT
128
+ echo "$EOF" >> $GITHUB_OUTPUT
129
+
130
+ echo "exit_code=$SCAN_EXIT_CODE" >> $GITHUB_OUTPUT
131
+
132
+ exit $SCAN_EXIT_CODE
0 commit comments