Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/docker-manager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,14 @@ describe('docker-manager', () => {
expect(env.SQUID_PROXY_PORT).toBe('3128');
});

it('should set NO_COLOR=1 to disable ANSI color output from CLI tools', () => {
const result = generateDockerCompose(mockConfig, mockNetworkConfig);
const agent = result.services.agent;
const env = agent.environment as Record<string, string>;

expect(env.NO_COLOR).toBe('1');
});

it('should mount required volumes in agent container (default behavior)', () => {
const result = generateDockerCompose(mockConfig, mockNetworkConfig);
const agent = result.services.agent;
Expand Down
4 changes: 4 additions & 0 deletions src/docker-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,10 @@ export function generateDockerCompose(
SQUID_PROXY_PORT: SQUID_PORT.toString(),
HOME: homeDir,
PATH: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
// Disable ANSI color output from CLI tools (Rich, Chalk, etc.) inside the container.
// Tools like Rich inject ANSI escape codes that break test assertions expecting plain text.
// NO_COLOR is a standard convention (https://no-color.org/) supported by many libraries.
NO_COLOR: '1',
// Configure one-shot-token library with sensitive tokens to protect
// These tokens are cached on first access and unset from /proc/self/environ
AWF_ONE_SHOT_TOKENS: 'COPILOT_GITHUB_TOKEN,GITHUB_TOKEN,GH_TOKEN,GITHUB_API_TOKEN,GITHUB_PAT,GH_ACCESS_TOKEN,OPENAI_API_KEY,OPENAI_KEY,ANTHROPIC_API_KEY,CLAUDE_API_KEY,CODEX_API_KEY',
Expand Down
Loading