From 480ed9d8f5794ba37d79ac37bb3b6d5e4c14ae4c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 17:20:50 +0200 Subject: [PATCH 01/13] fix(deps): update dependency validators to v0.31.0 (#1665) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- backend/poetry.lock | 8 ++++---- backend/pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/poetry.lock b/backend/poetry.lock index 81571441d..3e8015711 100644 --- a/backend/poetry.lock +++ b/backend/poetry.lock @@ -2293,13 +2293,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "validators" -version = "0.30.0" +version = "0.31.0" description = "Python Data Validation for Humans™" optional = false python-versions = ">=3.8" files = [ - {file = "validators-0.30.0-py3-none-any.whl", hash = "sha256:0f2387a9fe76d26c151ab716de18e34467413800abced256fd3a506f4f51cbdc"}, - {file = "validators-0.30.0.tar.gz", hash = "sha256:c2dc5ffef052040bc11b62677429a904f9e04abaf35e0196ac509237cd3c9961"}, + {file = "validators-0.31.0-py3-none-any.whl", hash = "sha256:e15a600d81555a4cd409b17bf55946c5edec7748e776afc85ed0a19bdee54e56"}, + {file = "validators-0.31.0.tar.gz", hash = "sha256:de7574fc56a231c788162f3e7da15bc2053c5ff9e0281d9ff1afb3a7b69498df"}, ] [package.extras] @@ -2429,4 +2429,4 @@ brotli = ["brotli"] [metadata] lock-version = "2.0" python-versions = ">= 3.10, < 3.13" -content-hash = "a9dd9d624d35ab3ca46ca5d58f8f7919c0b7cab27b4c8028724ee3b960b5aa9c" +content-hash = "0fbde692b7fb1b5d41518669c6eeec9c0df9b5cdcfe1b2f012cacaa7a0c18cbd" diff --git a/backend/pyproject.toml b/backend/pyproject.toml index f59a3269d..09b60cfbd 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -53,7 +53,7 @@ jira = "3.8.0" # https://github.com/pycontribs/jira # Others # ------------------------------------------------------------------------------ inflect = "7.3.1" # https://github.com/jaraco/inflect -validators = "0.30.0" # https://github.com/python-validators/validators +validators = "0.31.0" # https://github.com/python-validators/validators cvss = "3.1" # https://github.com/RedHatProductSecurity/cvss jsonpickle = "3.2.2" # https://github.com/jsonpickle/jsonpickle From d9e473e77ed11e81c07316cc91e54a36ca4f270a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 22:24:32 +0200 Subject: [PATCH 02/13] chore(deps): update typescript-eslint monorepo to v7.16.0 (#1667) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- frontend/package-lock.json | 88 +++++++++++++++++++------------------- frontend/package.json | 4 +- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index dec928410..dd87fa5bd 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -47,8 +47,8 @@ "@types/prop-types": "15.7.12", "@types/react": "18.3.3", "@types/react-dom": "18.3.0", - "@typescript-eslint/eslint-plugin": "7.15.0", - "@typescript-eslint/parser": "7.15.0", + "@typescript-eslint/eslint-plugin": "7.16.0", + "@typescript-eslint/parser": "7.16.0", "@vitejs/plugin-react": "4.3.1", "eslint": "8.57.0", "eslint-plugin-react": "7.34.3", @@ -2790,17 +2790,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.15.0.tgz", - "integrity": "sha512-uiNHpyjZtFrLwLDpHnzaDlP3Tt6sGMqTCiqmxaN4n4RP0EfYZDODJyddiFDF44Hjwxr5xAcaYxVKm9QKQFJFLA==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.16.0.tgz", + "integrity": "sha512-py1miT6iQpJcs1BiJjm54AMzeuMPBSPuKPlnT8HlfudbcS5rYeX5jajpLf3mrdRh9dA/Ec2FVUY0ifeVNDIhZw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.15.0", - "@typescript-eslint/type-utils": "7.15.0", - "@typescript-eslint/utils": "7.15.0", - "@typescript-eslint/visitor-keys": "7.15.0", + "@typescript-eslint/scope-manager": "7.16.0", + "@typescript-eslint/type-utils": "7.16.0", + "@typescript-eslint/utils": "7.16.0", + "@typescript-eslint/visitor-keys": "7.16.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -2824,16 +2824,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.15.0.tgz", - "integrity": "sha512-k9fYuQNnypLFcqORNClRykkGOMOj+pV6V91R4GO/l1FDGwpqmSwoOQrOHo3cGaH63e+D3ZiCAOsuS/D2c99j/A==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.16.0.tgz", + "integrity": "sha512-ar9E+k7CU8rWi2e5ErzQiC93KKEFAXA2Kky0scAlPcxYblLt8+XZuHUZwlyfXILyQa95P6lQg+eZgh/dDs3+Vw==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "7.15.0", - "@typescript-eslint/types": "7.15.0", - "@typescript-eslint/typescript-estree": "7.15.0", - "@typescript-eslint/visitor-keys": "7.15.0", + "@typescript-eslint/scope-manager": "7.16.0", + "@typescript-eslint/types": "7.16.0", + "@typescript-eslint/typescript-estree": "7.16.0", + "@typescript-eslint/visitor-keys": "7.16.0", "debug": "^4.3.4" }, "engines": { @@ -2853,14 +2853,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.15.0.tgz", - "integrity": "sha512-Q/1yrF/XbxOTvttNVPihxh1b9fxamjEoz2Os/Pe38OHwxC24CyCqXxGTOdpb4lt6HYtqw9HetA/Rf6gDGaMPlw==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.16.0.tgz", + "integrity": "sha512-8gVv3kW6n01Q6TrI1cmTZ9YMFi3ucDT7i7aI5lEikk2ebk1AEjrwX8MDTdaX5D7fPXMBLvnsaa0IFTAu+jcfOw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.15.0", - "@typescript-eslint/visitor-keys": "7.15.0" + "@typescript-eslint/types": "7.16.0", + "@typescript-eslint/visitor-keys": "7.16.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -2871,14 +2871,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.15.0.tgz", - "integrity": "sha512-SkgriaeV6PDvpA6253PDVep0qCqgbO1IOBiycjnXsszNTVQe5flN5wR5jiczoEoDEnAqYFSFFc9al9BSGVltkg==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.16.0.tgz", + "integrity": "sha512-j0fuUswUjDHfqV/UdW6mLtOQQseORqfdmoBNDFOqs9rvNVR2e+cmu6zJu/Ku4SDuqiJko6YnhwcL8x45r8Oqxg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "7.15.0", - "@typescript-eslint/utils": "7.15.0", + "@typescript-eslint/typescript-estree": "7.16.0", + "@typescript-eslint/utils": "7.16.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -2899,9 +2899,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.15.0.tgz", - "integrity": "sha512-aV1+B1+ySXbQH0pLK0rx66I3IkiZNidYobyfn0WFsdGhSXw+P3YOqeTq5GED458SfB24tg+ux3S+9g118hjlTw==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.16.0.tgz", + "integrity": "sha512-fecuH15Y+TzlUutvUl9Cc2XJxqdLr7+93SQIbcZfd4XRGGKoxyljK27b+kxKamjRkU7FYC6RrbSCg0ALcZn/xw==", "dev": true, "license": "MIT", "engines": { @@ -2913,14 +2913,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.15.0.tgz", - "integrity": "sha512-gjyB/rHAopL/XxfmYThQbXbzRMGhZzGw6KpcMbfe8Q3nNQKStpxnUKeXb0KiN/fFDR42Z43szs6rY7eHk0zdGQ==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.16.0.tgz", + "integrity": "sha512-a5NTvk51ZndFuOLCh5OaJBELYc2O3Zqxfl3Js78VFE1zE46J2AaVuW+rEbVkQznjkmlzWsUI15BG5tQMixzZLw==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "7.15.0", - "@typescript-eslint/visitor-keys": "7.15.0", + "@typescript-eslint/types": "7.16.0", + "@typescript-eslint/visitor-keys": "7.16.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -2942,16 +2942,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.15.0.tgz", - "integrity": "sha512-hfDMDqaqOqsUVGiEPSMLR/AjTSCsmJwjpKkYQRo1FNbmW4tBwBspYDwO9eh7sKSTwMQgBw9/T4DHudPaqshRWA==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.16.0.tgz", + "integrity": "sha512-PqP4kP3hb4r7Jav+NiRCntlVzhxBNWq6ZQ+zQwII1y/G/1gdIPeYDCKr2+dH6049yJQsWZiHU6RlwvIFBXXGNA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.15.0", - "@typescript-eslint/types": "7.15.0", - "@typescript-eslint/typescript-estree": "7.15.0" + "@typescript-eslint/scope-manager": "7.16.0", + "@typescript-eslint/types": "7.16.0", + "@typescript-eslint/typescript-estree": "7.16.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -2965,13 +2965,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.15.0.tgz", - "integrity": "sha512-Hqgy/ETgpt2L5xueA/zHHIl4fJI2O4XUE9l4+OIfbJIRSnTJb/QscncdqqZzofQegIJugRIF57OJea1khw2SDw==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.16.0.tgz", + "integrity": "sha512-rMo01uPy9C7XxG7AFsxa8zLnWXTF8N3PYclekWSrurvhwiw1eW88mrKiAYe6s53AUY57nTRz8dJsuuXdkAhzCg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.15.0", + "@typescript-eslint/types": "7.16.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { diff --git a/frontend/package.json b/frontend/package.json index ac9da7b29..6c2f1c334 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -56,8 +56,8 @@ "@types/react-dom": "18.3.0", "rewire": "7.0.0", "typescript": "5.5.3", - "@typescript-eslint/eslint-plugin": "7.15.0", - "@typescript-eslint/parser": "7.15.0", + "@typescript-eslint/eslint-plugin": "7.16.0", + "@typescript-eslint/parser": "7.16.0", "eslint": "8.57.0", "eslint-plugin-react": "7.34.3", "eslint-plugin-security": "3.0.1", From 57cc56325acc8be2e48e1f6c33d76d68f3246de1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 19:54:11 +0200 Subject: [PATCH 03/13] fix(deps): update dependency packageurl-python to v0.15.3 (#1668) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- backend/poetry.lock | 8 ++++---- backend/pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/poetry.lock b/backend/poetry.lock index 3e8015711..6f963e5c6 100644 --- a/backend/poetry.lock +++ b/backend/poetry.lock @@ -1396,13 +1396,13 @@ et-xmlfile = "*" [[package]] name = "packageurl-python" -version = "0.15.2" +version = "0.15.3" description = "A purl aka. Package URL parser and builder" optional = false python-versions = ">=3.7" files = [ - {file = "packageurl_python-0.15.2-py3-none-any.whl", hash = "sha256:6b81641aeedf0a73377d88a8a640e45a2a0848ffdf5447d24eeef8526c41ac92"}, - {file = "packageurl_python-0.15.2.tar.gz", hash = "sha256:9cd10eeedbc6680728c10a1585c6dd7bbad4ef4b389d80cd0ac223205e9c87df"}, + {file = "packageurl_python-0.15.3-py3-none-any.whl", hash = "sha256:96624702032239e70e61b950e14460a5b5f87ac21fc68f119414047b94f0de27"}, + {file = "packageurl_python-0.15.3.tar.gz", hash = "sha256:82e1150f1fc228e25e7b3be1c641ef96b6a0811526c0b4e4f7882a181e862607"}, ] [package.extras] @@ -2429,4 +2429,4 @@ brotli = ["brotli"] [metadata] lock-version = "2.0" python-versions = ">= 3.10, < 3.13" -content-hash = "0fbde692b7fb1b5d41518669c6eeec9c0df9b5cdcfe1b2f012cacaa7a0c18cbd" +content-hash = "bd49ab69108f2e779ea66881fe472272a6f20be6968072b79bd7e421326dbe5b" diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 09b60cfbd..fca49186c 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -43,7 +43,7 @@ defusedcsv = "2.0.0" # https://github.com/raphaelm/defusedcsv openpyxl = "3.1.5" # https://foss.heptapod.net/openpyxl/openpyxl # Package URL # ------------------------------------------------------------------------------ -packageurl-python = "0.15.2" # https://github.com/package-url/packageurl-python +packageurl-python = "0.15.3" # https://github.com/package-url/packageurl-python # Task queue # ------------------------------------------------------------------------------ huey = "2.5.1" # https://github.com/coleifer/huey From 715dec4261395e5935eaf7bdc15fa8484d751f32 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 20:02:37 +0200 Subject: [PATCH 04/13] chore(deps): update actions/setup-node action to v4.0.3 (#1669) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/check_frontend.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_frontend.yml b/.github/workflows/check_frontend.yml index 49fb70a19..abeed90f1 100644 --- a/.github/workflows/check_frontend.yml +++ b/.github/workflows/check_frontend.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 + - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 with: node-version: 20 From 194df8bd361a8c5d9e9816af538d2cc261fc9fa3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 20:59:53 +0100 Subject: [PATCH 05/13] fix(deps): update dependency django to v5.0.7 (#1670) --- backend/poetry.lock | 8 ++++---- backend/pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/poetry.lock b/backend/poetry.lock index 6f963e5c6..2936e53cd 100644 --- a/backend/poetry.lock +++ b/backend/poetry.lock @@ -592,13 +592,13 @@ files = [ [[package]] name = "django" -version = "5.0.6" +version = "5.0.7" description = "A high-level Python web framework that encourages rapid development and clean, pragmatic design." optional = false python-versions = ">=3.10" files = [ - {file = "Django-5.0.6-py3-none-any.whl", hash = "sha256:8363ac062bb4ef7c3f12d078f6fa5d154031d129a15170a1066412af49d30905"}, - {file = "Django-5.0.6.tar.gz", hash = "sha256:ff1b61005004e476e0aeea47c7f79b85864c70124030e95146315396f1e7951f"}, + {file = "Django-5.0.7-py3-none-any.whl", hash = "sha256:f216510ace3de5de01329463a315a629f33480e893a9024fc93d8c32c22913da"}, + {file = "Django-5.0.7.tar.gz", hash = "sha256:bd4505cae0b9bd642313e8fb71810893df5dc2ffcacaa67a33af2d5cd61888f2"}, ] [package.dependencies] @@ -2429,4 +2429,4 @@ brotli = ["brotli"] [metadata] lock-version = "2.0" python-versions = ">= 3.10, < 3.13" -content-hash = "bd49ab69108f2e779ea66881fe472272a6f20be6968072b79bd7e421326dbe5b" +content-hash = "c1f22b48dd5bf0d2c01f8c82a5bdae791925fb0acacb57886b0cbbd458a4a14b" diff --git a/backend/pyproject.toml b/backend/pyproject.toml index fca49186c..af0b61ea6 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -11,7 +11,7 @@ authors = [ python = ">= 3.10, < 3.13" # Django # ------------------------------------------------------------------------------ -django = "5.0.6" # https://www.djangoproject.com/ +django = "5.0.7" # https://www.djangoproject.com/ django-environ = "0.11.2" # https://github.com/joke2k/django-environ django-filter = "24.2" # https://github.com/carltongibson/django-filter django-csp = "3.8" # https://github.com/mozilla/django-csp From 5cdfde37b03b01cc97d8eddc5e36019bd828ff7b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 07:32:36 +0200 Subject: [PATCH 06/13] chore(deps): update node.js to v20.15.1 (#1671) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- docker/frontend/dev/Dockerfile | 2 +- docker/frontend/prod/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/frontend/dev/Dockerfile b/docker/frontend/dev/Dockerfile index a2bbdce1e..867bbb5a3 100644 --- a/docker/frontend/dev/Dockerfile +++ b/docker/frontend/dev/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20.15.0-alpine3.19@sha256:1bdec9c67503d33348be6e73a8e5e94aad679b32da15e4fd3956e5e48f87f623 +FROM node:20.15.1-alpine3.19@sha256:97f02cbb1c8ef6eefcfb1b1f958c012362758972cf125a99c09bd18b26a716c9 WORKDIR /app COPY ./frontend/package*.json /app/. diff --git a/docker/frontend/prod/Dockerfile b/docker/frontend/prod/Dockerfile index 6da9dbed5..1ecd3e8be 100644 --- a/docker/frontend/prod/Dockerfile +++ b/docker/frontend/prod/Dockerfile @@ -1,5 +1,5 @@ # build environment -FROM node:20.15.0-alpine3.19@sha256:1bdec9c67503d33348be6e73a8e5e94aad679b32da15e4fd3956e5e48f87f623 as build +FROM node:20.15.1-alpine3.19@sha256:97f02cbb1c8ef6eefcfb1b1f958c012362758972cf125a99c09bd18b26a716c9 as build ARG VERSION=unkown From ae0ea4a803edb09e6af730cc99229bf424669abb Mon Sep 17 00:00:00 2001 From: Stefan Fleckenstein Date: Wed, 10 Jul 2024 13:58:59 +0100 Subject: [PATCH 07/13] fix: product_group url when showing rule (#1672) * fix: product_group url when showing rule * fix: unittests --- backend/application/core/api/serializers_product.py | 2 +- .../api/test_authorization_observation_logs.py | 2 +- .../api/test_authorization_observations.py | 2 +- .../api/test_authorization_product_rules.py | 10 +++++----- .../access_control/api/test_authorization_vex_csaf.py | 6 +++--- .../api/test_authorization_vex_openvex.py | 6 +++--- frontend/src/rules/product_rules/ProductRuleShow.tsx | 9 ++++++++- 7 files changed, 22 insertions(+), 15 deletions(-) diff --git a/backend/application/core/api/serializers_product.py b/backend/application/core/api/serializers_product.py index c753dd2f4..c8729a020 100644 --- a/backend/application/core/api/serializers_product.py +++ b/backend/application/core/api/serializers_product.py @@ -342,7 +342,7 @@ class NestedProductSerializer(ModelSerializer): class Meta: model = Product - exclude = ["is_product_group", "new_observations_in_review", "members"] + exclude = ["new_observations_in_review", "members"] def get_permissions(self, product: Product) -> list[Permissions]: return get_permissions_for_role(get_highest_user_role(product)) diff --git a/backend/unittests/access_control/api/test_authorization_observation_logs.py b/backend/unittests/access_control/api/test_authorization_observation_logs.py index 1057ba724..8b4f89283 100644 --- a/backend/unittests/access_control/api/test_authorization_observation_logs.py +++ b/backend/unittests/access_control/api/test_authorization_observation_logs.py @@ -35,7 +35,7 @@ def _test_authorization_observation_logs(self): ) ) - expected_data = "{'id': 1, 'observation_data': {'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'branch_name': 'db_branch_internal_dev', 'parser_data': {'id': 1, 'name': 'db_parser_file', 'type': 'DAST', 'source': 'File', 'module_name': '', 'class_name': ''}, 'references': [], 'evidences': [{'id': 1, 'name': 'db_evidence_internal'}], 'origin_source_file_url': None, 'origin_component_purl_type': '', 'origin_component_purl_namespace': '', 'issue_tracker_issue_url': None, 'assessment_needs_approval': None, 'title': 'db_observation_internal', 'description': '', 'recommendation': '', 'current_severity': 'Medium', 'parser_severity': 'Medium', 'rule_severity': '', 'assessment_severity': '', 'current_status': 'Duplicate', 'parser_status': 'Open', 'vex_status': '', 'rule_status': 'Duplicate', 'assessment_status': '', 'scanner_observation_id': '', 'vulnerability_id': '', 'origin_component_name': '', 'origin_component_version': '', 'origin_component_name_version': '', 'origin_component_purl': '', 'origin_component_cpe': '', 'origin_component_dependencies': '', 'origin_docker_image_name': '', 'origin_docker_image_tag': '', 'origin_docker_image_name_tag': '', 'origin_docker_image_name_tag_short': '', 'origin_docker_image_digest': '', 'origin_endpoint_url': '', 'origin_endpoint_scheme': '', 'origin_endpoint_hostname': '', 'origin_endpoint_port': None, 'origin_endpoint_path': '', 'origin_endpoint_params': '', 'origin_endpoint_query': '', 'origin_endpoint_fragment': '', 'origin_service_name': 'db_service_internal_backend', 'origin_source_file': '', 'origin_source_line_start': None, 'origin_source_line_end': None, 'origin_cloud_provider': '', 'origin_cloud_account_subscription_project': '', 'origin_cloud_resource': '', 'origin_cloud_resource_type': '', 'origin_cloud_qualified_resource': '', 'cvss3_score': None, 'cvss3_vector': '', 'cwe': None, 'epss_score': None, 'epss_percentile': None, 'found': None, 'scanner': 'db_parser', 'upload_filename': 'parser.json', 'api_configuration_name': '', 'import_last_seen': '2022-12-15T17:14:20.870000+01:00', 'created': '2022-12-15T17:10:35.513000+01:00', 'modified': '2022-12-16T17:13:18.282000+01:00', 'last_observation_log': '2022-12-16T17:13:18.281000+01:00', 'identity_hash': '6eef8088480aa2523aeeb64ad35f876a942cc3172cfb36752f3a052a4f88642c', 'issue_tracker_issue_id': '', 'issue_tracker_issue_closed': False, 'has_potential_duplicates': False, 'current_vex_justification': '', 'parser_vex_justification': '', 'vex_vex_justification': '', 'rule_vex_justification': '', 'assessment_vex_justification': '', 'risk_acceptance_expiry_date': None, 'product': 1, 'branch': 1, 'parser': 1, 'origin_service': 1, 'general_rule': None, 'product_rule': 1, 'vex_statement': None}, 'user_full_name': 'db_internal_write', 'approval_user_full_name': None, 'severity': 'Medium', 'status': 'Open', 'comment': 'Set by parser', 'created': '2022-12-15T17:10:35.518000+01:00', 'vex_justification': '', 'assessment_status': 'Auto approved', 'approval_remark': '', 'approval_date': None, 'risk_acceptance_expiry_date': None, 'observation': 1, 'user': 2, 'approval_user': None, 'general_rule': None, 'product_rule': None, 'vex_statement': None}" + expected_data = "{'id': 1, 'observation_data': {'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'is_product_group': False, 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'branch_name': 'db_branch_internal_dev', 'parser_data': {'id': 1, 'name': 'db_parser_file', 'type': 'DAST', 'source': 'File', 'module_name': '', 'class_name': ''}, 'references': [], 'evidences': [{'id': 1, 'name': 'db_evidence_internal'}], 'origin_source_file_url': None, 'origin_component_purl_type': '', 'origin_component_purl_namespace': '', 'issue_tracker_issue_url': None, 'assessment_needs_approval': None, 'title': 'db_observation_internal', 'description': '', 'recommendation': '', 'current_severity': 'Medium', 'parser_severity': 'Medium', 'rule_severity': '', 'assessment_severity': '', 'current_status': 'Duplicate', 'parser_status': 'Open', 'vex_status': '', 'rule_status': 'Duplicate', 'assessment_status': '', 'scanner_observation_id': '', 'vulnerability_id': '', 'origin_component_name': '', 'origin_component_version': '', 'origin_component_name_version': '', 'origin_component_purl': '', 'origin_component_cpe': '', 'origin_component_dependencies': '', 'origin_docker_image_name': '', 'origin_docker_image_tag': '', 'origin_docker_image_name_tag': '', 'origin_docker_image_name_tag_short': '', 'origin_docker_image_digest': '', 'origin_endpoint_url': '', 'origin_endpoint_scheme': '', 'origin_endpoint_hostname': '', 'origin_endpoint_port': None, 'origin_endpoint_path': '', 'origin_endpoint_params': '', 'origin_endpoint_query': '', 'origin_endpoint_fragment': '', 'origin_service_name': 'db_service_internal_backend', 'origin_source_file': '', 'origin_source_line_start': None, 'origin_source_line_end': None, 'origin_cloud_provider': '', 'origin_cloud_account_subscription_project': '', 'origin_cloud_resource': '', 'origin_cloud_resource_type': '', 'origin_cloud_qualified_resource': '', 'cvss3_score': None, 'cvss3_vector': '', 'cwe': None, 'epss_score': None, 'epss_percentile': None, 'found': None, 'scanner': 'db_parser', 'upload_filename': 'parser.json', 'api_configuration_name': '', 'import_last_seen': '2022-12-15T17:14:20.870000+01:00', 'created': '2022-12-15T17:10:35.513000+01:00', 'modified': '2022-12-16T17:13:18.282000+01:00', 'last_observation_log': '2022-12-16T17:13:18.281000+01:00', 'identity_hash': '6eef8088480aa2523aeeb64ad35f876a942cc3172cfb36752f3a052a4f88642c', 'issue_tracker_issue_id': '', 'issue_tracker_issue_closed': False, 'has_potential_duplicates': False, 'current_vex_justification': '', 'parser_vex_justification': '', 'vex_vex_justification': '', 'rule_vex_justification': '', 'assessment_vex_justification': '', 'risk_acceptance_expiry_date': None, 'product': 1, 'branch': 1, 'parser': 1, 'origin_service': 1, 'general_rule': None, 'product_rule': 1, 'vex_statement': None}, 'user_full_name': 'db_internal_write', 'approval_user_full_name': None, 'severity': 'Medium', 'status': 'Open', 'comment': 'Set by parser', 'created': '2022-12-15T17:10:35.518000+01:00', 'vex_justification': '', 'assessment_status': 'Auto approved', 'approval_remark': '', 'approval_date': None, 'risk_acceptance_expiry_date': None, 'observation': 1, 'user': 2, 'approval_user': None, 'general_rule': None, 'product_rule': None, 'vex_statement': None}" self._test_api( APITest( "db_internal_write", diff --git a/backend/unittests/access_control/api/test_authorization_observations.py b/backend/unittests/access_control/api/test_authorization_observations.py index afa27c739..c0252648e 100644 --- a/backend/unittests/access_control/api/test_authorization_observations.py +++ b/backend/unittests/access_control/api/test_authorization_observations.py @@ -32,7 +32,7 @@ def _test_authorization_observations(self): expected_data, ) ) - expected_data = "{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'branch_name': 'db_branch_internal_dev', 'parser_data': {'id': 1, 'name': 'db_parser_file', 'type': 'DAST', 'source': 'File', 'module_name': '', 'class_name': ''}, 'references': [], 'evidences': [{'id': 1, 'name': 'db_evidence_internal'}], 'origin_source_file_url': None, 'origin_component_purl_type': '', 'origin_component_purl_namespace': '', 'issue_tracker_issue_url': None, 'assessment_needs_approval': None, 'title': 'db_observation_internal', 'description': '', 'recommendation': '', 'current_severity': 'Medium', 'parser_severity': 'Medium', 'rule_severity': '', 'assessment_severity': '', 'current_status': 'Duplicate', 'parser_status': 'Open', 'vex_status': '', 'rule_status': 'Duplicate', 'assessment_status': '', 'scanner_observation_id': '', 'vulnerability_id': '', 'origin_component_name': '', 'origin_component_version': '', 'origin_component_name_version': '', 'origin_component_purl': '', 'origin_component_cpe': '', 'origin_component_dependencies': '', 'origin_docker_image_name': '', 'origin_docker_image_tag': '', 'origin_docker_image_name_tag': '', 'origin_docker_image_name_tag_short': '', 'origin_docker_image_digest': '', 'origin_endpoint_url': '', 'origin_endpoint_scheme': '', 'origin_endpoint_hostname': '', 'origin_endpoint_port': None, 'origin_endpoint_path': '', 'origin_endpoint_params': '', 'origin_endpoint_query': '', 'origin_endpoint_fragment': '', 'origin_service_name': 'db_service_internal_backend', 'origin_source_file': '', 'origin_source_line_start': None, 'origin_source_line_end': None, 'origin_cloud_provider': '', 'origin_cloud_account_subscription_project': '', 'origin_cloud_resource': '', 'origin_cloud_resource_type': '', 'origin_cloud_qualified_resource': '', 'cvss3_score': None, 'cvss3_vector': '', 'cwe': None, 'epss_score': None, 'epss_percentile': None, 'found': None, 'scanner': 'db_parser', 'upload_filename': 'parser.json', 'api_configuration_name': '', 'import_last_seen': '2022-12-15T17:14:20.870000+01:00', 'created': '2022-12-15T17:10:35.513000+01:00', 'modified': '2022-12-16T17:13:18.282000+01:00', 'last_observation_log': '2022-12-16T17:13:18.281000+01:00', 'identity_hash': '6eef8088480aa2523aeeb64ad35f876a942cc3172cfb36752f3a052a4f88642c', 'issue_tracker_issue_id': '', 'issue_tracker_issue_closed': False, 'has_potential_duplicates': False, 'current_vex_justification': '', 'parser_vex_justification': '', 'vex_vex_justification': '', 'rule_vex_justification': '', 'assessment_vex_justification': '', 'risk_acceptance_expiry_date': None, 'product': 1, 'branch': 1, 'parser': 1, 'origin_service': 1, 'general_rule': None, 'product_rule': 1, 'vex_statement': None}" + expected_data = "{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'is_product_group': False, 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'branch_name': 'db_branch_internal_dev', 'parser_data': {'id': 1, 'name': 'db_parser_file', 'type': 'DAST', 'source': 'File', 'module_name': '', 'class_name': ''}, 'references': [], 'evidences': [{'id': 1, 'name': 'db_evidence_internal'}], 'origin_source_file_url': None, 'origin_component_purl_type': '', 'origin_component_purl_namespace': '', 'issue_tracker_issue_url': None, 'assessment_needs_approval': None, 'title': 'db_observation_internal', 'description': '', 'recommendation': '', 'current_severity': 'Medium', 'parser_severity': 'Medium', 'rule_severity': '', 'assessment_severity': '', 'current_status': 'Duplicate', 'parser_status': 'Open', 'vex_status': '', 'rule_status': 'Duplicate', 'assessment_status': '', 'scanner_observation_id': '', 'vulnerability_id': '', 'origin_component_name': '', 'origin_component_version': '', 'origin_component_name_version': '', 'origin_component_purl': '', 'origin_component_cpe': '', 'origin_component_dependencies': '', 'origin_docker_image_name': '', 'origin_docker_image_tag': '', 'origin_docker_image_name_tag': '', 'origin_docker_image_name_tag_short': '', 'origin_docker_image_digest': '', 'origin_endpoint_url': '', 'origin_endpoint_scheme': '', 'origin_endpoint_hostname': '', 'origin_endpoint_port': None, 'origin_endpoint_path': '', 'origin_endpoint_params': '', 'origin_endpoint_query': '', 'origin_endpoint_fragment': '', 'origin_service_name': 'db_service_internal_backend', 'origin_source_file': '', 'origin_source_line_start': None, 'origin_source_line_end': None, 'origin_cloud_provider': '', 'origin_cloud_account_subscription_project': '', 'origin_cloud_resource': '', 'origin_cloud_resource_type': '', 'origin_cloud_qualified_resource': '', 'cvss3_score': None, 'cvss3_vector': '', 'cwe': None, 'epss_score': None, 'epss_percentile': None, 'found': None, 'scanner': 'db_parser', 'upload_filename': 'parser.json', 'api_configuration_name': '', 'import_last_seen': '2022-12-15T17:14:20.870000+01:00', 'created': '2022-12-15T17:10:35.513000+01:00', 'modified': '2022-12-16T17:13:18.282000+01:00', 'last_observation_log': '2022-12-16T17:13:18.281000+01:00', 'identity_hash': '6eef8088480aa2523aeeb64ad35f876a942cc3172cfb36752f3a052a4f88642c', 'issue_tracker_issue_id': '', 'issue_tracker_issue_closed': False, 'has_potential_duplicates': False, 'current_vex_justification': '', 'parser_vex_justification': '', 'vex_vex_justification': '', 'rule_vex_justification': '', 'assessment_vex_justification': '', 'risk_acceptance_expiry_date': None, 'product': 1, 'branch': 1, 'parser': 1, 'origin_service': 1, 'general_rule': None, 'product_rule': 1, 'vex_statement': None}" self._test_api( APITest( "db_internal_write", diff --git a/backend/unittests/access_control/api/test_authorization_product_rules.py b/backend/unittests/access_control/api/test_authorization_product_rules.py index bc5cd31cb..93cf1d41e 100644 --- a/backend/unittests/access_control/api/test_authorization_product_rules.py +++ b/backend/unittests/access_control/api/test_authorization_product_rules.py @@ -16,12 +16,12 @@ def test_authorization_product_rules_product_authorization_group_member(self): self._test_authorization_product_rules() def _test_authorization_product_rules(self): - expected_data = "{'count': 2, 'next': None, 'previous': None, 'results': [{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'user': None, 'approval_status': '', 'approval_remark': '', 'approval_date': None, 'approval_user': None, 'user_full_name': None, 'approval_user_full_name': None, 'name': 'db_product_rule_internal', 'description': '', 'scanner_prefix': '', 'title': '', 'description_observation': '', 'origin_component_name_version': '', 'origin_docker_image_name_tag': '', 'origin_endpoint_url': '', 'origin_service_name': '', 'origin_source_file': '', 'origin_cloud_qualified_resource': '', 'new_severity': '', 'new_status': 'Duplicate', 'new_vex_justification': '', 'enabled': True, 'product': 1, 'parser': 1}, {'id': 2, 'product_data': {'id': 2, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_external', 'description': '', 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': None, 'security_gate_active': False, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': None, 'repository_default_branch': 3}, 'user': None, 'approval_status': '', 'approval_remark': '', 'approval_date': None, 'approval_user': None, 'user_full_name': None, 'approval_user_full_name': None, 'name': 'db_product_rule_external', 'description': '', 'scanner_prefix': '', 'title': '', 'description_observation': '', 'origin_component_name_version': '', 'origin_docker_image_name_tag': '', 'origin_endpoint_url': '', 'origin_service_name': '', 'origin_source_file': '', 'origin_cloud_qualified_resource': '', 'new_severity': '', 'new_status': 'False positive', 'new_vex_justification': '', 'enabled': True, 'product': 2, 'parser': 1}]}" + expected_data = "{'count': 2, 'next': None, 'previous': None, 'results': [{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'is_product_group': False, 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'user': None, 'approval_status': '', 'approval_remark': '', 'approval_date': None, 'approval_user': None, 'user_full_name': None, 'approval_user_full_name': None, 'name': 'db_product_rule_internal', 'description': '', 'scanner_prefix': '', 'title': '', 'description_observation': '', 'origin_component_name_version': '', 'origin_docker_image_name_tag': '', 'origin_endpoint_url': '', 'origin_service_name': '', 'origin_source_file': '', 'origin_cloud_qualified_resource': '', 'new_severity': '', 'new_status': 'Duplicate', 'new_vex_justification': '', 'enabled': True, 'product': 1, 'parser': 1}, {'id': 2, 'product_data': {'id': 2, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_external', 'description': '', 'is_product_group': False, 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': None, 'security_gate_active': False, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': None, 'repository_default_branch': 3}, 'user': None, 'approval_status': '', 'approval_remark': '', 'approval_date': None, 'approval_user': None, 'user_full_name': None, 'approval_user_full_name': None, 'name': 'db_product_rule_external', 'description': '', 'scanner_prefix': '', 'title': '', 'description_observation': '', 'origin_component_name_version': '', 'origin_docker_image_name_tag': '', 'origin_endpoint_url': '', 'origin_service_name': '', 'origin_source_file': '', 'origin_cloud_qualified_resource': '', 'new_severity': '', 'new_status': 'False positive', 'new_vex_justification': '', 'enabled': True, 'product': 2, 'parser': 1}]}" self._test_api( APITest("db_admin", "get", "/api/product_rules/", None, 200, expected_data) ) - expected_data = "{'count': 1, 'next': None, 'previous': None, 'results': [{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'user': None, 'approval_status': '', 'approval_remark': '', 'approval_date': None, 'approval_user': None, 'user_full_name': None, 'approval_user_full_name': None, 'name': 'db_product_rule_internal', 'description': '', 'scanner_prefix': '', 'title': '', 'description_observation': '', 'origin_component_name_version': '', 'origin_docker_image_name_tag': '', 'origin_endpoint_url': '', 'origin_service_name': '', 'origin_source_file': '', 'origin_cloud_qualified_resource': '', 'new_severity': '', 'new_status': 'Duplicate', 'new_vex_justification': '', 'enabled': True, 'product': 1, 'parser': 1}]}" + expected_data = "{'count': 1, 'next': None, 'previous': None, 'results': [{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'is_product_group': False, 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'user': None, 'approval_status': '', 'approval_remark': '', 'approval_date': None, 'approval_user': None, 'user_full_name': None, 'approval_user_full_name': None, 'name': 'db_product_rule_internal', 'description': '', 'scanner_prefix': '', 'title': '', 'description_observation': '', 'origin_component_name_version': '', 'origin_docker_image_name_tag': '', 'origin_endpoint_url': '', 'origin_service_name': '', 'origin_source_file': '', 'origin_cloud_qualified_resource': '', 'new_severity': '', 'new_status': 'Duplicate', 'new_vex_justification': '', 'enabled': True, 'product': 1, 'parser': 1}]}" self._test_api( APITest( "db_internal_write", @@ -33,7 +33,7 @@ def _test_authorization_product_rules(self): ) ) - expected_data = "{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'user': None, 'approval_status': '', 'approval_remark': '', 'approval_date': None, 'approval_user': None, 'user_full_name': None, 'approval_user_full_name': None, 'name': 'db_product_rule_internal', 'description': '', 'scanner_prefix': '', 'title': '', 'description_observation': '', 'origin_component_name_version': '', 'origin_docker_image_name_tag': '', 'origin_endpoint_url': '', 'origin_service_name': '', 'origin_source_file': '', 'origin_cloud_qualified_resource': '', 'new_severity': '', 'new_status': 'Duplicate', 'new_vex_justification': '', 'enabled': True, 'product': 1, 'parser': 1}" + expected_data = "{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'is_product_group': False, 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'user': None, 'approval_status': '', 'approval_remark': '', 'approval_date': None, 'approval_user': None, 'user_full_name': None, 'approval_user_full_name': None, 'name': 'db_product_rule_internal', 'description': '', 'scanner_prefix': '', 'title': '', 'description_observation': '', 'origin_component_name_version': '', 'origin_docker_image_name_tag': '', 'origin_endpoint_url': '', 'origin_service_name': '', 'origin_source_file': '', 'origin_cloud_qualified_resource': '', 'new_severity': '', 'new_status': 'Duplicate', 'new_vex_justification': '', 'enabled': True, 'product': 1, 'parser': 1}" self._test_api( APITest( "db_internal_write", @@ -83,7 +83,7 @@ def _test_authorization_product_rules(self): ) ) - expected_data = "{'id': 4, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'user': 'db_internal_write', 'approval_status': 'Auto approved', 'approval_remark': '', 'approval_date': None, 'approval_user': None, 'user_full_name': 'db_internal_write', 'approval_user_full_name': None, 'name': 'string', 'description': '', 'scanner_prefix': '', 'title': '', 'description_observation': '', 'origin_component_name_version': '', 'origin_docker_image_name_tag': '', 'origin_endpoint_url': '', 'origin_service_name': '', 'origin_source_file': '', 'origin_cloud_qualified_resource': '', 'new_severity': '', 'new_status': '', 'new_vex_justification': '', 'enabled': True, 'product': 1, 'parser': 1}" + expected_data = "{'id': 4, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'is_product_group': False, 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'user': 'db_internal_write', 'approval_status': 'Auto approved', 'approval_remark': '', 'approval_date': None, 'approval_user': None, 'user_full_name': 'db_internal_write', 'approval_user_full_name': None, 'name': 'string', 'description': '', 'scanner_prefix': '', 'title': '', 'description_observation': '', 'origin_component_name_version': '', 'origin_docker_image_name_tag': '', 'origin_endpoint_url': '', 'origin_service_name': '', 'origin_source_file': '', 'origin_cloud_qualified_resource': '', 'new_severity': '', 'new_status': '', 'new_vex_justification': '', 'enabled': True, 'product': 1, 'parser': 1}" self._test_api( APITest( "db_internal_write", @@ -110,7 +110,7 @@ def _test_authorization_product_rules(self): ) ) - expected_data = "{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'user': 'db_internal_write', 'approval_status': 'Auto approved', 'approval_remark': '', 'approval_date': None, 'approval_user': None, 'user_full_name': 'db_internal_write', 'approval_user_full_name': None, 'name': 'changed', 'description': '', 'scanner_prefix': 'also_changed', 'title': '', 'description_observation': '', 'origin_component_name_version': '', 'origin_docker_image_name_tag': '', 'origin_endpoint_url': '', 'origin_service_name': '', 'origin_source_file': '', 'origin_cloud_qualified_resource': '', 'new_severity': '', 'new_status': 'Duplicate', 'new_vex_justification': '', 'enabled': True, 'product': 1, 'parser': 1}" + expected_data = "{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'is_product_group': False, 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'user': 'db_internal_write', 'approval_status': 'Auto approved', 'approval_remark': '', 'approval_date': None, 'approval_user': None, 'user_full_name': 'db_internal_write', 'approval_user_full_name': None, 'name': 'changed', 'description': '', 'scanner_prefix': 'also_changed', 'title': '', 'description_observation': '', 'origin_component_name_version': '', 'origin_docker_image_name_tag': '', 'origin_endpoint_url': '', 'origin_service_name': '', 'origin_source_file': '', 'origin_cloud_qualified_resource': '', 'new_severity': '', 'new_status': 'Duplicate', 'new_vex_justification': '', 'enabled': True, 'product': 1, 'parser': 1}" self._test_api( APITest( "db_internal_write", diff --git a/backend/unittests/access_control/api/test_authorization_vex_csaf.py b/backend/unittests/access_control/api/test_authorization_vex_csaf.py index 2ef1f7f72..22d808a02 100644 --- a/backend/unittests/access_control/api/test_authorization_vex_csaf.py +++ b/backend/unittests/access_control/api/test_authorization_vex_csaf.py @@ -16,12 +16,12 @@ def test_authorization_csaf_product_authorization_group_member(self): self._test_authorization_csaf() def _test_authorization_csaf(self): - expected_data = "{'count': 2, 'next': None, 'previous': None, 'results': [{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'revisions': [], 'vulnerability_names': 'CVE_vulnerability_1', 'branch_names': 'db_branch_internal_dev', 'user_full_name': 'db_external', 'document_id_prefix': 'csaf_prefix', 'document_base_id': '2024_0001', 'version': 1, 'content_hash': 'abcdef123456', 'title': 'csaf_title_product', 'tlp_label': 'AMBER', 'tracking_initial_release_date': '2022-12-15T17:10:35.513000+01:00', 'tracking_current_release_date': '2022-12-16T17:13:18.282000+01:00', 'tracking_status': 'final', 'publisher_name': 'publisher name', 'publisher_category': 'publisher category', 'publisher_namespace': 'https://publisher.namespace', 'user': 4, 'product': 1}, {'id': 2, 'product_data': None, 'revisions': [], 'vulnerability_names': 'CVE_vulnerability', 'branch_names': 'db_branch_internal_main', 'user_full_name': 'db_external', 'document_id_prefix': 'csaf_prefix', 'document_base_id': '2024_0002', 'version': 1, 'content_hash': 'abcdef123456', 'title': 'csaf_title_vulnerability', 'tlp_label': 'RED', 'tracking_initial_release_date': '2022-12-15T17:10:35.513000+01:00', 'tracking_current_release_date': '2022-12-16T17:13:18.282000+01:00', 'tracking_status': 'final', 'publisher_name': 'publisher name', 'publisher_category': 'publisher category', 'publisher_namespace': 'https://publisher.namespace', 'user': 4, 'product': None}]}" + expected_data = "{'count': 2, 'next': None, 'previous': None, 'results': [{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'is_product_group': False, 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'revisions': [], 'vulnerability_names': 'CVE_vulnerability_1', 'branch_names': 'db_branch_internal_dev', 'user_full_name': 'db_external', 'document_id_prefix': 'csaf_prefix', 'document_base_id': '2024_0001', 'version': 1, 'content_hash': 'abcdef123456', 'title': 'csaf_title_product', 'tlp_label': 'AMBER', 'tracking_initial_release_date': '2022-12-15T17:10:35.513000+01:00', 'tracking_current_release_date': '2022-12-16T17:13:18.282000+01:00', 'tracking_status': 'final', 'publisher_name': 'publisher name', 'publisher_category': 'publisher category', 'publisher_namespace': 'https://publisher.namespace', 'user': 4, 'product': 1}, {'id': 2, 'product_data': None, 'revisions': [], 'vulnerability_names': 'CVE_vulnerability', 'branch_names': 'db_branch_internal_main', 'user_full_name': 'db_external', 'document_id_prefix': 'csaf_prefix', 'document_base_id': '2024_0002', 'version': 1, 'content_hash': 'abcdef123456', 'title': 'csaf_title_vulnerability', 'tlp_label': 'RED', 'tracking_initial_release_date': '2022-12-15T17:10:35.513000+01:00', 'tracking_current_release_date': '2022-12-16T17:13:18.282000+01:00', 'tracking_status': 'final', 'publisher_name': 'publisher name', 'publisher_category': 'publisher category', 'publisher_namespace': 'https://publisher.namespace', 'user': 4, 'product': None}]}" self._test_api( APITest("db_admin", "get", "/api/vex/csaf/", None, 200, expected_data) ) - expected_data = "{'count': 1, 'next': None, 'previous': None, 'results': [{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'revisions': [], 'vulnerability_names': 'CVE_vulnerability_1', 'branch_names': 'db_branch_internal_dev', 'user_full_name': 'db_external', 'document_id_prefix': 'csaf_prefix', 'document_base_id': '2024_0001', 'version': 1, 'content_hash': 'abcdef123456', 'title': 'csaf_title_product', 'tlp_label': 'AMBER', 'tracking_initial_release_date': '2022-12-15T17:10:35.513000+01:00', 'tracking_current_release_date': '2022-12-16T17:13:18.282000+01:00', 'tracking_status': 'final', 'publisher_name': 'publisher name', 'publisher_category': 'publisher category', 'publisher_namespace': 'https://publisher.namespace', 'user': 4, 'product': 1}]}" + expected_data = "{'count': 1, 'next': None, 'previous': None, 'results': [{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'is_product_group': False, 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'revisions': [], 'vulnerability_names': 'CVE_vulnerability_1', 'branch_names': 'db_branch_internal_dev', 'user_full_name': 'db_external', 'document_id_prefix': 'csaf_prefix', 'document_base_id': '2024_0001', 'version': 1, 'content_hash': 'abcdef123456', 'title': 'csaf_title_product', 'tlp_label': 'AMBER', 'tracking_initial_release_date': '2022-12-15T17:10:35.513000+01:00', 'tracking_current_release_date': '2022-12-16T17:13:18.282000+01:00', 'tracking_status': 'final', 'publisher_name': 'publisher name', 'publisher_category': 'publisher category', 'publisher_namespace': 'https://publisher.namespace', 'user': 4, 'product': 1}]}" self._test_api( APITest( "db_internal_write", @@ -33,7 +33,7 @@ def _test_authorization_csaf(self): ) ) - expected_data = "{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'revisions': [], 'vulnerability_names': 'CVE_vulnerability_1', 'branch_names': 'db_branch_internal_dev', 'user_full_name': 'db_external', 'document_id_prefix': 'csaf_prefix', 'document_base_id': '2024_0001', 'version': 1, 'content_hash': 'abcdef123456', 'title': 'csaf_title_product', 'tlp_label': 'AMBER', 'tracking_initial_release_date': '2022-12-15T17:10:35.513000+01:00', 'tracking_current_release_date': '2022-12-16T17:13:18.282000+01:00', 'tracking_status': 'final', 'publisher_name': 'publisher name', 'publisher_category': 'publisher category', 'publisher_namespace': 'https://publisher.namespace', 'user': 4, 'product': 1}" + expected_data = "{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'is_product_group': False, 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'revisions': [], 'vulnerability_names': 'CVE_vulnerability_1', 'branch_names': 'db_branch_internal_dev', 'user_full_name': 'db_external', 'document_id_prefix': 'csaf_prefix', 'document_base_id': '2024_0001', 'version': 1, 'content_hash': 'abcdef123456', 'title': 'csaf_title_product', 'tlp_label': 'AMBER', 'tracking_initial_release_date': '2022-12-15T17:10:35.513000+01:00', 'tracking_current_release_date': '2022-12-16T17:13:18.282000+01:00', 'tracking_status': 'final', 'publisher_name': 'publisher name', 'publisher_category': 'publisher category', 'publisher_namespace': 'https://publisher.namespace', 'user': 4, 'product': 1}" self._test_api( APITest( "db_internal_write", diff --git a/backend/unittests/access_control/api/test_authorization_vex_openvex.py b/backend/unittests/access_control/api/test_authorization_vex_openvex.py index 99c2da313..4fd3eec0f 100644 --- a/backend/unittests/access_control/api/test_authorization_vex_openvex.py +++ b/backend/unittests/access_control/api/test_authorization_vex_openvex.py @@ -16,12 +16,12 @@ def test_authorization_openvex_product_authorization_group_member(self): self._test_authorization_openvex() def _test_authorization_openvex(self): - expected_data = "{'count': 2, 'next': None, 'previous': None, 'results': [{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'vulnerability_names': 'CVE_vulnerability_1', 'branch_names': 'db_branch_internal_dev', 'user_full_name': 'db_external', 'document_id_prefix': 'openvex_prefix', 'document_base_id': '2024_0001', 'version': 1, 'content_hash': 'abcdef123456', 'id_namespace': 'https://id.namespace', 'author': 'author', 'role': 'role', 'timestamp': '2022-12-15T17:10:35.513000+01:00', 'last_updated': '2022-12-16T17:13:18.282000+01:00', 'user': 4, 'product': 1}, {'id': 2, 'product_data': None, 'vulnerability_names': 'CVE_vulnerability', 'branch_names': 'db_branch_internal_main', 'user_full_name': 'db_external', 'document_id_prefix': 'openvex_prefix', 'document_base_id': '2024_0002', 'version': 1, 'content_hash': 'abcdef123456', 'id_namespace': 'https://id.namespace', 'author': 'author', 'role': 'role', 'timestamp': '2022-12-15T17:10:35.513000+01:00', 'last_updated': '2022-12-16T17:13:18.282000+01:00', 'user': 4, 'product': None}]}" + expected_data = "{'count': 2, 'next': None, 'previous': None, 'results': [{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'is_product_group': False, 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'vulnerability_names': 'CVE_vulnerability_1', 'branch_names': 'db_branch_internal_dev', 'user_full_name': 'db_external', 'document_id_prefix': 'openvex_prefix', 'document_base_id': '2024_0001', 'version': 1, 'content_hash': 'abcdef123456', 'id_namespace': 'https://id.namespace', 'author': 'author', 'role': 'role', 'timestamp': '2022-12-15T17:10:35.513000+01:00', 'last_updated': '2022-12-16T17:13:18.282000+01:00', 'user': 4, 'product': 1}, {'id': 2, 'product_data': None, 'vulnerability_names': 'CVE_vulnerability', 'branch_names': 'db_branch_internal_main', 'user_full_name': 'db_external', 'document_id_prefix': 'openvex_prefix', 'document_base_id': '2024_0002', 'version': 1, 'content_hash': 'abcdef123456', 'id_namespace': 'https://id.namespace', 'author': 'author', 'role': 'role', 'timestamp': '2022-12-15T17:10:35.513000+01:00', 'last_updated': '2022-12-16T17:13:18.282000+01:00', 'user': 4, 'product': None}]}" self._test_api( APITest("db_admin", "get", "/api/vex/openvex/", None, 200, expected_data) ) - expected_data = "{'count': 1, 'next': None, 'previous': None, 'results': [{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'vulnerability_names': 'CVE_vulnerability_1', 'branch_names': 'db_branch_internal_dev', 'user_full_name': 'db_external', 'document_id_prefix': 'openvex_prefix', 'document_base_id': '2024_0001', 'version': 1, 'content_hash': 'abcdef123456', 'id_namespace': 'https://id.namespace', 'author': 'author', 'role': 'role', 'timestamp': '2022-12-15T17:10:35.513000+01:00', 'last_updated': '2022-12-16T17:13:18.282000+01:00', 'user': 4, 'product': 1}]}" + expected_data = "{'count': 1, 'next': None, 'previous': None, 'results': [{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'is_product_group': False, 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'vulnerability_names': 'CVE_vulnerability_1', 'branch_names': 'db_branch_internal_dev', 'user_full_name': 'db_external', 'document_id_prefix': 'openvex_prefix', 'document_base_id': '2024_0001', 'version': 1, 'content_hash': 'abcdef123456', 'id_namespace': 'https://id.namespace', 'author': 'author', 'role': 'role', 'timestamp': '2022-12-15T17:10:35.513000+01:00', 'last_updated': '2022-12-16T17:13:18.282000+01:00', 'user': 4, 'product': 1}]}" self._test_api( APITest( "db_internal_write", @@ -33,7 +33,7 @@ def _test_authorization_openvex(self): ) ) - expected_data = "{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'vulnerability_names': 'CVE_vulnerability_1', 'branch_names': 'db_branch_internal_dev', 'user_full_name': 'db_external', 'document_id_prefix': 'openvex_prefix', 'document_base_id': '2024_0001', 'version': 1, 'content_hash': 'abcdef123456', 'id_namespace': 'https://id.namespace', 'author': 'author', 'role': 'role', 'timestamp': '2022-12-15T17:10:35.513000+01:00', 'last_updated': '2022-12-16T17:13:18.282000+01:00', 'user': 4, 'product': 1}" + expected_data = "{'id': 1, 'product_data': {'id': 1, 'permissions': {, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }, 'product_group_assessments_need_approval': False, 'product_group_product_rules_need_approval': False, 'risk_acceptance_expiry_date_calculated': datetime.date(2024, 7, 1), 'name': 'db_product_internal', 'description': '', 'is_product_group': False, 'purl': '', 'cpe23': '', 'repository_prefix': '', 'repository_branch_housekeeping_active': None, 'repository_branch_housekeeping_keep_inactive_days': None, 'repository_branch_housekeeping_exempt_branches': '', 'security_gate_passed': True, 'security_gate_active': None, 'security_gate_threshold_critical': None, 'security_gate_threshold_high': None, 'security_gate_threshold_medium': None, 'security_gate_threshold_low': None, 'security_gate_threshold_none': None, 'security_gate_threshold_unkown': None, 'apply_general_rules': True, 'notification_ms_teams_webhook': '', 'notification_slack_webhook': '', 'notification_email_to': '', 'issue_tracker_active': False, 'issue_tracker_type': '', 'issue_tracker_base_url': '', 'issue_tracker_username': '', 'issue_tracker_api_key': '', 'issue_tracker_project_id': '', 'issue_tracker_labels': '', 'issue_tracker_issue_type': '', 'issue_tracker_status_closed': '', 'issue_tracker_minimum_severity': '', 'last_observation_change': '2022-12-16T17:13:18.283000+01:00', 'assessments_need_approval': False, 'product_rules_need_approval': False, 'risk_acceptance_expiry_active': None, 'risk_acceptance_expiry_days': None, 'product_group': 3, 'repository_default_branch': 1}, 'vulnerability_names': 'CVE_vulnerability_1', 'branch_names': 'db_branch_internal_dev', 'user_full_name': 'db_external', 'document_id_prefix': 'openvex_prefix', 'document_base_id': '2024_0001', 'version': 1, 'content_hash': 'abcdef123456', 'id_namespace': 'https://id.namespace', 'author': 'author', 'role': 'role', 'timestamp': '2022-12-15T17:10:35.513000+01:00', 'last_updated': '2022-12-16T17:13:18.282000+01:00', 'user': 4, 'product': 1}" self._test_api( APITest( "db_internal_write", diff --git a/frontend/src/rules/product_rules/ProductRuleShow.tsx b/frontend/src/rules/product_rules/ProductRuleShow.tsx index aedfec654..d992672e5 100644 --- a/frontend/src/rules/product_rules/ProductRuleShow.tsx +++ b/frontend/src/rules/product_rules/ProductRuleShow.tsx @@ -63,6 +63,13 @@ const ShowActions = () => { ); }; +function generateProductURL(product_id: number, is_product_group: boolean): string { + if (is_product_group) { + return "#/product_groups/" + product_id + "/show/rules"; + } + return "#/products/" + product_id + "/show/rules"; +} + const ProductRuleComponent = () => { const { classes } = useStyles(); @@ -78,7 +85,7 @@ const ProductRuleComponent = () => { From bc6f90cdbaed03a0370ff3556e0eae3e043b08d9 Mon Sep 17 00:00:00 2001 From: Stefan Fleckenstein Date: Wed, 10 Jul 2024 21:00:05 +0100 Subject: [PATCH 08/13] chore: upgrade to react-admin 5 (#1675) * chore: upgrade to react-admin 5 * chore: intermediate commit * chore: update to react-admin 5.0.3 * chore: add resource attribute * chore: more changes * chore: code quality --- frontend/package-lock.json | 434 ++++++------------ frontend/package.json | 8 +- .../api_tokens/ApiTokenEmbeddedList.tsx | 8 +- .../AuthorizationGroupEmbeddedList.tsx | 11 +- .../ProductApiTokenEmbeddedList.tsx | 6 +- .../users/UserAGEmbeddedList.tsx | 6 +- .../access_control/users/UserEmbeddedList.tsx | 6 +- frontend/src/commons/about/About.tsx | 15 +- .../custom_fields/SecurityGateTextField.tsx | 4 +- .../notifications/NotificationShow.tsx | 14 +- .../commons/user_settings/UserSettings.tsx | 5 +- .../src/commons/user_settings/functions.ts | 5 +- frontend/src/core/branches/BranchDelete.tsx | 3 +- .../src/core/branches/BranchEmbeddedList.tsx | 6 +- frontend/src/core/evidences/EvidenceShow.tsx | 14 +- .../ObservationLogApprovalList.tsx | 26 +- .../ObservationLogEmbeddedList.tsx | 19 +- .../observation_logs/ObservationLogShow.tsx | 17 +- .../observations/ObservationDashboardList.tsx | 5 +- .../src/core/observations/ObservationEdit.tsx | 2 +- .../observations/ObservationEmbeddedList.tsx | 5 +- .../observations/ObservationReviewList.tsx | 5 +- .../observations/ObservationShowAside.tsx | 37 +- .../observations/PotentialDuplicatesList.tsx | 5 +- ...ctAuthorizationGroupMemberEmbeddedList.tsx | 12 +- .../ProductMemberEmbeddedList.tsx | 12 +- .../src/core/products/ProductEmbeddedList.tsx | 11 +- .../src/core/products/ProductShowProduct.tsx | 14 +- frontend/src/core/services/ServiceDelete.tsx | 2 +- .../src/core/services/ServiceEmbeddedList.tsx | 6 +- .../ApiConfigurationDelete.tsx | 3 +- .../ApiConfigurationEmbeddedList.tsx | 13 +- .../VulnerabilityCheckEmbeddedList.tsx | 5 +- .../rules/general_rules/GeneralRuleEdit.tsx | 2 +- .../rules/general_rules/GeneralRuleList.tsx | 7 +- .../rules/general_rules/GeneralRuleShow.tsx | 7 +- .../product_rules/ProductRuleApprovalList.tsx | 12 +- .../rules/product_rules/ProductRuleDelete.tsx | 3 +- .../rules/product_rules/ProductRuleEdit.tsx | 2 +- .../product_rules/ProductRuleEmbeddedList.tsx | 12 +- .../rules/product_rules/ProductRuleShow.tsx | 7 +- frontend/src/vex/csaf/CSAFShow.tsx | 7 +- frontend/src/vex/openvex/OpenVEXShow.tsx | 7 +- .../src/vex/vex_counters/VEXCounterShow.tsx | 4 +- .../VEXStatementEmbeddedList.tsx | 11 +- .../vex/vex_statements/VEXStatementShow.tsx | 7 +- 46 files changed, 381 insertions(+), 451 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index dd87fa5bd..433a3cb16 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -26,11 +26,11 @@ "oidc-client-ts": "3.0.1", "prop-types": "15.8.1", "query-string": "9.0.0", - "ra-i18n-polyglot": "4.16.19", - "ra-input-rich-text": "4.16.19", - "ra-language-english": "4.16.19", + "ra-i18n-polyglot": "5.0.3", + "ra-input-rich-text": "5.0.3", + "ra-language-english": "5.0.3", "react": "18.3.1", - "react-admin": "4.16.19", + "react-admin": "5.0.3", "react-chartjs-2": "5.2.0", "react-dom": "18.3.1", "react-oidc-context": "3.1.0", @@ -1992,6 +1992,30 @@ "dev": true, "license": "MIT" }, + "node_modules/@tanstack/query-core": { + "version": "5.50.1", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.50.1.tgz", + "integrity": "sha512-lpfhKPrJlyV2DSVcQb/HuozH3Av3kws4ge22agx+lNGpFkS4vLZ7St0l3GLwlAD+bqB+qXGex3JdRKUNtMviEQ==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, + "node_modules/@tanstack/react-query": { + "version": "5.50.1", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.50.1.tgz", + "integrity": "sha512-s0DW3rVBDPReDDovUjVqItVa3R2nPfUANK9nqGvarO2DwTiY9U4EBTsqizMxItRCoGgK5apeM7D3mxlHrSKpdQ==", + "dependencies": { + "@tanstack/query-core": "5.50.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": "^18.0.0" + } + }, "node_modules/@textea/json-viewer": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/@textea/json-viewer/-/json-viewer-3.4.1.tgz", @@ -3265,7 +3289,6 @@ "version": "2.2.2", "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-2.2.2.tgz", "integrity": "sha512-7prDjvt9HmqiZ0cl5CRjtS84sEyhsHP2coDkaZKRKVfCDo9s7iw7ChVmar78Gu9pC4SoR/28wFu/G5JJhTnqEg==", - "license": "MIT", "engines": { "node": ">=4" } @@ -3274,7 +3297,6 @@ "version": "3.3.4", "resolved": "https://registry.npmjs.org/autosuggest-highlight/-/autosuggest-highlight-3.3.4.tgz", "integrity": "sha512-j6RETBD2xYnrVcoV1S5R4t3WxOlWZKyDQjkwnggDPSjF5L4jV98ZltBpvPvbkM1HtoSe5o+bNrTHyjPbieGeYA==", - "license": "MIT", "dependencies": { "remove-accents": "^0.4.2" } @@ -3324,17 +3346,9 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, "license": "MIT" }, - "node_modules/big-integer": { - "version": "1.6.52", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", - "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==", - "license": "Unlicense", - "engines": { - "node": ">=0.6" - } - }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -3358,22 +3372,6 @@ "node": ">=8" } }, - "node_modules/broadcast-channel": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/broadcast-channel/-/broadcast-channel-3.7.0.tgz", - "integrity": "sha512-cIAKJXAxGJceNZGTZSBzMxzyOn72cVgPnKx4dc6LRjQgbaJUQqhy5rzL3zbMxkMWsGKkv2hSFkPRMEXfoMZ2Mg==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.7.2", - "detect-node": "^2.1.0", - "js-sha3": "0.8.0", - "microseconds": "0.2.0", - "nano-time": "1.0.0", - "oblivious-set": "1.0.0", - "rimraf": "3.0.2", - "unload": "2.2.0" - } - }, "node_modules/browserslist": { "version": "4.23.1", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", @@ -3561,6 +3559,7 @@ "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, "license": "MIT" }, "node_modules/convert-source-map": { @@ -3618,8 +3617,7 @@ "node_modules/css-mediaquery": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/css-mediaquery/-/css-mediaquery-0.1.2.tgz", - "integrity": "sha512-COtn4EROW5dBGlE/4PiKnh6rZpAPxDeFLaEEwt4i10jpDMFt2EhQGS79QmmrO+iKCHv0PU/HrOWEhijFd1x99Q==", - "license": "BSD" + "integrity": "sha512-COtn4EROW5dBGlE/4PiKnh6rZpAPxDeFLaEEwt4i10jpDMFt2EhQGS79QmmrO+iKCHv0PU/HrOWEhijFd1x99Q==" }, "node_modules/csstype": { "version": "3.1.3", @@ -3679,19 +3677,12 @@ } }, "node_modules/date-fns": { - "version": "2.30.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", - "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.21.0" - }, - "engines": { - "node": ">=0.11" - }, + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz", + "integrity": "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==", "funding": { - "type": "opencollective", - "url": "https://opencollective.com/date-fns" + "type": "github", + "url": "https://github.com/sponsors/kossnocorp" } }, "node_modules/debug": { @@ -3770,12 +3761,6 @@ "node": ">=0.4.0" } }, - "node_modules/detect-node": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", - "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", - "license": "MIT" - }, "node_modules/diff-sequences": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", @@ -4482,10 +4467,9 @@ } }, "node_modules/eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", - "license": "MIT" + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" }, "node_modules/expect": { "version": "29.7.0", @@ -4579,15 +4563,14 @@ } }, "node_modules/file-selector": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/file-selector/-/file-selector-0.5.0.tgz", - "integrity": "sha512-s8KNnmIDTBoD0p9uJ9uD0XY38SCeBOtj0UMXyQSLg1Ypfrfj8+dAvwsLjYQkQ2GjhVtp2HrnF5cJzMhBjfD8HA==", - "license": "MIT", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/file-selector/-/file-selector-0.6.0.tgz", + "integrity": "sha512-QlZ5yJC0VxHxQQsQhXvBaC7VRJ2uaxTf+Tfpu4Z/OcVQJVpZO+DGU0rkoVW5ce2SccxugvpBJoMvUs59iILYdw==", "dependencies": { - "tslib": "^2.0.3" + "tslib": "^2.4.0" }, "engines": { - "node": ">= 10" + "node": ">= 12" } }, "node_modules/fill-range": { @@ -4707,6 +4690,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, "license": "ISC" }, "node_modules/fsevents": { @@ -4820,6 +4804,7 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -4853,6 +4838,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -4863,6 +4849,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -5033,15 +5020,6 @@ "node": ">= 0.4" } }, - "node_modules/history": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/history/-/history-5.3.0.tgz", - "integrity": "sha512-ZqaKwjjrAYUYfLG+htGaIIZ4nioX2L70ZUMIFysS3xvBsSG4x/n1V6TXV3N8ZYNuFGlDirFg32T7B6WOUPDYcQ==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.7.6" - } - }, "node_modules/hoist-non-react-statics": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", @@ -5060,8 +5038,7 @@ "node_modules/hotscript": { "version": "1.0.13", "resolved": "https://registry.npmjs.org/hotscript/-/hotscript-1.0.13.tgz", - "integrity": "sha512-C++tTF1GqkGYecL+2S1wJTfoH6APGAsbb7PAWQ3iVIwgG/EFseAfEVOKFgAFq4yK3+6j1EjUD4UQ9dRJHX/sSQ==", - "license": "ISC" + "integrity": "sha512-C++tTF1GqkGYecL+2S1wJTfoH6APGAsbb7PAWQ3iVIwgG/EFseAfEVOKFgAFq4yK3+6j1EjUD4UQ9dRJHX/sSQ==" }, "node_modules/ignore": { "version": "5.3.1", @@ -5100,19 +5077,19 @@ } }, "node_modules/inflection": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.12.0.tgz", - "integrity": "sha512-lRy4DxuIFWXlJU7ed8UiTJOSTqStqYdEb4CEbtXfNbkdj3nH1L+reUWiE10VWcJS2yR7tge8Z74pJjtBjNwj0w==", - "engines": [ - "node >= 0.4.0" - ], - "license": "MIT" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/inflection/-/inflection-3.0.0.tgz", + "integrity": "sha512-1zEJU1l19SgJlmwqsEyFTbScw/tkMHFenUo//Y0i+XEP83gDFdMvPizAD/WGcE+l1ku12PcTVHQhO6g5E0UCMw==", + "engines": { + "node": ">=18.0.0" + } }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, "license": "ISC", "dependencies": { "once": "^1.3.0", @@ -5123,6 +5100,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, "license": "ISC" }, "node_modules/internal-slot": { @@ -5933,12 +5911,6 @@ "node": ">=8" } }, - "node_modules/js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", - "license": "MIT" - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -6024,7 +5996,6 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/jsonexport/-/jsonexport-3.2.0.tgz", "integrity": "sha512-GbO9ugb0YTZatPd/hqCGR0FSwbr82H6OzG04yzdrG7XOe4QZ0jhQ+kOsB29zqkzoYJLmLxbbrFiuwbQu891XnQ==", - "license": "Apache-2.0", "bin": { "jsonexport": "bin/jsonexport.js" } @@ -6179,22 +6150,6 @@ "react": ">= 0.14.0" } }, - "node_modules/match-sorter": { - "version": "6.3.4", - "resolved": "https://registry.npmjs.org/match-sorter/-/match-sorter-6.3.4.tgz", - "integrity": "sha512-jfZW7cWS5y/1xswZo8VBOdudUiSd9nifYRWphc9M5D/ee4w4AoXLgBEdRbgVaxbMuagBPeUC5y2Hi8DO6o9aDg==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.23.8", - "remove-accents": "0.5.0" - } - }, - "node_modules/match-sorter/node_modules/remove-accents": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/remove-accents/-/remove-accents-0.5.0.tgz", - "integrity": "sha512-8g3/Otx1eJaVD12e31UbJj1YzdtVvzH85HV7t+9MJYk/u3XmkOUJ5Ys9wQrf9PCPK8+xn4ymzqYCiZl6QWKn+A==", - "license": "MIT" - }, "node_modules/mdurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", @@ -6225,12 +6180,6 @@ "node": ">=8.6" } }, - "node_modules/microseconds": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/microseconds/-/microseconds-0.2.0.tgz", - "integrity": "sha512-n7DHHMjR1avBbSpsTBj6fmMGh2AGrifVV4e+WYc3Q9lO+xnSZ3NyhcBND3vzzatt05LFhoKFRxrIyklmLlUtyA==", - "license": "MIT" - }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -6274,15 +6223,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "license": "MIT" }, - "node_modules/nano-time": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/nano-time/-/nano-time-1.0.0.tgz", - "integrity": "sha512-flnngywOoQ0lLQOTRNexn2gGSNuM9bKj9RZAWSzhQ+UJYaAFG9bac4DW9VHjUAzrOaIcajHybCTHe/bkvozQqA==", - "license": "ISC", - "dependencies": { - "big-integer": "^1.6.16" - } - }, "node_modules/nanoid": { "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", @@ -6446,12 +6386,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/oblivious-set": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/oblivious-set/-/oblivious-set-1.0.0.tgz", - "integrity": "sha512-z+pI07qxo4c2CulUHCDf9lcqDlMSo72N/4rLUpRXf6fu+q8vjt8y0xS+Tlf8NTJDdTXHbdeO1n3MlbctwEoXZw==", - "license": "MIT" - }, "node_modules/oidc-client-ts": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/oidc-client-ts/-/oidc-client-ts-3.0.1.tgz", @@ -6468,6 +6402,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, "license": "ISC", "dependencies": { "wrappy": "1" @@ -6573,6 +6508,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -6989,45 +6925,34 @@ "license": "MIT" }, "node_modules/ra-core": { - "version": "4.16.19", - "resolved": "https://registry.npmjs.org/ra-core/-/ra-core-4.16.19.tgz", - "integrity": "sha512-1qNuLGaGSHYv5esqJcu7n/PeMKTBXA3JXzjQPAPDK9dBsuWC1IXx9MilivANwh8doYbpFfqsX8VJyW1aqIG1Pg==", - "license": "MIT", - "dependencies": { - "clsx": "^1.1.1", - "date-fns": "^2.19.0", - "eventemitter3": "^4.0.7", - "inflection": "~1.12.0", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/ra-core/-/ra-core-5.0.3.tgz", + "integrity": "sha512-aTDY4CtX/TLPslGqCABPMFQR2KeiTlF1M8xJ/9SJpe7Cpd244AY9Gbtgx0YjEsW+HeI4/OSQXMEj+Sz0l0Xtiw==", + "dependencies": { + "@tanstack/react-query": "^5.8.4", + "clsx": "^2.1.1", + "date-fns": "^3.6.0", + "eventemitter3": "^5.0.1", + "hotscript": "^1.0.12", + "inflection": "^3.0.0", "jsonexport": "^3.2.0", "lodash": "~4.17.5", - "prop-types": "^15.6.1", - "query-string": "^7.1.1", - "react-is": "^17.0.2", - "react-query": "^3.32.1" + "query-string": "^7.1.3", + "react-error-boundary": "^4.0.13", + "react-is": "^18.2.0" }, "peerDependencies": { - "history": "^5.1.0", - "react": "^16.9.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0", - "react-hook-form": "^7.43.9", - "react-router": "^6.1.0", - "react-router-dom": "^6.1.0" - } - }, - "node_modules/ra-core/node_modules/clsx": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", - "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", - "license": "MIT", - "engines": { - "node": ">=6" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0", + "react-hook-form": "^7.52.0", + "react-router": "^6.22.0", + "react-router-dom": "^6.22.0" } }, "node_modules/ra-core/node_modules/decode-uri-component": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", - "license": "MIT", "engines": { "node": ">=0.10" } @@ -7036,7 +6961,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==", - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -7045,7 +6969,6 @@ "version": "7.1.3", "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.3.tgz", "integrity": "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==", - "license": "MIT", "dependencies": { "decode-uri-component": "^0.2.2", "filter-obj": "^1.1.0", @@ -7059,36 +6982,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ra-core/node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", - "license": "MIT" - }, "node_modules/ra-core/node_modules/split-on-first": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==", - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/ra-i18n-polyglot": { - "version": "4.16.19", - "resolved": "https://registry.npmjs.org/ra-i18n-polyglot/-/ra-i18n-polyglot-4.16.19.tgz", - "integrity": "sha512-gRnY0fUn61cVtR36Qf5mgULXnQALRrjZ8Hnp7w+U9YvtrzapNTuIyZem3Tp0QL+/jRgxeqlQW7dqPYdV0bC7vg==", - "license": "MIT", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/ra-i18n-polyglot/-/ra-i18n-polyglot-5.0.3.tgz", + "integrity": "sha512-zzC1+hjpwj/UQjF2poIEFgHSNsGF8cjWRCAgtSe7iNw+T9ztc5uqOHmDKzRzJaUv4QCLypN+QjGG85GRe9M8QQ==", "dependencies": { "node-polyglot": "^2.2.2", - "ra-core": "^4.16.19" + "ra-core": "^5.0.3" } }, "node_modules/ra-input-rich-text": { - "version": "4.16.19", - "resolved": "https://registry.npmjs.org/ra-input-rich-text/-/ra-input-rich-text-4.16.19.tgz", - "integrity": "sha512-cE71yaw8Q0S0Q8LJItbxyXaPoILWhd0wg+ciss7XwcgU95mUwxwhIKoRwlM+zWAZ+s3Q1eGnZF7uRRyPIstEFw==", - "license": "MIT", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/ra-input-rich-text/-/ra-input-rich-text-5.0.3.tgz", + "integrity": "sha512-1pAau85tMRwWTWBrgd9i79NUx36vTTbi2Tn2jA3N327F9Q0DVmG3jUociCKQ/1fwVXPvJr0FSXoPLrQA3kyuKQ==", "dependencies": { "@tiptap/core": "^2.0.3", "@tiptap/extension-color": "^2.0.3", @@ -7102,82 +7016,60 @@ "@tiptap/pm": "^2.0.3", "@tiptap/react": "^2.0.3", "@tiptap/starter-kit": "^2.0.3", - "clsx": "^1.1.1" + "clsx": "^2.1.1" }, "peerDependencies": { - "@mui/icons-material": "^5.0.1", - "@mui/material": "^5.0.2", - "ra-core": "^4.0.0", - "ra-ui-materialui": "^4.0.0", - "react": "^16.9.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0" - } - }, - "node_modules/ra-input-rich-text/node_modules/clsx": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", - "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", - "license": "MIT", - "engines": { - "node": ">=6" + "@mui/icons-material": "^5.15.20", + "@mui/material": "^5.15.20", + "ra-core": "^5.0.0", + "ra-ui-materialui": "^5.0.0", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, "node_modules/ra-language-english": { - "version": "4.16.19", - "resolved": "https://registry.npmjs.org/ra-language-english/-/ra-language-english-4.16.19.tgz", - "integrity": "sha512-k8ykj7bJ5UEAebB+SsOAcpyb6gUlsNkJ8N0+lDAezpilBaHahDQaYtNKA+GkoZnU8rIKYMYLttcl3VdCllkG2g==", - "license": "MIT", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/ra-language-english/-/ra-language-english-5.0.3.tgz", + "integrity": "sha512-0qm+arNNk7aynYzKlH5s20VVPAYWz2jDfhIeRyBcDVRifC96XbkvTTiFtr9k96LtRyJUGocBROxuuqKsEzw3YA==", "dependencies": { - "ra-core": "^4.16.19" + "ra-core": "^5.0.3" } }, "node_modules/ra-ui-materialui": { - "version": "4.16.19", - "resolved": "https://registry.npmjs.org/ra-ui-materialui/-/ra-ui-materialui-4.16.19.tgz", - "integrity": "sha512-EyalFIUq9oUQ8N/vAeQFlrBaRTU/pMPAHvmfPHUxL5ajcQaSii6XKhRgT9S+YOec/XAU0DDaTjH9oJm0H3UgNA==", - "license": "MIT", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/ra-ui-materialui/-/ra-ui-materialui-5.0.3.tgz", + "integrity": "sha512-Y3COTPdztPSZekN7Vc3tP3nbj+4Q1wgCc4w4GEv6ET1Sme0JmzOA+ybgwbM8dKryqlMtnjuMGwIMz1gzPSewbQ==", "dependencies": { + "@tanstack/react-query": "^5.8.4", "autosuggest-highlight": "^3.1.1", - "clsx": "^1.1.1", + "clsx": "^2.1.1", "css-mediaquery": "^0.1.2", "dompurify": "^2.4.3", "hotscript": "^1.0.12", - "inflection": "~1.12.0", + "inflection": "^3.0.0", "jsonexport": "^3.2.0", "lodash": "~4.17.5", - "prop-types": "^15.7.0", - "query-string": "^7.1.1", - "react-dropzone": "^12.0.4", - "react-error-boundary": "^3.1.4", - "react-query": "^3.32.1", - "react-transition-group": "^4.4.1" + "query-string": "^7.1.3", + "react-dropzone": "^14.2.3", + "react-error-boundary": "^4.0.13", + "react-transition-group": "^4.4.5" }, "peerDependencies": { - "@mui/icons-material": "^5.0.1", - "@mui/material": "^5.0.2", - "ra-core": "^4.0.0", - "react": "^16.9.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0", + "@mui/icons-material": "^5.15.20", + "@mui/material": "^5.15.20", + "ra-core": "^5.0.0", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0", "react-hook-form": "*", - "react-is": "^16.9.0 || ^17.0.0 || ^18.0.0", - "react-router": "^6.1.0", - "react-router-dom": "^6.1.0" - } - }, - "node_modules/ra-ui-materialui/node_modules/clsx": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", - "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", - "license": "MIT", - "engines": { - "node": ">=6" + "react-is": "^18.0.0", + "react-router": "^6.22.0", + "react-router-dom": "^6.22.0" } }, "node_modules/ra-ui-materialui/node_modules/decode-uri-component": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", - "license": "MIT", "engines": { "node": ">=0.10" } @@ -7186,7 +7078,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==", - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -7195,7 +7086,6 @@ "version": "7.1.3", "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.3.tgz", "integrity": "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==", - "license": "MIT", "dependencies": { "decode-uri-component": "^0.2.2", "filter-obj": "^1.1.0", @@ -7213,7 +7103,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==", - "license": "MIT", "engines": { "node": ">=6" } @@ -7231,27 +7120,25 @@ } }, "node_modules/react-admin": { - "version": "4.16.19", - "resolved": "https://registry.npmjs.org/react-admin/-/react-admin-4.16.19.tgz", - "integrity": "sha512-aFUPEbHFaDbfT3158moam2bchiQHE5C1f4yljSV7/0FukFkKa0ihS2hosPchqzilPEOS41ve0krYNEnHCPlHxw==", - "license": "MIT", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/react-admin/-/react-admin-5.0.3.tgz", + "integrity": "sha512-p8uuCgSCXGzad3EojVGPztIVXcCD7/GHnztywnKZwnfK3YSo9jJL8VYUpY/QnTJ6Gedz8eWRM9vFjBuyTKuwnw==", "dependencies": { "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", - "@mui/icons-material": "^5.0.1", - "@mui/material": "^5.0.2", - "history": "^5.1.0", - "ra-core": "^4.16.19", - "ra-i18n-polyglot": "^4.16.19", - "ra-language-english": "^4.16.19", - "ra-ui-materialui": "^4.16.19", - "react-hook-form": "^7.43.9", - "react-router": "^6.1.0", - "react-router-dom": "^6.1.0" + "@mui/icons-material": "^5.15.20", + "@mui/material": "^5.15.20", + "ra-core": "^5.0.3", + "ra-i18n-polyglot": "^5.0.3", + "ra-language-english": "^5.0.3", + "ra-ui-materialui": "^5.0.3", + "react-hook-form": "^7.52.0", + "react-router": "^6.22.0", + "react-router-dom": "^6.22.0" }, "peerDependencies": { - "react": "^16.9.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, "node_modules/react-chartjs-2": { @@ -7278,34 +7165,28 @@ } }, "node_modules/react-dropzone": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-12.1.0.tgz", - "integrity": "sha512-iBYHA1rbopIvtzokEX4QubO6qk5IF/x3BtKGu74rF2JkQDXnwC4uO/lHKpaw4PJIV6iIAYOlwLv2FpiGyqHNog==", - "license": "MIT", + "version": "14.2.3", + "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-14.2.3.tgz", + "integrity": "sha512-O3om8I+PkFKbxCukfIR3QAGftYXDZfOE2N1mr/7qebQJHs7U+/RSL/9xomJNpRg9kM5h9soQSdf0Gc7OHF5Fug==", "dependencies": { "attr-accept": "^2.2.2", - "file-selector": "^0.5.0", + "file-selector": "^0.6.0", "prop-types": "^15.8.1" }, "engines": { "node": ">= 10.13" }, "peerDependencies": { - "react": ">= 16.8" + "react": ">= 16.8 || 18.0.0" } }, "node_modules/react-error-boundary": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-3.1.4.tgz", - "integrity": "sha512-uM9uPzZJTF6wRQORmSrvOIgt4lJ9MC1sNgEOj2XGsDTRE4kmpWxg7ENK9EWNKJRMAOY9z0MuF4yIfl6gp4sotA==", - "license": "MIT", + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-4.0.13.tgz", + "integrity": "sha512-b6PwbdSv8XeOSYvjt8LpgpKrZ0yGdtZokYwkwV2wlcZbxgopHX/hgPl5VgpnoVOWd868n1hktM8Qm4b+02MiLQ==", "dependencies": { "@babel/runtime": "^7.12.5" }, - "engines": { - "node": ">=10", - "npm": ">=6" - }, "peerDependencies": { "react": ">=16.13.1" } @@ -7345,32 +7226,6 @@ "react": ">=16.8.0" } }, - "node_modules/react-query": { - "version": "3.39.3", - "resolved": "https://registry.npmjs.org/react-query/-/react-query-3.39.3.tgz", - "integrity": "sha512-nLfLz7GiohKTJDuT4us4X3h/8unOh+00MLb2yJoGTPjxKs2bc1iDhkNx2bd5MKklXnOD3NrVZ+J2UXujA5In4g==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.5.5", - "broadcast-channel": "^3.4.1", - "match-sorter": "^6.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "react-dom": { - "optional": true - }, - "react-native": { - "optional": true - } - } - }, "node_modules/react-refresh": { "version": "0.14.2", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz", @@ -7488,8 +7343,7 @@ "node_modules/remove-accents": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/remove-accents/-/remove-accents-0.4.4.tgz", - "integrity": "sha512-EpFcOa/ISetVHEXqu+VwI96KZBmq+a8LJnGkaeFw45epGlxIZz5dhEEnNZMsQXgORu3qaMoLX4qJCzOik6ytAg==", - "license": "MIT" + "integrity": "sha512-EpFcOa/ISetVHEXqu+VwI96KZBmq+a8LJnGkaeFw45epGlxIZz5dhEEnNZMsQXgORu3qaMoLX4qJCzOik6ytAg==" }, "node_modules/require-directory": { "version": "2.1.1", @@ -7552,6 +7406,7 @@ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, "license": "ISC", "dependencies": { "glob": "^7.1.3" @@ -7849,7 +7704,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==", - "license": "MIT", "engines": { "node": ">=4" } @@ -8059,8 +7913,7 @@ "node_modules/tslib": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", - "license": "0BSD" + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" }, "node_modules/tss-react": { "version": "4.9.10", @@ -8228,16 +8081,6 @@ "dev": true, "license": "MIT" }, - "node_modules/unload": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/unload/-/unload-2.2.0.tgz", - "integrity": "sha512-B60uB5TNBLtN6/LsgAf3udH9saB5p7gqJwcFfbOEZ8BcBHnGwCf6G/TGiEqkRAxX7zAFIUtzdrXQSdL3Q/wqNA==", - "license": "Apache-2.0", - "dependencies": { - "@babel/runtime": "^7.6.2", - "detect-node": "^2.0.4" - } - }, "node_modules/update-browserslist-db": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", @@ -8527,6 +8370,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, "license": "ISC" }, "node_modules/y18n": { diff --git a/frontend/package.json b/frontend/package.json index 6c2f1c334..5d5b41eba 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -11,10 +11,10 @@ "@types/recharts": "1.8.29", "prop-types": "15.8.1", "query-string": "9.0.0", - "react-admin": "4.16.19", - "ra-i18n-polyglot": "4.16.19", - "ra-input-rich-text": "4.16.19", - "ra-language-english": "4.16.19", + "react-admin": "5.0.3", + "ra-i18n-polyglot": "5.0.3", + "ra-input-rich-text": "5.0.3", + "ra-language-english": "5.0.3", "react": "18.3.1", "react-dom": "18.3.1", "react-router": "6.24.1", diff --git a/frontend/src/access_control/api_tokens/ApiTokenEmbeddedList.tsx b/frontend/src/access_control/api_tokens/ApiTokenEmbeddedList.tsx index 78fe0f45d..ae2078227 100644 --- a/frontend/src/access_control/api_tokens/ApiTokenEmbeddedList.tsx +++ b/frontend/src/access_control/api_tokens/ApiTokenEmbeddedList.tsx @@ -32,15 +32,11 @@ const ApiTokenEmbeddedList = () => { return
Loading...
; } - if (listContext.data === undefined) { - listContext.data = []; - } - return (
- + { link={(record: any, reference: any) => `../../${reference}/${record.id}/show/api_token` } + sx={{ "& a": { textDecoration: "none" } }} /> )} @@ -69,6 +66,7 @@ const ApiTokenEmbeddedList = () => { link={(record: any, reference: any) => `../../${reference}/${record.id}/show/api_token` } + sx={{ "& a": { textDecoration: "none" } }} /> )} diff --git a/frontend/src/access_control/authorization_groups/AuthorizationGroupEmbeddedList.tsx b/frontend/src/access_control/authorization_groups/AuthorizationGroupEmbeddedList.tsx index ad8111801..daea45a96 100644 --- a/frontend/src/access_control/authorization_groups/AuthorizationGroupEmbeddedList.tsx +++ b/frontend/src/access_control/authorization_groups/AuthorizationGroupEmbeddedList.tsx @@ -28,16 +28,17 @@ const AuthorizationGroupEmbeddedList = () => { return
Loading...
; } - if (listContext.data === undefined) { - listContext.data = []; - } - return (
{is_superuser() && } - + diff --git a/frontend/src/access_control/product_api_token/ProductApiTokenEmbeddedList.tsx b/frontend/src/access_control/product_api_token/ProductApiTokenEmbeddedList.tsx index cc5092712..8423fd63f 100644 --- a/frontend/src/access_control/product_api_token/ProductApiTokenEmbeddedList.tsx +++ b/frontend/src/access_control/product_api_token/ProductApiTokenEmbeddedList.tsx @@ -22,14 +22,10 @@ const ProductApiTokenEmbeddedList = ({ product }: ProductApiTokenEmbeddedListPro return
Loading...
; } - if (listContext.data === undefined) { - listContext.data = []; - } - return (
- + {product && product.permissions.includes(PERMISSION_PRODUCT_API_TOKEN_REVOKE) && ( diff --git a/frontend/src/access_control/users/UserAGEmbeddedList.tsx b/frontend/src/access_control/users/UserAGEmbeddedList.tsx index 85e88240c..52cdc0783 100644 --- a/frontend/src/access_control/users/UserAGEmbeddedList.tsx +++ b/frontend/src/access_control/users/UserAGEmbeddedList.tsx @@ -50,10 +50,6 @@ const UserAGEmbeddedList = ({ authorization_group }: UserAGEmbeddedListProps) => return
Loading...
; } - if (listContext.data === undefined) { - listContext.data = []; - } - localStorage.setItem("useragembeddedlist", "true"); localStorage.removeItem("userembeddedlist"); localStorage.setItem("useragembeddedlist.authorization_group", authorization_group.id); @@ -63,7 +59,7 @@ const UserAGEmbeddedList = ({ authorization_group }: UserAGEmbeddedListProps) =>
{is_superuser() && } - + {is_superuser() && } diff --git a/frontend/src/access_control/users/UserEmbeddedList.tsx b/frontend/src/access_control/users/UserEmbeddedList.tsx index 8e362f0fd..02c32a52b 100644 --- a/frontend/src/access_control/users/UserEmbeddedList.tsx +++ b/frontend/src/access_control/users/UserEmbeddedList.tsx @@ -48,10 +48,6 @@ const UserEmbeddedList = () => { return
Loading...
; } - if (listContext.data === undefined) { - listContext.data = []; - } - localStorage.setItem("userembeddedlist", "true"); localStorage.removeItem("useragembeddedlist"); localStorage.removeItem("useragembeddedlist.authorization_group"); @@ -61,7 +57,7 @@ const UserEmbeddedList = () => {
{is_superuser() && } - + {is_superuser() && } diff --git a/frontend/src/commons/about/About.tsx b/frontend/src/commons/about/About.tsx index 995776ee2..8416bda83 100644 --- a/frontend/src/commons/about/About.tsx +++ b/frontend/src/commons/about/About.tsx @@ -101,7 +101,12 @@ const About = () => { Copyright: - + MaibornWolff GmbH @@ -113,6 +118,7 @@ const About = () => { href="https://github.com/MaibornWolff/SecObserve/blob/dev/LICENSE.txt" target="_blank" rel="noreferrer" + sx={{ textDecoration: "none" }} > BSD 3-Clause @@ -121,7 +127,12 @@ const About = () => { Source code: - + https://github.com/MaibornWolff/SecObserve diff --git a/frontend/src/commons/custom_fields/SecurityGateTextField.tsx b/frontend/src/commons/custom_fields/SecurityGateTextField.tsx index 1abeea49b..dc4a6b534 100644 --- a/frontend/src/commons/custom_fields/SecurityGateTextField.tsx +++ b/frontend/src/commons/custom_fields/SecurityGateTextField.tsx @@ -9,7 +9,7 @@ export const SecurityGateTextField = (props: SecurityGateTextProps) => { const record = useRecordContext(); function get_severity_color() { - if (record.security_gate_passed) { + if (record && record.security_gate_passed) { return "#0a0"; } else { return "#d4333f"; @@ -17,7 +17,7 @@ export const SecurityGateTextField = (props: SecurityGateTextProps) => { } function get_text_record() { - if (record.security_gate_passed) { + if (record && record.security_gate_passed) { return { text: "Passed" }; } else { return { text: "Failed" }; diff --git a/frontend/src/commons/notifications/NotificationShow.tsx b/frontend/src/commons/notifications/NotificationShow.tsx index 571edde36..8849de3f3 100644 --- a/frontend/src/commons/notifications/NotificationShow.tsx +++ b/frontend/src/commons/notifications/NotificationShow.tsx @@ -40,10 +40,20 @@ const NotificationShow = () => { {notification && notification.function && } {notification && notification.arguments && } {notification && notification.product && ( - + )} {notification && notification.observation && ( - + )} diff --git a/frontend/src/commons/user_settings/UserSettings.tsx b/frontend/src/commons/user_settings/UserSettings.tsx index 1c8238e78..2d3461418 100644 --- a/frontend/src/commons/user_settings/UserSettings.tsx +++ b/frontend/src/commons/user_settings/UserSettings.tsx @@ -11,19 +11,18 @@ import { } from "@mui/material"; import { Title, useTheme } from "react-admin"; -import { darkTheme, lightTheme } from "../layout/themes"; import { getSettingListSize, getSettingTheme, saveSettingListSize, saveSettingTheme } from "./functions"; const UserSettings = () => { const [, setTheme] = useTheme(); function setLightTheme() { - setTheme(lightTheme); + setTheme("light"); saveSettingTheme("light"); } function setDarkTheme() { - setTheme(darkTheme); + setTheme("dark"); saveSettingTheme("dark"); } diff --git a/frontend/src/commons/user_settings/functions.ts b/frontend/src/commons/user_settings/functions.ts index 5167be83a..c0fee499d 100644 --- a/frontend/src/commons/user_settings/functions.ts +++ b/frontend/src/commons/user_settings/functions.ts @@ -1,5 +1,4 @@ import { httpClient } from "../../commons/ra-data-django-rest-framework"; -import { darkTheme, lightTheme } from "../layout/themes"; export async function saveSettingTheme(theme: string) { const user = JSON.parse(localStorage.getItem("user") || "{}"); @@ -39,9 +38,9 @@ export function getSettingListSize(): "small" | "medium" | undefined { export function getTheme() { const setting_theme = getSettingTheme(); if (setting_theme == "dark") { - return darkTheme; + return "dark"; } else { - return lightTheme; + return "light"; } } diff --git a/frontend/src/core/branches/BranchDelete.tsx b/frontend/src/core/branches/BranchDelete.tsx index e088d9b22..5d6d41c3a 100644 --- a/frontend/src/core/branches/BranchDelete.tsx +++ b/frontend/src/core/branches/BranchDelete.tsx @@ -10,8 +10,7 @@ const BranchDelete = (props: BranchDeleteProps) => { const [open, setOpen] = useState(false); const [deleted, setDeleted] = useState(false); const [error_shown, setErrorShown] = useState(false); - const [deleteOne, { isLoading, error }] = useDelete(); // eslint-disable-line @typescript-eslint/no-unused-vars - // isLoading is not needed but easier to let it there + const [deleteOne, { error }] = useDelete(); const refresh = useRefresh(); const notify = useNotify(); const handleClick = () => setOpen(true); diff --git a/frontend/src/core/branches/BranchEmbeddedList.tsx b/frontend/src/core/branches/BranchEmbeddedList.tsx index 719d9e458..ff7f662ad 100644 --- a/frontend/src/core/branches/BranchEmbeddedList.tsx +++ b/frontend/src/core/branches/BranchEmbeddedList.tsx @@ -35,10 +35,6 @@ const BranchEmbeddedList = ({ product }: BranchEmbeddedListProps) => { return
Loading...
; } - if (listContext.data === undefined) { - listContext.data = []; - } - function get_observations_url(product_id: number, branch_id: number): string { return `#/products/${product_id}/show?displayedFilters=%7B%7D&filter=%7B%22current_status%22%3A%22Open%22%2C%22branch%22%3A${branch_id}%7D&order=ASC&sort=current_severity`; } @@ -46,7 +42,7 @@ const BranchEmbeddedList = ({ product }: BranchEmbeddedListProps) => { return (
- + ( diff --git a/frontend/src/core/evidences/EvidenceShow.tsx b/frontend/src/core/evidences/EvidenceShow.tsx index 8e6d9a8b3..9806a48f0 100644 --- a/frontend/src/core/evidences/EvidenceShow.tsx +++ b/frontend/src/core/evidences/EvidenceShow.tsx @@ -36,10 +36,20 @@ const EvidenceShow = () => { }> Evidence - + - + diff --git a/frontend/src/core/observation_logs/ObservationLogApprovalList.tsx b/frontend/src/core/observation_logs/ObservationLogApprovalList.tsx index 64d999d91..c48d9f582 100644 --- a/frontend/src/core/observation_logs/ObservationLogApprovalList.tsx +++ b/frontend/src/core/observation_logs/ObservationLogApprovalList.tsx @@ -48,18 +48,16 @@ const ObservationLogApprovalList = ({ product }: ObservationLogApprovalListProps return
Loading...
; } - if (listContext.data === undefined) { - listContext.data = []; + if (listContext.data) { + listContext.data.forEach((element: any) => { + if (element.comment.length > 255) { + element.comment_shortened = element.comment.substring(0, 255) + "..."; + } else { + element.comment_shortened = element.comment; + } + }); } - listContext.data.forEach((element: any) => { - if (element.comment.length > 255) { - element.comment_shortened = element.comment.substring(0, 255) + "..."; - } else { - element.comment_shortened = element.comment; - } - }); - const ShowObservationLogs = (id: any) => { return "../../../../observation_logs/" + id + "/show"; }; @@ -76,9 +74,15 @@ const ObservationLogApprovalList = ({ product }: ObservationLogApprovalListProps sx={{ width: "100%" }} bulkActionButtons={false} rowClick={ShowObservationLogs} + resource="observation_logs" > - + diff --git a/frontend/src/core/observation_logs/ObservationLogEmbeddedList.tsx b/frontend/src/core/observation_logs/ObservationLogEmbeddedList.tsx index a5a2c9ed5..25503b431 100644 --- a/frontend/src/core/observation_logs/ObservationLogEmbeddedList.tsx +++ b/frontend/src/core/observation_logs/ObservationLogEmbeddedList.tsx @@ -21,18 +21,16 @@ const ObservationLogEmbeddedList = ({ observation }: ObservationLogEmbeddedListP return
Loading...
; } - if (listContext.data === undefined) { - listContext.data = []; + if (listContext.data) { + listContext.data.forEach((element: any) => { + if (element.comment.length > 255) { + element.comment_shortened = element.comment.substring(0, 255) + "..."; + } else { + element.comment_shortened = element.comment; + } + }); } - listContext.data.forEach((element: any) => { - if (element.comment.length > 255) { - element.comment_shortened = element.comment.substring(0, 255) + "..."; - } else { - element.comment_shortened = element.comment; - } - }); - const ShowObservationLogs = (id: any) => { return "../../../../observation_logs/" + id + "/show"; }; @@ -48,6 +46,7 @@ const ObservationLogEmbeddedList = ({ observation }: ObservationLogEmbeddedListP sx={{ width: "100%" }} bulkActionButtons={false} rowClick={ShowObservationLogs} + resource="observation_logs" > {(observation.product_data.assessments_need_approval || observation.product_data.product_group_assessments_need_approval) && ( diff --git a/frontend/src/core/observation_logs/ObservationLogShow.tsx b/frontend/src/core/observation_logs/ObservationLogShow.tsx index 3bbfb1ef8..cb8cc67d6 100644 --- a/frontend/src/core/observation_logs/ObservationLogShow.tsx +++ b/frontend/src/core/observation_logs/ObservationLogShow.tsx @@ -68,12 +68,22 @@ const ObservationLogComponent = () => { Observation Log - + - + @@ -112,6 +122,7 @@ const ObservationLogComponent = () => { reference="general_rules" label="General rule name" link="show" + sx={{ "& a": { textDecoration: "none" } }} /> )} @@ -122,6 +133,7 @@ const ObservationLogComponent = () => { reference="product_rules" label="Product rule name" link="show" + sx={{ "& a": { textDecoration: "none" } }} /> )} @@ -132,6 +144,7 @@ const ObservationLogComponent = () => { reference="vex/vex_statements" label="VEX statement" link="show" + sx={{ "& a": { textDecoration: "none" } }} /> )} diff --git a/frontend/src/core/observations/ObservationDashboardList.tsx b/frontend/src/core/observations/ObservationDashboardList.tsx index d3a552eb8..2b04aedf3 100644 --- a/frontend/src/core/observations/ObservationDashboardList.tsx +++ b/frontend/src/core/observations/ObservationDashboardList.tsx @@ -33,10 +33,6 @@ const ObservationDashboardList = () => { return
Loading...
; } - if (listContext.data === undefined) { - listContext.data = []; - } - return ( @@ -49,6 +45,7 @@ const ObservationDashboardList = () => { sx={{ width: "100%" }} rowClick={ShowObservations} bulkActionButtons={false} + resource="observations" > diff --git a/frontend/src/core/observations/ObservationEdit.tsx b/frontend/src/core/observations/ObservationEdit.tsx index 62e9b7f25..c28238e07 100644 --- a/frontend/src/core/observations/ObservationEdit.tsx +++ b/frontend/src/core/observations/ObservationEdit.tsx @@ -49,7 +49,7 @@ const CustomToolbar = () => { const ObservationEditForm = () => { const observation = useRecordContext(); - const [status, setStatus] = useState(observation.parser_status); + const [status, setStatus] = useState(observation ? observation.parser_status : ""); const justificationEnabled = justificationIsEnabledForStatus(status); return ( diff --git a/frontend/src/core/observations/ObservationEmbeddedList.tsx b/frontend/src/core/observations/ObservationEmbeddedList.tsx index ceb3cb99a..fe9a9cc2d 100644 --- a/frontend/src/core/observations/ObservationEmbeddedList.tsx +++ b/frontend/src/core/observations/ObservationEmbeddedList.tsx @@ -134,10 +134,6 @@ const ObservationsEmbeddedList = ({ product }: ObservationsEmbeddedListProps) => return
Loading...
; } - if (listContext.data === undefined) { - listContext.data = []; - } - return (
@@ -156,6 +152,7 @@ const ObservationsEmbeddedList = ({ product }: ObservationsEmbeddedListProps) => ) } + resource="observations" preferenceKey="observations.embedded" > diff --git a/frontend/src/core/observations/ObservationReviewList.tsx b/frontend/src/core/observations/ObservationReviewList.tsx index 11a09ccd7..2619697d3 100644 --- a/frontend/src/core/observations/ObservationReviewList.tsx +++ b/frontend/src/core/observations/ObservationReviewList.tsx @@ -114,10 +114,6 @@ const ObservationsReviewList = ({ product }: ObservationsReviewListProps) => { return
Loading...
; } - if (listContext.data === undefined) { - listContext.data = []; - } - return (
@@ -135,6 +131,7 @@ const ObservationsReviewList = ({ product }: ObservationsReviewListProps) => { ) } + resource="observations" preferenceKey="observations.embedded" > diff --git a/frontend/src/core/observations/ObservationShowAside.tsx b/frontend/src/core/observations/ObservationShowAside.tsx index 31f1a8d7e..d2afaa028 100644 --- a/frontend/src/core/observations/ObservationShowAside.tsx +++ b/frontend/src/core/observations/ObservationShowAside.tsx @@ -36,20 +36,44 @@ const MetaData = () => { render={(observation) => ( Metadata - + {observation.branch && ( )} - - + + - + {observation.scanner_observation_id != "" && ( @@ -66,6 +90,7 @@ const MetaData = () => { reference="general_rules" label="General rule name" link="show" + sx={{ "& a": { textDecoration: "none" } }} /> )} {observation.product_rule != null && ( @@ -74,6 +99,7 @@ const MetaData = () => { reference="product_rules" label="Product rule name" link="show" + sx={{ "& a": { textDecoration: "none" } }} /> )} {is_superuser() && observation.vex_statement != null && ( @@ -82,6 +108,7 @@ const MetaData = () => { reference="vex/vex_statements" label="VEX statement" link="show" + sx={{ "& a": { textDecoration: "none" } }} /> )} {observation.issue_tracker_issue_id != "" && ( @@ -124,6 +151,7 @@ const References = () => { bulkActionButtons={false} header={EmptyDatagridHeader} sx={{ paddingBottom: 2 }} + rowClick={false} > @@ -152,6 +180,7 @@ const Evidences = () => { bulkActionButtons={false} header={EmptyDatagridHeader} sx={{ paddingBottom: 2 }} + rowClick={false} > ( diff --git a/frontend/src/core/observations/PotentialDuplicatesList.tsx b/frontend/src/core/observations/PotentialDuplicatesList.tsx index 7d6d89aea..dbb59436f 100644 --- a/frontend/src/core/observations/PotentialDuplicatesList.tsx +++ b/frontend/src/core/observations/PotentialDuplicatesList.tsx @@ -44,16 +44,13 @@ const PotentialDuplicatesList = ({ observation }: PotentialDuplicatesListProps) return
Loading...
; } - if (listContext.data === undefined) { - listContext.data = []; - } - return ( } + resource="potential_duplicates" > diff --git a/frontend/src/core/product_authorization_group_members/ProductAuthorizationGroupMemberEmbeddedList.tsx b/frontend/src/core/product_authorization_group_members/ProductAuthorizationGroupMemberEmbeddedList.tsx index 4010bb2ac..394aca2b4 100644 --- a/frontend/src/core/product_authorization_group_members/ProductAuthorizationGroupMemberEmbeddedList.tsx +++ b/frontend/src/core/product_authorization_group_members/ProductAuthorizationGroupMemberEmbeddedList.tsx @@ -29,14 +29,16 @@ const ProductAuthorizationGroupMemberEmbeddedList = ({ product }: ProductAuthori return
Loading...
; } - if (listContext.data === undefined) { - listContext.data = []; - } - return (
- + Loading...
; } - if (listContext.data === undefined) { - listContext.data = []; - } - return (
- + { return
Loading...
; } - if (listContext.data === undefined) { - listContext.data = []; - } - localStorage.setItem("productembeddedlist.product_group", product_group.id); return (
- + { )} {product.product_group && ( - + @@ -61,7 +66,12 @@ const ProductShowProduct = ({ product }: ProductShowProductProps) => { )} {product.repository_default_branch && ( - + diff --git a/frontend/src/core/services/ServiceDelete.tsx b/frontend/src/core/services/ServiceDelete.tsx index 66decfa43..fed4b81b8 100644 --- a/frontend/src/core/services/ServiceDelete.tsx +++ b/frontend/src/core/services/ServiceDelete.tsx @@ -10,7 +10,7 @@ const ServiceDelete = (props: ServiceDeleteProps) => { const [open, setOpen] = useState(false); const [deleted, setDeleted] = useState(false); const [error_shown, setErrorShown] = useState(false); - const [deleteOne, { isLoading, error }] = useDelete(); // eslint-disable-line @typescript-eslint/no-unused-vars + const [deleteOne, { error }] = useDelete(); // eslint-disable-line @typescript-eslint/no-unused-vars // isLoading is not needed but easier to let it there const refresh = useRefresh(); const notify = useNotify(); diff --git a/frontend/src/core/services/ServiceEmbeddedList.tsx b/frontend/src/core/services/ServiceEmbeddedList.tsx index bb6e68059..35c346f06 100644 --- a/frontend/src/core/services/ServiceEmbeddedList.tsx +++ b/frontend/src/core/services/ServiceEmbeddedList.tsx @@ -26,10 +26,6 @@ const ServiceEmbeddedList = ({ product }: ServiceEmbeddedListProps) => { return
Loading...
; } - if (listContext.data === undefined) { - listContext.data = []; - } - function get_observations_url( product_id: number, service_id: number, @@ -45,7 +41,7 @@ const ServiceEmbeddedList = ({ product }: ServiceEmbeddedListProps) => { return (
- + ( diff --git a/frontend/src/import_observations/api_configurations/ApiConfigurationDelete.tsx b/frontend/src/import_observations/api_configurations/ApiConfigurationDelete.tsx index 9c93bc610..d865c046a 100644 --- a/frontend/src/import_observations/api_configurations/ApiConfigurationDelete.tsx +++ b/frontend/src/import_observations/api_configurations/ApiConfigurationDelete.tsx @@ -10,8 +10,7 @@ const APIConfigurationDelete = (props: APIConfigurationDeleteProps) => { const [open, setOpen] = useState(false); const [deleted, setDeleted] = useState(false); const [error_shown, setErrorShown] = useState(false); - const [deleteOne, { isLoading, error }] = useDelete(); // eslint-disable-line @typescript-eslint/no-unused-vars - // isLoading is not needed but easier to let it there + const [deleteOne, { error }] = useDelete(); const refresh = useRefresh(); const notify = useNotify(); const handleClick = () => setOpen(true); diff --git a/frontend/src/import_observations/api_configurations/ApiConfigurationEmbeddedList.tsx b/frontend/src/import_observations/api_configurations/ApiConfigurationEmbeddedList.tsx index 3a8b4840a..08870c6f7 100644 --- a/frontend/src/import_observations/api_configurations/ApiConfigurationEmbeddedList.tsx +++ b/frontend/src/import_observations/api_configurations/ApiConfigurationEmbeddedList.tsx @@ -43,17 +43,18 @@ const ApiConfigurationEmbeddedList = ({ product }: ApiConfigurationEmbeddedListP return
Loading...
; } - if (listContext.data === undefined) { - listContext.data = []; - } - return (
- + - + Loading...
; } - if (listContext.data === undefined) { - listContext.data = []; - } - function get_observations_url(vulnerability_check: any): string { if (vulnerability_check.branch == null) { return `..?displayedFilters=%7B%7D&filter=%7B%22current_status%22%3A%22Open%22%2C%22scanner%22%3A%22${vulnerability_check.scanner_name}%22%2C%22upload_filename%22%3A%22${vulnerability_check.filename}%22%2C%22api_configuration_name%22%3A%22${vulnerability_check.api_configuration_name}%22%7D&order=ASC&sort=current_severity`; @@ -54,6 +50,7 @@ const VulnerabilityCheckEmbeddedList = ({ product, long_list }: VulnerabilityChe sx={{ width: "100%" }} bulkActionButtons={false} rowClick={(id, resource, record) => get_observations_url(record)} + resource="vulnerability_checks" > diff --git a/frontend/src/rules/general_rules/GeneralRuleEdit.tsx b/frontend/src/rules/general_rules/GeneralRuleEdit.tsx index 5261b0714..0b0428822 100644 --- a/frontend/src/rules/general_rules/GeneralRuleEdit.tsx +++ b/frontend/src/rules/general_rules/GeneralRuleEdit.tsx @@ -84,7 +84,7 @@ const GeneralRuleEdit = () => { }; const GeneralRuleEditForm = () => { const generalRule = useRecordContext(); - const [status, setStatus] = useState(generalRule.new_status); + const [status, setStatus] = useState(generalRule ? generalRule.new_status : ""); const justificationEnabled = justificationIsEnabledForStatus(status); return ( diff --git a/frontend/src/rules/general_rules/GeneralRuleList.tsx b/frontend/src/rules/general_rules/GeneralRuleList.tsx index a7d0e7b1b..d7d134852 100644 --- a/frontend/src/rules/general_rules/GeneralRuleList.tsx +++ b/frontend/src/rules/general_rules/GeneralRuleList.tsx @@ -70,7 +70,12 @@ const GeneralRuleList = () => { {feature_general_rules_need_approval_enabled() && } - +
diff --git a/frontend/src/rules/general_rules/GeneralRuleShow.tsx b/frontend/src/rules/general_rules/GeneralRuleShow.tsx index 44bf4990a..b1b82f3cf 100644 --- a/frontend/src/rules/general_rules/GeneralRuleShow.tsx +++ b/frontend/src/rules/general_rules/GeneralRuleShow.tsx @@ -94,7 +94,12 @@ const GeneralRuleComponent = () => { {rule.parser && ( - + )} {rule.scanner_prefix && ( diff --git a/frontend/src/rules/product_rules/ProductRuleApprovalList.tsx b/frontend/src/rules/product_rules/ProductRuleApprovalList.tsx index 29294da0e..1c1a5ace2 100644 --- a/frontend/src/rules/product_rules/ProductRuleApprovalList.tsx +++ b/frontend/src/rules/product_rules/ProductRuleApprovalList.tsx @@ -43,10 +43,6 @@ const ProductRuleApprovalList = ({ product }: ProductRuleApprovalListProps) => { return
Loading...
; } - if (listContext.data === undefined) { - listContext.data = []; - } - const ShowProductRule = (id: any) => { return "../../../../product_rules/" + id + "/show"; }; @@ -63,6 +59,7 @@ const ProductRuleApprovalList = ({ product }: ProductRuleApprovalListProps) => { sx={{ width: "100%" }} bulkActionButtons={false} rowClick={ShowProductRule} + resource="product_rules" > @@ -72,7 +69,12 @@ const ProductRuleApprovalList = ({ product }: ProductRuleApprovalListProps) => { )} - +
diff --git a/frontend/src/rules/product_rules/ProductRuleDelete.tsx b/frontend/src/rules/product_rules/ProductRuleDelete.tsx index d18c9cb64..f18798e06 100644 --- a/frontend/src/rules/product_rules/ProductRuleDelete.tsx +++ b/frontend/src/rules/product_rules/ProductRuleDelete.tsx @@ -10,8 +10,7 @@ const ProductRuleDelete = (props: ProductRuleDeleteProps) => { const [open, setOpen] = useState(false); const [deleted, setDeleted] = useState(false); const [error_shown, setErrorShown] = useState(false); - const [deleteOne, { isLoading, error }] = useDelete(); // eslint-disable-line @typescript-eslint/no-unused-vars - // isLoading is not needed but easier to let it there + const [deleteOne, { error }] = useDelete(); const refresh = useRefresh(); const notify = useNotify(); const handleClick = () => setOpen(true); diff --git a/frontend/src/rules/product_rules/ProductRuleEdit.tsx b/frontend/src/rules/product_rules/ProductRuleEdit.tsx index 926472213..a4b200dd2 100644 --- a/frontend/src/rules/product_rules/ProductRuleEdit.tsx +++ b/frontend/src/rules/product_rules/ProductRuleEdit.tsx @@ -92,7 +92,7 @@ const ProductRuleEdit = () => { }; const ProductRuleEditForm = () => { const productRule = useRecordContext(); - const [status, setStatus] = useState(productRule.new_status); + const [status, setStatus] = useState(productRule ? productRule.new_status : ""); const justificationEnabled = justificationIsEnabledForStatus(status); return ( diff --git a/frontend/src/rules/product_rules/ProductRuleEmbeddedList.tsx b/frontend/src/rules/product_rules/ProductRuleEmbeddedList.tsx index 97ecc2300..b9146221d 100644 --- a/frontend/src/rules/product_rules/ProductRuleEmbeddedList.tsx +++ b/frontend/src/rules/product_rules/ProductRuleEmbeddedList.tsx @@ -54,10 +54,6 @@ const ProductRuleEmbeddedList = ({ product }: ProductRuleEmbeddedListProps) => { return
Loading...
; } - if (listContext.data === undefined) { - listContext.data = []; - } - const ShowProductRule = (id: any) => { return "../../../../product_rules/" + id + "/show"; }; @@ -74,6 +70,7 @@ const ProductRuleEmbeddedList = ({ product }: ProductRuleEmbeddedListProps) => { sx={{ width: "100%" }} bulkActionButtons={false} rowClick={ShowProductRule} + resource="product_rules" > @@ -83,7 +80,12 @@ const ProductRuleEmbeddedList = ({ product }: ProductRuleEmbeddedListProps) => { )} - + diff --git a/frontend/src/rules/product_rules/ProductRuleShow.tsx b/frontend/src/rules/product_rules/ProductRuleShow.tsx index d992672e5..d439cd7ec 100644 --- a/frontend/src/rules/product_rules/ProductRuleShow.tsx +++ b/frontend/src/rules/product_rules/ProductRuleShow.tsx @@ -130,7 +130,12 @@ const ProductRuleComponent = () => { {rule.parser && ( - + )} {rule.scanner_prefix && ( diff --git a/frontend/src/vex/csaf/CSAFShow.tsx b/frontend/src/vex/csaf/CSAFShow.tsx index 8c19a9056..1d3262858 100644 --- a/frontend/src/vex/csaf/CSAFShow.tsx +++ b/frontend/src/vex/csaf/CSAFShow.tsx @@ -43,7 +43,12 @@ const CSAFShow = () => { Exported CSAF document {csaf && csaf.product_data && csaf.product_data.name && ( - + )} {csaf && csaf.vulnerability_names && ( { Exported OpenVEX document {openvex && openvex.product_data && openvex.product_data.name && ( - + )} {openvex && openvex.vulnerability_names && ( { VEX Counter - + diff --git a/frontend/src/vex/vex_statements/VEXStatementEmbeddedList.tsx b/frontend/src/vex/vex_statements/VEXStatementEmbeddedList.tsx index 731abe17c..1219ea3eb 100644 --- a/frontend/src/vex/vex_statements/VEXStatementEmbeddedList.tsx +++ b/frontend/src/vex/vex_statements/VEXStatementEmbeddedList.tsx @@ -42,15 +42,16 @@ const VEXStatementEmbeddedList = ({ vex_document }: VEXStatementEmbeddedListProp return
Loading...
; } - if (listContext.data === undefined) { - listContext.data = []; - } - return (
- + diff --git a/frontend/src/vex/vex_statements/VEXStatementShow.tsx b/frontend/src/vex/vex_statements/VEXStatementShow.tsx index 941829e06..813b73f55 100644 --- a/frontend/src/vex/vex_statements/VEXStatementShow.tsx +++ b/frontend/src/vex/vex_statements/VEXStatementShow.tsx @@ -41,7 +41,12 @@ const VEXStatementShow = () => { render={(vex_statement) => ( Imported VEX Statement - + From 54b7a177ebed861ee26fc4304fb5088c4a086c57 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 22:05:40 +0200 Subject: [PATCH 09/13] fix(deps): update dependency validators to v0.32.0 (#1673) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- backend/poetry.lock | 8 ++++---- backend/pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/poetry.lock b/backend/poetry.lock index 2936e53cd..1a11a5d23 100644 --- a/backend/poetry.lock +++ b/backend/poetry.lock @@ -2293,13 +2293,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "validators" -version = "0.31.0" +version = "0.32.0" description = "Python Data Validation for Humans™" optional = false python-versions = ">=3.8" files = [ - {file = "validators-0.31.0-py3-none-any.whl", hash = "sha256:e15a600d81555a4cd409b17bf55946c5edec7748e776afc85ed0a19bdee54e56"}, - {file = "validators-0.31.0.tar.gz", hash = "sha256:de7574fc56a231c788162f3e7da15bc2053c5ff9e0281d9ff1afb3a7b69498df"}, + {file = "validators-0.32.0-py3-none-any.whl", hash = "sha256:e9ce1703afb0adf7724b0f98e4081d9d10e88fa5d37254d21e41f27774c020cd"}, + {file = "validators-0.32.0.tar.gz", hash = "sha256:9ee6e6d7ac9292b9b755a3155d7c361d76bb2dce23def4f0627662da1e300676"}, ] [package.extras] @@ -2429,4 +2429,4 @@ brotli = ["brotli"] [metadata] lock-version = "2.0" python-versions = ">= 3.10, < 3.13" -content-hash = "c1f22b48dd5bf0d2c01f8c82a5bdae791925fb0acacb57886b0cbbd458a4a14b" +content-hash = "341ce012b2347fb4c9ba89dbcf75a2bd66843622d24cc620ddacbd19fd6a63cf" diff --git a/backend/pyproject.toml b/backend/pyproject.toml index af0b61ea6..b3fed467c 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -53,7 +53,7 @@ jira = "3.8.0" # https://github.com/pycontribs/jira # Others # ------------------------------------------------------------------------------ inflect = "7.3.1" # https://github.com/jaraco/inflect -validators = "0.31.0" # https://github.com/python-validators/validators +validators = "0.32.0" # https://github.com/python-validators/validators cvss = "3.1" # https://github.com/RedHatProductSecurity/cvss jsonpickle = "3.2.2" # https://github.com/jsonpickle/jsonpickle From b27c330176213a6d649701b0a8a3b3398178b820 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 22:22:13 +0200 Subject: [PATCH 10/13] chore(deps): update actions/setup-python action to v5.1.1 (#1674) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/check_backend.yml | 2 +- .github/workflows/publish_docs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_backend.yml b/.github/workflows/check_backend.yml index e03f954fa..4de425513 100644 --- a/.github/workflows/check_backend.yml +++ b/.github/workflows/check_backend.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Set up Python 3.12 - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 + uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 with: python-version: 3.12 diff --git a/.github/workflows/publish_docs.yml b/.github/workflows/publish_docs.yml index 17010e009..cf1bef4c6 100644 --- a/.github/workflows/publish_docs.yml +++ b/.github/workflows/publish_docs.yml @@ -15,7 +15,7 @@ jobs: contents: write steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 + - uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 with: python-version: 3.x - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 From 565c52ed45e404122181033338f08c2215fc8b12 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 22:27:30 +0200 Subject: [PATCH 11/13] fix(deps): update react-admin monorepo to v5.0.4 (#1676) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- frontend/package-lock.json | 62 +++++++++++++++++++++----------------- frontend/package.json | 8 ++--- 2 files changed, 38 insertions(+), 32 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 433a3cb16..56bbd1879 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -26,11 +26,11 @@ "oidc-client-ts": "3.0.1", "prop-types": "15.8.1", "query-string": "9.0.0", - "ra-i18n-polyglot": "5.0.3", - "ra-input-rich-text": "5.0.3", - "ra-language-english": "5.0.3", + "ra-i18n-polyglot": "5.0.4", + "ra-input-rich-text": "5.0.4", + "ra-language-english": "5.0.4", "react": "18.3.1", - "react-admin": "5.0.3", + "react-admin": "5.0.4", "react-chartjs-2": "5.2.0", "react-dom": "18.3.1", "react-oidc-context": "3.1.0", @@ -6925,9 +6925,10 @@ "license": "MIT" }, "node_modules/ra-core": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/ra-core/-/ra-core-5.0.3.tgz", - "integrity": "sha512-aTDY4CtX/TLPslGqCABPMFQR2KeiTlF1M8xJ/9SJpe7Cpd244AY9Gbtgx0YjEsW+HeI4/OSQXMEj+Sz0l0Xtiw==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/ra-core/-/ra-core-5.0.4.tgz", + "integrity": "sha512-NGiogs6pxkQEnVymPlYBwMaiE/GXV5yxcTT3EKQB6IVhvCDYCu2qqBTvKjKLuMcAEirK2gnR5pIuitF1ZmrGmg==", + "license": "MIT", "dependencies": { "@tanstack/react-query": "^5.8.4", "clsx": "^2.1.1", @@ -6991,18 +6992,20 @@ } }, "node_modules/ra-i18n-polyglot": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/ra-i18n-polyglot/-/ra-i18n-polyglot-5.0.3.tgz", - "integrity": "sha512-zzC1+hjpwj/UQjF2poIEFgHSNsGF8cjWRCAgtSe7iNw+T9ztc5uqOHmDKzRzJaUv4QCLypN+QjGG85GRe9M8QQ==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/ra-i18n-polyglot/-/ra-i18n-polyglot-5.0.4.tgz", + "integrity": "sha512-KcDgDJqIvaqFa7YAOhh4lL2yhDLGE3Z//wJkJ9gQjty1C2Y7aUWTI1t7DRFcs09inA5Z6/aawXd/oBNtG8wbjA==", + "license": "MIT", "dependencies": { "node-polyglot": "^2.2.2", - "ra-core": "^5.0.3" + "ra-core": "^5.0.4" } }, "node_modules/ra-input-rich-text": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/ra-input-rich-text/-/ra-input-rich-text-5.0.3.tgz", - "integrity": "sha512-1pAau85tMRwWTWBrgd9i79NUx36vTTbi2Tn2jA3N327F9Q0DVmG3jUociCKQ/1fwVXPvJr0FSXoPLrQA3kyuKQ==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/ra-input-rich-text/-/ra-input-rich-text-5.0.4.tgz", + "integrity": "sha512-un6W9/Fu5KtkIxo+lulKbd6FNkZRL99KPiuWWGkzg5dXyJbIQ6dmFftfShx2t2rGDvQ5bn6wj4pzdN7MHHqn9Q==", + "license": "MIT", "dependencies": { "@tiptap/core": "^2.0.3", "@tiptap/extension-color": "^2.0.3", @@ -7028,17 +7031,19 @@ } }, "node_modules/ra-language-english": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/ra-language-english/-/ra-language-english-5.0.3.tgz", - "integrity": "sha512-0qm+arNNk7aynYzKlH5s20VVPAYWz2jDfhIeRyBcDVRifC96XbkvTTiFtr9k96LtRyJUGocBROxuuqKsEzw3YA==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/ra-language-english/-/ra-language-english-5.0.4.tgz", + "integrity": "sha512-X5THxwAmOqxNzHtR3NBNWKxAOTEmMvjWwIXdfgCFIgeZQEfBMboThPTLSc7eewlz0Rc/MGQQRdKxdFXWzbEAmA==", + "license": "MIT", "dependencies": { - "ra-core": "^5.0.3" + "ra-core": "^5.0.4" } }, "node_modules/ra-ui-materialui": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/ra-ui-materialui/-/ra-ui-materialui-5.0.3.tgz", - "integrity": "sha512-Y3COTPdztPSZekN7Vc3tP3nbj+4Q1wgCc4w4GEv6ET1Sme0JmzOA+ybgwbM8dKryqlMtnjuMGwIMz1gzPSewbQ==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/ra-ui-materialui/-/ra-ui-materialui-5.0.4.tgz", + "integrity": "sha512-D4TTN4681PUHn+/LkR9Dd50DUsJsbbRJQkujuWAAshjfzMRxhoJa/yVzcpgYk0UczNc4NpwQ2EjVnoLye49pXw==", + "license": "MIT", "dependencies": { "@tanstack/react-query": "^5.8.4", "autosuggest-highlight": "^3.1.1", @@ -7120,18 +7125,19 @@ } }, "node_modules/react-admin": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/react-admin/-/react-admin-5.0.3.tgz", - "integrity": "sha512-p8uuCgSCXGzad3EojVGPztIVXcCD7/GHnztywnKZwnfK3YSo9jJL8VYUpY/QnTJ6Gedz8eWRM9vFjBuyTKuwnw==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/react-admin/-/react-admin-5.0.4.tgz", + "integrity": "sha512-HTiT+DVz5Raz9TdoBlEfVjXXmf0dLLgGimtJdTAx0shYhilzI9GNir5HXDPBaZKSfw80yVuzDL6VVKWfQ2nNtw==", + "license": "MIT", "dependencies": { "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", "@mui/icons-material": "^5.15.20", "@mui/material": "^5.15.20", - "ra-core": "^5.0.3", - "ra-i18n-polyglot": "^5.0.3", - "ra-language-english": "^5.0.3", - "ra-ui-materialui": "^5.0.3", + "ra-core": "^5.0.4", + "ra-i18n-polyglot": "^5.0.4", + "ra-language-english": "^5.0.4", + "ra-ui-materialui": "^5.0.4", "react-hook-form": "^7.52.0", "react-router": "^6.22.0", "react-router-dom": "^6.22.0" diff --git a/frontend/package.json b/frontend/package.json index 5d5b41eba..79b6b98db 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -11,10 +11,10 @@ "@types/recharts": "1.8.29", "prop-types": "15.8.1", "query-string": "9.0.0", - "react-admin": "5.0.3", - "ra-i18n-polyglot": "5.0.3", - "ra-input-rich-text": "5.0.3", - "ra-language-english": "5.0.3", + "react-admin": "5.0.4", + "ra-i18n-polyglot": "5.0.4", + "ra-input-rich-text": "5.0.4", + "ra-language-english": "5.0.4", "react": "18.3.1", "react-dom": "18.3.1", "react-router": "6.24.1", From 48c394450ab5f88678d6e59d32b7b384d0992479 Mon Sep 17 00:00:00 2001 From: Stefan Fleckenstein Date: Thu, 11 Jul 2024 08:21:00 +0100 Subject: [PATCH 12/13] fix: compilation error for onClose (#1677) --- frontend/src/commons/layout/AppBar.tsx | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/frontend/src/commons/layout/AppBar.tsx b/frontend/src/commons/layout/AppBar.tsx index efff990ea..b89f7313e 100644 --- a/frontend/src/commons/layout/AppBar.tsx +++ b/frontend/src/commons/layout/AppBar.tsx @@ -10,7 +10,11 @@ import About from "../about/About"; import Logo from "./Logo"; const DocumentationMenu = forwardRef(() => { - const { onClose } = useUserMenu(); + const userMenuContext = useUserMenu(); + if (!userMenuContext) { + return null; + } + const { onClose } = userMenuContext; return ( { }); const ProfileMenu = forwardRef(() => { - const { onClose } = useUserMenu(); + const userMenuContext = useUserMenu(); + if (!userMenuContext) { + return null; + } + const { onClose } = userMenuContext; + const user = localStorage.getItem("user"); const user_id = user ? JSON.parse(user).id : null; @@ -54,7 +63,11 @@ const ProfileMenu = forwardRef(() => { }); const SettingsMenu = forwardRef(() => { - const { onClose } = useUserMenu(); + const userMenuContext = useUserMenu(); + if (!userMenuContext) { + return null; + } + const { onClose } = userMenuContext; return ( Date: Thu, 11 Jul 2024 10:25:56 +0100 Subject: [PATCH 13/13] chore: prepare for release 1.16.1 (#1678) --- .github/workflows/scan_sca_current.yml | 2 +- backend/application/__init__.py | 2 +- backend/pyproject.toml | 2 +- .../vex/api/files/csaf_given_vulnerability.json | 2 +- .../api/files/csaf_given_vulnerability_update.json | 2 +- .../vex/api/files/csaf_product_branches.json | 2 +- .../vex/api/files/csaf_product_given_branch.json | 2 +- .../vex/api/files/csaf_product_no_branch.json | 2 +- .../vex/api/files/csaf_product_no_branch_update.json | 2 +- .../vex/api/files/openvex_given_vulnerability.json | 2 +- .../files/openvex_given_vulnerability_update.json | 2 +- .../vex/api/files/openvex_product_branches.json | 2 +- .../vex/api/files/openvex_product_given_branch.json | 2 +- .../vex/api/files/openvex_product_no_branch.json | 2 +- .../api/files/openvex_product_no_branch_update.json | 2 +- docker-compose-prod-mysql.yml | 4 ++-- docker-compose-prod-postgres.yml | 4 ++-- docs/getting_started/installation.md | 4 ++-- end_to_end_tests/package-lock.json | 4 ++-- end_to_end_tests/package.json | 2 +- frontend/package-lock.json | 4 ++-- frontend/package.json | 2 +- so_configuration_sca_current.yml | 12 ++++++------ 23 files changed, 33 insertions(+), 33 deletions(-) diff --git a/.github/workflows/scan_sca_current.yml b/.github/workflows/scan_sca_current.yml index 06060760f..3c9549e39 100644 --- a/.github/workflows/scan_sca_current.yml +++ b/.github/workflows/scan_sca_current.yml @@ -15,7 +15,7 @@ jobs: name: Checkout uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: - ref: 'v1.16.0' + ref: 'v1.16.1' - name: Run SCA vulnerability scanners uses: MaibornWolff/secobserve_actions_templates/actions/vulnerability_scanner@b5a60f29e16156ade4d49a2929268361e95e55ff # main diff --git a/backend/application/__init__.py b/backend/application/__init__.py index ef45b855d..ce6e048e7 100644 --- a/backend/application/__init__.py +++ b/backend/application/__init__.py @@ -1,4 +1,4 @@ -__version__ = "1.16.0" +__version__ = "1.16.1" import pymysql diff --git a/backend/pyproject.toml b/backend/pyproject.toml index b3fed467c..71790e84c 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "SecObserve" -version = "1.16.0" +version = "1.16.1" description = "SecObserve is an open source vulnerability management system for software development and cloud environments." license = "BSD-3-Clause" authors = [ diff --git a/backend/unittests/vex/api/files/csaf_given_vulnerability.json b/backend/unittests/vex/api/files/csaf_given_vulnerability.json index 4406929c6..8f0d20395 100644 --- a/backend/unittests/vex/api/files/csaf_given_vulnerability.json +++ b/backend/unittests/vex/api/files/csaf_given_vulnerability.json @@ -18,7 +18,7 @@ "generator": { "engine": { "name": "SecObserve", - "version": "1.16.0" + "version": "1.16.1" } }, "id": "CSAF_2024_0001_0001", diff --git a/backend/unittests/vex/api/files/csaf_given_vulnerability_update.json b/backend/unittests/vex/api/files/csaf_given_vulnerability_update.json index a52bca054..dfe9f2aad 100644 --- a/backend/unittests/vex/api/files/csaf_given_vulnerability_update.json +++ b/backend/unittests/vex/api/files/csaf_given_vulnerability_update.json @@ -18,7 +18,7 @@ "generator": { "engine": { "name": "SecObserve", - "version": "1.16.0" + "version": "1.16.1" } }, "id": "CSAF_2024_0001_0002", diff --git a/backend/unittests/vex/api/files/csaf_product_branches.json b/backend/unittests/vex/api/files/csaf_product_branches.json index 66e3ddb15..de3d0921b 100644 --- a/backend/unittests/vex/api/files/csaf_product_branches.json +++ b/backend/unittests/vex/api/files/csaf_product_branches.json @@ -18,7 +18,7 @@ "generator": { "engine": { "name": "SecObserve", - "version": "1.16.0" + "version": "1.16.1" } }, "id": "CSAF_2024_0001_0001", diff --git a/backend/unittests/vex/api/files/csaf_product_given_branch.json b/backend/unittests/vex/api/files/csaf_product_given_branch.json index cafc60631..23145eb88 100644 --- a/backend/unittests/vex/api/files/csaf_product_given_branch.json +++ b/backend/unittests/vex/api/files/csaf_product_given_branch.json @@ -18,7 +18,7 @@ "generator": { "engine": { "name": "SecObserve", - "version": "1.16.0" + "version": "1.16.1" } }, "id": "CSAF_2024_0001_0001", diff --git a/backend/unittests/vex/api/files/csaf_product_no_branch.json b/backend/unittests/vex/api/files/csaf_product_no_branch.json index 388c738a5..f4bda5a83 100644 --- a/backend/unittests/vex/api/files/csaf_product_no_branch.json +++ b/backend/unittests/vex/api/files/csaf_product_no_branch.json @@ -18,7 +18,7 @@ "generator": { "engine": { "name": "SecObserve", - "version": "1.16.0" + "version": "1.16.1" } }, "id": "CSAF_2024_0001_0001", diff --git a/backend/unittests/vex/api/files/csaf_product_no_branch_update.json b/backend/unittests/vex/api/files/csaf_product_no_branch_update.json index b0310ea60..a0d746dfe 100644 --- a/backend/unittests/vex/api/files/csaf_product_no_branch_update.json +++ b/backend/unittests/vex/api/files/csaf_product_no_branch_update.json @@ -18,7 +18,7 @@ "generator": { "engine": { "name": "SecObserve", - "version": "1.16.0" + "version": "1.16.1" } }, "id": "CSAF_2024_0001_0002", diff --git a/backend/unittests/vex/api/files/openvex_given_vulnerability.json b/backend/unittests/vex/api/files/openvex_given_vulnerability.json index 1a283b985..514879d5d 100644 --- a/backend/unittests/vex/api/files/openvex_given_vulnerability.json +++ b/backend/unittests/vex/api/files/openvex_given_vulnerability.json @@ -47,6 +47,6 @@ } ], "timestamp": "2020-01-01T04:30:00+00:00", - "tooling": "SecObserve / 1.16.0", + "tooling": "SecObserve / 1.16.1", "version": 1 } \ No newline at end of file diff --git a/backend/unittests/vex/api/files/openvex_given_vulnerability_update.json b/backend/unittests/vex/api/files/openvex_given_vulnerability_update.json index 1ecc6505b..6988004b5 100644 --- a/backend/unittests/vex/api/files/openvex_given_vulnerability_update.json +++ b/backend/unittests/vex/api/files/openvex_given_vulnerability_update.json @@ -37,6 +37,6 @@ } ], "timestamp": "2020-01-01T04:30:00+00:00", - "tooling": "SecObserve / 1.16.0", + "tooling": "SecObserve / 1.16.1", "version": 2 } \ No newline at end of file diff --git a/backend/unittests/vex/api/files/openvex_product_branches.json b/backend/unittests/vex/api/files/openvex_product_branches.json index 95cfc50f3..dc0c4db7e 100644 --- a/backend/unittests/vex/api/files/openvex_product_branches.json +++ b/backend/unittests/vex/api/files/openvex_product_branches.json @@ -70,6 +70,6 @@ } ], "timestamp": "2020-01-01T04:30:00+00:00", - "tooling": "SecObserve / 1.16.0", + "tooling": "SecObserve / 1.16.1", "version": 1 } \ No newline at end of file diff --git a/backend/unittests/vex/api/files/openvex_product_given_branch.json b/backend/unittests/vex/api/files/openvex_product_given_branch.json index 757436e8c..18ad6b5a6 100644 --- a/backend/unittests/vex/api/files/openvex_product_given_branch.json +++ b/backend/unittests/vex/api/files/openvex_product_given_branch.json @@ -28,6 +28,6 @@ } ], "timestamp": "2020-01-01T04:30:00+00:00", - "tooling": "SecObserve / 1.16.0", + "tooling": "SecObserve / 1.16.1", "version": 1 } \ No newline at end of file diff --git a/backend/unittests/vex/api/files/openvex_product_no_branch.json b/backend/unittests/vex/api/files/openvex_product_no_branch.json index 891528183..f01f28d77 100644 --- a/backend/unittests/vex/api/files/openvex_product_no_branch.json +++ b/backend/unittests/vex/api/files/openvex_product_no_branch.json @@ -63,6 +63,6 @@ } ], "timestamp": "2020-01-01T04:30:00+00:00", - "tooling": "SecObserve / 1.16.0", + "tooling": "SecObserve / 1.16.1", "version": 1 } \ No newline at end of file diff --git a/backend/unittests/vex/api/files/openvex_product_no_branch_update.json b/backend/unittests/vex/api/files/openvex_product_no_branch_update.json index 582312ee1..bbe6cbdf6 100644 --- a/backend/unittests/vex/api/files/openvex_product_no_branch_update.json +++ b/backend/unittests/vex/api/files/openvex_product_no_branch_update.json @@ -64,6 +64,6 @@ } ], "timestamp": "2020-01-01T04:30:00+00:00", - "tooling": "SecObserve / 1.16.0", + "tooling": "SecObserve / 1.16.1", "version": 2 } \ No newline at end of file diff --git a/docker-compose-prod-mysql.yml b/docker-compose-prod-mysql.yml index 7557ec58d..e691ae4f8 100644 --- a/docker-compose-prod-mysql.yml +++ b/docker-compose-prod-mysql.yml @@ -37,7 +37,7 @@ services: - traefik frontend: - image: maibornwolff/secobserve-frontend:1.16.0 + image: maibornwolff/secobserve-frontend:1.16.1 container_name: "prod_secobserve_frontend" labels: - "traefik.enable=true" @@ -55,7 +55,7 @@ services: - traefik backend: - image: maibornwolff/secobserve-backend:1.16.0 + image: maibornwolff/secobserve-backend:1.16.1 container_name: "prod_secobserve_backend" labels: - "traefik.enable=true" diff --git a/docker-compose-prod-postgres.yml b/docker-compose-prod-postgres.yml index 70d39c675..8fb8f18de 100644 --- a/docker-compose-prod-postgres.yml +++ b/docker-compose-prod-postgres.yml @@ -37,7 +37,7 @@ services: - traefik frontend: - image: maibornwolff/secobserve-frontend:1.16.0 + image: maibornwolff/secobserve-frontend:1.16.1 container_name: "prod_secobserve_frontend" labels: - "traefik.enable=true" @@ -55,7 +55,7 @@ services: - traefik backend: - image: maibornwolff/secobserve-backend:1.16.0 + image: maibornwolff/secobserve-backend:1.16.1 container_name: "prod_secobserve_backend" labels: - "traefik.enable=true" diff --git a/docs/getting_started/installation.md b/docs/getting_started/installation.md index 5668cf4f0..a5d0639d4 100644 --- a/docs/getting_started/installation.md +++ b/docs/getting_started/installation.md @@ -47,7 +47,7 @@ services: - default frontend: - image: maibornwolff/secobserve-frontend:1.16.0 + image: maibornwolff/secobserve-frontend:1.16.1 labels: - "traefik.enable=true" - "traefik.http.routers.frontend.rule=Host(`secobserve.localhost`)" @@ -63,7 +63,7 @@ services: - traefik backend: - image: maibornwolff/secobserve-backend:1.16.0 + image: maibornwolff/secobserve-backend:1.16.1 labels: - "traefik.enable=true" - "traefik.http.routers.backend.rule=Host(`secobserve-backend.localhost`)" diff --git a/end_to_end_tests/package-lock.json b/end_to_end_tests/package-lock.json index 118dfa3d3..1c7ccf363 100644 --- a/end_to_end_tests/package-lock.json +++ b/end_to_end_tests/package-lock.json @@ -1,12 +1,12 @@ { "name": "end_to_end_tests", - "version": "1.16.0", + "version": "1.16.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "end_to_end_tests", - "version": "1.16.0", + "version": "1.16.1", "devDependencies": { "@playwright/test": "1.45.1", "@types/node": "20.14.10" diff --git a/end_to_end_tests/package.json b/end_to_end_tests/package.json index 998b68c6d..630d37ba5 100644 --- a/end_to_end_tests/package.json +++ b/end_to_end_tests/package.json @@ -1,6 +1,6 @@ { "name": "end_to_end_tests", - "version": "1.16.0", + "version": "1.16.1", "private": true, "description": "", "main": "index.js", diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 56bbd1879..d9389bdd9 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "secobserve", - "version": "1.16.0", + "version": "1.16.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "secobserve", - "version": "1.16.0", + "version": "1.16.1", "license": "BSD-3-Clause", "dependencies": { "@emotion/react": "11.11.4", diff --git a/frontend/package.json b/frontend/package.json index 79b6b98db..7f615b42b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "secobserve", - "version": "1.16.0", + "version": "1.16.1", "license": "BSD-3-Clause", "description": "SecObserve is an open source vulnerability management system for software development and cloud environments.", "private": true, diff --git a/so_configuration_sca_current.yml b/so_configuration_sca_current.yml index 96152df3d..1f27de85a 100644 --- a/so_configuration_sca_current.yml +++ b/so_configuration_sca_current.yml @@ -1,18 +1,18 @@ trivy_image_backend_current: SCANNER: trivy_image - TARGET: "maibornwolff/secobserve-backend:1.16.0" + TARGET: "maibornwolff/secobserve-backend:1.16.1" FURTHER_PARAMETERS: "--vuln-type os" REPORT_NAME: "trivy_backend_image.json" SO_ORIGIN_SERVICE: "backend" - SO_BRANCH_NAME: "1.16.0" + SO_BRANCH_NAME: "1.16.1" trivy_image_frontend_current: SCANNER: trivy_image - TARGET: "maibornwolff/secobserve-frontend:1.16.0" + TARGET: "maibornwolff/secobserve-frontend:1.16.1" FURTHER_PARAMETERS: "--vuln-type os" REPORT_NAME: "trivy_frontend_image.json" SO_ORIGIN_SERVICE: "frontend" - SO_BRANCH_NAME: "1.16.0" + SO_BRANCH_NAME: "1.16.1" trivy_filesystem_backend_current: SCANNER: trivy_filesystem @@ -20,7 +20,7 @@ trivy_filesystem_backend_current: TARGET: "backend/poetry.lock" REPORT_NAME: "trivy_backend_poetry.json" SO_ORIGIN_SERVICE: "backend" - SO_BRANCH_NAME: "1.16.0" + SO_BRANCH_NAME: "1.16.1" trivy_filesystem_frontend_current: SCANNER: trivy_filesystem @@ -28,7 +28,7 @@ trivy_filesystem_frontend_current: TARGET: "frontend/package-lock.json" REPORT_NAME: "trivy_frontend_npm.json" SO_ORIGIN_SERVICE: "frontend" - SO_BRANCH_NAME: "1.16.0" + SO_BRANCH_NAME: "1.16.1" importer: SO_UPLOAD: "true"