-
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (66 loc) · 2.7 KB
/
Copy pathsupervised-fleet-scan.yml
File metadata and controls
73 lines (66 loc) · 2.7 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
# SPDX-License-Identifier: MPL-2.0
# Scheduled/dispatch pipeline for supervised-repo scanning via Hypatia + gitbot-fleet.
name: Supervised Fleet Scan
on:
schedule:
- cron: '0 3 * * 1'
workflow_dispatch:
inputs:
limit:
description: 'Maximum repos to scan (0 = all resolved)'
required: false
default: '0'
inventory_file:
description: 'Optional inventory file path (.git-private-repos or .git-private-farm.scm)'
required: false
default: ''
process_findings:
description: 'Run fleet process-findings after scan'
required: false
type: boolean
default: true
permissions:
contents: read
jobs:
supervised-scan:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout gitbot-fleet
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v4
with:
lfs: true # shared-context/learning/*.jsonl is LFS-tracked (Item 60)
- name: Clone Hypatia scanner
run: |
set -euo pipefail
git clone --depth=1 https://github.com/hyperpolymath/hypatia.git ../hypatia
- name: Run supervised fleet scan
env:
LIMIT: ${{ github.event.inputs.limit || '0' }}
INVENTORY_FILE: ${{ github.event.inputs.inventory_file || '' }}
PROCESS_FINDINGS: ${{ github.event.inputs.process_findings || 'true' }}
FLEET_SUPERVISED_REPOS_FILE: ${{ github.event.inputs.inventory_file || '' }}
# FLEET_SCAN_PAT is required for Hypatia's DependabotAlerts
# rule (DA001-DA004) to query per-repo Dependabot alerts via
# the GitHub REST API. This PAT must have `security_events: read`
# scope on ALL target repos. Without it, cross-repo alerts will
# be MISSING. The built-in GITHUB_TOKEN is insufficient for
# estate-wide scanning. See:
# 007-lang/audits/audit-dependabot-automation-gap-2026-04-17.md.
GITHUB_TOKEN: ${{ secrets.FLEET_SCAN_PAT }}
# HYPATIA_SEVERITY=low surfaces low-severity findings from
# every rule module. The Hypatia CLI's default threshold is
# "medium"; without this override, low-severity findings
# from any rule (not just DependabotAlerts) are dropped.
HYPATIA_SEVERITY: low
run: |
set -euo pipefail
ARGS=(--limit "$LIMIT")
if [[ -n "$INVENTORY_FILE" ]]; then
ARGS+=(--inventory "$INVENTORY_FILE")
fi
if [[ "$PROCESS_FINDINGS" == "true" ]]; then
ARGS+=(--process)
fi
echo "Running: fleet-coordinator.sh scan-supervised ${ARGS[*]}"
bash fleet-coordinator.sh scan-supervised "${ARGS[@]}"