Skip to content

Commit b93f061

Browse files
feat(ci): reuse isolated scanner credential checks across secret stores (#1178)
A successful scanner check in Hypatia does not validate the separate Actions secret stored in gitbot-fleet. Make the existing no-checkout read check callable by a consumer with an explicitly passed HYPATIA_SCAN_PAT, using the same fixed Hypatia API targets and suppressed response bodies. Reusable calls default to scanner_only=true and skip the separate dispatch job. Manual runs preserve the existing two-role default and offer a scanner-only checkbox. The dispatch secret is optional for reusable calls and required by the check only when that role is explicitly selected. Document that this validates the caller's stored value against Hypatia endpoints, not estate-wide access. Validation: actionlint and canonical lock synchronization passed. The probe shell and pinned action are unchanged from #1176, whose seven failure controls and live three-endpoint read have passed. Hosted qualification will include a scanner-only manual run and the fleet caller; no reusable execution is claimed yet. This adds no credential grants and changes no saved secret.
1 parent aa621fd commit b93f061

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

‎.github/workflows/credential-read-check.yml‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,26 @@ name: Credential read check
44

55
on:
66
workflow_dispatch:
7+
inputs:
8+
scanner_only:
9+
description: Check only the scanner credential
10+
type: boolean
11+
required: false
12+
default: false
13+
workflow_call:
14+
inputs:
15+
scanner_only:
16+
description: Omit the separate dispatch credential check
17+
type: boolean
18+
required: false
19+
default: true
20+
secrets:
21+
HYPATIA_SCAN_PAT:
22+
description: Scanner credential to validate against Hypatia's three alert endpoints
23+
required: true
24+
HYPATIA_DISPATCH_PAT:
25+
description: Required only when scanner_only is false
26+
required: false
727

828
permissions:
929
contents: read
@@ -46,6 +66,7 @@ jobs:
4666
echo 'This checks authentication and three alert endpoints in one repository. It does not prove estate coverage, absence of alerts, or write access. An unavailable endpoint is not a pass.' >> "$GITHUB_STEP_SUMMARY"
4767
exit "$failed"
4868
dispatch:
69+
if: ${{ !inputs.scanner_only }}
4970
name: Dispatch authentication and store read
5071
runs-on: ubuntu-24.04
5172
timeout-minutes: 5

‎docs/operations/credential-roles.adoc‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,21 @@ alert access under another owner such as `metadatastician`. A passing check
2929
here tests only this repository's stored secret and these three endpoints.
3030
The separate secret stored in `gitbot-fleet` needs its own validation.
3131

32+
The same workflow supports `workflow_call` so a consumer can validate its own
33+
stored scanner credential without copying the check or handing the token to
34+
an operator. Pin the reusable to a reviewed full commit SHA and pass only
35+
`HYPATIA_SCAN_PAT`, never `secrets: inherit`. Reusable calls default to
36+
`scanner_only: true`; the dispatch job is skipped and its secret is optional.
37+
Manual runs default to checking both roles, with a `scanner_only` checkbox
38+
for scanner-only validation. A caller that explicitly checks dispatch must
39+
also pass `HYPATIA_DISPATCH_PAT`.
40+
41+
The API targets remain fixed: Hypatia's three alert endpoints and, only for
42+
dispatch validation, the observation-store main ref. A successful call from
43+
another repository proves that caller's stored scanner credential can read
44+
those Hypatia endpoints. It does not prove access to every caller repository
45+
or every estate repository.
46+
3247
A PAT's display name is not linked to an Actions secret. Regeneration or
3348
replacement requires updating each intended secret store with the new value.
3449
Do not revoke the old PAT until all known consumers are migrated or explicitly

0 commit comments

Comments
 (0)