Skip to content

Commit

Permalink
Merge branch 'main' into fix/translate_mails_trmp_reset
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-intuitem committed Dec 12, 2024
2 parents 7436cd7 + 12085fc commit 5b64519
Show file tree
Hide file tree
Showing 9 changed files with 1,196 additions and 1,183 deletions.
4 changes: 2 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1
# Based on https://docs.docker.com/samples/django/

FROM python:3.11-alpine
FROM python:3.12-alpine
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1

Expand All @@ -26,7 +26,7 @@ COPY poetry.lock /code/
COPY startup.sh /code/

RUN pip install --upgrade pip && \
pip install poetry==1.8.3
pip install poetry==1.8.5
RUN poetry install
RUN rm -rf $POETRY_CACHE_DIR

Expand Down
2 changes: 0 additions & 2 deletions backend/app_tests/api/test_api_requirement_assessments.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ def test_get_requirement_assessments(self, test):
"str": compliance_assessment.name,
},
"requirement": {
"str": str(RequirementNode.objects.all()[0]),
"id": str(RequirementNode.objects.all()[0].id),
"urn": RequirementNode.objects.all()[0].urn,
"annotation": RequirementNode.objects.all()[0].annotation,
Expand Down Expand Up @@ -252,7 +251,6 @@ def test_update_requirement_assessments(self, test):
"str": compliance_assessment.name,
},
"requirement": {
"str": str(RequirementNode.objects.all()[0]),
"id": str(RequirementNode.objects.all()[0].id),
"urn": RequirementNode.objects.all()[0].urn,
"annotation": RequirementNode.objects.all()[0].annotation,
Expand Down
45 changes: 31 additions & 14 deletions backend/core/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,20 @@ class Meta:
model = Asset
fields = "__all__"

def validate_parent_assets(self, parent_assets):
"""
Check that the assets graph will not contain cycles
"""
if not self.instance:
return parent_assets
if parent_assets:
for asset in parent_assets:
if self.instance in asset.ancestors_plus_self():
raise serializers.ValidationError(
"errorAssetGraphMustNotContainCycles"
)
return parent_assets


class AssetReadSerializer(AssetWriteSerializer):
folder = FieldsRelatedField()
Expand Down Expand Up @@ -621,26 +635,29 @@ class Meta:


class RequirementAssessmentReadSerializer(BaseModelSerializer):
class FilteredNodeSerializer(RequirementNodeReadSerializer):
class Meta:
model = RequirementNode
fields = [
"id",
"urn",
"annotation",
"name",
"description",
"typical_evidence",
"ref_id",
"associated_reference_controls",
"associated_threats",
"parent_requirement",
]

name = serializers.CharField(source="__str__")
description = serializers.CharField(source="get_requirement_description")
evidences = FieldsRelatedField(many=True)
compliance_assessment = FieldsRelatedField()
folder = FieldsRelatedField()
assessable = serializers.BooleanField(source="requirement.assessable")
requirement = FieldsRelatedField(
[
"id",
"urn",
"annotation",
"name",
"description",
"typical_evidence",
"ref_id",
"associated_reference_controls",
"associated_threats",
"parent_requirement",
]
)
requirement = FilteredNodeSerializer()

class Meta:
model = RequirementAssessment
Expand Down
220 changes: 110 additions & 110 deletions backend/poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions enterprise/backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1
# Based on https://docs.docker.com/samples/django/

FROM python:3.11-alpine
FROM python:3.12-alpine
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1

Expand Down Expand Up @@ -29,7 +29,7 @@ COPY backend/pyproject.toml /code/
COPY backend/poetry.lock /code/

RUN pip install --upgrade pip && \
pip install poetry==1.8.3
pip install poetry==1.8.5

RUN poetry install
RUN rm -rf $POETRY_CACHE_DIR
Expand Down
4 changes: 2 additions & 2 deletions enterprise/frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:21-alpine AS builder
FROM node:22-alpine AS builder
WORKDIR /app

ENV PUBLIC_BACKEND_API_URL=foo
Expand All @@ -13,7 +13,7 @@ RUN pnpm install --frozen-lockfile
RUN pnpm run build
RUN pnpm prune

FROM node:21-alpine
FROM node:22-alpine
WORKDIR /app
COPY --from=builder /app/build build/
COPY --from=builder /app/server server/
Expand Down
4 changes: 2 additions & 2 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:21-alpine AS builder
FROM node:22-alpine AS builder
ENV NODE_OPTIONS="--max-old-space-size=8192"
WORKDIR /app

Expand All @@ -11,7 +11,7 @@ RUN pnpm install --frozen-lockfile
RUN pnpm run build
RUN pnpm prune

FROM node:21-alpine
FROM node:22-alpine
ENV NODE_OPTIONS="--max-old-space-size=8192"
WORKDIR /app
COPY --from=builder /app/build build/
Expand Down
56 changes: 28 additions & 28 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,70 +21,70 @@
},
"devDependencies": {
"@inlang/paraglide-js": "1.11.2",
"@playwright/test": "^1.48.2",
"@playwright/test": "^1.49.1",
"@skeletonlabs/skeleton": "^2.10.3",
"@skeletonlabs/tw-plugin": "^0.4.0",
"@storybook/addon-essentials": "^8.4.1",
"@storybook/addon-interactions": "^8.4.1",
"@storybook/addon-links": "^8.4.1",
"@storybook/blocks": "^8.4.1",
"@storybook/svelte": "^8.4.1",
"@storybook/sveltekit": "^8.4.1",
"@storybook/test": "^8.4.1",
"@storybook/addon-essentials": "^8.4.7",
"@storybook/addon-interactions": "^8.4.7",
"@storybook/addon-links": "^8.4.7",
"@storybook/blocks": "^8.4.7",
"@storybook/svelte": "^8.4.7",
"@storybook/sveltekit": "^8.4.7",
"@storybook/test": "^8.4.7",
"@svelte-put/copy": "^3.0.2",
"@svelte-put/qr": "^1.2.1",
"@sveltejs/adapter-auto": "^3.3.1",
"@sveltejs/adapter-node": "^5.2.9",
"@sveltejs/kit": "^2.8.3",
"@sveltejs/kit": "^2.10.1",
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@tailwindcss/forms": "^0.5.9",
"@tailwindcss/typography": "^0.5.15",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/svelte": "^5.2.4",
"@types/node": "^20.17.6",
"@testing-library/svelte": "^5.2.6",
"@types/node": "^20.17.10",
"@vincjo/datatables": "^1.14.10",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/ui": "^1.6.0",
"autoprefixer": "^10.4.20",
"eslint": "^9.14.0",
"eslint": "^9.16.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-intuitem-sveltekit": "file:plugins/eslint/eslint-plugin-intuitem-sveltekit",
"eslint-plugin-svelte": "^2.46.0",
"eslint-plugin-svelte": "^2.46.1",
"jsdom": "^24.1.3",
"postcss": "^8.4.47",
"prettier": "^3.3.3",
"prettier-plugin-svelte": "^3.2.7",
"postcss": "^8.4.49",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"storybook": "^8.4.1",
"storybook": "^8.4.7",
"svelte": "^4.2.19",
"svelte-check": "^3.8.6",
"svelte-typewriter": "^3.2.3",
"sveltekit-flash-message": "^2.4.4",
"sveltekit-rate-limiter": "^0.5.2",
"sveltekit-superforms": "^2.20.0",
"tailwindcss": "^3.4.14",
"sveltekit-superforms": "^2.21.1",
"tailwindcss": "^3.4.16",
"tslib": "^2.8.1",
"typescript": "^5.6.3",
"vite": "^5.4.10",
"vite-plugin-tailwind-purgecss": "^0.3.3",
"typescript": "^5.7.2",
"vite": "^5.4.11",
"vite-plugin-tailwind-purgecss": "^0.3.5",
"vitest": "^1.6.0",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"type": "module",
"dependencies": {
"@floating-ui/dom": "^1.6.12",
"@fortawesome/fontawesome-free": "^6.6.0",
"@fortawesome/fontawesome-free": "^6.7.1",
"@inlang/paraglide-sveltekit": "0.11.0",
"@typescript-eslint/eslint-plugin": "^8.13.0",
"@typescript-eslint/parser": "^8.13.0",
"@typescript-eslint/eslint-plugin": "^8.18.0",
"@typescript-eslint/parser": "^8.18.0",
"@unovis/svelte": "1.4.3-beta.0",
"@unovis/ts": "1.4.3-beta.0",
"dotenv": "^16.4.5",
"dotenv": "^16.4.7",
"echarts": "^5.5.1",
"eslint-plugin-storybook": "^0.10.2",
"globals": "^15.12.0",
"globals": "^15.13.0",
"svelte-multiselect": "^10.3.0",
"svelte-persisted-store": "^0.11.0"
}
Expand Down
Loading

0 comments on commit 5b64519

Please sign in to comment.