You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
such as rules, data, tables, reference lists, and rule exclusions. Content
8
-
Manager can be utilized in a CI/CD pipeline to implement Detection-as-Code with
9
-
Google SecOps or ran locally using
7
+
such as rules, data, tables, reference lists, rule exclusions, and saved
8
+
searches. Content Manager can be utilized in a CI/CD pipeline to implement
9
+
Detection-as-Code with Google SecOps or ran locally using
10
10
[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials) for authentication.
11
11
12
12
If you're new to the concept of managing detection rules and other content using
@@ -31,6 +31,7 @@ in a CI/CD pipeline (in GitHub, GitLab, CircleCI, etc) to do the following:
31
31
* Retrieve the latest version of all reference lists from Google SecOps and write them to local files along with their current state/configuration
32
32
* Create or update reference lists in Google SecOps based on local files
33
33
* Manage [rule exclusions](https://cloud.google.com/chronicle/docs/detection/rule-exclusions) in Google SecOps based on a local config file
34
+
* Manage [saved searches](https://docs.cloud.google.com/chronicle/docs/investigation/udm-search#search-manager) in Google SecOps based on a local config file
34
35
35
36
Sample detection rules can be found in the [Google SecOps Detection Rules](https://github.com/chronicle/detection-rules/tree/main) repo.
If you're unable to configure your CI/CD pipeline to authenticate using Workload
@@ -210,6 +216,7 @@ Commands:
210
216
reference-lists Manage reference lists.
211
217
rule-exclusions Manage rule exclusions.
212
218
rules Manage rules.
219
+
saved-searches Manage saved searches.
213
220
```
214
221
215
222
A logical first step after reading the contents of this readme file and
@@ -657,6 +664,98 @@ Example output from update remote rule exclusions command.
657
664
01-May-25 12:15:36 MDT | INFO | dump_rule_exclusion_config | Writing rule exclusion config to /Users/x/Documents/projects/detection-rules/tools/content_manager/rule_exclusions_config.yaml
658
665
```
659
666
667
+
## Managing saved searches in Google SecOps
668
+
669
+
### Retrieve saved searches from Google SecOps
670
+
671
+
The `saved-searches get` command retrieves the latest version of all saved
672
+
searches from Google SecOps and writes them to a `saved_search_config.yaml`
673
+
file.
674
+
675
+
The saved search content, configuration, and metadata is written to the
676
+
`saved_search_config.yaml` file.
677
+
678
+
Example output from `saved-searches get` command:
679
+
680
+
```
681
+
(venv) $ python -m content_manager saved-searches get
682
+
10-Nov-25 14:11:37 MST | INFO | <module> | Content Manager started
683
+
10-Nov-25 14:11:37 MST | INFO | get_saved_searches | Attempting to pull latest version of all saved searches from Google SecOps and update the local config file
684
+
10-Nov-25 14:11:38 MST | INFO | get_remote_saved_searches | Attempting to retrieve all saved searches from Google SecOps
10-Nov-25 14:25:46 MST | INFO | <module> | Content Manager started
738
+
10-Nov-25 14:25:46 MST | INFO | update_saved_searches | Attempting to update saved searches in Google SecOps based on the local config file
739
+
10-Nov-25 14:25:46 MST | INFO | update_remote_saved_searches | Attempting to update saved searches in Google SecOps based on local config file /Users/x/Documents/projects/detection-rules/tools/content_manager/saved_search_config.yaml
740
+
10-Nov-25 14:25:46 MST | INFO | load_saved_search_config | Loading saved search config from /Users/x/Documents/projects/detection-rules/tools/content_manager/saved_search_config.yaml
741
+
10-Nov-25 14:25:46 MST | INFO | load_saved_search_config | Loaded 12 saved search config entries from file /Users/x/Documents/projects/detection-rules/tools/content_manager/saved_search_config.yaml
742
+
10-Nov-25 14:25:46 MST | INFO | update_remote_saved_searches | Attempting to retrieve latest version of all saved searches from Google SecOps
743
+
10-Nov-25 14:25:46 MST | INFO | get_remote_saved_searches | Attempting to retrieve all saved searches from Google SecOps
10-Nov-25 14:25:47 MST | INFO | get_remote_saved_searches | Retrieved a total of 12 saved searches
746
+
10-Nov-25 14:25:47 MST | INFO | update_remote_saved_searches | Checking if any saved search updates are required
747
+
10-Nov-25 14:25:47 MST | INFO | update_remote_saved_searches | Saved search Top 10 Suricata Rules - Description for local and remote saved search is different. Remote saved search will be updated
748
+
10-Nov-25 14:25:47 MST | INFO | update_remote_saved_searches | Saved search Top 10 Suricata Rules - Updating remote saved search
749
+
10-Nov-25 14:25:48 MST | INFO | update | Logging summary of saved search changes...
0 commit comments