Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update versions to fix security alerts #396

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions acto/schema/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@
num = 0
if "size" in kwargs and kwargs["size"] is not None:
num = kwargs["size"]
elif minimum:
num = self.min_items
else:
num = random.randint(self.min_items, self.max_items)

Check warning on line 133 in acto/schema/array.py

View workflow job for this annotation

GitHub Actions / coverage-report

Missing coverage

Missing coverage on line 133

if self.enum is not None:
if exclude_value is not None:
Expand All @@ -145,10 +149,6 @@

# XXX: need to handle exclude_value, but not important for now for array types
result = []
if minimum:
num = self.min_items
else:
num = random.randint(self.min_items, self.max_items)
for _ in range(num):
result.append(self.item_schema.gen(minimum=minimum))
return result
Expand Down
45 changes: 24 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,39 @@ version = "0.1.0"
readme = "README.md"
license = { file = "LICENSE" }
dependencies = [
"deepdiff~=6.3.0",
"kubernetes==26.1.0",
"exrex~=0.11.0",
"jsonschema~=4.17.3",
"jsonpatch~=1.33",
"pandas~=2.0.2",
"PyYAML~=6.0",
"ruamel.yaml~=0.18",
"requests~=2.31.0",
"pydantic~=2.5.2",
"pytest~=7.4.0",
"deepdiff",
"kubernetes==31.0.0",
"exrex",
"jsonschema",
"jsonpatch",
"pandas",
"PyYAML",
"ruamel.yaml",
"requests",
"pydantic",
"pytest",
"urllib3>=2.2.3", # security fix
"requests>=2.32.3", # security fix
"idna>=3.10", # security fix
"certifi>=2024.8.30", # security fix
]

[project.optional-dependencies]
dev = [
"docker~=6.1.3",
"docker",
"prometheus_client",
"pytest-cov~=4.1.0",
"tabulate~=0.9.0",
"pip-tools~=7.3.0",
"pre-commit~=3.6.0",
"ansible-core>=2.16.3",
"cryptography>=42.0.4",
"aiohttp>=3.9.2",
"jinja2>=3.1.3",
"pytest-cov",
"tabulate",
"pip-tools",
"pre-commit",
"ansible-core>=2.17.5",
"jinja2>=3.1.4",
"isort",
"mypy",
"black",
"black>=24.10.0",
"pylint",
"jsonref",
"cryptography>=43.0.1", # security fix
]

[build-system]
Expand Down
66 changes: 19 additions & 47 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,35 +1,26 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --extra=dev --output-file=requirements-dev.txt
#
aiohttp==3.9.3
# via
# acto (pyproject.toml)
# black
aiosignal==1.3.1
# via aiohttp
annotated-types==0.6.0
# via pydantic
ansible-core==2.16.3
ansible-core==2.17.5
# via acto (pyproject.toml)
astroid==3.0.2
# via pylint
async-timeout==4.0.3
# via aiohttp
attrs==23.1.0
# via
# aiohttp
# jsonschema
black==23.12.0
# via jsonschema
black==24.10.0
# via acto (pyproject.toml)
build==1.0.3
# via pip-tools
cachetools==5.3.2
# via google-auth
certifi==2023.11.17
certifi==2024.8.30
# via
# acto (pyproject.toml)
# kubernetes
# requests
cffi==1.16.0
Expand All @@ -46,7 +37,7 @@ coverage[toml]==7.3.3
# via
# coverage
# pytest-cov
cryptography==42.0.5
cryptography==43.0.1
# via
# acto (pyproject.toml)
# ansible-core
Expand All @@ -58,31 +49,27 @@ distlib==0.3.8
# via virtualenv
docker==6.1.3
# via acto (pyproject.toml)
exceptiongroup==1.2.0
# via pytest
durationpy==0.9
# via kubernetes
exrex==0.11.0
# via acto (pyproject.toml)
filelock==3.13.1
# via virtualenv
frozenlist==1.4.1
# via
# aiohttp
# aiosignal
google-auth==2.25.2
# via kubernetes
identify==2.5.33
# via pre-commit
idna==3.6
idna==3.10
# via
# acto (pyproject.toml)
# requests
# yarl
iniconfig==2.0.0
# via pytest
isort==5.13.2
# via
# acto (pyproject.toml)
# pylint
jinja2==3.1.3
jinja2==3.1.4
# via
# acto (pyproject.toml)
# ansible-core
Expand All @@ -94,16 +81,12 @@ jsonref==1.1.0
# via acto (pyproject.toml)
jsonschema==4.17.3
# via acto (pyproject.toml)
kubernetes==26.1.0
kubernetes==31.0.0
# via acto (pyproject.toml)
markupsafe==2.1.3
# via jinja2
mccabe==0.7.0
# via pylint
multidict==6.0.4
# via
# aiohttp
# yarl
mypy==1.7.1
# via acto (pyproject.toml)
mypy-extensions==1.0.0
Expand All @@ -115,7 +98,9 @@ nodeenv==1.8.0
numpy==1.26.2
# via pandas
oauthlib==3.2.2
# via requests-oauthlib
# via
# kubernetes
# requests-oauthlib
ordered-set==4.1.0
# via deepdiff
packaging==23.2
Expand Down Expand Up @@ -178,7 +163,7 @@ pyyaml==6.0.1
# ansible-core
# kubernetes
# pre-commit
requests==2.31.0
requests==2.32.3
# via
# acto (pyproject.toml)
# docker
Expand All @@ -200,29 +185,18 @@ six==1.16.0
# python-dateutil
tabulate==0.9.0
# via acto (pyproject.toml)
tomli==2.0.1
# via
# black
# build
# coverage
# mypy
# pip-tools
# pylint
# pyproject-hooks
# pytest
tomlkit==0.12.3
# via pylint
typing-extensions==4.9.0
# via
# astroid
# black
# mypy
# pydantic
# pydantic-core
tzdata==2023.3
# via pandas
urllib3==2.1.0
urllib3==2.2.3
# via
# acto (pyproject.toml)
# docker
# kubernetes
# requests
Expand All @@ -234,8 +208,6 @@ websocket-client==1.7.0
# kubernetes
wheel==0.42.0
# via pip-tools
yarl==1.9.4
# via aiohttp

