-
Notifications
You must be signed in to change notification settings - Fork 86
52 lines (45 loc) · 1.36 KB
/
validate-queries.yml
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
name: Validate ARG Queries
on:
pull_request_target:
branches:
- main
- dev-tools
types:
- opened
- reopened
- synchronize
- ready_for_review
paths:
- '**/*.kql'
workflow_dispatch: {}
permissions:
contents: read # This is required for actions/checkout
jobs:
kql_file_check:
environment: Azure
permissions:
id-token: write # This is required for requesting the JWT
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: "refs/pull/${{ github.event.number }}/merge"
- name: Azure login (OIDC)
uses: azure/login@a65d910e8af852a8061c627c456678983e180302 # v2.2.0
if:
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true
- name: Run KQL Comment Check
run: |
pwsh .github/scripts/validate-kql-comments.ps1
- name: Run KQL Syntax Check
run: |
pwsh .github/scripts/validate-kql-syntax.ps1