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

Support STIX 2.1 EXISTS operator #1353

Open
pcoccoli opened this issue Mar 1, 2023 · 3 comments
Open

Support STIX 2.1 EXISTS operator #1353

pcoccoli opened this issue Mar 1, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@pcoccoli
Copy link
Contributor

pcoccoli commented Mar 1, 2023

Is your feature request related to a problem? Please describe.
STIX 2.1 introduced a unary EXISTS operator:
https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_t11hn314cr7w

None of the stix-shifter modules support it.

Describe the solution you'd like
Each module should translate EXISTS to the appropriate query construct for their native queries.

Describe alternatives you've considered
If not supported, the error message form stix-shifter could suggest how to rewrite the pattern to accomplish the same thing. E.g. [EXISTS file:name] is equivalent to [file:name LIKE '%'] (I think).

Additional context

@pcoccoli pcoccoli added the enhancement New feature or request label Mar 1, 2023
@mavam
Copy link

mavam commented Mar 1, 2023

Are the semantics the same as "field is not null"?

@subbyte
Copy link
Member

subbyte commented Mar 1, 2023

I think so, not sure what is the standard STIX pattern way of saying "field is not null".

@mavam
Copy link

mavam commented Mar 1, 2023

Intuitively, EXISTS is the natural fit. It's listed as set operation, though, indicating that it's basically set membership. But I would argue that you could argue that field existence is some version of that.

Ultimately I'd go pragmatically: if we need to check whether a field is null, let's use the next-best thing, which is EXISTS. If there was a null, we could do x != null.

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

No branches or pull requests

3 participants