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

Documentation for deleting report is inconsistent with validation #21

Open
edeca opened this issue Oct 9, 2018 · 1 comment
Open

Documentation for deleting report is inconsistent with validation #21

edeca opened this issue Oct 9, 2018 · 1 comment

Comments

@edeca
Copy link

edeca commented Oct 9, 2018

The documentation says:

For reports to be deleted, remove all IOCs from the report and update the timestamp rather than removing the report.

However, a report with removed IOCs does not validate:

    {
      "title": "Deleted item",
      "id": "63abcefe6f851464002510074f3da6a22d9072173e0daa1522468b22c62109d9",
      "timestamp": 1539089424,
      "score": 100,
      "link": "https://example.com",
      "iocs": {}
    }

The output from validate_feed.py is:

-> % python validate_feed.py -f output.json
-> Validated that file exists and is readable
-> Validated that feed file is valid JSON
-> Unable to validate that the file is a valid CB feed
-> Details:

Report with no IOCs in report 63abcefe6f851464002510074f3da6a22d9072173e0daa1522468b22c62109d9

Errors also occur if the iocs key is completely removed:

-> % python validate_feed.py -f output.json
-> Validated that file exists and is readable
-> Validated that feed file is valid JSON
-> Unable to validate that the file is a valid CB feed
-> Details:

Report missing required field(s): iocs
@yellowdepot
Copy link

Hello,

just stumbled upon the same problem. The only workaround I found is using a query which can never match but that's bad because it costs performance. Any better ideas?

Best solution would probably to issue a warning on empty iocs but not make it required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants