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

Bug: STIX1toMISPParser doesn't work at all #40

Open
1 task done
maciej-lech opened this issue Mar 19, 2023 · 1 comment
Open
1 task done

Bug: STIX1toMISPParser doesn't work at all #40

maciej-lech opened this issue Mar 19, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@maciej-lech
Copy link

MISP-STIX usage

No response

Expected behavior

Function stix_1_to_misp converts STIX1 to MISP as the main script allows setting STIX1 version:

parser.add_argument('-v', '--version', choices=['1.1.1', '1.2', '2.0', '2.1'], required=True, help='STIX version.')

Actual behavior

It uses:

stix_parser.load_event()
stix_parser.build_misp_event(event)

... but both methods are undefined, so the implementation is completely missing.
However, it fails even prior to that with: TypeError: descriptor '__init__' of 'super' object needs an argument

Steps to reproduce

Run misp_stix_converter -i -v 1.2 -f ../../example_stix1.xml

Version

2.4.168

Python version

3.8

Relevant log output

Traceback (most recent call last):
  File "./ve/bin/misp_stix_converter", line 8, in <module>
    sys.exit(main())
  File "./ve/lib/python3.8/site-packages/misp_stix_converter/__init__.py", line 174, in main
    results = _misp_to_stix(stix_args) if stix_args.export else _stix_to_misp(stix_args)
  File "./ve/lib/python3.8/site-packages/misp_stix_converter/__init__.py", line 150, in _stix_to_misp
    return _process_files(stix_args.file, method)
  File "./ve/lib/python3.8/site-packages/misp_stix_converter/__init__.py", line 137, in _process_files
    status = method(filename)
  File "./ve/lib/python3.8/site-packages/misp_stix_converter/misp_stix_converter.py", line 440, in stix_1_to_misp
    stix_parser = InternalSTIX1toMISPParser() if from_misp else ExternalSTIX1toMISPParser()
  File "./ve/lib/python3.8/site-packages/misp_stix_converter/stix2misp/external_stix1_to_misp.py", line 9, in __init__
    super().__init__()
  File "./ve/lib/python3.8/site-packages/misp_stix_converter/stix2misp/stix1_to_misp.py", line 9, in __init__
    super.__init__()
TypeError: descriptor '__init__' of 'super' object needs an argument

Extra attachments

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@maciej-lech maciej-lech added the bug Something isn't working label Mar 19, 2023
@dragsu
Copy link

dragsu commented Mar 23, 2023

Tests are also failing,

poetry run pytest tests/test_stix1_export.py - pass
poetry run pytest tests/test_stix20_export.py - fail
poetry run pytest tests/test_stix21_export.py - fail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants