Skip to content

Commit

Permalink
feat: add skip_cve option to img_build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Nov 12, 2024
1 parent b617875 commit b6f7fbf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/image_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ on:
required: false
type: boolean
default: true
skip_cve:
description: "Skip specific CVE from checkcov (override rules)."
required: false
type: string
# Skip mandatory user creation, allow ROOT usage
default: "CKV_DOCKER_8,CKV_DOCKER_2,CKV_DOCKER_3,CKV_DOCKER_5"
outputs:
image_name:
description: "The final full image reference."
Expand Down Expand Up @@ -120,8 +126,7 @@ jobs:
file: ${{ inputs.context }}/${{ inputs.dockerfile }} # only run on file
dockerfile_path: ${{ inputs.context }}/${{ inputs.dockerfile }}
quiet: true # show only failed checks
skip_check: CKV_DOCKER_8,CKV_DOCKER_2,CKV_DOCKER_3,CKV_DOCKER_5
# Skip mandatory user creation, allow ROOT usage
skip_check: ${{ inputs.skip_cve }}

- name: Log in to the Container registry
uses: docker/login-action@v3
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/image_build_multi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ on:
required: false
type: boolean
default: true
skip_cve:
description: "Skip specific CVE from checkcov (override rules)."
required: false
type: string
# Skip mandatory user creation, allow ROOT usage
default: "CKV_DOCKER_8,CKV_DOCKER_2,CKV_DOCKER_3,CKV_DOCKER_5"
outputs:
image_name:
description: "The final full image reference."
Expand All @@ -78,8 +84,7 @@ jobs:
file: ${{ inputs.context }}/${{ inputs.dockerfile }} # only run on file
dockerfile_path: ${{ inputs.context }}/${{ inputs.dockerfile }}
quiet: true # show only failed checks
skip_check: CKV_DOCKER_8,CKV_DOCKER_2,CKV_DOCKER_3,CKV_DOCKER_5
# Skip mandatory user creation, allow ROOT usage
skip_check: ${{ inputs.skip_cve }}

build-images:
runs-on: ubuntu-latest
Expand Down

0 comments on commit b6f7fbf

Please sign in to comment.