Skip to content

Add Snyk Security workflow to monitor multiple tags #750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

ChristianZaccaria
Copy link
Collaborator

@ChristianZaccaria ChristianZaccaria commented Oct 31, 2024

Issue link

Jira: https://issues.redhat.com/browse/RHOAIENG-14391

What changes have been made

  1. As part of setting this up, I performed a once-off task to import and monitor the codeflare-sdk tags that we continue to support in RHOAI. Snyk is now monitoring them here: [Snyk Dashboard]. For reference, the workflow used to generate this initial import/monitoring was ran here: [initial workflow run].
**RHOAI 2.8**
2023.2 py3.9 (Recommended) = vv0.14.1 # This is not a typo

**RHOAI 2.10**
2024.1 py3.9 (Recommended) = v0.16.4

**RHOAI 2.11**
2024.1 py3.9 (Recommended) = v0.16.4

**RHOAI 2.13**
2024.1 py3.9 (Recommended) = v0.19.1

**RHOAI 2.14**
2024.2 py3.11 (Recommended) = v0.21.1
2024.1 py3.9 = v0.21.1

**RHOAI 2.15**
2024.2 py3.11 (Recommended) = v0.22.0
2024.1 py3.9 = v0.22.0

The above list was created based off the list of RHOAI supported versions compared to the tags in the ImageStream annotations in the notebooks repository.

I've added the Snyk secrets for authentication.

1- Created "Snyk Security" workflow that will trigger on push events to main branch.

This workflow will authenticate with Snyk from our org. Then, it will monitor the codeflare-sdk dependencies from main branch.

  1. The release workflow will take a snapshot of the new release tag and upload the snapshot to Snyk UI for monitoring. This is to monitor all new/recent releases.

Verification steps

Workflow run in my fork: https://github.com/ChristianZaccaria/codeflare-sdk/actions/runs/11610603721/job/32330214880

Example result:
Snyk - CodeFlare-SDK
image

Maintainability

In terms of new release tags the release workflow will add all subsequent new release tags to Snyk UI, this way monitoring all newest tags.

In terms of older tags, RHOAI releases and their support period are listed [here]. Sometimes, the support can be extended for some of the versions. It's best to manually remove unsupported tags from time to time. There's no harm in monitoring multiple tags.

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • Testing is not required for this change

@ChristianZaccaria ChristianZaccaria requested review from varshaprasad96 and removed request for Maxusmusti October 31, 2024 15:54
Copy link

codecov bot commented Oct 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.00%. Comparing base (eb5ce8d) to head (6c486b7).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #750   +/-   ##
=======================================
  Coverage   93.00%   93.00%           
=======================================
  Files          36       36           
  Lines        2403     2403           
=======================================
  Hits         2235     2235           
  Misses        168      168           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@KPostOffice
Copy link
Collaborator

Looks good, just a couple of comments 👍🏻

Copy link
Contributor

@varshaprasad96 varshaprasad96 left a comment

Choose a reason for hiding this comment

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

/lgtm
The PR looks good, just a couple of questions!

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 5, 2024
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 6, 2024
@ChristianZaccaria ChristianZaccaria changed the title Add Snyk Security workflow to scan multiple tags Add Snyk Security workflow to monitor multiple tags Nov 6, 2024
@ChristianZaccaria
Copy link
Collaborator Author

Enhancements based off this comment have been added:
#750 (comment)

Copy link
Collaborator

@KPostOffice KPostOffice left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 11, 2024
Copy link
Contributor

openshift-ci bot commented Nov 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: KPostOffice, Ygnas

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 9af07a0 into project-codeflare:main Nov 11, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants