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

feature: update dependencies and relax version constraints (#47) #48

Merged
merged 3 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ classifiers = [
"Programming Language :: Python :: 3.9",
]
dependencies = [
"urllib3 ~=2.2.1",
"python-dateutil ~=2.9.0.post0",
"Authlib ~=1.3.0",
"pyjwt ~=2.8.0",
"requests ~=2.31.0",
"typing-extensions ~=4.11.0",
"frozendict ~=2.4.3",
"certifi ~=2024.2.2",
"urllib3",
"python-dateutil",
"Authlib",
"pyjwt",
"requests",
"typing-extensions >=4.11.0",
"frozendict >=2.4.3",
"certifi >=2024.7.4",
]
[project.urls]
"Homepage" = "https://github.com/kinde-oss/kinde-python-sdk"
Expand Down
16 changes: 8 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
urllib3~=2.2.1 # https://github.com/urllib3/urllib3
python-dateutil~=2.9.0.post0 # https://github.com/dateutil/dateutil
Authlib~=1.3.0 # https://github.com/lepture/authlib
pyjwt~=2.8.0 # https://github.com/jpadilla/pyjwt
requests~=2.32.0 # https://github.com/psf/requests
typing-extensions~=4.11.0 # https://github.com/python/typing_extensions
frozendict~=2.4.3 # https://github.com/Marco-Sulla/python-frozendict
certifi~=2024.2.2 # https://github.com/certifi/python-certifi
urllib3 # https://github.com/urllib3/urllib3
python-dateutil # https://github.com/dateutil/dateutil
Authlib # https://github.com/lepture/authlib
pyjwt # https://github.com/jpadilla/pyjwt
requests # https://github.com/psf/requests
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

⚠️ Potential issue

Update minimum version constraints based on latest security patches

The review comment's concern is valid and supported by recent security advisories. Here are the minimum recommended versions based on latest security patches:

-urllib3  # https://github.com/urllib3/urllib3
-python-dateutil # https://github.com/dateutil/dateutil
-Authlib # https://github.com/lepture/authlib
-pyjwt  # https://github.com/jpadilla/pyjwt
-requests # https://github.com/psf/requests
+urllib3>=2.2.2  # https://github.com/urllib3/urllib3
+python-dateutil>=2.9.0  # https://github.com/dateutil/dateutil
+Authlib>=1.3.1  # https://github.com/lepture/authlib
+pyjwt>=2.10.1  # https://github.com/jpadilla/pyjwt
+requests>=2.32.0  # https://github.com/psf/requests

These constraints ensure you get the latest security fixes while allowing compatible updates.

🔗 Analysis chain

Add minimum version constraints for critical dependencies

Removing all version constraints for critical dependencies like urllib3, python-dateutil, Authlib, pyjwt, and requests could lead to compatibility issues and potential security vulnerabilities. While relaxing constraints is good, completely removing them might cause problems when new major versions are released with breaking changes.

Let's verify the latest stable versions and any known security advisories:

Recommendation: Add minimum version constraints (>=) based on the current working versions while allowing for compatible updates:

-urllib3  # https://github.com/urllib3/urllib3
-python-dateutil # https://github.com/dateutil/dateutil
-Authlib # https://github.com/lepture/authlib
-pyjwt  # https://github.com/jpadilla/pyjwt
-requests # https://github.com/psf/requests
+urllib3>=2.2.1  # https://github.com/urllib3/urllib3
+python-dateutil>=2.9.0  # https://github.com/dateutil/dateutil
+Authlib>=1.3.0  # https://github.com/lepture/authlib
+pyjwt>=2.8.0  # https://github.com/jpadilla/pyjwt
+requests>=2.32.0  # https://github.com/psf/requests
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check latest versions and security advisories for critical dependencies
for pkg in urllib3 python-dateutil authlib pyjwt requests; do
  echo "=== $pkg ==="
  # Get latest version from PyPI
  curl -s "https://pypi.org/pypi/$pkg/json" | jq -r '.info.version'
  
  # Check for security advisories
  gh api graphql -f query="
  {
    securityVulnerabilities(first: 3, ecosystem: PIP, package: \"$pkg\") {
      nodes {
        advisory {
          summary
          severity
          publishedAt
        }
        vulnerableVersionRange
        firstPatchedVersion {
          identifier
        }
      }
    }
  }"
done

Length of output: 5088

typing-extensions>=4.11 # https://github.com/python/typing_extensions
frozendict>=2.4 # https://github.com/Marco-Sulla/python-frozendict
certifi>=2024.7.4 # https://github.com/certifi/python-certifi
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Update certifi to latest version 2024.12.14

While version 2024.7.4 is secure against all known vulnerabilities, it's recommended to update to the latest version 2024.12.14 to stay current with the most recent root certificate updates.

🔗 Analysis chain

Verify latest certifi version.

Let's verify if 2024.7.4 is the latest secure version of certifi.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check latest version and security advisories for certifi
echo "=== certifi ==="
# Get latest version from PyPI
curl -s "https://pypi.org/pypi/certifi/json" | jq -r '.info.version'

# Check for security advisories
gh api graphql -f query='
{
  securityVulnerabilities(first: 3, ecosystem: PIP, package: "certifi") {
    nodes {
      advisory {
        summary
        severity
        publishedAt
      }
      vulnerableVersionRange
      firstPatchedVersion {
        identifier
      }
    }
  }
}'

Length of output: 1143