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
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_executablea public symbol of that module. Havesource_providers,code_review_sage, andissue_radarall import it — collapsing three spawn-audit allowlist entries into one.Current state
Issue Radar (PR #314) imports the private
_validate_provider_executablecross-layer; this cross-layer dependency should be resolved by the extraction.Labels
enhancement,security,tech-debt