Repository navigation
Expand file tree
/
Copy pathaction.yml
More file actions
58 lines (53 loc) · 1.43 KB
/
Copy pathaction.yml
File metadata and controls
58 lines (53 loc) · 1.43 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
name: markscrub
description: Inspect a repo for AI provenance marks (Unicode / metadata) and fail CI when findings exist
author: markscrub
branding:
icon: search
color: orange
inputs:
path:
description: File or directory to inspect
required: false
default: .
recursive:
description: Recurse into directories
required: false
default: "true"
fail-on-findings:
description: Fail the job when findings are present
required: false
default: "true"
sarif-file:
description: Path to write SARIF output
required: false
default: markscrub.sarif
runs:
using: composite
steps:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install markscrub
shell: bash
run: |
cd "${{ github.action_path }}"
npm ci
npm run build
- name: Inspect
shell: bash
run: |
FLAGS=(inspect "${{ inputs.path }}" --json --sarif "${{ inputs.sarif-file }}")
if [ "${{ inputs.recursive }}" = "true" ]; then
FLAGS+=(--recursive)
fi
if [ "${{ inputs.fail-on-findings }}" = "true" ]; then
FLAGS+=(--fail-on-findings)
fi
node "${{ github.action_path }}/dist/cli.js" "${FLAGS[@]}"
- name: Upload SARIF
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ inputs.sarif-file }}
continue-on-error: true