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

update dependencies to fix various high/critical security vulnerabilies #1083

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

pc-bob
Copy link
Contributor

@pc-bob pc-bob commented Jul 31, 2024

User description

This vulnerability scan results below is from the scan of the 0.24-github_app docker image but I believe would apply to most versions of the image.

Security Violations
┌──────────┬──────────────────────────────────────────────────────────────────────────────┬─────────┬────────────┬──────────┬──────────┬────────┬────────────────┬──────┬──────┬─────────────┐
│ SEVERITY │ DIRECT                                                                       │ DIRECT  │ IMPACTED   │ IMPACTED │ FIXED    │ TYPE   │ CVE            │ CVSS │ CVSS │ ISSUE ID    │
│          │ PACKAGE                                                                      │ PACKAGE │ PACKAGE    │ PACKAGE  │ VERSIONS │        │                │ V2   │ V3   │             │
│          │                                                                              │ VERSION │ NAME       │ VERSION  │          │        │                │      │      │             │
├──────────┼──────────────────────────────────────────────────────────────────────────────┼─────────┼────────────┼──────────┼──────────┼────────┼────────────────┼──────┼──────┼─────────────┤
│ 🔥High   │ sha256__e6f0569d0d53924e95d6c952eda94f9f7de0a22a954b2e758ef0e3d665999427.tar │         │ aiohttp    │ 3.9.1    │ [3.9.2]  │ Python │ CVE-2024-23334 │      │ 7.5  │ XRAY-589577 │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
├──────────┼──────────────────────────────────────────────────────────────────────────────┼─────────┼────────────┼──────────┼──────────┼────────┼────────────────┼──────┼──────┼─────────────┤
│ 🔥High   │ sha256__b234c65d8980a86624c28589f17b80f447e1559fffec9b40e0e4fb49a0c5502d.tar │         │ setuptools │ 65.5.1   │ [70.0.0] │ Python │ CVE-2024-6345  │      │ 8.8  │ XRAY-611082 │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
├──────────┼──────────────────────────────────────────────────────────────────────────────┼─────────┼────────────┼──────────┼──────────┼────────┼────────────────┼──────┼──────┼─────────────┤
│ 🔥High   │ sha256__b4d3e178cf4e0a6345bc893b8bb28c9b0fa56180f4bd0e13079a54e79ee48d6d.tar │         │ setuptools │ 65.5.0   │ [70.0.0] │ Python │ CVE-2024-6345  │      │ 8.8  │ XRAY-611082 │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
├──────────┼──────────────────────────────────────────────────────────────────────────────┼─────────┼────────────┼──────────┼──────────┼────────┼────────────────┼──────┼──────┼─────────────┤
│ 🔥High   │ sha256__e6f0569d0d53924e95d6c952eda94f9f7de0a22a954b2e758ef0e3d665999427.tar │         │ GitPython  │ 3.1.32   │ [3.1.33] │ Python │ CVE-2023-40590 │      │ 7.8  │ XRAY-529237 │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
├──────────┼──────────────────────────────────────────────────────────────────────────────┼─────────┼────────────┼──────────┼──────────┼────────┼────────────────┼──────┼──────┼─────────────┤
│ 🔥High   │ sha256__e6f0569d0d53924e95d6c952eda94f9f7de0a22a954b2e758ef0e3d665999427.tar │         │ GitPython  │ 3.1.32   │ [3.1.41] │ Python │ CVE-2024-22190 │      │ 7.8  │ XRAY-588270 │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
├──────────┼──────────────────────────────────────────────────────────────────────────────┼─────────┼────────────┼──────────┼──────────┼────────┼────────────────┼──────┼──────┼─────────────┤
│ 🔥High   │ sha256__e6f0569d0d53924e95d6c952eda94f9f7de0a22a954b2e758ef0e3d665999427.tar │         │ gunicorn   │ 20.1.0   │ [22.0.0] │ Python │ CVE-2024-1135  │      │ 8.2  │ XRAY-598275 │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
├──────────┼──────────────────────────────────────────────────────────────────────────────┼─────────┼────────────┼──────────┼──────────┼────────┼────────────────┼──────┼──────┼─────────────┤
│ 🔥High   │ sha256__e6f0569d0d53924e95d6c952eda94f9f7de0a22a954b2e758ef0e3d665999427.tar │         │ aiohttp    │ 3.9.1    │ [3.9.4]  │ Python │ CVE-2024-30251 │      │ 7.5  │ XRAY-600100 │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
│          │                                                                              │         │            │          │          │        │                │      │      │             │
└──────────┴──────────────────────────────────────────────────────────────────────────────┴─────────┴────────────┴──────────┴──────────┴────────┴────────────────┴──────┴──────┴─────────────┘

