Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the "name" field for plugins mandatory #3471

Merged
merged 5 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion boefjes/boefjes/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Organisation(BaseModel):

class Plugin(BaseModel):
id: str
name: str | None = None
name: str
version: str | None = None
created: datetime.datetime | None = None
description: str | None = None
Expand Down
1 change: 1 addition & 0 deletions boefjes/boefjes/plugins/kat_dns_version/normalizer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"id": "dns-bind-version-normalize",
"name": "DNS bind version normalizer",
"consumes": [
"boefje/dns-bind-version"
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"id": "kat_green_hosting_normalize",
"description": "Parses the Green Hosting output into findings.",
"name": "Green Hosting",
"consumes": [
"boefje/green-hosting"
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"id": "kat_kat_finding_types_normalize",
"name": "KAT finding types",
"description": "Parses KAT finding types.",
"consumes": [
"boefje/kat-finding-types"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"id": "kat_manual_ooi",
"name": "Manual OOI normalizer",
"consumes": [
"manual/ooi"
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"id": "kat_test_normalize_2",
"name": "Test normalizer 2",
"description": "Testing KAT 2",
"consumes": [
"text/html"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"id": "kat_test_normalize",
"name": "Test normalizer",
"description": "Testing KAT",
"consumes": [
"text/html"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"id": "dummy_bad_normalizer_dict_structure",
"name": "dummy_bad_normalizer_dict_structure",
"description": "",
"consumes": [],
"produces": []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"id": "dummy_bad_normalizer_return_type",
"name": "dummy_bad_normalizer_return_type",
"description": "",
"consumes": [],
"produces": []
Expand Down
1 change: 1 addition & 0 deletions boefjes/tests/modules/dummy_normalizer/normalizer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"id": "dummy_normalizer",
"name": "dummy_normalizer",
"description": "",
"consumes": [],
"produces": []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"id": "dummy_normalizer",
"name": "dummy_normalizer",
"description": "",
"consumes": [],
"produces": []
Expand Down
8 changes: 8 additions & 0 deletions boefjes/tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,46 +22,54 @@ def setUp(self) -> None:
self.boefjes = [
Boefje(
id="test-boefje-1",
name="test-boefje-1",
consumes={"SomeOOI"},
produces=["test-boef-1", "test/text"],
),
Boefje(
id="test-boefje-2",
name="test-boefje-2",
consumes={"SomeOOI"},
produces=["test-boef-2", "test/text"],
),
Boefje(
id="test-boefje-3",
name="test-boefje-3",
consumes={"SomeOOI"},
produces=["test-boef-3", "test/plain"],
),
Boefje(
id="test-boefje-4",
name="test-boefje-4",
consumes={"SomeOOI"},
produces=["test-boef-4", "test/and-simple"],
),
]
self.normalizers = [
Normalizer(
id="test-normalizer-1",
name="test-normalizer-1",
consumes=["test-boef-3", "test/text"],
produces=["SomeOOI", "OtherOOI"],
),
Normalizer(
id="test-normalizer-2",
name="test-normalizer-2",
consumes=["test/text"],
produces=["SomeOtherOOI"],
),
]
self.bits = [
Bit(
id="test-bit-1",
name="test-bit-1",
consumes="SomeOOI",
produces=["SomeOOI"],
parameters=[],
),
Bit(
id="test-bit-2",
name="test-bit-2",
consumes="SomeOOI",
produces=["SomeOOI", "SomeOtherOOI"],
parameters=[],
Expand Down