[uk-ai-resilience] UK AI Governance: recurring go/bad-redirect-check false positive across path-traversal guards (Tier B)
- Dominant language
- Go
- Stars
- 5.1k
- Forks
- 541
- Avg merge
- 5h 46m
- Merged PRs (30d)
- 760
Description
### UK AI Governance — Tier B: recurring `go/bad-redirect-check` false positive across path-traversal guards
**Tier**: B — Open With Conditions
**Source discussion report**: see the "UK AI Governance: recent-change risk review (2026-08-24 to 2026-08-31)" discussion created by this run.
### Risk-scoring breakdown
| Dimension | Rating |
|---|---|
| Exposure amplification | Low |
| Patchability | High |
| Detectability | High (CodeQL) |
| Operational fragility | Low |
| Ownership confidence | Medium |
| **Overall** | **Low-Medium** |
### Finding
Three open CodeQL `go/bad-redirect-check` alerts (severity: error) flag path-traversal guard functions as if they were redirect handlers:
- **#668, #669** in `pkg/workflow/graders_config.go` (lines 441, 448), function `IsValidOperationalValueEvaluatorRunPath` — validates operational-value evaluator `.sh` script paths, rejecting empty components, `.`, `..`, and paths containing `\`.
- **#667** in `pkg/cli/add_package_manifest_includes.go` (line 146), function `cleanManifestRelativePath` — validates manifest include/destination paths, rejecting absolute paths and traversal outside the root.
CodeQL's message for all three is: *"This is a check that this value, which flows into a redirect, has a leading slash, but not that it does not have '/' or '\' in its second position."* This is the same false-positive shape already assessed for a sibling function `cleanManifestRelativePath` in `pkg/cli/add_package_manifest.go`, tracked in still-open issue #54037 (Tier B). None of these three functions produce HTTP redirects; they are filesystem path validators used at workflow-compile time and CLI manifest-processing time.
### Remediation action
- Consolidate fix across all three flagged functions in one PR:
- Either add an explicit CodeQL suppression annotation with rationale (path-traversal guard, not a redirect handler), or
- Harden each guard to additionally reject a `\` (backslash) immediately following the leading `/`, which silences the CodeQL heuristic without weakening security.
- Cross-reference and close out #54037 alongside this fix if the same PR addresses that sibling occurrence too, to avoid duplicate open Tier B tracking for the same underlying pattern.
### SLA urgency
**Medium** — low exploitability (these are not redirect handlers, no user-facing redirect surface), but should be closed to prevent continued alert noise and to keep the Tier B backlog from growing across governance cycles.
> Generated by [UK AI Operational Resilience](https://github.com/github/gh-aw/actions/runs/33408700724) · copilot · auto · 55.7 AIC · ⌖ 9.97 AIC · ⊞ 8.1K · [◷](https://github.com/search?q=repo%3Agithub%2Fgh-aw+is%3Aissue+%22gh-aw-workflow-call-id%3A+github%2Fgh-aw%2Fuk-ai-operational-resilience%22&type=issues)
Contributor guide
Research direction
Read pkg/workflow/graders_config.go and pkg/cli/add_package_manifest_includes.go at the named functions, then compare the sibling cleanManifestRelativePath occurrence in #54037. Confirm whether suppression or additional path validation best fits the existing guards. Done means the three CodeQL alerts are resolved and the related duplicate tracking is addressed if the same change covers it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, security, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100