Skip to content

Commit 41598df

Browse files
committed
Merge branch 'main' into cli_arg_order
2 parents 77a50c8 + 018124d commit 41598df

35 files changed

Lines changed: 5734 additions & 1351 deletions

.github/workflows/gemini-review.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ jobs:
3333
uses: 'google-github-actions/run-gemini-cli@v0' # ratchet:exclude
3434
id: 'gemini_pr_review'
3535
env:
36-
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN || github.token }}'
3736
ISSUE_TITLE: '${{ github.event.pull_request.title || github.event.issue.title }}'
3837
ISSUE_BODY: '${{ github.event.pull_request.body || github.event.issue.body }}'
3938
PULL_REQUEST_NUMBER: '${{ github.event.pull_request.number || github.event.issue.number }}'
@@ -179,7 +178,6 @@ jobs:
179178
});
180179
```
181180
182-
IMPORTANT:
183181
- DO NOT modify the "owner" and "repo" parameters - they must be exactly as shown
184182
- Use only '${{ env.PULL_REQUEST_NUMBER }}' as PR number. DO NOT PARSE from anywhere.
185183
- DO NOT try to access environment variables through shell commands
@@ -360,3 +358,5 @@ jobs:
360358
## Final Instructions
361359
362360
Remember, you are running in a virtual machine and no one reviewing your output. Your review must be posted to GitHub using the MCP tools to create a pending review, add comments to the pending review, and submit the pending review.
361+
362+
gcp_token_format: '${{ secrets.GITHUB_TOKEN || github.token }}' # Migrated from env var

.github/workflows/integration_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,15 +252,15 @@ jobs:
252252
python -m pytest tests/ -m "integration" -v --junitxml=junit/integration-test-results.xml
253253
254254
- name: Upload integration test results
255-
uses: actions/upload-artifact@v6
255+
uses: actions/upload-artifact@v7
256256
if: always()
257257
with:
258258
name: integration-test-results
259259
path: junit/integration-test-results.xml
260260
retention-days: 1
261261

262262
- name: Publish integration test results
263-
uses: EnricoMi/publish-unit-test-result-action@v2
263+
uses: EnricoMi/publish-unit-test-result-action@v2.23.0
264264
if: always()
265265
with:
266266
files: junit/integration-test-results.xml

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
# Only upload coverage report for Python 3.10
5454
- name: Upload coverage report
5555
if: matrix.python-version == '3.10'
56-
uses: actions/upload-artifact@v6
56+
uses: actions/upload-artifact@v7
5757
with:
5858
name: coverage-report
5959
path: coverage.xml

CHANGELOG.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,61 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [0.36.0] - 2026-03-31
8+
## [0.38.0] - 2026-03-31
99
### Added
1010
- CLI local configuration support with `--local` flag for config set and view commands
1111
- `SECOPS_LOCAL_CONFIG_DIR` environment variable support for managing multiple local configurations
1212

1313
### Updated
1414
- CLI argument parsing to properly handle global flags placed after subcommands
15+
## [0.37.0] - 2026-03-11
16+
### Added
17+
- Comprehensive case management functionality for Chronicle
18+
- `get_case()` - Retrieve single case details with optional field expansion
19+
- `list_cases()` - List cases with filtering, pagination, and sorting capabilities
20+
- `patch_case()` - Update case properties using partial updates
21+
- `merge_cases()` - Merge multiple cases into a single case
22+
- `get_cases()` - Legacy batch case retrieval for multiple case IDs
23+
- Bulk case operations for efficient case management
24+
- `execute_bulk_add_tag()` - Add tags to multiple cases
25+
- `execute_bulk_assign()` - Assign multiple cases to users
26+
- `execute_bulk_change_priority()` - Change priority for multiple cases
27+
- `execute_bulk_change_stage()` - Change stage for multiple cases
28+
- `execute_bulk_close()` - Close multiple cases with reasons
29+
- `execute_bulk_reopen()` - Reopen multiple cases
30+
- Complete CLI support for case management through `secops case` commands
31+
- `secops case get` - Get single case details
32+
- `secops case list` - List cases with filtering and pagination
33+
- `secops case update` - Update case properties
34+
- `secops case merge` - Merge multiple cases
35+
- `secops case bulk-*` commands for bulk operations
36+
37+
## [0.36.0] - 2026-03-10
38+
### Added
39+
- Raw log search functionality with `search_raw_logs()` method
40+
- CLI command `secops search raw-logs` for searching raw logs
41+
42+
## [0.35.3] - 2026-03-03
43+
### Updated
44+
- Dashboard methods to use centralized `chronicle_request` helper function for improved code consistency and maintainability
45+
46+
### Added
47+
- Helper functions for formatting dashboard resources
48+
- Pagination helper for `list_dashboards` method
49+
50+
## [0.35.2] - 2026-03-02
51+
### Added
52+
- `parse_statedump` parameter to `run_parser()` method for converting
53+
statedump strings into structured JSON format
54+
- CLI `--parse-statedump` flag for `secops parser run` command
55+
56+
## [0.35.1] - 2026-02-23
57+
### Added
58+
- `as_list` parameter to `search_udm()` for returning events as a list instead of dictionary
59+
- CLI `--as-list` flag for `secops search` command
60+
61+
### Updated
62+
- Migrated `search_udm()` to use `chronicle_request` helper for improved error handling and consistency
1563

1664
## [0.35.0] - 2026-02-18
1765
### Added

CLI.md

Lines changed: 98 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ Search for events using UDM query syntax:
165165

166166
```bash
167167
secops search --query "metadata.event_type = \"NETWORK_CONNECTION\"" --max-events 10
168+
169+
# Get result as list
170+
secops search --query "metadata.event_type = \"NETWORK_CONNECTION\"" --max-events 10 --as-list
168171
```
169172

170173
Search using natural language:
@@ -212,6 +215,21 @@ Search ingested UDM field values that match a query:
212215
secops search udm-field-values --query "source" --page-size 10
213216
```
214217

218+
### Search Raw Logs
219+
220+
Search for raw logs in Chronicle using the query language:
221+
222+
```bash
223+
secops search raw-logs \
224+
--query 'raw = \"authentication\"' \
225+
--snapshot-query 'user != ""' \
226+
--time-window 24 \
227+
--case-sensitive \
228+
--log-types "OKTA,AZURE_AD" \
229+
--max-aggregations-per-field 100 \
230+
--page-size 25
231+
```
232+
215233
### Get Statistics
216234

217235
Run statistical analyses on your data:
@@ -654,8 +672,18 @@ secops parser run \
654672
secops parser run \
655673
--log-type OKTA \
656674
--logs-file "./test.log"
675+
676+
# Run parser with statedump for debugging (outputs readable parser state)
677+
secops parser run \
678+
--log-type WINEVTLOG \
679+
--parser-code-file "./parser.conf" \
680+
--logs-file "./logs.txt" \
681+
--statedump-allowed \
682+
--parse-statedump
657683
```
658684

685+
The `--statedump-allowed` flag enables statedump output in the parser results, which shows the internal state of the parser during execution. The `--parse-statedump` flag converts the statedump string into a structured JSON format.
686+
659687
The command validates:
660688
- Log type and parser code are provided
661689
- At least one log is provided
@@ -1054,6 +1082,8 @@ secops rule-exclusion compute-activity \
10541082

10551083
### Case Management
10561084

1085+
Chronicle also provides comprehensive case management capabilities for tracking and managing security investigations. The CLI supports listing, retrieving, updating, and performing bulk operations on cases.
1086+
10571087
Get case details for specific case IDs:
10581088

10591089
```bash
@@ -1071,7 +1101,74 @@ secops alert --time-window 24 --max-alerts 50 > alerts.json
10711101
secops case --ids "case-123,case-456"
10721102
```
10731103
1074-
> **Note**: The case management uses a batch API that can retrieve multiple cases in a single request. You can provide up to 1000 case IDs separated by commas.
1104+
> **Note**: You can provide up to 1000 case IDs separated by commas.
1105+
1106+
#### List cases
1107+
1108+
```bash
1109+
# List all cases with default pagination
1110+
secops case list --page-size 50
1111+
1112+
# List with filtering
1113+
secops case list --page-size 100 --filter 'status = "OPENED"' --order-by "createTime desc"
1114+
1115+
# Get cases as a flat list instead of paginated dict
1116+
secops case list --page-size 50 --as-list
1117+
```
1118+
1119+
#### Get case details
1120+
1121+
```bash
1122+
# Get a specific case by ID
1123+
secops case get --id "12345"
1124+
1125+
# Get case with expanded fields
1126+
secops case get --id "12345" --expand "tags,products"
1127+
1128+
# Legacy: Get multiple cases by IDs (batch API)
1129+
secops case --ids "case-123,case-456"
1130+
```
1131+
1132+
> **Note**: The legacy batch API can retrieve up to 1000 case IDs in a single request.
1133+
1134+
#### Update a case
1135+
1136+
```bash
1137+
# Update case priority
1138+
secops case update --id "12345" --data '{"priority": "PRIORITY_HIGH"}' --update-mask "priority"
1139+
1140+
# Update multiple fields
1141+
secops case update --id "12345" --data '{"priority": "PRIORITY_MEDIUM", "stage": "Investigation"}' --update-mask "priority,stage"
1142+
```
1143+
1144+
#### Merge cases
1145+
1146+
```bash
1147+
# Merge source cases into target case
1148+
secops case merge --source-ids "12345,67890" --target-id "11111"
1149+
```
1150+
1151+
#### Bulk operations
1152+
1153+
```bash
1154+
# Bulk add tags to cases
1155+
secops case bulk-add-tag --ids "12345,67890" --tags "phishing,high-priority"
1156+
1157+
# Bulk assign cases to a user
1158+
secops case bulk-assign --ids "12345,67890" --username "@SecurityTeam"
1159+
1160+
# Bulk change priority
1161+
secops case bulk-change-priority --ids "12345,67890" --priority "HIGH"
1162+
1163+
# Bulk change stage
1164+
secops case bulk-change-stage --ids "12345,67890" --stage "Remediation"
1165+
1166+
# Bulk close cases
1167+
secops case bulk-close --ids "12345,67890" --close-reason "NOT_MALICIOUS" --root-cause "False positive - benign activity"
1168+
1169+
# Bulk reopen cases
1170+
secops case bulk-reopen --ids "12345,67890" --reopen-comment "New evidence discovered"
1171+
```
10751172
10761173
### Investigation Management
10771174

0 commit comments

Comments
 (0)