You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Source: UK AI Open Code Risk & Resilience Governance β weekly scan 2026-07-24 SLA: 7 days (by 2026-07-31)
Finding
Semgrep code-scanning alerts #651 and #652 flag fmt.Sprintf usage to build GraphQL queries with user-controlled input (owner) in pkg/cli/project_command.go at lines 269 and 272.
Although escapeGraphQLString() is applied, manual string escaping is brittle and may miss edge cases. Both alerts have been open since 2026-07-24 and are unassigned.
Code pattern (simplified):
// Lines 269 and 272 β user-controlled `owner` interpolated into query stringquery:=fmt.Sprintf(`{ ... owner: "%s" ... }`, escapeGraphQLString(owner))
Risk Scoring
Dimension
Score (1β5)
Notes
Exposure amplification
3
Requires authenticated access; owner input
Patchability
4
Replace with parameterised GraphQL variables
Detectability
3
Semgrep detects; runtime exploitation logged
Operational fragility
2
CLI feature; not core runtime path
Ownership confidence
4
pelikhan owns CLI pkg
Overall
Tier B
Open With Conditions
Remediation Actions
Migratepkg/cli/project_command.go lines 269 and 272 to use GraphQL variables instead of string interpolation:
// Use variables map passed to GraphQL client β no string interpolation neededvariables:=map[string]interface{}{"owner": owner}
RemoveescapeGraphQLString() calls on the affected lines once parameterised.
Add a unit test asserting that GraphQL queries use variable syntax for user-supplied fields.
π High β Tier B: Open With Conditions
Source: UK AI Open Code Risk & Resilience Governance β weekly scan 2026-07-24
SLA: 7 days (by 2026-07-31)
Finding
Semgrep code-scanning alerts #651 and #652 flag
fmt.Sprintfusage to build GraphQL queries with user-controlled input (owner) inpkg/cli/project_command.goat lines 269 and 272.Although
escapeGraphQLString()is applied, manual string escaping is brittle and may miss edge cases. Both alerts have been open since 2026-07-24 and are unassigned.Code pattern (simplified):
Risk Scoring
Remediation Actions
pkg/cli/project_command.golines 269 and 272 to use GraphQL variables instead of string interpolation:escapeGraphQLString()calls on the affected lines once parameterised.Exception Governance
ownerinput bypassingescapeGraphQLString()Governance report: UK AI Open Code Risk & Resilience Governance β Weekly Report 2026-07-24
References: Β§30107107922 Β· Semgrep alert #651 Β· Semgrep alert #652