Skip to content

Commit 727a648

Browse files
Update Kibana MITRE workflow (#4735)
1 parent d1e9247 commit 727a648

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

.github/workflows/kibana-mitre-update.yml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
jobs:
1111
create_issue:
1212
runs-on: ubuntu-latest
13+
env:
14+
KIBANA_ISSUE_NUMBER: 166152 # Define the Kibana issue number as a variable
1315
steps:
1416
- name: Checkout code
1517
uses: actions/checkout@v4
@@ -28,20 +30,14 @@ jobs:
2830
run: |
2931
VERSION=$(echo $ADDED_FILE[0] | grep -o 'v[^json]*')
3032
echo "::set-output name=version::$VERSION"
31-
32-
- name: Create issue in elastic/kibana repository
33+
34+
- name: Add Kibana Issue Comment
3335
run: |
34-
ISSUE_TITLE="[Security Solution] Update MITRE ATT&CK to ${{ steps.extract_version.outputs.version }}"
35-
ISSUE_BODY="The detection rules MITRE ATT&CK version has been updated to ${{ steps.extract_version.outputs.version }} Please update the MITRE ATT&CK version in Kibana accordingly."
36-
37-
curl -X POST \
38-
-H "Authorization: token ${{ secrets.WRITE_KIBANA_DETECTION_RULES_TOKEN }}" \
36+
echo "Adding comment to Kibana issue #${KIBANA_ISSUE_NUMBER}"
37+
curl -L \
38+
-X POST \
3939
-H "Accept: application/vnd.github.v3+json" \
40-
https://api.github.com/repos/elastic/kibana/issues \
41-
-d '{
42-
"title": "'"$ISSUE_TITLE"'",
43-
"body": "'"$ISSUE_BODY"'"
44-
}'
45-
46-
env:
47-
GITHUB_TOKEN: ${{ secrets.WRITE_KIBANA_DETECTION_RULES_TOKEN }}
40+
-H "Authorization: token ${{ secrets.WRITE_KIBANA_DETECTION_RULES_TOKEN }}" \
41+
https://api.github.com/repos/elastic/kibana/issues/${KIBANA_ISSUE_NUMBER}/comments \
42+
-d '{"body":"The detection rules MITRE ATT&CK version has been updated to ${{ steps.extract_version.outputs.version }} Please help in scheduling the MITRE ATT&CK version upgrade in Kibana accordingly @banderror @approksiu. cc @elastic/threat-research-and-detection-engineering"}'
43+
exit $?

0 commit comments

Comments
 (0)