-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create docker-compose.ps1 This is the initialization script for Windows user * translate doc-pol in French * Create cjis.yaml create mapping for cjis update fix error message * Avoid reckless error localization lookups * Remove is_open_for_signup method override The signup check is already done in the SAML views * chore: Organize imports * chore: Some cleaning * Modèle ANSSI ajout de nouveaux framework et homogénéisation des références des bibliothèques * Modèles ANSSI ajout de nouveaux framework et homogénéisation des références des bibliothèques * Fix objects_meta always counting 1 object even when there is more than that * Fix null name for implementation groups * Add extra log useful for mapping issues * Update utils.py fix and rationalize messages * Update utils.py * add GL on costs and losses * Add migration to fix the wrong objects_meta counters * Formatter * quick cleanup * Fix reference controls french translation It translates to "Mesures de référence", not "Contrôles de référence" * Remove debug code * Remove unnecessary click handler * Change all backend endpoint URLs not ending with a slash to stop useless redirections when requesting the API * Fix broken dependency links for loaded library detail views * Backend formatter * Update data-model.md * Simplify post token generation flow This essentially removes redundant or irrelevant checks from allauth. As we will most certainly only have a single social account adapter for the entire lifespan of the project, these changes will only save us from headaches. * Render IdP-initiated SSO rejected error * Create enum for SAML-related auth errors * Internationalize auth errors * Use FieldsRelatedField to serialize dependencies * chore: Run formatting * chore: Organize imports * Bump django from 5.0.7 to 5.0.8 in /backend Bumps [django](https://github.com/django/django) from 5.0.7 to 5.0.8. - [Commits](django/django@5.0.7...5.0.8) --- updated-dependencies: - dependency-name: django dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * TPRM model Leverage compliance assessment. * fix translation spec * Update data-model.md clarify solution. small fixes. * Update data-model.md Consider contract as a subset of applied controls. A domain can be owned by one entity at most. * Update id and new template anssi framework * Update id and new template anssi framework * TPRM * Update data-model.md * Update startup-tests.yml try fix docker test error * Update startup-tests.yml try fix docker test * 724: improve framework naming rendering * Small ui improvement * also improve library view * Add RTS DORA on JET, on OVS * Add PART-IS * fix: typo in quality checks * chore: update translations with Fink 🐦 * Update libraries.test.ts try fix functional tests * try fix functional tests - une name instead of ref to get a lib. - adjust library name for NIST CSF, so that lib name=referential name (assumption for tests) * Update page-content.ts prettier * Update README.md * fix: allow empty link * fix French translation for iso27005 matrix * Update README.md * fix: revert evidence link field schema * chore: add missing comma * Render authentication errors * feat: raise urn max length * chore: format migration * Add Romanian translation * update the excel sheet * generate the new yaml with annotations and levels * Update README.md Add in 1.6.6 * Update README.md * Update README.md --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Fabrizio Di Carlo <[email protected]> Co-authored-by: eric-intuitem <[email protected]> Co-authored-by: Nassim Tabchiche <[email protected]> Co-authored-by: protocolpaladin <[email protected]> Co-authored-by: Nassim <[email protected]> Co-authored-by: monsieurswag <[email protected]> Co-authored-by: Abder <[email protected]> Co-authored-by: ImanABS <[email protected]> Co-authored-by: monsieurswag <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mohamed-Hacene <[email protected]> Co-authored-by: Mohamed-Hacene <[email protected]>
- Loading branch information
1 parent
83e9c50
commit 7ce6cbb
Showing
75 changed files
with
18,422 additions
and
334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,7 +115,7 @@ jobs: | |
export $(grep -v '^#' .env | xargs) | ||
- name: Config the Docker app | ||
run: | | ||
sleep 30 # give the migrations time to finish (included in the up on the previous step) | ||
sleep 60 # give the migrations time to finish (included in the up on the previous step) | ||
docker compose -f docker-compose-build.yml exec backend /bin/bash -c "[email protected] DJANGO_SUPERUSER_PASSWORD=1234 python manage.py createsuperuser --noinput && exit 0" | ||
- name: Run tests | ||
working-directory: ${{ env.working-directory }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
backend/core/migrations/0020_fix_libraries_objects_meta.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
from django.db import migrations | ||
import json | ||
|
||
|
||
def fix_libraries_objects_meta(apps, schema_editor): | ||
StoredLibrary = apps.get_model("core", "StoredLibrary") | ||
LoadedLibrary = apps.get_model("core", "LoadedLibrary") | ||
|
||
for library in StoredLibrary.objects.all(): | ||
objects = json.loads(library.content) | ||
library.objects_meta = { | ||
key: (1 if key in ["framework", "requirement_mapping_set"] else len(value)) | ||
for key, value in objects.items() | ||
} | ||
library.save() | ||
|
||
for library in LoadedLibrary.objects.all(): | ||
objects_meta = {} | ||
for object_name, object_set in [ | ||
("frameworks", library.frameworks), | ||
("threats", library.threats), | ||
("reference_controls", library.reference_controls), | ||
("risk_matrix", library.risk_matrices), | ||
]: | ||
count = object_set.count() | ||
if count > 0: | ||
objects_meta[object_name] = count | ||
|
||
library.objects_meta = objects_meta | ||
library.save() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("core", "0019_merge_20240726_2156"), | ||
] | ||
|
||
operations = [migrations.RunPython(fix_libraries_objects_meta)] |
75 changes: 75 additions & 0 deletions
75
backend/core/migrations/0021_alter_framework_urn_alter_loadedlibrary_urn_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Generated by Django 5.0.4 on 2024-08-14 12:05 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("core", "0020_fix_libraries_objects_meta"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="framework", | ||
name="urn", | ||
field=models.CharField( | ||
blank=True, max_length=255, null=True, unique=True, verbose_name="URN" | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="loadedlibrary", | ||
name="urn", | ||
field=models.CharField( | ||
blank=True, max_length=255, null=True, verbose_name="URN" | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="referencecontrol", | ||
name="urn", | ||
field=models.CharField( | ||
blank=True, max_length=255, null=True, unique=True, verbose_name="URN" | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="requirementmappingset", | ||
name="urn", | ||
field=models.CharField( | ||
blank=True, max_length=255, null=True, unique=True, verbose_name="URN" | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="requirementnode", | ||
name="parent_urn", | ||
field=models.CharField( | ||
blank=True, max_length=255, null=True, verbose_name="Parent URN" | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="requirementnode", | ||
name="urn", | ||
field=models.CharField( | ||
blank=True, max_length=255, null=True, unique=True, verbose_name="URN" | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="riskmatrix", | ||
name="urn", | ||
field=models.CharField( | ||
blank=True, max_length=255, null=True, unique=True, verbose_name="URN" | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="storedlibrary", | ||
name="urn", | ||
field=models.CharField( | ||
blank=True, max_length=255, null=True, verbose_name="URN" | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="threat", | ||
name="urn", | ||
field=models.CharField( | ||
blank=True, max_length=255, null=True, unique=True, verbose_name="URN" | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.