close
Skip to content

refactor: Extract shared hardened gh-runner module #342

Description

@dwu96

Context

The codebase has three independent gh-spawning paths (source_providers, code_review_sage, issue_radar), each with its own trusted-binary resolution, minimal-env construction, and spawn-audit exemption. A future hardening fix must be applied in all three places — a missed copy silently keeps the weaker guard.

Proposal

Extract the hardened runner (trusted-binary resolution via _validate_provider_executable + minimal env + SEL audit + timeout handling) and the GitHub URL parser into one shared module (e.g. kiro_crew/github_runner.py). Make _validate_provider_executable a public symbol of that module. Have source_providers, code_review_sage, and issue_radar all import it — collapsing three spawn-audit allowlist entries into one.

Current state

Issue Radar (PR #314) imports the private _validate_provider_executable cross-layer; this cross-layer dependency should be resolved by the extraction.

Labels

enhancement, security, tech-debt

Metadata

Metadata

Assignees

Labels

area: appsApp Store, app-sdk, MCP apps, app runtimeclaimedAn automated fix is in progressfollow-upDeferred work split out of a merged PRrefactorInternal restructuring with no behavior changesecurityHardening, trust boundary, or sandbox escape

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions