Skip to content

Conversation

@dafneb
Copy link
Owner

@dafneb dafneb commented May 1, 2025

This pull request introduces updates to Snyk scanning workflows, including a new container scanning workflow and a minor adjustment to the Python code scanning workflow. These changes enhance the security scanning capabilities by adding container image analysis and refining existing configurations.

New Snyk Container Scanning Workflow:

  • Added a new workflow, snyk-container-scan.yml, to perform container image vulnerability scanning. It includes steps for validating the working directory, Dockerfile, and image name, building the Docker image, running Snyk scans, and uploading results to GitHub Code Scanning.

Update to Snyk Python Code Scanning Workflow:

  • Changed the category field in the Python code scanning workflow from "snyk" to "snyk-python" to provide more specific categorization for SARIF uploads.

@dafneb dafneb self-assigned this May 1, 2025
Copilot AI review requested due to automatic review settings May 1, 2025 19:09
# Snyk can be used to break the build when it detects vulnerabilities.
# In this case we want to upload the issues to GitHub Code Scanning
continue-on-error: true
uses: snyk/actions/docker@master

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Snyk Container Scan' step
Uses Step
uses 'snyk/actions/docker' with ref 'master', not a pinned commit hash
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces updates to the Snyk scanning workflows by adding a new container scanning workflow and refining the Python code scanning workflow’s SARIF tagging.

  • Added a container scanning workflow that validates inputs, checks for a Dockerfile, builds the Docker image, runs a Snyk scan, and uploads results.
  • Updated the Python code scanning workflow to use a more specific SARIF category ("snyk-python") for improved categorization.

Reviewed Changes

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

File Description
.github/workflows/snyk-container-scan.yml New workflow for container scanning with steps for directory and Dockerfile checks, image building, vulnerability scanning, and result uploading.
.github/workflows/snyk-code-scan-python.yml Updated the SARIF upload category from "snyk" to "snyk-python".

@dafneb dafneb merged commit 4b0e1e7 into main May 1, 2025
3 checks passed
@dafneb dafneb deleted the feature/snyk-container-scan branch May 1, 2025 19:11
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