diff --git a/.husky/hooks/test-runner.sh b/.husky/hooks/test-runner.sh index aa5de03..dea2fc4 100755 --- a/.husky/hooks/test-runner.sh +++ b/.husky/hooks/test-runner.sh @@ -20,7 +20,12 @@ fi # Run tests echo " - Running tests..." -if pytest --html=tests/report/test-report.html; then +# HTML report only when pytest-html is installed (it is optional) +HTML_ARGS="" +if python -c "import pytest_html" 2>/dev/null; then + HTML_ARGS="--html=tests/report/test-report.html" +fi +if pytest $HTML_ARGS; then echo " โœ… All tests passed" else echo " โŒ Tests failed. Please fix before pushing." diff --git a/.husky/pre-push b/.husky/pre-push index a5b1923..9ed9517 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -10,7 +10,12 @@ fi # Run tests to ensure code quality echo "๐Ÿงช Running tests..." -if ! pytest --html=tests/report/test-report.html; then +# HTML report only when pytest-html is installed (it is optional) +HTML_ARGS="" +if python -c "import pytest_html" 2>/dev/null; then + HTML_ARGS="--html=tests/report/test-report.html" +fi +if ! pytest $HTML_ARGS; then echo "โŒ Tests failed. Please fix before pushing." exit 1 fi diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ea088c..cc91677 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # CHANGELOG +## _v2.8.1_ + +### **Date: 26-Oct-2026** + +- Resolved Snyk dependency findings in `requirements.txt` (DX-27844 to DX-27852, DX-23123, DX-23125 to DX-23129): + - Bumped `urllib3` to `~=2.8.0`, `certifi` to `>=2026.10.19` and `setuptools` to `>=84.1.0`. + - Removed unused packages that were the source of the remaining vulnerability and licence findings: `twython` (and its `oauthlib`), `tox` (and its `virtualenv`, `chardet`, `distlib`, `filelock`, `platformdirs`, `cachetools`), `utils`, `astroid`, `pytest-html` and `black`. None are imported by the SDK. The runtime requirements in `setup.py` are unchanged. + ## _v2.8.0_ ### **Date: 03-Aug-2026** diff --git a/CODEOWNERS b/CODEOWNERS index ac7dad0..d9f2fb3 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,4 +1,5 @@ * @contentstack/developer-ecosystem-pr-reviewers .github/workflows/ @contentstack/security-admin **/.snyk @contentstack/security-admin -**/CODEOWNERS @contentstack/security-admin \ No newline at end of file +**/CODEOWNERS @contentstack/security-admin +**/.gitguardian.yaml @contentstack/security-admin \ No newline at end of file diff --git a/contentstack/__init__.py b/contentstack/__init__.py index e930a2c..a8c4046 100644 --- a/contentstack/__init__.py +++ b/contentstack/__init__.py @@ -42,7 +42,7 @@ def get_contentstack_endpoint(region='us', service='', omit_https=False): __title__ = 'contentstack-delivery-python' __author__ = 'contentstack' __status__ = 'debug' -__version__ = 'v2.8.0' +__version__ = 'v2.8.1' __endpoint__ = 'cdn.contentstack.io' __email__ = 'support@contentstack.com' __developer_email__ = 'mobile@contentstack.com' diff --git a/requirements.txt b/requirements.txt index 9b6523d..2793401 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,18 +1,14 @@ -twython==3.9.1 -setuptools==83.0.0 +setuptools>=84.1.0 contentstack-utils==1.6.0 python-dateutil==2.8.2 requests==2.33.0 coverage==7.6.0 -tox==4.5.1 -virtualenv~=20.36.1 Sphinx==7.3.7 sphinxcontrib-websupport==1.2.7 pip~=26.0 build==0.10.0 wheel~=0.46.2 lxml==6.1.0 -utils~=1.0.2 docutils==0.21.2 pyparsing~=3.1.2 config~=0.5.1 @@ -22,7 +18,6 @@ argparse~=1.4.0 toml~=0.10.2 Jinja2~=3.1.4 env~=0.1.0 -filelock~=3.20.1 pluggy~=1.5.0 six~=1.16.0 packaging>=24.0 @@ -41,26 +36,18 @@ itsdangerous~=2.2.0 isort==5.13.2 pkginfo==1.11.1 ruff==0.11.5 -astroid==3.2.4 mccabe==0.7.0 -platformdirs==3.9.1 imagesize==1.4.1 snowballstemmer~=2.2.0 Pygments~=2.20.0 wrapt==1.16.0 -certifi==2024.8.30 -oauthlib==3.2.2 +certifi>=2026.10.19 idna==3.15 -chardet~=5.2.0 alabaster==0.7.16 zipp==3.20.1 -distlib~=0.3.8 -cachetools~=5.4.0 tomlkit~=0.13.2 -urllib3~=2.7.0 +urllib3~=2.8.0 exceptiongroup~=1.2.2 iniconfig~=2.0.0 pytest-cov>=4.0.0 -pytest-html>=4.2.0 -black>=24.3.0 -flake8>=6.0.0 \ No newline at end of file +flake8>=6.0.0