Add ignore glob option
This commit is contained in:
Родитель
fa83d20ed2
Коммит
8fe366dd3c
|
@ -1,5 +1,5 @@
|
|||
name: 'DevSkim'
|
||||
description: 'Run DevSkim Code Analysis'
|
||||
description: 'Run DevSkim Code Analysis and output Sarif compatible with GitHub Code Scanning alerts'
|
||||
inputs:
|
||||
directory-to-scan:
|
||||
description: 'The sub directory of the repository root to scan. Repository root used by default.'
|
||||
|
@ -17,6 +17,10 @@ inputs:
|
|||
description: 'The sub directory for the output under GITHUB_WORKSPACE.'
|
||||
required: false
|
||||
default: 'GITHUB_WORKSPACE'
|
||||
ignore-globs:
|
||||
description: 'Optional comma separated list of file globs to ignore when scanning.'
|
||||
required: false
|
||||
default: "**/.git/**,**/bin/**"
|
||||
branding:
|
||||
icon: 'check-square'
|
||||
color: 'green'
|
||||
|
@ -28,3 +32,4 @@ runs:
|
|||
- ${{ inputs.should-scan-archives }}
|
||||
- ${{ inputs.output-filename }}
|
||||
- ${{ inputs.output-directory }}
|
||||
- ${{ inputs.ignore-globs }}
|
|
@ -4,6 +4,7 @@
|
|||
# $2 is if we should crawl archives
|
||||
# $3 is the output filename
|
||||
# $4 is the output directory
|
||||
# $5 is the file globs to ignore
|
||||
|
||||
if [ "$1" = "GITHUB_WORKSPACE" ]; then
|
||||
ScanTarget=$GITHUB_WORKSPACE
|
||||
|
@ -21,4 +22,4 @@ if [ "$2" = "true" ]; then
|
|||
Opts = "-c"
|
||||
fi
|
||||
|
||||
/tools/devskim analyze "$ScanTarget" "$OutputDirectory/$3" -f sarif $Opts
|
||||
/tools/devskim analyze "$ScanTarget" "$OutputDirectory/$3" -f sarif $Opts -g $5
|
Загрузка…
Ссылка в новой задаче