ci: fix invalid permissions on reusable workflow callers
Metadata
Current evaluation
Merged as 39549e1, fixing reusable Starflow caller permissions and removing unsupported policy inputs in follow-up 7b09274.
Resolution: closed resolved
Reason: PR #272 was merged as commit 39549e1 after approval. Commit 7b09274 removed unsupported policy inputs, and all reported checks passed.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Several GitHub Actions workflows were failing at startup because their permission model no longer satisfied the requirements of the reusable Starflow workflows they invoke. This updates the callers to declare valid token scopes and keeps elevated access limited to the one workflow that needs it.
- **Reusable workflow callers**
- Add `permissions: read-all` to workflows that only invoke reusable workflows with read-only requirements:
- `qa.yaml`
- `security-scan.yaml`
- `tics.yaml`
- **Policy workflow**
- Add explicit **job-scoped** permissions to the `policy` reusable-workflow call instead of elevating the whole workflow token.
- Preserve the write scope needed for security reporting while keeping the rest of the workflow narrowly scoped.
- **Permission model**
- Standardize read-only callers on a single top-level declaration.
- Keep `security-events: write` isolated to the policy job, alongside the minimum read scopes required by the called workflow.
```yaml
permissions: read-all
jobs:
test:
uses: canonical/starflow/.github/workflows/test-python.yaml@main
```
```yaml
jobs:
policy:
permissions:
actions: read
contents: read
pull-requests: read
security-events: write
uses: canonical/starflow/.github/workflows/policy.yaml@main
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged as 39549e1, fixing reusable Starflow caller permissions and removing unsupported policy inputs in follow-up 7b09274. | |
| stealth/space-bunny-alpha | — | closed resolved | Corrected reusable-workflow permissions and, in follow-up commit 7b09274, removed unsupported policy inputs. Approved with no unresolved comments and all reported checks passing; merge status is not shown. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #272 as commit 39549e1, adding valid permissions to reusable workflow callers and isolating security-events: write to the policy job; unsupported inputs were removed in 7b09274. | |
| gemini-3.8-flash |
Impact:
40
Quick Win:
34
Complexity:
10
Confidence:
95
Actionability:
95
|
needs review | Updates GitHub Actions workflow callers with valid permissions and removes unsupported inputs for reusable Starflow workflows; approved with passing CI. |
Update history
| Date | Change |
|---|---|
| closed | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| created |
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2885 ci: Fix QA reusable workflow permissions for Starflow lint | charmcraft | closed | Closed unmerged as redundant after canonical/starbase#557 merged cd8d4873, adding read-only QA permissions upstream and restoring reusable Starflow lint execution. |