-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from CrowdStrike/response-policies-scaffolding
Adds response policies scaffolding
- Loading branch information
Showing
3 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
"""Caracara Filters: Response Policies Dialect. | ||
This module contains filters that are specific to the Response Policies API. | ||
This code may be merged into a more generic policies dialect, depending on the overlaps | ||
in data structures. | ||
""" | ||
from caracara_filters.dialects._base import default_filter | ||
from caracara_filters.dialects._base import rebase_filters_on_default | ||
|
||
RESPONSE_POLICIES_FILTERS = {} | ||
rebase_filters_on_default(default_filter, RESPONSE_POLICIES_FILTERS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from caracara_filters import FQLGenerator | ||
|
||
|
||
def test_response_policies_platform(): | ||
fql_generator = FQLGenerator(dialect='response_policies') | ||
fql_generator.create_new_filter("platform_name", "Linux") | ||
fql = fql_generator.get_fql() | ||
assert fql == "platform_name: 'Linux'" |