Skip to content

Add actions for snyk scanning of Maven repos and container images#38

Merged
Frawless merged 26 commits into
strimzi:mainfrom
Frawless:add-snyk-actions
Jun 12, 2026
Merged

Add actions for snyk scanning of Maven repos and container images#38
Frawless merged 26 commits into
strimzi:mainfrom
Frawless:add-snyk-actions

Conversation

@Frawless

@Frawless Frawless commented Jun 8, 2026

Copy link
Copy Markdown
Member

Type of change

  • Enhancement / new feature

Description

Adds snyk scanning workflows for containers and maven. Each project within Strimzi org should create it's own workflow where the actions will be used. The workflow should be run for push events into main and release branches. SNYK_TOKEN secret has to be added to all repos as part of the implementing the scanning workflow.

The actions can send snapshots to Snyk App so we will be able to check scan results in Snyk UI and we will also be able to have periodical scans against snapshot. The actions also can send results from scans into GitHub Code Scanning page.

The PR contains testing workflow where the actions are used, but due to security constraints it can be run also against push events into main or release branches. I decided to pick operators and drain-cleaner for testing scans against single and multiple images per repo and drain-cleaner for maven scanning example.

Usage:

      # Checkout drain-cleaner repo
      ...
      - name: Run Snyk Maven scan
        uses: strimzi/github-actions/.github/actions/security/snyk-maven-scan@sha12345 #v2
        with:
          snykMonitor: "true"
          uploadToCodeScanning: "true"
          projectPrefix: drain-cleaner
        env:
          SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
      # Prepare image son the runner
      ...
      - name: Run Snyk container scan
        uses: strimzi/github-actions/.github/actions/security/snyk-container-scan@sha12345 #v2
        with:
          imageFile: drain-cleaner-container-amd64.tar.gz
          image: drain-cleaner-amd64
          snykMonitor: "true"
          uploadToCodeScanning: "true"
          projectPrefix: drain-cleaner
        env:
          SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

Plan is to merge this PR, create workflows in operators repo (reference main of github-actions for scan workflow) and see if everything is fine and then release 2.0 and use it within operators repo.

Checklist

  • Write tests
  • Make sure all tests pass
  • AI assistance was used to create this PR (see the Strimzi AI policy)

@Frawless Frawless added this to the 2.0 milestone Jun 8, 2026
@Frawless Frawless self-assigned this Jun 8, 2026
@Frawless Frawless marked this pull request as ready for review June 9, 2026 07:29
@Frawless Frawless requested a review from scholzj June 9, 2026 07:29
@scholzj scholzj requested a review from a team June 9, 2026 07:33
Comment thread .github/actions/security/snyk-container-scan/action.yml Outdated
Comment thread .github/actions/security/snyk-maven-scan/action.yml Outdated
@Frawless Frawless requested a review from a team June 9, 2026 20:35
Frawless added 22 commits June 12, 2026 18:39
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Frawless added 4 commits June 12, 2026 18:39
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>

# Conflicts:
#	.github/workflows/test-integrations.yml
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
@Frawless Frawless merged commit 18137f3 into strimzi:main Jun 12, 2026
105 checks passed
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.

2 participants