You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
During the QA of #3557 it appeared that the API used by the boefje variants does something silly with/near the JSON schema.
To Reproduce
Steps to reproduce the behavior:
Go to Nmap TCP boefje and create a variant.
Observe that the JSON schema contains a lot of 'null' values.
Open the newly created boefje variant in the Katalogus.
Observe that the settings page 'exploded' with variables.
Running the boefje variant results in an error. The output from raw is posted below.
Expected behavior
The JSON schema for the nmap options should be displayed on the katalogus page.
Screenshots
JSON schema when creating a new boefje variant:
Viewing this new boefje variant in the katalogus:
OpenKAT version
main
Contents RAW file
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/app/oci_adapter.py", line 46, in <module>
main()
File "/app/oci_adapter.py", line 13, in main
boefje_input = httpx.get(input_url).json()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/httpx/_models.py", line 766, in json
return jsonlib.loads(self.content, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
The text was updated successfully, but these errors were encountered:
It looks like this is a regression due to @ammar92 's migration of some fieldnames / or should be fixed by the migration.
What you are seeing here is the Internal Pydantic Schema of the Boefje, not the boefjes JsonSchema as defined in our plugin itself.
I think we made an error in merging #3557
Describe the bug
During the QA of #3557 it appeared that the API used by the boefje variants does something silly with/near the JSON schema.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The JSON schema for the nmap options should be displayed on the katalogus page.
Screenshots
JSON schema when creating a new boefje variant:
Viewing this new boefje variant in the katalogus:
OpenKAT version
main
Contents RAW file
The text was updated successfully, but these errors were encountered: