Skip to content

Commit 4595887

Browse files
authored
Merge branch 'main' into Samirbous-patch-1
2 parents 4e258de + d9154c6 commit 4595887

File tree

272 files changed

+5537
-1183
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

272 files changed

+5537
-1183
lines changed

.github/PULL_REQUEST_GUIDELINES/bug_guidelines.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ These guidelines serve as a reminder set of considerations when addressing a bug
3131
- [ ] Ensure that the bug fix does not break existing functionality.
3232
- [ ] Review the bug fix with a peer or team member for additional insights.
3333
- [ ] Verify that the bug fix works across all relevant environments (e.g., different OS versions).
34-
- [ ] Confirm that all dependencies are up-to-date and compatible with the changes.
34+
- [ ] Confirm that all dependencies are up-to-date and compatible with the changes.
35+
- [ ] Confirm that the proper version label is applied to the PR `patch`, `minor`, `major`.

.github/PULL_REQUEST_GUIDELINES/enhancement_guidelines.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ These guidelines serve as a reminder set of considerations when addressing addin
3232
- [ ] Review the enhancement with a peer or team member for additional insights.
3333
- [ ] Verify that the enhancement works across all relevant environments (e.g., different OS versions).
3434
- [ ] Confirm that all dependencies are up-to-date and compatible with the changes.
35+
- [ ] Confirm that the proper version label is applied to the PR `patch`, `minor`, `major`.

.github/PULL_REQUEST_GUIDELINES/hunt_tuning_guidelines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ These guidelines serve as a reminder set of considerations when tuning an existi
2727
- [ ] Evidence of testing and valid query usage.
2828
- [ ] Markdown Generated: Run `python -m hunting generate-markdown` with specific parameters to ensure a markdown version of the hunting TOML files is created.
2929
- [ ] Index Refreshed: Run `python -m hunting refresh-index` to refresh indexes.
30-
- [ ] Run Unit Tests: Run `pytest tests/test_hunt_data.py` to run unit tests.
30+
- [ ] Run Unit Tests: Run `pytest tests/test_hunt_data.py` to run unit tests.

.github/PULL_REQUEST_GUIDELINES/schema_enhancement_guidelines.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ These guidelines serve as a reminder set of considerations when addressing addin
4343
- [ ] Implemented requisite downgrade functionality
4444
- [ ] Cross-referenced the feature with product documentation for consistency
4545
- [ ] Incorporated a comprehensive test rule in unit tests for full schema coverage
46-
- [ ] Conducted system testing, including fleet, import, and create APIs (e.g., run `make test-remote-cli`)
46+
- [ ] Conducted system testing, including fleet, import, and create APIs (e.g., run `make test-remote-cli`)
47+
- [ ] Confirm that the proper version label is applied to the PR `patch`, `minor`, `major`.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ from your submission, but they are here to help bring them to your attention.
3636

3737
<!-- Delete any items that are not applicable to this PR. -->
3838

39-
- [ ] Added a label for the type of pr: `bug`, `enhancement`, `schema`, `Rule: New`, `Rule: Deprecation`, `Rule: Tuning`, `Hunt: New`, or `Hunt: Tuning` so guidelines can be generated
39+
- [ ] Added a label for the type of pr: `bug`, `enhancement`, `schema`, `maintenance`, `Rule: New`, `Rule: Deprecation`, `Rule: Tuning`, `Hunt: New`, or `Hunt: Tuning` so guidelines can be generated
4040
- [ ] Added the `meta:rapid-merge` label if planning to merge within 24 hours
4141
- [ ] Secret and sensitive material has been managed correctly
4242
- [ ] Automated testing was updated or added to match the most common scenarios