PR Type

Bug fix, Dependencies


Description

  • Updated setuptools version requirement in pyproject.toml from >=61.0 to >=70.0.
  • Updated aiohttp version from 3.9.1 to 3.9.2 to fix a high-severity security vulnerability (CVE-2024-23334).
  • Updated GitPython version from 3.1.32 to 3.1.41.
  • Updated gunicorn version from 20.1.0 to 22.0.0.

Changes walkthrough 📝

Relevant files
Dependencies
pyproject.toml
Update `setuptools` version requirement in `pyproject.toml`

pyproject.toml

  • Updated setuptools version requirement from >=61.0 to >=70.0.
  • +1/-1     
    requirements.txt
    Update dependencies to address security vulnerabilities   

    requirements.txt

  • Updated aiohttp version from 3.9.1 to 3.9.2.
  • Updated GitPython version from 3.1.32 to 3.1.41.
  • Updated gunicorn version from 20.1.0 to 22.0.0.
  • +3/-3     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    @pc-bob pc-bob marked this pull request as ready for review July 31, 2024 20:23
    @@ -1,41 +1,41 @@
    FROM python:3.10 as base
    FROM python:3.10 AS base
    Copy link
    Contributor Author

    Choose a reason for hiding this comment

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

    fixes warnings on docker build:

     => WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 1)                                                                                                                                                                                                                                                                                                                      0.0s
     => WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 10)                                                                                                                                                                                                                                                                                                                     0.0s
     => WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 14)                                                                                                                                                                                                                                                                                                                     0.0s
     => WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 18)                                                                                                                                                                                                                                                                                                                     0.0s
     => WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 22)                                                                                                                                                                                                                                                                                                                     0.0s
     => WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 26)                                                                                                                                                                                                                                                                                                                     0.0s
     => WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 30)                                                                                                                                                                                                                                                                                                                     0.0s
     => WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 34)                                                                                                                                                                                                                                                                                                                     0.0s
     => WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 40)  
    

    @pc-bob
    Copy link
    Contributor Author

    pc-bob commented Jul 31, 2024

    With these changes all the vulns except the setuptools one should be resolved. I believe that is bundled with python and upgrading python probably has some additional implications.

    Screenshot 2024-07-31 at 3 08 35 PM

    @mrT23
    Copy link
    Collaborator

    mrT23 commented Aug 1, 2024

    thanks.
    will be deployed in the nightly version

    @mrT23 mrT23 merged commit c95a8cd into Codium-ai:main Aug 1, 2024
    1 check passed
    @mrT23
    Copy link
    Collaborator

    mrT23 commented Aug 1, 2024

    @pc-bob
    Copy link
    Contributor Author

    pc-bob commented Aug 1, 2024

    @mrT23 when can we expect a new tagged version to be released?

    @pc-bob pc-bob deleted the BL/fix-security-vulns branch August 1, 2024 15:37
    @mrT23
    Copy link
    Collaborator

    mrT23 commented Aug 1, 2024

    in 2-3 weeks.
    but you can use the docker SHA and get something equivalent - a fixed version

    for example in github action:
    https://pr-agent-docs.codium.ai/installation/github/#run-as-a-github-action

        steps:
          - name: PR Agent action step
            id: pragent
            uses: docker://codiumai/pr-agent@sha256:a4cde7a24586f88de4fbb03a0ffdb0d0e8b9f76400f6a30764159a6dcb61aad9
    

    @pc-bob
    Copy link
    Contributor Author

    pc-bob commented Aug 1, 2024

    wonderful, thank you!

    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