Skip to content

Commit 48c4684

Browse files
authored
fix: added var file option for checkov (#50)
1 parent 770439a commit 48c4684

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/checkov.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
required: true
1212
type: string
1313
default: 'true'
14+
var_file:
15+
required: false
16+
type: string
17+
1418
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1519
jobs:
1620
# This workflow contains a single job called "scan"
@@ -37,6 +41,7 @@ jobs:
3741
output_file_path: console,results.sarif
3842
soft_fail: true
3943
directory: ${{ inputs.directory}}
44+
var_file: ${{ inputs.var_file}}
4045

4146
- name: Checkov GitHub Action
4247
if: ${{ inputs.continue_on_error == 'false' }}
@@ -46,6 +51,7 @@ jobs:
4651
output_format: cli,sarif
4752
output_file_path: console,results.sarif
4853
directory: ${{ inputs.directory}}
54+
var_file: ${{ inputs.var_file}}
4955

5056

5157
- name: Upload SARIF file
@@ -57,4 +63,4 @@ jobs:
5763
# Or 'soft_fail: true' to checkov.
5864
if: success() || failure()
5965
with:
60-
sarif_file: results.sarif
66+
sarif_file: results.sarif

docs/checkov.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ jobs:
3131
uses: clouddrove/github-shared-workflows/.github/workflows/checkov.yml@master # shared workflow
3232
with:
3333
directory: # specify your working folder from repo
34-
continue_on_error: true #action will continue on error
35-
```
34+
continue_on_error: true #action will continue on error
35+
var_file: # define var file path (optional)
36+
```

0 commit comments

Comments
 (0)