# The following packages are considered to be unsafe in a requirements file:
# pip
Expand Down
31 changes: 16 additions & 15 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --output-file=requirements.txt
Expand All @@ -10,22 +10,25 @@ attrs==23.1.0
# via jsonschema
cachetools==5.3.2
# via google-auth
certifi==2023.11.17
certifi==2024.8.30
# via
# acto (pyproject.toml)
# kubernetes
# requests
charset-normalizer==3.3.2
# via requests
deepdiff==6.3.1
# via acto (pyproject.toml)
exceptiongroup==1.2.0
# via pytest
durationpy==0.9
# via kubernetes
exrex==0.11.0
# via acto (pyproject.toml)
google-auth==2.25.2
# via kubernetes
idna==3.6
# via requests
idna==3.10
# via
# acto (pyproject.toml)
# requests
iniconfig==2.0.0
# via pytest
jsonpatch==1.33
Expand All @@ -34,12 +37,14 @@ jsonpointer==2.4
# via jsonpatch
jsonschema==4.17.3
# via acto (pyproject.toml)
kubernetes==26.1.0
kubernetes==31.0.0
# via acto (pyproject.toml)
numpy==1.26.2
# via pandas
oauthlib==3.2.2
# via requests-oauthlib
# via
# kubernetes
# requests-oauthlib
ordered-set==4.1.0
# via deepdiff
packaging==23.2
Expand Down Expand Up @@ -72,7 +77,7 @@ pyyaml==6.0.1
# via
# acto (pyproject.toml)
# kubernetes
requests==2.31.0
requests==2.32.3
# via
# acto (pyproject.toml)
# kubernetes
Expand All @@ -89,20 +94,16 @@ six==1.16.0
# via
# kubernetes
# python-dateutil
tomli==2.0.1
# via pytest
typing-extensions==4.9.0
# via
# pydantic
# pydantic-core
tzdata==2023.3
# via pandas
urllib3==2.1.0
urllib3==2.2.3
# via
# acto (pyproject.toml)
# kubernetes
# requests
websocket-client==1.7.0
# via kubernetes

# The following packages are considered to be unsafe in a requirements file:
# setuptools
8 changes: 5 additions & 3 deletions test/integration_tests/test_semantic_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,14 @@ def test_rbop_tests(self):
curr_input_with_schema, field_path, testcase, setup=True
)

if not testcase.test_precondition(
curr_input_with_schema.get_value_by_path(list(field_path))
):
field_curr_value = curr_input_with_schema.get_value_by_path(
list(field_path)
)
if not testcase.test_precondition(field_curr_value):
raise AssertionError(
"Test precondition failed after applying the test case"
f" {testcase} to the field {field_path_str}"
f" current value: {field_curr_value}"
)

group.finish_testcase()
Expand Down
Loading