oasis-open / cti-stix-common-objects

OASIS Cyber Threat Intelligence (CTI) TC: A repository for commonly used STIX objects in order to avoid needless duplication. https://github.com/oasis-open/cti-stix-common-objects
BSD 3-Clause "New" or "Revised" License
84 stars 36 forks source link

JSONs containing "# noqa"? #48

Closed dunkeki closed 8 months ago

dunkeki commented 8 months ago

Not sure about other JSON parsers, but Jackson barfs on many bundles within the repository. These have (typically key-value) lines with a trailing "# noqa". At the risk of exposing my Python ignorance, Google reports this as a comment indicating "no quality assurance". Amusing that inserting it into a JSON creates a flawed object as far as I can tell per the JSON standard.

I added filters in our server code to catch these (removing the comment before parsing), but was curious if the repo contents should be remediated - thanks!

dunkeki commented 8 months ago

check out objects/extension-definition/extension-definition--005e229c-fffc-42b0-a912-84671ab2829d for an example

rpiazza commented 8 months ago

@dunkeki

Thanks for point this out. It was probably copied directly from a python file, and the #noqa is to tell the python linter not to mark the line as "too long". I will remove any that I find and push up corrections. In the meantime, you can safely delete #noqa from any STIX JSON file.

rpiazza commented 8 months ago

fixed