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

feat(deps): update dependency sentry-sdk to v2.11.0 [security] - abandoned #322

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 25, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
sentry-sdk (changelog) 2.10.0 -> 2.11.0 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2024-40647

Impact

The bug in Sentry's Python SDK <2.8.0 results in the unintentional exposure of environment variables to subprocesses despite the env={} setting.

Details

In Python's subprocess calls, all environment variables are passed to subprocesses by default. However, if you specifically do not want them to be passed to subprocesses, you may use env argument in subprocess calls, like in this example:

>>> subprocess.check_output(["env"], env={"TEST":"1"})
b'TEST=1\n'

If you'd want to not pass any variables, you can set an empty dict:

>>> subprocess.check_output(["env"], env={})
b''

However, the bug in Sentry SDK <2.8.0 causes all environment variables to be passed to the subprocesses when env={} is set, unless the Sentry SDK's Stdlib integration is disabled. The Stdlib integration is enabled by default.

Patches

The issue has been patched in https://github.com/getsentry/sentry-python/pull/3251 and the fix released in sentry-sdk==2.8.0. The fix was also backported to sentry-sdk==1.45.1.

Workarounds

We strongly recommend upgrading to the latest SDK version. However, if it's not possible, and if passing environment variables to child processes poses a security risk for you, there are two options:

  1. In your application, replace env={} with the minimal dict env={"EMPTY_ENV":"1"} or similar.

OR

  1. Disable Stdlib integration:
import sentry_sdk

# Should go before sentry_sdk.init
sentry_sdk.integrations._DEFAULT_INTEGRATIONS.remove("sentry_sdk.integrations.stdlib.StdlibIntegration")

sentry_sdk.init(...)

References


Release Notes

getsentry/sentry-python (sentry-sdk)

v2.11.0

Compare Source

Various fixes & improvements
  • Add disabled_integrations (#​3328) by @​sentrivana

    Disabling individual integrations is now much easier.
    Instead of disabling all automatically enabled integrations and specifying the ones
    you want to keep, you can now use the new
    disabled_integrations
    config option to provide a list of integrations to disable:

    import sentry_sdk
    from sentry_sdk.integrations.flask import FlaskIntegration
    
    sentry_sdk.init(

Do not use the Flask integration even if Flask is installed.

  disabled_integrations=[
      FlaskIntegration(),
  ],

)


- Use operation name as transaction name in Strawberry (#&#8203;3294) by @&#8203;sentrivana
- WSGI integrations respect `SCRIPT_NAME` env variable (#&#8203;2622) by @&#8203;sarvaSanjay
- Make Django DB spans have origin `auto.db.django` (#&#8203;3319) by @&#8203;antonpirker
- Sort breadcrumbs by time before sending (#&#8203;3307) by @&#8203;antonpirker
- Fix `KeyError('sentry-monitor-start-timestamp-s')` (#&#8203;3278) by @&#8203;Mohsen-Khodabakhshi
- Set MongoDB tags directly on span data (#&#8203;3290) by @&#8203;0Calories
- Lower logger level for some messages (#&#8203;3305) by @&#8203;sentrivana and @&#8203;antonpirker
- Emit deprecation warnings from `Hub` API (#&#8203;3280) by @&#8203;szokeasaurusrex
- Clarify that `instrumenter` is internal-only (#&#8203;3299) by @&#8203;szokeasaurusrex
- Support Django 5.1 (#&#8203;3207) by @&#8203;sentrivana
- Remove apparently unnecessary `if` (#&#8203;3298) by @&#8203;szokeasaurusrex
- Preliminary support for Python 3.13 (#&#8203;3200) by @&#8203;sentrivana
- Move `sentry_sdk.init` out of `hub.py` (#&#8203;3276) by @&#8203;szokeasaurusrex
- Unhardcode integration list (#&#8203;3240) by @&#8203;rominf
- Allow passing of PostgreSQL port in tests (#&#8203;3281) by @&#8203;rominf
- Add tests for `@ai_track` decorator (#&#8203;3325) by @&#8203;colin-sentry
- Do not include type checking code in coverage report (#&#8203;3327) by @&#8203;antonpirker
- Fix test_installed_modules (#&#8203;3309) by @&#8203;szokeasaurusrex
- Fix typos and grammar in a comment (#&#8203;3293) by @&#8203;szokeasaurusrex
- Fixed failed tests setup (#&#8203;3303) by @&#8203;antonpirker
- Only assert warnings we are interested in (#&#8203;3314) by @&#8203;szokeasaurusrex

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link
Contributor Author

renovate bot commented Sep 25, 2024

Autoclosing Skipped

This PR has been flagged for autoclosing. However, it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error.

@renovate renovate bot changed the title feat(deps): update dependency sentry-sdk to v2.11.0 [security] feat(deps): update dependency sentry-sdk to v2.11.0 [security] - abandoned Sep 25, 2024
@scopsy scopsy closed this Oct 13, 2024
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.

1 participant