From 08fe9e0d9a2163d67293d3d5ba62877f2684213a Mon Sep 17 00:00:00 2001 From: Rohan Dhiman Date: Wed, 12 Aug 2026 17:11:12 +0530 Subject: [PATCH] SCA Finding fixed --- .github/workflows/maze-runner.yml | 3 +++ .github/workflows/python-package.yml | 5 +++++ CHANGELOG.md | 1 + example/celery+django/celery_django/settings.py | 5 ++++- example/django21/bugsnag_demo/settings.py | 5 ++++- example/django31/todo/settings.py | 5 ++++- tests/fixtures/django30/todo/settings.py | 2 +- tests/fixtures/django4/todo/settings.py | 2 +- tests/fixtures/django5/todo/settings.py | 2 +- tests/fixtures/django6/todo/settings.py | 2 +- 10 files changed, 25 insertions(+), 7 deletions(-) diff --git a/.github/workflows/maze-runner.yml b/.github/workflows/maze-runner.yml index 85d26756..17297807 100644 --- a/.github/workflows/maze-runner.yml +++ b/.github/workflows/maze-runner.yml @@ -2,6 +2,9 @@ name: Maze Runner on: [push, pull_request] +permissions: + contents: read + jobs: maze-runner: runs-on: 'ubuntu-latest' diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 5cfef9cf..d945445f 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -2,6 +2,9 @@ name: Test bugsnag-python against Python versions on: [ push, pull_request ] +permissions: + contents: read + jobs: test: runs-on: ${{ matrix.os }} @@ -46,6 +49,8 @@ jobs: needs: test runs-on: ubuntu-latest container: python:3-slim + permissions: + contents: none steps: - name: Send request run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 39eebfee..7c3d525b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Changelog ### Enhancements * Add support for `level` parameter in `BugsnagHandler` constructor and `Client.log_handler()` method. + [#416](https://github.com/bugsnag/bugsnag-python/pull/416) ## v4.9.0 (2026-04-21) diff --git a/example/celery+django/celery_django/settings.py b/example/celery+django/celery_django/settings.py index 7fe170c8..c52f75bd 100644 --- a/example/celery+django/celery_django/settings.py +++ b/example/celery+django/celery_django/settings.py @@ -20,7 +20,10 @@ # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = 't70qw62gdx%ru%w1&f#$so*a$h9-m6h#a1=gji9$5q&)exf$*%' +SECRET_KEY = os.environ.get( + 'DJANGO_SECRET_KEY', + 'django-insecure-testonly-not-a-real-secret-key-replace-me', +) # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True diff --git a/example/django21/bugsnag_demo/settings.py b/example/django21/bugsnag_demo/settings.py index ecc58277..e4885815 100644 --- a/example/django21/bugsnag_demo/settings.py +++ b/example/django21/bugsnag_demo/settings.py @@ -18,7 +18,10 @@ # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = '3n3h7r@tpqnwqtt8#avxh_t75k_6zf3x)@6cg!u(&xmz79(26h' +SECRET_KEY = os.environ.get( + 'DJANGO_SECRET_KEY', + 'django-insecure-testonly-not-a-real-secret-key-replace-me', +) # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True diff --git a/example/django31/todo/settings.py b/example/django31/todo/settings.py index 80ddedb5..2dc42416 100644 --- a/example/django31/todo/settings.py +++ b/example/django31/todo/settings.py @@ -22,7 +22,10 @@ # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = '$#yb)ri-v$^#8o1r0x%5$0yy&aqu2yefwo10zm+(=7!t+d^6ft' +SECRET_KEY = os.environ.get( + 'DJANGO_SECRET_KEY', + 'django-insecure-testonly-not-a-real-secret-key-replace-me', +) # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True diff --git a/tests/fixtures/django30/todo/settings.py b/tests/fixtures/django30/todo/settings.py index ac11d39f..8f505374 100644 --- a/tests/fixtures/django30/todo/settings.py +++ b/tests/fixtures/django30/todo/settings.py @@ -22,7 +22,7 @@ # See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = '$#yb)ri-v$^#8o1r0x%5$0yy&aqu2yefwo10zm+(=7!t+d^6ft' +SECRET_KEY = 'django-insecure-testonly-not-a-real-secret-key-replace-me' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = False diff --git a/tests/fixtures/django4/todo/settings.py b/tests/fixtures/django4/todo/settings.py index 1458b48a..1fead5d2 100644 --- a/tests/fixtures/django4/todo/settings.py +++ b/tests/fixtures/django4/todo/settings.py @@ -21,7 +21,7 @@ # See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = 'django-insecure-z++&i7gx^m*qqq_1(xjqo=7%gg)^&fcq6fa3gen+10(zn5756z' +SECRET_KEY = 'django-insecure-testonly-not-a-real-secret-key-replace-me' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = False diff --git a/tests/fixtures/django5/todo/settings.py b/tests/fixtures/django5/todo/settings.py index 378ee386..1afec6cd 100644 --- a/tests/fixtures/django5/todo/settings.py +++ b/tests/fixtures/django5/todo/settings.py @@ -21,7 +21,7 @@ # See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = 'django-insecure-z++&i7gx^m*qqq_1(xjqo=7%gg)^&fcq6fa3gen+10(zn5756z' +SECRET_KEY = 'django-insecure-testonly-not-a-real-secret-key-replace-me' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = False diff --git a/tests/fixtures/django6/todo/settings.py b/tests/fixtures/django6/todo/settings.py index c0cee231..6532fbe8 100644 --- a/tests/fixtures/django6/todo/settings.py +++ b/tests/fixtures/django6/todo/settings.py @@ -21,7 +21,7 @@ # See https://docs.djangoproject.com/en/6.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = 'django-insecure-z++&i7gx^m*qqq_1(xjqo=7%gg)^&fcq6fa3gen+10(zn5756z' +SECRET_KEY = 'django-insecure-testonly-not-a-real-secret-key-replace-me' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = False