-
-
Notifications
You must be signed in to change notification settings - Fork 461
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Adding /api/get_playbook_config API endpoint * Adding codefactor suggestions to remove trailing whitespaces * removing whitespaces * Fixing schema bug * Finishing up views, models and serializers with some active bugs left to take care of * Removing unnecessary files * Fixing linting issues * Fixing API endpoints and making them work * Fixing overall logic and laying down the endpoints more efficiently * Fixing typo in serializer * Fixing bugs wrt validation of playbooks when adding new ones * Fixing linting errors * Fixing flake8 errors * Removing exposing responses i left out for debugging * fixing unnecessary f strings * Saving frontend progress * Finishing up UI skeleton * Fixing eslint issues in the frontend * Running prettier on the frontend * Adding code-doctor suggestions * Fixing some bugs and making codedoctor changes * Adding code factor suggestions * Removing unnecessary printing * running prettier on frontend * Finishing up light test cases for the backend * Finishing up test cases * Finalising test cases * Adding suggested changes * removing pnpm-lock.yaml * Fixing permissions * Fixing typo in tests * Moving test cases up for playbooks and fixing test cases * Fixing test case errors * Fixing typo * Putting workflows back to the same place * removing google file and fixed typo * added docs about changes Co-authored-by: Matteo Lodi <30625432+mlodic@users.noreply.github.com>
- Loading branch information
Showing
15 changed files
with
577 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,5 @@ docker/.env.start | |
.ipython | ||
.subversion | ||
.bash_history | ||
.cache | ||
.cache | ||
.google-cookie |
24 changes: 24 additions & 0 deletions
24
api_app/migrations/0011_alter_organizationpluginstate_organization.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,24 @@ | ||
# Generated by Django 3.2.15 on 2022-11-12 13:51 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("certego_saas_organization", "0001_initial"), | ||
("api_app", "0010_custom_config_playbooks"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="organizationpluginstate", | ||
name="organization", | ||
field=models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="+", | ||
to="certego_saas_organization.organization", | ||
), | ||
), | ||
] |
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,42 @@ | ||
# Generated by Django 3.2.15 on 2022-11-12 17:10 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
("api_app", "0011_alter_organizationpluginstate_organization"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="CachedPlaybook", | ||
fields=[ | ||
( | ||
"name", | ||
models.CharField(max_length=225, primary_key=True, serialize=False), | ||
), | ||
( | ||
"description", | ||
models.CharField(blank=True, default="", max_length=225), | ||
), | ||
("analyzers", models.JSONField(default=dict)), | ||
("connectors", models.JSONField(default=dict)), | ||
("supports", models.JSONField(default=list)), | ||
("disabled", models.BooleanField(default=False)), | ||
( | ||
"job", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.SET_NULL, | ||
null=True, | ||
to="api_app.job", | ||
related_name="job", | ||
), | ||
), | ||
], | ||
), | ||
] |
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,23 @@ | ||
# This file is a part of IntelOwl https://github.com/intelowlproject/IntelOwl | ||
# See the file 'LICENSE' for copying permission. | ||
|
||
from django.db import models | ||
|
||
from api_app.models import Job | ||
|
||
|
||
class CachedPlaybook(models.Model): | ||
name = models.CharField(max_length=225, primary_key=True) | ||
# Required fields | ||
description = models.CharField(max_length=225, default="", blank=True) | ||
analyzers = models.JSONField(default=dict) | ||
connectors = models.JSONField(default=dict) | ||
|
||
# Optional Fields | ||
supports = models.JSONField(default=list) | ||
disabled = models.BooleanField(default=False) | ||
|
||
# job might not be necessary. | ||
job = models.ForeignKey( | ||
Job, on_delete=models.SET_NULL, related_name="job", null=True, blank=True | ||
) |
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
Oops, something went wrong.