File tree Expand file tree Collapse file tree 15 files changed +42
-42
lines changed
Expand file tree Collapse file tree 15 files changed +42
-42
lines changed Original file line number Diff line number Diff line change 99 runs-on : ubuntu-latest
1010 steps :
1111 - name : Check out the repository
12- uses : actions/checkout@v2
12+ uses : actions/checkout@v4
1313
1414 - name : Set environment variable for early exit control
1515 id : check_label
5757 uses : mshick/add-pr-comment@v2
5858 with :
5959 message-path : ${{ env.GUIDELINES_FILE }}
60- repo-token : ${{ secrets.PROTECTIONS_MACHINE_TOKEN }}
60+ repo-token : ${{ secrets.GITHUB_TOKEN }}
6161 message-id : " guidelines-comment"
Original file line number Diff line number Diff line change 3939
4040 - name : Update navigator gist files and docs/ATT&CK-coverage.md file.
4141 env :
42- GITHUB_TOKEN : " ${{ secrets.NAVIGATOR_GIST_TOKEN }}"
42+ GITHUB_TOKEN : " ${{ secrets.WRITE_TRADEBOT_GIST_TOKEN }}"
4343 run : |
4444 python -m detection_rules dev update-navigator-gists "${{ github.event.inputs.update-coverage }}"
4545 git add docs/"ATT\&CK-coverage.md"
Original file line number Diff line number Diff line change @@ -65,16 +65,16 @@ jobs:
6565
6666 steps :
6767 - name : Checkout repo
68- uses : actions/checkout@v2
68+ uses : actions/checkout@v4
6969 with :
70- token : ${{ secrets.PROTECTIONS_MACHINE_TOKEN }}
70+ token : ${{ secrets.WRITE_TRADEBOT_DETECTION_RULES_TOKEN }}
7171 ref : main
7272 fetch-depth : 100
7373
7474 - name : Set github config
7575 run : |
76- git config --global user.email "41898282+github-actions[bot] @users.noreply.github.com"
77- git config --global user.name "github-actions[bot] "
76+ git config --global user.email "178941316+tradebot-elastic @users.noreply.github.com"
77+ git config --global user.name "tradebot-elastic "
7878
7979 - name : Get branch histories
8080 run : |
@@ -161,6 +161,6 @@ jobs:
161161 - name : " Notify slack on failure"
162162 uses : craftech-io/slack-action@v1
163163 with :
164- slack_webhook_url : ${{ secrets.SLACK_WEBHOOK_URL }}
164+ slack_webhook_url : ${{ secrets.EXTERNAL_SLACK_DETECTION_RULES_URL }}
165165 status : failure
166166 if : failure()
Original file line number Diff line number Diff line change 2222 with :
2323 url : " https://api.github.com/repos/elastic/detection-rules/actions/workflows/pythonpackage.yml/runs?per_page=1&branch=${{matrix.target_branch}}"
2424 method : ' GET'
25- bearerToken : ${{ secrets.READ_ORG_TOKEN }}
25+ bearerToken : ${{ secrets.READ_ELASTIC_DETECTION_RULES_ORG_TOKEN }}
2626
2727 - name : Check Backport Status
2828 uses : actions/github-script@v6
Original file line number Diff line number Diff line change 1515 uses : actions/github-script@v6
1616 id : membership
1717 with :
18- github-token : ${{ secrets.READ_ORG_TOKEN }}
18+ github-token : ${{ secrets.READ_ELASTIC_DETECTION_RULES_ORG_TOKEN }}
1919 result-encoding : string
2020 script : |
2121
Original file line number Diff line number Diff line change 1414 outputs :
1515 matrix : ${{ steps.get-branch-list.outputs.matrix }}
1616 steps :
17- - uses : actions/checkout@v2
17+ - uses : actions/checkout@v4
1818
1919 - name : Set up Python 3.12
2020 uses : actions/setup-python@v5
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Check MITRE ATT&CK Version Updates Are Synced
22
33on :
44 pull_request :
5- types :
5+ types :
66 - opened
77 paths :
88 - ' detection_rules/etc/attack-v*.json.gz'
1818 id : changed-attack-files
1919 uses : tj-actions/changed-files@v44
2020 with :
21- files : detection_rules/etc/attack-v*.json.gz
22-
21+ files : detection_rules/etc/attack-v*.json.gz
22+
2323 - name : Extract version from file name
2424 id : extract_version
2525 if : steps.changed-attack-files.outputs.any_changed == 'true'
3333 run : |
3434 ISSUE_TITLE="[Security Solution] Update MITRE ATT&CK to ${{ steps.extract_version.outputs.version }}"
3535 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-
36+
3737 curl -X POST \
38- -H "Authorization: token ${{ secrets.READ_WRITE_KIBANA_TOKEN }}" \
38+ -H "Authorization: token ${{ secrets.WRITE_KIBANA_DETECTION_RULES_TOKEN }}" \
3939 -H "Accept: application/vnd.github.v3+json" \
4040 https://api.github.com/repos/elastic/kibana/issues \
4141 -d '{
4444 }'
4545
4646 env :
47- GITHUB_TOKEN : ${{ secrets.READ_WRITE_KIBANA_TOKEN }}
47+ GITHUB_TOKEN : ${{ secrets.WRITE_KIBANA_DETECTION_RULES_TOKEN }}
Original file line number Diff line number Diff line change 2222 }
2323
2424 - name : Checkout detection-rules
25- uses : actions/checkout@v2
25+ uses : actions/checkout@v4
2626 with :
2727 fetch-depth : 0
2828
Original file line number Diff line number Diff line change @@ -19,15 +19,15 @@ jobs:
1919 steps :
2020
2121 - name : Checkout detection-rules
22- uses : actions/checkout@v3
22+ uses : actions/checkout@v4
2323 with :
24- token : ${{ secrets.PROTECTIONS_MACHINE_TOKEN }}
24+ token : ${{ secrets.WRITE_TRADEBOT_DETECTION_RULES_TOKEN }}
2525 fetch-depth : 0
2626
2727 - name : Set github config
2828 run : |
29- git config --global user.email "41898282+github-actions[bot] @users.noreply.github.com"
30- git config --global user.name "github-actions[bot] "
29+ git config --global user.email "178941316+tradebot-elastic @users.noreply.github.com"
30+ git config --global user.name "tradebot-elastic "
3131
3232 - name : Get branch histories
3333 run : |
8181 - name : " Notify slack on failure"
8282 uses : craftech-io/slack-action@v1
8383 with :
84- slack_webhook_url : ${{ secrets.SLACK_WEBHOOK_URL }}
84+ slack_webhook_url : ${{ secrets.READ_DETECTION_RULES_SLACK_WEBHOOK_TOKEN }}
8585 status : failure
8686 if : failure()
Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ jobs:
1515 - uses : actions/checkout@v4
1616 with :
1717 fetch-depth : 1
18-
18+
1919 - name : Fetch main branch
2020 run : |
2121 git fetch origin main:refs/remotes/origin/main
22-
22+
2323 - name : Set up Python 3.12
2424 uses : actions/setup-python@v5
2525 with :
6464
6565 - name : Update navigator gist files
6666 env :
67- GITHUB_TOKEN : " ${{ secrets.NAVIGATOR_GIST_TOKEN }}"
67+ GITHUB_TOKEN : " ${{ secrets.WRITE_TRADEBOT_GIST_TOKEN }}"
6868 if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
6969 run : python -m detection_rules dev update-navigator-gists
You can’t perform that action at this time.
0 commit comments