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 auth0-python version to ultimately resolve CVE-2024-26130 #2314

Merged
merged 2 commits into from Mar 19, 2024

Conversation

tylergraff
Copy link
Contributor

Reference Issues or PRs

Fixes #2313

What does this implement/fix?

Put a x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features not to work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

  • Did you test the pull request locally?
  • Did you add new tests?

Any other comments?

Copy link
Contributor

@dcmcand dcmcand left a comment

Choose a reason for hiding this comment

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

@tylergraff it looks like this creates some dependency issues for some versions of python. Can you look into that? https://github.com/nebari-dev/nebari/actions/runs/8254991236/job/22580755776?pr=2314

@dcmcand dcmcand added the needs: changes 🧱 Review completed - some changes are needed before merging label Mar 13, 2024
@viniciusdc
Copy link
Contributor

viniciusdc commented Mar 13, 2024

Hi @tylergraff thanks for the PR, regarding the conda build there, I will add some docs later today, but here's a way to run this locally:

SRC_DIR = Path(__file__).parent.parent.parent
PYPROJECT = SRC_DIR / "pyproject.toml"

def test_build_by_conda_forge(tmp_path):
    """
    This test ensures that nebari can be built and packaged by conda-forge.
    This is achieved by walking through the following steps:
      1. Use Python build package to generate the `sdist` .tar.gz file
      2. Use grayskull package to generate the `meta.yaml` recipe file
      3. Use conda build to attempt to build the nebari package from the `meta.yaml`
    These steps mimic what takes places on the conda-forge/nebari-feedstock repo whenever
    a new version of the package gets released.
    NOTE: this test requires conda and conda-build
    """

    assert PYPROJECT.exists()

    try:
        # build sdist
        subprocess.run(
            ["python", "-m", "build", SRC_DIR, "--outdir", tmp_path],
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,
            check=True,
        )

        # get location of sdist file built above
        sdist_loc = next(tmp_path.glob("*.tar.gz"))
        # run grayskull to create the meta.yaml using the local sdist file
        subprocess.run(
            [
                "grayskull",
                "pypi",
                "--strict-conda-forge",
                sdist_loc,
                "--output",
                tmp_path,
            ],
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,
            check=True,
        )

        # get the directory the meta.yaml is in
        meta_loc = tmp_path / "nebari"
        # try to run conda build to build package from meta.yaml
        subprocess.run(
            ["conda", "build", "--channel=conda-forge", meta_loc],
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,
            check=True,
        )
    except subprocess.CalledProcessError as e:
        print(e.stderr.decode("utf-8"))
        raise e

You might need to make some changes to ensure the path is correct, as this originally was part of our test suit.

@dharhas
Copy link
Member

dharhas commented Mar 18, 2024

Question. Do we still use auth0-python? Wouldn't it be an optional dependency if you wanted to integrate with the auth0 service?

@dcmcand dcmcand merged commit e15a7ec into nebari-dev:develop Mar 19, 2024
35 of 37 checks passed
@dcmcand
Copy link
Contributor

dcmcand commented Mar 19, 2024

resolved by #2315

@viniciusdc viniciusdc added this to the 2024.3.3 milestone Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: changes 🧱 Review completed - some changes are needed before merging
Projects
Status: Done 💪🏾
Development

Successfully merging this pull request may close these issues.

Solve CVE-2024-26130 via upgrade to auth0-python==4.7.1
4 participants