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

Fix behavior of the match filter #14

Open
seansica opened this issue Apr 18, 2024 · 0 comments
Open

Fix behavior of the match filter #14

seansica opened this issue Apr 18, 2024 · 0 comments
Assignees

Comments

@seansica
Copy link
Contributor

The TAXII 2.1 spec states that:

The match parameter can be specified any number of times, where each match instance specifies an additional filter to be applied to the resulting data and each MUST NOT occur more than once in a request. Said another way, all match fields are ANDed together.

and

Each field MAY contain one or more values. Multiple values are separated by a comma (U+002C COMMA, “,”) without any spaces. If multiple values are present, the match is treated as a logical OR.

In other words:

  • ?match[type]=campaign,malware,threat-actor : matches campaigns OR malware OR threat-actors
  • ?match[type]=campaign?match[type]=malware?match[type]=threat-actor : matches campaigns AND malware AND threat-actors

However, the current implementation only supports one match filter at a time.

  • Passing multiple match filters will trigger a 500 response.
  • Passing multiple comma-delimited values (e.g., ?match[type]=campaign,malware) will always return an empty response because the values are not parsed but instead treated as one type.
@seansica seansica self-assigned this Apr 18, 2024
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

1 participant