-
Notifications
You must be signed in to change notification settings - Fork 1
90 lines (78 loc) · 2.46 KB
/
structure-validate.yml
File metadata and controls
90 lines (78 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: structure-validate
on:
pull_request:
paths:
- "examples/**"
- "techniques/**"
- "tactics/**"
- "actors/**"
- "mitigations/**"
- "software/**"
- "data-sources/**"
- "TAXONOMY-GAPS.md"
- "citations.bib"
- "tools/check_linkage.py"
- "tools/check_backlinks.py"
- ".github/workflows/structure-validate.yml"
push:
branches: [main]
paths:
- "examples/**"
- "techniques/**"
- "tactics/**"
- "actors/**"
- "mitigations/**"
- "software/**"
- "data-sources/**"
- "TAXONOMY-GAPS.md"
permissions:
contents: read
jobs:
forward-linkage:
name: Forward references and example structure
runs-on: ubuntu-latest
# Strict: every example must have Loss / OAK Techniques observed /
# Attribution (with strength label) / Summary / Public references; every
# OAK-T*, OAK-G*, OAK-M*, OAK-S*, OAK-DS-* mention must resolve to the
# taxonomy or to a TAXONOMY-GAPS candidate.
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Run check_linkage.py
run: python3 tools/check_linkage.py
backlinks:
name: Reverse anchors and bidirectional consistency
runs-on: ubuntu-latest
# Strict: actor `## Observed Examples` and technique `## Real-world examples`
# must list every example that attributes / references them via canonical
# markdown link or `**OAK-Gnn:**` header. Mitigation `**Maps to Techniques:**`
# and software `**Used by Groups:**` metadata must resolve.
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Run check_backlinks.py
run: python3 tools/check_backlinks.py
coverage-matrix:
name: Coverage matrix snapshot
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Generate coverage matrix
run: python3 tools/build_coverage_matrix.py > /tmp/coverage-snapshot.md
- name: Upload coverage snapshot
uses: actions/upload-artifact@v4
with:
name: coverage-matrix-snapshot
path: /tmp/coverage-snapshot.md
retention-days: 30