Skip to content

Commit 352ed48

Browse files
committed
feat: add support for --only filters
1 parent 149739c commit 352ed48

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

action.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ inputs:
3535
reviewdog-version:
3636
description: 'Version of reviewdog to install'
3737
default: 'latest'
38+
only:
39+
description: 'Only scan these crates (comma-separated). Maps to --only flag.'
40+
default: ''
41+
skip:
42+
description: 'Skip these crates (comma-separated). Maps to --skip flag.'
43+
default: ''
3844
install-from:
3945
description: 'Install method: "crates-io" (cargo install) or "git" (from repository)'
4046
default: 'crates-io'
@@ -93,6 +99,14 @@ runs:
9399
SARIF_FILE="${RUNNER_TEMP:-/tmp}/capsec-results.sarif"
94100
AUDIT_ARGS="--format sarif --fail-on ${{ inputs.fail-on }}"
95101
102+
# Crate filtering
103+
if [ -n "${{ inputs.only }}" ]; then
104+
AUDIT_ARGS="$AUDIT_ARGS --only ${{ inputs.only }}"
105+
fi
106+
if [ -n "${{ inputs.skip }}" ]; then
107+
AUDIT_ARGS="$AUDIT_ARGS --skip ${{ inputs.skip }}"
108+
fi
109+
96110
# Determine if we should diff against baseline
97111
USE_DIFF="false"
98112
if [ "${{ inputs.diff }}" = "true" ]; then

0 commit comments

Comments
 (0)