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

Upgrade Jinja2 dependency version specification to address CVE-2024-22195 #9638

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

QMalcolm
Copy link
Contributor

@QMalcolm QMalcolm commented Feb 22, 2024

resolves CVE-2024-22195

Problem

CVE-2024-22195 identified an issue in Jinja2 versions <= 3.1.2.

Solution

We've gone changed our dependency requirement specification to be 3.1.3 or greater (but less than 4).

Note: Preivously we were using the ~= version specifier. However due to some issues with the ~= we've moved to using >= in combination with <. This gives us the same range that ~= gave us, but avoids a pip resolution issue when multiple packages in an environment use ~= for the same dependency.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX
  • This PR includes type annotations for new and modified functions

@QMalcolm QMalcolm requested a review from a team as a code owner February 22, 2024 23:48
@QMalcolm QMalcolm requested a review from MichelleArk February 22, 2024 23:48
@cla-bot cla-bot bot added the cla:yes label Feb 22, 2024
Copy link

codecov bot commented Feb 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.00%. Comparing base (869ba18) to head (07635ec).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9638   +/-   ##
=======================================
  Coverage   88.00%   88.00%           
=======================================
  Files         176      176           
  Lines       22311    22311           
=======================================
  Hits        19634    19634           
  Misses       2677     2677           
Flag Coverage Δ
integration 85.59% <ø> (ø)
unit 62.09% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

…2195

CVE-2024-22195 identified an issue in Jinja2 versions <= 3.1.2. As such
we've gone and changed are dependency requirement specification to be
3.1.3 or greater (but less than 4).

Note: Preivously we were using the `~=` version specifier. However due
to some issues with the `~=` we've moved to using `>=` in combination
with `<`. This gives us the same range that `~=` gave us, but avoids
a pip resolution issue when multipe packages in an environment use `~=`
for the same dependency.
@QMalcolm QMalcolm force-pushed the qmalcolm--CVE-2024-22195-exclude-jinja-3.1.2 branch from 3348c5a to 07635ec Compare February 23, 2024 16:55
@QMalcolm QMalcolm merged commit 7ea4670 into main Feb 23, 2024
52 checks passed
@QMalcolm QMalcolm deleted the qmalcolm--CVE-2024-22195-exclude-jinja-3.1.2 branch February 23, 2024 17:13
github-actions bot pushed a commit that referenced this pull request Feb 23, 2024
…2195 (#9638)

CVE-2024-22195 identified an issue in Jinja2 versions <= 3.1.2. As such
we've gone and changed our dependency requirement specification to be
3.1.3 or greater (but less than 4).

Note: Preivously we were using the `~=` version specifier. However due
to some issues with the `~=` we've moved to using `>=` in combination
with `<`. This gives us the same range that `~=` gave us, but avoids
a pip resolution issue when multiple packages in an environment use `~=`
for the same dependency.

(cherry picked from commit 7ea4670)
Copy link
Contributor

The backport to 1.6.latest failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.6.latest 1.6.latest
# Navigate to the new working tree
cd .worktrees/backport-1.6.latest
# Create a new branch
git switch --create backport-9638-to-1.6.latest
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 7ea46708327260c85460d8034ef6ab84fe3d1b78
# Push it to GitHub
git push --set-upstream origin backport-9638-to-1.6.latest
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.6.latest

Then, create a pull request where the base branch is 1.6.latest and the compare/head branch is backport-9638-to-1.6.latest.

Copy link
Contributor

The backport to 1.5.latest failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.5.latest 1.5.latest
# Navigate to the new working tree
cd .worktrees/backport-1.5.latest
# Create a new branch
git switch --create backport-9638-to-1.5.latest
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 7ea46708327260c85460d8034ef6ab84fe3d1b78
# Push it to GitHub
git push --set-upstream origin backport-9638-to-1.5.latest
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.5.latest

Then, create a pull request where the base branch is 1.5.latest and the compare/head branch is backport-9638-to-1.5.latest.

QMalcolm added a commit that referenced this pull request Feb 26, 2024
…2195 (#9638)

CVE-2024-22195 identified an issue in Jinja2 versions <= 3.1.2. As such
we've gone and changed our dependency requirement specification to be
3.1.3 or greater (but less than 4).

Note: Preivously we were using the `~=` version specifier. However due
to some issues with the `~=` we've moved to using `>=` in combination
with `<`. This gives us the same range that `~=` gave us, but avoids
a pip resolution issue when multiple packages in an environment use `~=`
for the same dependency.
QMalcolm added a commit that referenced this pull request Feb 26, 2024
…2195 (#9638)

CVE-2024-22195 identified an issue in Jinja2 versions <= 3.1.2. As such
we've gone and changed our dependency requirement specification to be
3.1.3 or greater (but less than 4).

Note: Preivously we were using the `~=` version specifier. However due
to some issues with the `~=` we've moved to using `>=` in combination
with `<`. This gives us the same range that `~=` gave us, but avoids
a pip resolution issue when multiple packages in an environment use `~=`
for the same dependency.
QMalcolm added a commit that referenced this pull request Feb 26, 2024
…2195 (#9638) (#9668)

CVE-2024-22195 identified an issue in Jinja2 versions <= 3.1.2. As such
we've gone and changed our dependency requirement specification to be
3.1.3 or greater (but less than 4).

Note: Preivously we were using the `~=` version specifier. However due
to some issues with the `~=` we've moved to using `>=` in combination
with `<`. This gives us the same range that `~=` gave us, but avoids
a pip resolution issue when multiple packages in an environment use `~=`
for the same dependency.
QMalcolm added a commit that referenced this pull request Feb 26, 2024
…2195 (#9638) (#9655)

CVE-2024-22195 identified an issue in Jinja2 versions <= 3.1.2. As such
we've gone and changed our dependency requirement specification to be
3.1.3 or greater (but less than 4).

Note: Preivously we were using the `~=` version specifier. However due
to some issues with the `~=` we've moved to using `>=` in combination
with `<`. This gives us the same range that `~=` gave us, but avoids
a pip resolution issue when multiple packages in an environment use `~=`
for the same dependency.

(cherry picked from commit 7ea4670)

Co-authored-by: Quigley Malcolm <[email protected]>
QMalcolm added a commit that referenced this pull request Feb 26, 2024
… to address CVE-2024-22195 (#9670)

* Upgrade Jinja2 dependency version specification to address CVE-2024-22195 (#9638)

CVE-2024-22195 identified an issue in Jinja2 versions <= 3.1.2. As such
we've gone and changed our dependency requirement specification to be
3.1.3 or greater (but less than 4).

Note: Preivously we were using the `~=` version specifier. However due
to some issues with the `~=` we've moved to using `>=` in combination
with `<`. This gives us the same range that `~=` gave us, but avoids
a pip resolution issue when multiple packages in an environment use `~=`
for the same dependency.
@aranke aranke mentioned this pull request Jul 12, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants