-
Notifications
You must be signed in to change notification settings - Fork 521
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add flag to update the docs/ATT&CK-coverage.md with markdown URL(s) (#…
- Loading branch information
1 parent
6da6c7d
commit c3757d2
Showing
2 changed files
with
103 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: attack-coverage-update | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
update-coverage: | ||
description: 'Update the docs/ATT&CK-coverage.md file' | ||
required: true | ||
default: '--update-coverage' | ||
|
||
jobs: | ||
pr: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout detection-rules | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip cache purge | ||
pip install .[dev] | ||
- name: Build release package with navigator files | ||
run: | | ||
python -m detection_rules dev build-release --generate-navigator | ||
- name: Set github config | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "protectionsmachine" | ||
- name: Update navigator gist files and docs/ATT&CK-coverage.md file. | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.NAVIGATOR_GIST_TOKEN }}" | ||
run: | | ||
python -m detection_rules dev update-navigator-gists "${{ github.event.inputs.update-coverage }}" | ||
git add docs/"ATT\&CK-coverage.md" | ||
- name: Create Pull Request | ||
uses: peter-evans/[email protected] | ||
with: | ||
assignees: '${{github.actor}}' | ||
delete-branch: true | ||
branch: "update-attack-coverage" | ||
commit-message: "Update ATT&CK coverage URL(s) in docs/ATT&CK-coverage.md" | ||
branch-suffix: "short-commit-hash" | ||
base: main | ||
title: 'Update ATT&CK coverage URL(s) in docs/ATT&CK-coverage.md' | ||
body: | | ||
Update ATT&CK coverage URL(s) in docs/ATT&CK-coverage.md | ||
- Autogenerated from job `attack-coverage-update: pr`. | ||
labels: "backport: auto" | ||
|
||
- name: Archive production artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: release-files | ||
path: | | ||
releases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters