Skip to content

Commit

Permalink
Latest data: Sat Jul 27 08:04:51 UTC 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
github.actions committed Jul 27, 2024
1 parent 8a860ba commit 3b5a522
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
5 changes: 3 additions & 2 deletions audits/mentat-requirements.audit.json
Original file line number Diff line number Diff line change
Expand Up @@ -694,15 +694,15 @@
],
"vulnerabilities": [
{
"modified": "2024-07-18T20:01:22Z",
"modified": "2024-07-26T22:12:12Z",
"published": "2024-07-18T17:18:46Z",
"schema_version": "1.6.0",
"id": "GHSA-g92j-qhmh-64v2",
"aliases": [
"CVE-2024-40647"
],
"summary": "Sentry's Python SDK unintentionally exposes environment variables to subprocesses",
"details": "### Impact\n\nThe bug in Sentry's Python SDK <2.8.0 results in the unintentional exposure of environment variables to subprocesses despite the `env={}` setting.\n\n### Details\n\nIn 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:\n\n```\n>>> subprocess.check_output([\"env\"], env={\"TEST\":\"1\"})\nb'TEST=1\\n'\n```\n\nIf you'd want to not pass any variables, you can set an empty dict:\n\n```\n>>> subprocess.check_output([\"env\"], env={})\nb''\n```\n\nHowever, 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](https://docs.sentry.io/platforms/python/integrations/default-integrations/#stdlib) integration is disabled. The Stdlib integration is enabled by default.\n\n### Patches\nThe issue has been patched in https://github.com/getsentry/sentry-python/pull/3251 and the fix released in [sentry-sdk==2.8.0](https://github.com/getsentry/sentry-python/releases/tag/2.8.0).\n\n### Workarounds\n\nWe 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:\n\n1. In your application, replace `env={}` with the minimal dict `env={\"EMPTY_ENV\":\"1\"}` or similar.\n\nOR\n\n2. Disable Stdlib integration:\n```\nimport sentry_sdk\n\n# Should go before sentry_sdk.init\nsentry_sdk.integrations._DEFAULT_INTEGRATIONS.remove(\"sentry_sdk.integrations.stdlib.StdlibIntegration\")\n\nsentry_sdk.init(...)\n```\n\n### References\n* Sentry docs: [Default integrations](https://docs.sentry.io/platforms/python/integrations/default-integrations/)\n* Python docs: [subprocess module](https://docs.python.org/3/library/subprocess.html)\n* Patch https://github.com/getsentry/sentry-python/pull/3251 \n",
"details": "### Impact\n\nThe bug in Sentry's Python SDK <2.8.0 results in the unintentional exposure of environment variables to subprocesses despite the `env={}` setting.\n\n### Details\n\nIn 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:\n\n```\n>>> subprocess.check_output([\"env\"], env={\"TEST\":\"1\"})\nb'TEST=1\\n'\n```\n\nIf you'd want to not pass any variables, you can set an empty dict:\n\n```\n>>> subprocess.check_output([\"env\"], env={})\nb''\n```\n\nHowever, 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](https://docs.sentry.io/platforms/python/integrations/default-integrations/#stdlib) integration is disabled. The Stdlib integration is enabled by default.\n\n### Patches\nThe issue has been patched in https://github.com/getsentry/sentry-python/pull/3251 and the fix released in [sentry-sdk==2.8.0](https://github.com/getsentry/sentry-python/releases/tag/2.8.0). The fix was also backported to [sentry-sdk==1.45.1](https://github.com/getsentry/sentry-python/releases/tag/1.45.1).\n\n### Workarounds\n\nWe 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:\n\n1. In your application, replace `env={}` with the minimal dict `env={\"EMPTY_ENV\":\"1\"}` or similar.\n\nOR\n\n2. Disable Stdlib integration:\n```\nimport sentry_sdk\n\n# Should go before sentry_sdk.init\nsentry_sdk.integrations._DEFAULT_INTEGRATIONS.remove(\"sentry_sdk.integrations.stdlib.StdlibIntegration\")\n\nsentry_sdk.init(...)\n```\n\n### References\n* Sentry docs: [Default integrations](https://docs.sentry.io/platforms/python/integrations/default-integrations/)\n* Python docs: [subprocess module](https://docs.python.org/3/library/subprocess.html)\n* Patch https://github.com/getsentry/sentry-python/pull/3251 \n",
"affected": [
{
"package": {
Expand Down Expand Up @@ -919,6 +919,7 @@
"1.44.0",
"1.44.1",
"1.45.0",
"1.45.1",
"1.5.0",
"1.5.1",
"1.5.10",
Expand Down
10 changes: 5 additions & 5 deletions requirements/datalad-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
annexremote==1.6.5
backports-tarfile==1.2.0
boto3==1.34.138
botocore==1.34.138
boto3==1.34.149
botocore==1.34.149
chardet==5.2.0
charset-normalizer==3.3.2
distro==1.9.0
fasteners==0.19
humanize==4.9.0
humanize==4.10.0
idna==3.7
importlib-metadata==8.0.0
importlib-metadata==8.2.0
iso8601==2.1.0
jaraco-classes==3.4.0
jaraco-context==5.3.0
Expand All @@ -24,7 +24,7 @@ packaging==24.1
patool==2.3.0
platformdirs==4.2.2
python-dateutil==2.9.0.post0
python-gitlab==4.7.0
python-gitlab==4.8.0
requests==2.32.3
requests-toolbelt==1.0.0
s3transfer==0.10.2
Expand Down
8 changes: 4 additions & 4 deletions requirements/parliament-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
boto3==1.34.128
botocore==1.34.128
boto3==1.34.149
botocore==1.34.149
jmespath==1.0.1
json-cfg==0.4.2
kwonly-args==1.0.10
python-dateutil==2.9.0.post0
pyyaml==6.0.1
s3transfer==0.10.1
setuptools==70.0.0
s3transfer==0.10.2
setuptools==71.1.0
six==1.16.0
urllib3==2.2.2
2 changes: 1 addition & 1 deletion requirements/tartufo-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ click==8.1.7
gitdb==4.0.11
gitpython==3.1.43
smmap==5.0.1
tomlkit==0.11.8
tomlkit==0.13.0

0 comments on commit 3b5a522

Please sign in to comment.