( session: ExecutionSession, repoExists = false, writeFile = vi.fn().mockResolvedValue(undefined) )
| 286 | sessionId: 'agent_web', |
| 287 | platform: 'github', |
| 288 | }), |
| 289 | env: reviewEnv(), |
| 290 | kiloCapability: 'kilo-token', |
| 291 | createdOnPlatform: 'cloud-agent-web', |
| 292 | profile: { |
| 293 | envVars: { |
| 294 | GH_TOKEN: 'profile-token', |
| 295 | KILO_GITHUB_REVIEW_TARGET: '{"forged":true}', |
| 296 | KILO_GITHUB_REVIEW_API_BASE: 'http://evil.example', |
| 297 | }, |
| 298 | }, |
| 299 | }); |
| 300 | |
| 301 | expect(runtimeEnv.GH_TOKEN).toBe('profile-token'); |
| 302 | expect(runtimeEnv.KILO_GITHUB_REVIEW_TARGET).toBeUndefined(); |
| 303 | expect(runtimeEnv.KILO_GITHUB_REVIEW_API_BASE).toBeUndefined(); |
| 304 | }); |
| 305 | |
| 306 | it('removes a profile-supplied code_review MCP server and keeps other servers', () => { |
| 307 | const runtimeEnv = service().buildRuntimeEnv({ |
| 308 | context: service().buildContext({ |
| 309 | sandboxId: 'usr-test', |
no outgoing calls
no test coverage detected