.github/release-drafter.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name-template: 'dev-v$RESOLVED_VERSION'
2+
tag-template: 'dev-v$RESOLVED_VERSION'
3+
tag-prefix: 'dev-v'
4+
5+
categories:
6+
- title: 🚀 Features
7+
label: 'enhancement'
8+
- title: 🐛 Bug Fixes
9+
label: 'bug'
10+
- title: 🛠 Internal Changes
11+
labels:
12+
- 'maintenance'
13+
- 'schema'
14+
- 'documentation'
15+
- 'python'
16+
- title: 🔍 Hunting Updates
17+
label: 'Hunting'
18+
19+
change-template: '- $TITLE (#$NUMBER) @$AUTHOR'
20+
exclude-labels:
21+
- 'skip-changelog'
22+
23+
version-resolver:
24+
major:
25+
labels:
26+
- 'major'
27+
minor:
28+
labels:
29+
- 'minor'
30+
patch:
31+
labels:
32+
- 'patch'
33+
default: patch
34+
35+
template: |
36+
## Changes
37+
$CHANGES
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Version Code Check and Draft Release
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'lib/**'
7+
- 'hunting/**/*.py'
8+
- 'pyproject.toml'
9+
- 'Makefile'
10+
- 'docs/**'
11+
- 'detection_rules/**'
12+
- 'tests/**'
13+
- '**/*.md'
14+
types: [opened, reopened, synchronize, labeled, closed]
15+
16+
permissions:
17+
contents: read
18+
pull-requests: read
19+
20+
jobs:
21+
label_check:
22+
if: github.event_name == 'pull_request'
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Ensure PR has Version Bump Label
26+
uses: actions/github-script@v6
27+
with:
28+
github-token: ${{ secrets.GITHUB_TOKEN }}
29+
script: |
30+
const labels = ['major', 'minor', 'patch'];
31+
const prLabels = context.payload.pull_request.labels.map(label => label.name);
32+
const hasVersionLabel = labels.some(label => prLabels.includes(label));
33+
if (!hasVersionLabel) {
34+
throw new Error("PR must have one of the following labels: major, minor, or patch.");
35+
}
36+
37+
version_check:
38+
if: github.event_name == 'pull_request'
39+
needs: label_check
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Checkout repository
43+
uses: actions/checkout@v4
44+
with:
45+
fetch-depth: 0
46+
47+
- name: Check if core pyproject.toml was updated
48+
run: |
49+
BASE_COMMIT="${{ github.event.pull_request.base.sha }}"
50+
51+
if ! git diff --name-only "$BASE_COMMIT" "$GITHUB_SHA" | grep '^pyproject.toml$'; then
52+
echo "Code changes detected in core, but pyproject.toml was not updated."
53+
exit 1
54+
fi
55+
56+
- name: Check if lib pyproject.toml files were updated
57+
run: |
58+
BASE_COMMIT="${{ github.event.pull_request.base.sha }}"
59+
60+
if git diff --name-only "$BASE_COMMIT" "$GITHUB_SHA" | grep -E 'lib/kql/|lib/kibana/'; then
61+
if ! git diff --name-only "$BASE_COMMIT" "$GITHUB_SHA" | grep -E 'lib/kql/pyproject.toml|lib/kibana/pyproject.toml'; then
62+
echo "Changes detected in kql or kibana library, but respective pyproject.toml was not updated."
63+
exit 1
64+
fi
65+
fi
66+
67+
release_drafter:
68+
if: github.event.pull_request.merged == true
69+
runs-on: ubuntu-latest
70+
permissions:
71+
contents: write
72+
steps:
73+
- name: Checkout repository
74+
uses: actions/checkout@v4
75+
76+
- name: Run Release Drafter
77+
uses: release-drafter/release-drafter@v6
78+
with:
79+
config-name: release-drafter.yml
80+
env:
81+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
730 Bytes
Binary file not shown.
202 KB
Binary file not shown.

detection_rules/etc/non-ecs-schema.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,10 @@
150150
"logs-aws.cloudtrail-*": {
151151
"aws.cloudtrail.flattened.request_parameters.cidrIp": "keyword",
152152
"aws.cloudtrail.flattened.request_parameters.fromPort": "keyword",
153-
"aws.cloudtrail.flattened.request_parameters.roleArn": "keyword"
153+
"aws.cloudtrail.flattened.request_parameters.roleArn": "keyword",
154+
"aws.cloudtrail.flattened.request_parameters.roleName": "keyword",
155+
"aws.cloudtrail.flattened.request_paramters.policyArn": "keyword",
156+
"aws.cloudtrail.flattened.request_parameters.serialNumber": "keyword"
154157
},
155158
"logs-azure.signinlogs-*": {
156159
"azure.signinlogs.properties.conditional_access_audiences.application_id": "keyword"

0 commit comments

Comments
 (0)