-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2131 from MaibornWolff/dev
chore: merge to main for release 1.21.0
- Loading branch information
Showing
296 changed files
with
25,765 additions
and
6,804 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Check application licenses for dev | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
scan_licenses: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- | ||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | ||
with: | ||
node-version: 20 | ||
- | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- | ||
name: Install programs | ||
env: | ||
CDXGEN_VERSION: 10.10.6 | ||
run: | | ||
npm install -g @cyclonedx/cdxgen@"$CDXGEN_VERSION" | ||
- | ||
name: Generate SBOM for backend application | ||
env: | ||
FETCH_LICENSE: 1 | ||
run: | | ||
cdxgen ./backend --type python --required-only --profile license-compliance --no-auto-compositions --output sbom_backend_application.json | ||
- | ||
name: Generate SBOM for frontend application | ||
run: | | ||
cdxgen ./frontend --type npm --no-babel --required-only --profile license-compliance --no-auto-compositions --project-name secobserve --output sbom_frontend_application.json | ||
- | ||
name: Import backend SBOM | ||
uses: MaibornWolff/secobserve_actions_templates/actions/importer@6eefe400d9efeaae2b7abe05710785fa4a53dbf6 # main | ||
with: | ||
so_product_name: 'SecObserve' | ||
so_file_name: 'sbom_backend_application.json' | ||
so_parser_name: 'CycloneDX' | ||
so_branch_name: 'dev' | ||
so_api_base_url: "https://secobserve-backend.maibornwolff.de" | ||
so_api_token: ${{ secrets.SO_API_TOKEN }} | ||
- | ||
name: Import frontend SBOM | ||
uses: MaibornWolff/secobserve_actions_templates/actions/importer@6eefe400d9efeaae2b7abe05710785fa4a53dbf6 # main | ||
with: | ||
so_product_name: 'SecObserve' | ||
so_file_name: 'sbom_frontend_application.json' | ||
so_parser_name: 'CycloneDX' | ||
so_branch_name: 'dev' | ||
so_api_base_url: "https://secobserve-backend.maibornwolff.de" | ||
so_api_token: ${{ secrets.SO_API_TOKEN }} |
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
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
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
__version__ = "1.20.0" | ||
__version__ = "1.21.0" | ||
|
||
import pymysql | ||
|
||
|
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
22 changes: 22 additions & 0 deletions
22
backend/application/commons/api/extended_ordering_filter.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,22 @@ | ||
from django.core.validators import EMPTY_VALUES | ||
from django.db.models import F | ||
from django_filters import OrderingFilter | ||
|
||
|
||
# Copied from https://github.com/carltongibson/django-filter/issues/274#issuecomment-1862859556 | ||
class ExtendedOrderingFilter(OrderingFilter): | ||
def filter(self, qs, value): | ||
if value in EMPTY_VALUES: | ||
return qs | ||
|
||
ordering = [] | ||
for param in value: | ||
fields = self.param_map[param.removeprefix("-")] | ||
if not isinstance(fields, tuple): | ||
fields = (fields,) | ||
for field in fields: | ||
if isinstance(field, str): | ||
field = F(field) | ||
ordering.append(field.desc() if param.startswith("-") else field) | ||
|
||
return qs.order_by(*ordering) |
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
45 changes: 45 additions & 0 deletions
45
backend/application/commons/migrations/0010_settings_feature_license_management_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,45 @@ | ||
# Generated by Django 5.1.2 on 2024-10-15 10:43 | ||
|
||
import django.core.validators | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("commons", "0009_settings_password_validator_attribute_similarity_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="settings", | ||
name="feature_license_management", | ||
field=models.BooleanField( | ||
default=True, help_text="Enable license management" | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="settings", | ||
name="license_import_crontab_hour", | ||
field=models.IntegerField( | ||
default=1, | ||
help_text="Hour crontab expression for importing licenses (UTC)", | ||
validators=[ | ||
django.core.validators.MinValueValidator(0), | ||
django.core.validators.MaxValueValidator(23), | ||
], | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="settings", | ||
name="license_import_crontab_minute", | ||
field=models.IntegerField( | ||
default=30, | ||
help_text="Minute crontab expression for importing licenses", | ||
validators=[ | ||
django.core.validators.MinValueValidator(0), | ||
django.core.validators.MaxValueValidator(59), | ||
], | ||
), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
...end/application/commons/migrations/0011_rename_settings_security_gate_threshold_unkown.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,18 @@ | ||
# Generated by Django 5.1.2 on 2024-10-24 06:19 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("commons", "0010_settings_feature_license_management_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name="settings", | ||
old_name="security_gate_threshold_unkown", | ||
new_name="security_gate_threshold_unknown", | ||
), | ||
] |
Oops, something went wrong.