Skip to content
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

IP-242 - Add .snyk file. #5

Merged
merged 4 commits into from
Jun 20, 2024
Merged

IP-242 - Add .snyk file. #5

merged 4 commits into from
Jun 20, 2024

Conversation

owenlittlejohns
Copy link
Member

Description

This PR builds on some work that @flamingbear has done in other repositories to add a .snyk file that will ensure Snyk uses the correct version of Python when building an environment to scan the Harmony Regridding Service dependency tree. This will avoid false positives in our Snyk scans.

This change does not impact the service and only relates to our CI/CD (so it doesn't need a release or updated notes in the change log).

(Side note - we should separately bump the version of Python used from 3.9 to something more like 3.11, but that can be separate to this PR)

Jira Issue ID

N/A

Local Test Steps

  • Check the version of Python listed in docker/service.Dockerfile matches the one in .snyk.
  • After merging, check the version of Python Snyk uses is correct.

PR Acceptance Checklist

  • Jira ticket acceptance criteria met.
  • CHANGELOG.md updated to include high level summary of PR changes.
  • docker/service_version.txt updated if publishing a release.
  • Tests added/updated and passing.
  • Documentation updated (if needed).

.snyk Outdated
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.25.0
language-settings:
python: "3.9"
Copy link
Member Author

Choose a reason for hiding this comment

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

Old, but matching the service for now. I'll add bumping the Python version for the service to my to-do list.

Copy link
Member

Choose a reason for hiding this comment

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

was coming to ask why not bump the service version too. but this is fine

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll try and take a look at bumping the service in the next day or so. Now that I'm reading this thread back, I'm feeling like I was being lazy.

Copy link
Member Author

Choose a reason for hiding this comment

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

Alrighty, @flamingbear - it's all bumped to Python 3.11. Probably needs some more testing, likely running the regression test notebook against Harmony in a Box.

Copy link
Member

@flamingbear flamingbear left a comment

Choose a reason for hiding this comment

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

It'll be nice to bump the service version too, but this works.

@flamingbear
Copy link
Member

So I would say this is good, but I would also change the python version in this comment and in this one.

Otherwise it all looks good to me.

@owenlittlejohns
Copy link
Member Author

@flamingbear - nice catch on the documentation notebook. I've tweaked that now. I bumped the dependencies. It looks like it all runs nicely now, but I had to specify another dependency version (which was otherwise installed) to squash a bunch of deprecation warnings.

@owenlittlejohns owenlittlejohns merged commit b7cfd09 into main Jun 20, 2024
4 checks passed
@owenlittlejohns owenlittlejohns deleted the add-snyk-file branch June 20, 2024 21:14
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