Skip to content

[Testing] Missing integration test for workDir tmpfs hiding (docker-compose.yml secret exposure) #759

@Mossaka

Description

@Mossaka

Summary

PR #718 added tmpfs overlays on workDir to prevent the agent from reading docker-compose.yml which contains plaintext tokens (GITHUB_TOKEN, ANTHROPIC_API_KEY, COPILOT_GITHUB_TOKEN, etc.). However, there is no integration test verifying this protection actually works.

Current Test Coverage

  • Unit test (src/docker-manager.test.ts, lines 1424-1455): Only verifies the Docker Compose config includes a tmpfs entry for workDir. Does NOT verify the actual protection.
  • Integration test: NONE

What Should Be Tested

An integration test that:

  1. Runs awf with --env-all (or specific env vars) passing sensitive tokens
  2. Inside the container, attempts cat /tmp/awf-*/docker-compose.yml
  3. Verifies the command returns empty/error (tmpfs overlay is working)
  4. In chroot mode, also attempts cat /host/tmp/awf-*/docker-compose.yml

Why This Matters

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions