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

dependencies: fix vulnerabilites #3769

Merged
merged 1 commit into from
Oct 31, 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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ tests/e2e/cypress/cypress/videos
tests/e2e/cypress/cypress/screenshots
tests/e2e/cypress/cypress/integration/test

# tests
tests/data/documents_items_lofi_items.json

# Dependencies
/node_modules

Expand Down
435 changes: 215 additions & 220 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions rero_ils/modules/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,10 @@ def delete_from_index(self):
current_app.logger.warning(
f"Can not delete from index {self.__class__.__name__}" f": {self.pid}"
)
except ValueError:
current_app.logger.warning(
f"Can not delete from index {self.__class__.__name__}"
)

@property
def pid(self):
Expand Down
2 changes: 1 addition & 1 deletion rero_ils/modules/items/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class Item(ItemCirculation, ItemIssue):

def delete_from_index(self):
"""Delete record from index."""
with contextlib.suppress(NotFoundError):
with contextlib.suppress(NotFoundError, ValueError):
ItemsIndexer().delete(self)

def reasons_not_to_delete(self):
Expand Down
14 changes: 7 additions & 7 deletions scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ function pretests () {
# -> Vulnerability found in flask-caching version 2.0.1
# Vulnerability ID: 40459
# -> Vulnerability found in flask-cors version 5.0.0
# Vulnerability ID: 72731
# -> Vulnerability found in flask-cors version 5.0.0
# Vulnerability ID: 70624
# -> Vulnerability found in sqlalchemy version 1.4.54
# Vulnerability ID: 51668
Expand All @@ -80,21 +82,19 @@ function pretests () {
# -> Vulnerability found in werkzeug version 2.2.3
# Vulnerability ID: 62019
# -> Vulnerability found in werkzeug version 2.2.3
# Vulnerability ID: 71594
# -> Vulnerability found in werkzeug version 2.2.3
# Vulnerability ID: 71595
# -> Vulnerability found in werkzeug version 2.2.3
# Vulnerability ID: 71594
# -> Vulnerability found in jinja2 version 3.1.4
# Vulnerability ID: 70612
# -> Vulnerability found in jsonpickle version 1.4.2
# Vulnerability ID: 72982
# -> Vulnerability found in py version 1.11.0
# Vulnerability ID: 51457
# -> Vulnerability found in sentry-sdk version 1.45.1
# Vulnerability ID: 72260
# -> Vulnerability found in flask-cors version 5.0.0
# Vulnerability ID: 72731
# -> Vulnerability found in jsonpickle version 1.4.2
# Vulnerability ID: 72982
info_msg "Check vulnerabilities:"
safety_exceptions="-i 40459 -i 70624 -i 51668 -i 42194 -i 42852 -i 71594 -i 62019 -i 71595 -i 70612 -i 51457 -i 72260 -i 72731 -i 72982"
safety_exceptions="-i 40459 -i 72731 -i 70624 -i 51668 -i 42194 -i 42852 -i 62019 -i 71595 -i 71594 -i 70612 -i 72982 -i 51457 -i 72260"
msg=$(safety check -o text ${safety_exceptions}) || {
echo "Safety vulnerabilites found for packages:" $(safety check -o bare ${safety_exceptions})
echo "Run: \"safety check -o screen ${safety_exceptions} | grep -i vulnerability\" for more details"
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ def app_config(app_config):
"sources": ["idref", "gnd"],
},
}
app_config["INDEXER_DEFAULT_INDEX"] = "records-record-v1.0.0"
return app_config


Expand Down
77 changes: 0 additions & 77 deletions tests/data/documents_items_lofi_items.json

This file was deleted.

10 changes: 2 additions & 8 deletions tests/ui/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,13 @@ def create_app():
@pytest.fixture()
def ils_record():
"""Ils Record test record."""
yield {
"pid": "ilsrecord_pid",
"name": "IlsRecord Name",
}
yield {"pid": "ilsrecord_pid", "name": "IlsRecord Name"}


@pytest.fixture()
def ils_record_2():
"""Ils Record test record 2."""
yield {
"pid": "ilsrecord_pid_2",
"name": "IlsRecord Name 2",
}
yield {"pid": "ilsrecord_pid_2", "name": "IlsRecord Name 2"}


@pytest.fixture(scope="module")
Expand Down
Loading