oasis-open / cti-stix-elevator

OASIS Cyber Threat Intelligence (CTI) TC Open Repository: Convert STIX 1.2 XML to STIX 2.x JSON
https://stix2-elevator.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
49 stars 23 forks source link

How to ignore all errors #161

Closed HBadger0017 closed 4 years ago

HBadger0017 commented 5 years ago

Hey all, I am trying to suppress all error messages using the --disable 214,121 format in the docs but I keep getting these:

[X] STIX JSON: Invalid [!] Warning: indicator--REDACTED: {121} kill_chain_name 'LM Cyber Kill Chain' should be all lowercase and use hyphens instead of spaces or underscores as word separators. [!] Warning: indicator--REDACTED: {121} phase_name 'Delivery' should be all lowercase and use hyphens instead of spaces or underscores as word separators. [!] Warning: indicator--REDACTED: {214} indicator_types contains a value not in the indicator-type-ov vocabulary. [!] Warning: indicator--REDACTED: {121} kill_chain_name 'LM Cyber Kill Chain' should be all lowercase and use hyphens instead of spaces or underscores as word separators.

The json is being created but all these warnings are in the 'header'... how do I get rid/suppress them when the --disable doesn't work?

-Matthew

rpiazza commented 5 years ago

Hi @HBadger0017

I looked into this a little, and noticed some inconsistencies with the code, but I want to discuss it with the developer who originally wrote it - and he was out this week. We should be able to get you an answer next week.

emmanvg commented 5 years ago

Hi @HBadger0017,

Can you try running the tool with the following flags stix2_elevator <the_file.xml> --validator-args="-d 214,121". Based on the messages you provided it seems like the error messages are being generated by the stix2-validator, which checks the generated STIX JSON. Let me know if you are still having problems.