Skip to content

Commit 2f8716e

Browse files
Merge pull request #99 from SumoLogic/fix/SUMO-281751-vulnerability-fix
Fix/sumo 281751 vulnerability fix
2 parents 2666313 + f591c67 commit 2f8716e

10 files changed

Lines changed: 707 additions & 494 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515

16-
- name: Set up Python 3.12
16+
- name: Set up Python 3.14
1717
uses: actions/setup-python@v5
1818
with:
19-
python-version: 3.12
19+
python-version: "3.14"
2020

2121
- name: Install pipenv
2222
run: pip install pipenv

.github/workflows/runtest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v4
1111

12-
- name: Set up Python 3.12
12+
- name: Set up Python 3.14
1313
uses: actions/setup-python@v5
1414
with:
15-
python-version: 3.12
15+
python-version: "3.14"
1616

1717
- name: Install pipenv and mypy
1818
run: pip install pipenv mypy

.pre-commit-config.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ repos:
88
entry: bandit
99
language: python
1010
types: [python]
11-
- repo: https://github.com/ambv/black
12-
rev: 19.3b0
11+
- repo: https://github.com/psf/black
12+
rev: 26.3.1
1313
hooks:
1414
- id: black
15+
args: [--no-cache]
1516
- repo: https://github.com/pre-commit/pre-commit-hooks
1617
rev: v2.2.1
1718
hooks:

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
# CHANGELOG for sumologic-python-sdk
22
This project adheres to [Semantic Versioning](http://semver.org/). The CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
33

4+
## [0.2.0] - 2026-05-18
5+
### Security
6+
- Upgraded `certifi` to `>=2026.4.22` to remove the revoked GLOBALTRUST root certificate
7+
- Upgraded `setuptools` to `>=78.1.1` to fix Command Injection via package URL (CVE-2024-6345) and path traversal in `PackageIndex.download` leading to Arbitrary File Write
8+
- Upgraded `urllib3` to `>=2.6.3` to fix unbounded decompression chain vulnerability
9+
- Upgraded `requests` to `>=2.33.1` to fix decompression-bomb safeguards being bypassed when following HTTP redirects
10+
- Upgraded `virtualenv` to `>=21.3.0` to fix command injection through activation scripts
11+
- Upgraded `filelock` to `>=3.29.0` to fix TOCTOU race condition allowing symlink attacks during lock file creation
12+
- Upgraded `zipp` to `>=3.19.1` to fix Denial of Service vulnerability
13+
- Upgraded `pygments` to `>=2.20.0` to fix ReDoS vulnerability
14+
- Updated `black` in pre-commit hooks to fix arbitrary file writes from unsanitized user input in cache file name
15+
16+
### Breaking Changes
17+
- Dependency upgrades in this release add Python 3.14 support and drop support for older Python versions (3.8 and 3.9) that were previously supported. Treat the Python version support change as a breaking change when upgrading
18+
419
## [0.1.16]
520
### Fixed
621
- Fixed Retry logic and bug related to headers to make it compatible with newer python versions

Pipfile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,29 @@ url = "https://pypi.org/simple"
44
verify_ssl = true
55

66
[dev-packages]
7+
virtualenv = ">=21.3.0"
8+
setuptools = ">=78.1.1"
9+
filelock = ">=3.29.0"
10+
zipp = ">=3.19.1"
11+
pygments = ">=2.20.0"
12+
certifi = ">=2026.4.22"
13+
pyupgrade = "*"
714
bandit = "*" # https://github.com/PyCQA/bandit
815
better_exceptions = "*"
916
black = "*"
10-
pipenv = {path = ".", editable = true, extras = ["test"]}
17+
sumologic-sdk = {path = ".", editable = true}
1118
flake8 = "*"
1219
pre-commit = "*" # https://ljvmiranda921.github.io/notebook/2018/06/21/precommits-using-black-and-flake8/
13-
pytest = "*"
20+
pytest = ">=9.0.3"
1421
requests = "*"
1522
twine = "*"
1623
build = "*"
1724

1825
[packages]
19-
requests = "*"
26+
requests = ">=2.33.1"
2027

2128
[requires]
22-
python_version = "3.12"
29+
python_version = "3.14"
2330

2431
[pipenv]
2532
allow_prereleases = true

Pipfile.lock

Lines changed: 651 additions & 468 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.17
1+
0.2.0

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[project]
22
name = "sumologic-sdk"
3-
requires-python = ">=3.8"
3+
requires-python = ">=3.10"
44
classifiers = [
55
"Programming Language :: Python :: 3",
6-
"Programming Language :: Python :: 3.8",
7-
"Programming Language :: Python :: 3.9",
86
"Programming Language :: Python :: 3.10",
97
"Programming Language :: Python :: 3.11",
108
"Programming Language :: Python :: 3.12",
9+
"Programming Language :: Python :: 3.13",
10+
"Programming Language :: Python :: 3.14",
1111
"Operating System :: OS Independent",
1212
]
1313
authors = [
@@ -29,5 +29,5 @@ Issues = "https://github.com/SumoLogic/sumologic-python-sdk/issues"
2929
Changelog = "https://github.com/SumoLogic/sumologic-python-sdk/blob/master/CHANGELOG.md"
3030

3131
[build-system]
32-
requires = ["setuptools>=61.0"]
32+
requires = ["setuptools>=78.1.1"]
3333
build-backend = "setuptools.build_meta"

requirements.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
requests>=2.32.0
1+
requests>=2.33.1
2+
certifi>=2026.4.22
3+
urllib3>=2.6.3
4+
pytest>=9.0.3
5+
filelock>=3.29.0
6+
virtualenv>=21.3.0
7+
pygments>=2.20.0

sumologic/sumologic.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import json
2+
23
import requests
34
import os
45
import sys
@@ -274,7 +275,7 @@ def sync_folder(self, folder_id, content):
274275
return self.post('/content/folders/%s/synchronize' % folder_id, params=content, version='v2')
275276

276277
def check_sync_folder(self, folder_id, job_id):
277-
return self.get('/content/folders/%s/synchronize/%s/status' % (folder_id, job_id), version='v2')
278+
return self.get('/content/folders/{}/synchronize/{}/status'.format(folder_id, job_id), version='v2')
278279

279280
def delete_folder(self, folder_id, isAdmin=False):
280281
headers = {'isAdminMode': 'true'} if isAdmin else {}
@@ -319,11 +320,11 @@ def get_global_folder(self):
319320

320321
def import_content(self, folder_id, content, is_overwrite="false", isAdmin=False):
321322
headers = {'isAdminMode': 'true'} if isAdmin else {}
322-
return self.post('/content/folders/%s/import?overwrite=%s' % (folder_id, is_overwrite), headers=headers, params=content,
323+
return self.post('/content/folders/{}/import?overwrite={}'.format(folder_id, is_overwrite), headers=headers, params=content,
323324
version='v2')
324325

325326
def check_import_status(self, folder_id, job_id):
326-
return self.get('/content/folders/%s/import/%s/status' % (folder_id, job_id), version='v2')
327+
return self.get('/content/folders/{}/import/{}/status'.format(folder_id, job_id), version='v2')
327328

328329
def get_folder(self, folder_id, isAdmin=False):
329330
headers = {'isAdminMode': 'true'} if isAdmin else {}
@@ -335,22 +336,22 @@ def update_folder(self, folder_id, isAdmin=False):
335336

336337
def copy_folder(self, folder_id, destination_folder_id, isAdmin=False):
337338
headers = {'isAdminMode': 'true'} if isAdmin else {}
338-
return self.post('/content/%s/copy?destinationFolder=%s' % (folder_id, destination_folder_id), headers=headers, params={}, version='v2')
339+
return self.post('/content/{}/copy?destinationFolder={}'.format(folder_id, destination_folder_id), headers=headers, params={}, version='v2')
339340

340341
def export_content(self, content_id):
341342
return self.post('/content/%s/export' % content_id, params="", version='v2')
342343

343344
def check_export_status(self, content_id, job_id):
344-
return self.get('/content/%s/export/%s/status' % (content_id, job_id), version='v2')
345+
return self.get('/content/{}/export/{}/status'.format(content_id, job_id), version='v2')
345346

346347
def get_export_content_result(self, content_id, job_id):
347-
return self.get('/content/%s/export/%s/result' % (content_id, job_id), version='v2')
348+
return self.get('/content/{}/export/{}/result'.format(content_id, job_id), version='v2')
348349

349350
def delete_content(self, content_id):
350351
return self.delete('/content/%s/delete' % content_id, version='v2')
351352

352353
def check_delete_status(self, content_id, job_id):
353-
return self.get('/content/%s/delete/%s/status' % (content_id, job_id), version='v2')
354+
return self.get('/content/{}/delete/{}/status'.format(content_id, job_id), version='v2')
354355

355356
def get_content(self, path):
356357
return self.get('/content/path?path=%s' % path, version='v2')
@@ -359,14 +360,14 @@ def get_content_path(self, content_id):
359360
return self.get('/content/%s/path' % content_id, version='v2')
360361

361362
def copy_content(self, content_id, destination_folder):
362-
return self.post('/content/%s/copy?destinationFolder=%s' % (content_id, destination_folder), params=None,
363+
return self.post('/content/{}/copy?destinationFolder={}'.format(content_id, destination_folder), params=None,
363364
version='v2')
364365

365366
def check_copy_status(self, content_id, job_id):
366-
return self.get('/content/%s/copy/%s/status' % (content_id, job_id), version='v2')
367+
return self.get('/content/{}/copy/{}/status'.format(content_id, job_id), version='v2')
367368

368369
def move_content(self, content_id, destination_folder):
369-
return self.post('/content/%s/move?destinationFolderId=%s' % (content_id, destination_folder), params=None,
370+
return self.post('/content/{}/move?destinationFolderId={}'.format(content_id, destination_folder), params=None,
370371
version='v2')
371372

372373
def get_content_item_by_path(self, path):

0 commit comments

Comments
 (0)