-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.38 KB
/
Copy pathcode-scanning.yml
File metadata and controls
53 lines (44 loc) · 1.38 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
name: AgentContextMap Code Scanning
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
security-events: write
concurrency:
group: agentcontext-code-scanning-${{ github.ref }}
cancel-in-progress: true
jobs:
agent-context-code-scanning:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Install Rust
uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # master
with:
toolchain: stable
- name: Build current AgentContextMap
run: cargo build --release --locked
- name: Generate AgentContextMap SARIF
id: agentcontext
uses: ./
with:
path: .
sarif: agentcontext.sarif
- name: Validate SARIF output
shell: bash
env:
SARIF_PATH: ${{ steps.agentcontext.outputs.sarif }}
run: |
set -euo pipefail
test -n "$SARIF_PATH"
test -s "$SARIF_PATH"
grep -F '"version":"2.1.0"' "$SARIF_PATH" >/dev/null
- name: Upload SARIF to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4
with:
sarif_file: ${{ steps.agentcontext.outputs.sarif }}
category: agentcontextmap-dogfood