mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-05 16:38:26 -04:00
Compare commits
7 Commits
test-branc
...
ee922d735f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee922d735f | ||
|
|
af4a47dd7f | ||
|
|
268136b1b5 | ||
|
|
773460dcaf | ||
|
|
d033af8f76 | ||
|
|
776a33a9e3 | ||
|
|
931c7791ba |
7
.github/dependabot.yml
vendored
7
.github/dependabot.yml
vendored
@@ -3,16 +3,19 @@
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
# Note: Setting open-pull-requests-limit to 0 disables automatic version update PRs.
|
||||
# Security updates are still active and managed separately in repository settings under
|
||||
# "Security & analysis" > "Dependabot security updates"
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "pip" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 0 # Disable version update PRs; security updates still active
|
||||
labels:
|
||||
- "dependabot" # Custom label to identify Dependabot PRs
|
||||
assignees:
|
||||
- "alexjanousekGSA"
|
||||
ignore:
|
||||
# gevent 25.8+ breaks Celery/Kombu compatibility (potentially)
|
||||
- dependency-name: "gevent"
|
||||
|
||||
54
poetry.lock
generated
54
poetry.lock
generated
@@ -1,4 +1,4 @@
|
||||
# This file is automatically @generated by Poetry 2.2.1 and should not be changed by hand.
|
||||
# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand.
|
||||
|
||||
[[package]]
|
||||
name = "aiohappyeyeballs"
|
||||
@@ -268,23 +268,23 @@ files = [
|
||||
|
||||
[[package]]
|
||||
name = "awscli"
|
||||
version = "1.42.26"
|
||||
version = "1.44.49"
|
||||
description = "Universal Command Line Environment for AWS."
|
||||
optional = false
|
||||
python-versions = ">=3.9"
|
||||
groups = ["main"]
|
||||
files = [
|
||||
{file = "awscli-1.42.26-py3-none-any.whl", hash = "sha256:08621dd915b01b512857c73360271cf33303b16a8e5052434fa41e6207e46e68"},
|
||||
{file = "awscli-1.42.26.tar.gz", hash = "sha256:4e806c50c56a245dc86d230691fe17be468cfaf5b43d0171b5f6418fbee80ada"},
|
||||
{file = "awscli-1.44.49-py3-none-any.whl", hash = "sha256:5c15ed939e6a990d90ba82af78ad6acd9e0c111a7df78b6fb873a5006e2ee688"},
|
||||
{file = "awscli-1.44.49.tar.gz", hash = "sha256:f7c8151da43a7ebc0e6bc049771470b440dea07f25c5e8f5b0d3c01f64d84184"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
botocore = "1.40.26"
|
||||
botocore = "1.42.59"
|
||||
colorama = ">=0.2.5,<0.4.7"
|
||||
docutils = ">=0.18.1,<=0.19"
|
||||
PyYAML = ">=3.10,<6.1"
|
||||
rsa = ">=3.1.2,<4.8"
|
||||
s3transfer = ">=0.13.0,<0.14.0"
|
||||
s3transfer = ">=0.16.0,<0.17.0"
|
||||
|
||||
[[package]]
|
||||
name = "bandit"
|
||||
@@ -524,34 +524,34 @@ testing = ["pytest (>=6,!=7.0.0)", "pytest-xdist (>=2)"]
|
||||
|
||||
[[package]]
|
||||
name = "boto3"
|
||||
version = "1.40.26"
|
||||
version = "1.42.59"
|
||||
description = "The AWS SDK for Python"
|
||||
optional = false
|
||||
python-versions = ">=3.9"
|
||||
groups = ["main", "dev"]
|
||||
files = [
|
||||
{file = "boto3-1.40.26-py3-none-any.whl", hash = "sha256:8272deb4b82c4a0faa1231c2cd5c6d267d71ed6265abef545c1d5b7f0aa936d8"},
|
||||
{file = "boto3-1.40.26.tar.gz", hash = "sha256:9a71684825cfd4548027f254eadf4dafb7fccc7523f20e2a1cb74033f4d74a6b"},
|
||||
{file = "boto3-1.42.59-py3-none-any.whl", hash = "sha256:7a66e3e8e2087ea4403e135e9de592e6d63fc9a91080d8dac415bb74df873a72"},
|
||||
{file = "boto3-1.42.59.tar.gz", hash = "sha256:6c4a14a4eb37b58a9048901bdeefbe1c529638b73e8f55413319a25f010ca211"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
botocore = ">=1.40.26,<1.41.0"
|
||||
botocore = ">=1.42.59,<1.43.0"
|
||||
jmespath = ">=0.7.1,<2.0.0"
|
||||
s3transfer = ">=0.13.0,<0.14.0"
|
||||
s3transfer = ">=0.16.0,<0.17.0"
|
||||
|
||||
[package.extras]
|
||||
crt = ["botocore[crt] (>=1.21.0,<2.0a0)"]
|
||||
|
||||
[[package]]
|
||||
name = "botocore"
|
||||
version = "1.40.26"
|
||||
version = "1.42.59"
|
||||
description = "Low-level, data-driven core of boto 3."
|
||||
optional = false
|
||||
python-versions = ">=3.9"
|
||||
groups = ["main", "dev"]
|
||||
files = [
|
||||
{file = "botocore-1.40.26-py3-none-any.whl", hash = "sha256:c3e89787b1a360d0fd30f9066864415df02d54b07691cabc34a6b1a01c3d2549"},
|
||||
{file = "botocore-1.40.26.tar.gz", hash = "sha256:f8f46b3978b7c324f4c0bef03505870c4c5240c736bfb63318da091942a29710"},
|
||||
{file = "botocore-1.42.59-py3-none-any.whl", hash = "sha256:d2f2ff7ecc31e86ef46b5daee112cfbca052c13801285fb23af909f7bff5b657"},
|
||||
{file = "botocore-1.42.59.tar.gz", hash = "sha256:5314f19e1da8fc0ebc41bdb8bbe17c9a7397d87f4d887076ac8bdef972a34138"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
@@ -560,7 +560,7 @@ python-dateutil = ">=2.1,<3.0.0"
|
||||
urllib3 = {version = ">=1.25.4,<2.2.0 || >2.2.0,<3", markers = "python_version >= \"3.10\""}
|
||||
|
||||
[package.extras]
|
||||
crt = ["awscrt (==0.27.6)"]
|
||||
crt = ["awscrt (==0.31.2)"]
|
||||
|
||||
[[package]]
|
||||
name = "build"
|
||||
@@ -3934,21 +3934,21 @@ windows-terminal = ["colorama (>=0.4.6)"]
|
||||
|
||||
[[package]]
|
||||
name = "pyjwt"
|
||||
version = "2.10.1"
|
||||
version = "2.12.0"
|
||||
description = "JSON Web Token implementation in Python"
|
||||
optional = false
|
||||
python-versions = ">=3.9"
|
||||
groups = ["main"]
|
||||
files = [
|
||||
{file = "PyJWT-2.10.1-py3-none-any.whl", hash = "sha256:dcdd193e30abefd5debf142f9adfcdd2b58004e644f25406ffaebd50bd98dacb"},
|
||||
{file = "pyjwt-2.10.1.tar.gz", hash = "sha256:3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953"},
|
||||
{file = "pyjwt-2.12.0-py3-none-any.whl", hash = "sha256:9bb459d1bdd0387967d287f5656bf7ec2b9a26645d1961628cda1764e087fd6e"},
|
||||
{file = "pyjwt-2.12.0.tar.gz", hash = "sha256:2f62390b667cd8257de560b850bb5a883102a388829274147f1d724453f8fb02"},
|
||||
]
|
||||
|
||||
[package.extras]
|
||||
crypto = ["cryptography (>=3.4.0)"]
|
||||
dev = ["coverage[toml] (==5.0.4)", "cryptography (>=3.4.0)", "pre-commit", "pytest (>=6.0.0,<7.0.0)", "sphinx", "sphinx-rtd-theme", "zope.interface"]
|
||||
dev = ["coverage[toml] (==7.10.7)", "cryptography (>=3.4.0)", "pre-commit", "pytest (>=8.4.2,<9.0.0)", "sphinx", "sphinx-rtd-theme", "zope.interface"]
|
||||
docs = ["sphinx", "sphinx-rtd-theme", "zope.interface"]
|
||||
tests = ["coverage[toml] (==5.0.4)", "pytest (>=6.0.0,<7.0.0)"]
|
||||
tests = ["coverage[toml] (==7.10.7)", "pytest (>=8.4.2,<9.0.0)"]
|
||||
|
||||
[[package]]
|
||||
name = "pyparsing"
|
||||
@@ -4828,14 +4828,14 @@ pyasn1 = ">=0.1.3"
|
||||
|
||||
[[package]]
|
||||
name = "s3transfer"
|
||||
version = "0.13.1"
|
||||
version = "0.16.0"
|
||||
description = "An Amazon S3 Transfer Manager"
|
||||
optional = false
|
||||
python-versions = ">=3.9"
|
||||
groups = ["main", "dev"]
|
||||
files = [
|
||||
{file = "s3transfer-0.13.1-py3-none-any.whl", hash = "sha256:a981aa7429be23fe6dfc13e80e4020057cbab622b08c0315288758d67cabc724"},
|
||||
{file = "s3transfer-0.13.1.tar.gz", hash = "sha256:c3fdba22ba1bd367922f27ec8032d6a1cf5f10c934fb5d68cf60fd5a23d936cf"},
|
||||
{file = "s3transfer-0.16.0-py3-none-any.whl", hash = "sha256:18e25d66fed509e3868dc1572b3f427ff947dd2c56f844a5bf09481ad3f3b2fe"},
|
||||
{file = "s3transfer-0.16.0.tar.gz", hash = "sha256:8e990f13268025792229cd52fa10cb7163744bf56e719e0b9cb925ab79abf920"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
@@ -5341,14 +5341,14 @@ files = [
|
||||
|
||||
[[package]]
|
||||
name = "virtualenv"
|
||||
version = "21.0.0"
|
||||
version = "21.1.0"
|
||||
description = "Virtual Python Environment builder"
|
||||
optional = false
|
||||
python-versions = ">=3.8"
|
||||
groups = ["main", "dev"]
|
||||
files = [
|
||||
{file = "virtualenv-21.0.0-py3-none-any.whl", hash = "sha256:d44e70637402c7f4b10f48491c02a6397a3a187152a70cba0b6bc7642d69fb05"},
|
||||
{file = "virtualenv-21.0.0.tar.gz", hash = "sha256:e8efe4271b4a5efe7a4dce9d60a05fd11859406c0d6aa8464f4cf451bc132889"},
|
||||
{file = "virtualenv-21.1.0-py3-none-any.whl", hash = "sha256:164f5e14c5587d170cf98e60378eb91ea35bf037be313811905d3a24ea33cc07"},
|
||||
{file = "virtualenv-21.1.0.tar.gz", hash = "sha256:1990a0188c8f16b6b9cf65c9183049007375b26aad415514d377ccacf1e4fb44"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
@@ -5982,4 +5982,4 @@ cffi = ["cffi (>=1.17,<2.0) ; platform_python_implementation != \"PyPy\" and pyt
|
||||
[metadata]
|
||||
lock-version = "2.1"
|
||||
python-versions = "^3.13.2"
|
||||
content-hash = "e4a39ec819321987a78ff7670f29540a721526b68d2fdb131ce4e5f90473f46a"
|
||||
content-hash = "45f24781709000d21d10c83ff5634f79084ea4e4052d69a16e74bd730f459ba7"
|
||||
|
||||
@@ -41,7 +41,7 @@ newrelic = "^11.5.0"
|
||||
packaging = "==26.0"
|
||||
poetry-dotenv-plugin = "==0.2.0"
|
||||
psycopg2-binary = "==2.9.11"
|
||||
pyjwt = "==2.10.1"
|
||||
pyjwt = "==2.12.0"
|
||||
python-dotenv = "==1.2.1"
|
||||
sqlalchemy = "==2.0.47"
|
||||
werkzeug = "^3.1.5"
|
||||
@@ -65,7 +65,7 @@ markupsafe = "^3.0.3"
|
||||
pycparser = "^3.0"
|
||||
python-dateutil = "^2.9.0.post0"
|
||||
pyyaml = "^6.0.3"
|
||||
s3transfer = "^0.13.1"
|
||||
s3transfer = "^0.16.0"
|
||||
six = "^1.16.0"
|
||||
urllib3 = "^2.6.3"
|
||||
webencodings = "^0.5.1"
|
||||
@@ -73,9 +73,9 @@ itsdangerous = "^2.2.0"
|
||||
jinja2 = "^3.1.6"
|
||||
redis = "^6.4.0"
|
||||
requests = "^2.32.5"
|
||||
virtualenv = "^21.0.0"
|
||||
virtualenv = "^21.1.0"
|
||||
marshmallow-enum = "^1.5.1"
|
||||
awscli = "^1.40.36"
|
||||
awscli = "^1.44.38"
|
||||
typing-extensions = "^4.15.0"
|
||||
aiohttp = "^3.13.3"
|
||||
pytest = "^9.0.2"
|
||||
|
||||
@@ -238,12 +238,11 @@ def test_decode_jwt_token_returns_error_with_no_secrets(client):
|
||||
assert exc.value.short_message == "Invalid token: API key not found"
|
||||
|
||||
|
||||
@pytest.mark.parametrize("service_id", ["not-a-valid-id", 1234])
|
||||
def test_requires_auth_should_not_allow_service_id_with_the_wrong_data_type(
|
||||
client, service_jwt_secret, service_id
|
||||
client, service_jwt_secret
|
||||
):
|
||||
token = create_jwt_token(
|
||||
client_id=service_id,
|
||||
client_id="not-a-valid-id",
|
||||
secret=service_jwt_secret,
|
||||
)
|
||||
|
||||
@@ -256,6 +255,16 @@ def test_requires_auth_should_not_allow_service_id_with_the_wrong_data_type(
|
||||
)
|
||||
|
||||
|
||||
def test_requires_auth_should_not_allow_service_id_with_a_non_string(
|
||||
client, service_jwt_secret
|
||||
):
|
||||
with pytest.raises(TypeError):
|
||||
create_jwt_token(
|
||||
client_id=1234,
|
||||
secret=service_jwt_secret,
|
||||
)
|
||||
|
||||
|
||||
def test_requires_auth_returns_error_when_service_doesnt_exist(client, sample_api_key):
|
||||
# get service ID and secret the wrong way around
|
||||
token = create_jwt_token(
|
||||
|
||||
Reference in New Issue
Block a user