Skip to content

feat: OPS-11677 Allow to skip files on trivy scan - #60

Merged
mcpovel merged 6 commits into
mainfrom
OPS-11677_CronToolsAuto
Aug 13, 2026
Merged

feat: OPS-11677 Allow to skip files on trivy scan#60
mcpovel merged 6 commits into
mainfrom
OPS-11677_CronToolsAuto

Conversation

@mcpovel

@mcpovel mcpovel commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

As trivy scan will still complain on latest kubectl we will enable skipping files in scan to overcome these failing scans for specific stuff.

@mcpovel
mcpovel requested review from NilsB98 and mjuergens-cg and a lite review from Copilot August 13, 2026 09:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds workflow-call inputs to allow excluding specific directories/files from Trivy traversal (to work around known findings on bundled tools like kubectl) and wires those inputs through to the Trivy GitHub Action invocation.

Changes:

  • Add skip_dirs / skip_files inputs to reusable workflows and pass them to Trivy (skip-dirs / skip-files).
  • Update aquasecurity/trivy-action to a newer pinned revision.
  • Update the caller workflow wiring to forward the new inputs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/image-publish-trivy.yaml Exposes skip inputs and forwards them into the Trivy reusable workflow call.
.github/workflows/check-trivy.yaml Adds skip inputs, passes them to Trivy action, and updates pinned action revisions (but currently breaks SARIF upload step).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/check-trivy.yaml
Comment thread .github/workflows/image-publish-trivy.yaml Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (4)

.github/workflows/image-publish-trivy.yaml:244

  • The reusable workflow reference is pointing to a feature branch/ref (OPS-11677_CronToolsAuto) and includes a note to ignore it. This makes the workflow non-reproducible and will break once the branch is deleted. Please pin to the intended stable tag/ref before merging.
    uses: dBildungsplattform/dbp-github-workflows/.github/workflows/check-trivy.yaml@OPS-11677_CronToolsAuto # To be changed to @8 --- IGNORE ---

.github/workflows/image-publish-trivy.yaml:106

  • Trailing whitespace in this default value is easy to miss and can cause noisy diffs or lint failures. Remove the extra spaces after the quoted empty string.
        description: 'comma separated list of directories where traversal is skipped'
        required: false
        default: ''        
        type: string

.github/workflows/image-publish-trivy.yaml:253

  • This line has trailing whitespace at the end, which can create noisy diffs and may violate YAML/style checks. Remove the extra spaces after the expression.
      skip_dirs: ${{ inputs.skip_dirs }}
      skip_files: ${{ inputs.skip_files }}      

.github/workflows/check-trivy.yaml:48

  • Trailing whitespace in this default value is easy to miss and can cause noisy diffs or lint failures. Remove the extra spaces after the quoted empty string.
        description: 'comma separated list of directories where traversal is skipped'
        required: false
        default: ''        
        type: string

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (5)

.github/workflows/image-publish-trivy.yaml:109

  • Hyphenate “comma-separated” in the input description for consistency and correct grammar.
        description: 'comma separated list of files to be skipped'

.github/workflows/check-trivy.yaml:51

  • Hyphenate “comma-separated” in the input description for consistency and correct grammar.
        description: 'comma separated list of files to be skipped'

.github/workflows/image-publish-trivy.yaml:244

  • The reusable workflow is referenced via a feature branch ref. Branch refs can be deleted or rewritten, which makes this workflow non-reproducible and can break callers after merge. Prefer referencing the local workflow path (same revision) or a stable tag/commit SHA.
    uses: dBildungsplattform/dbp-github-workflows/.github/workflows/check-trivy.yaml@OPS-11677_CronToolsAuto # To be changed to @8 --- IGNORE ---

.github/workflows/image-publish-trivy.yaml:104

  • Hyphenate “comma-separated” in the input description for consistency and correct grammar.

This issue also appears on line 109 of the same file.

        description: 'comma separated list of directories where traversal is skipped'

.github/workflows/check-trivy.yaml:46

  • Hyphenate “comma-separated” in the input description for consistency and correct grammar.

This issue also appears on line 51 of the same file.

        description: 'comma separated list of directories where traversal is skipped'

@mcpovel
mcpovel merged commit 2cb5e8c into main Aug 13, 2026
1 check passed
@mcpovel
mcpovel deleted the OPS-11677_CronToolsAuto branch August 13, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants