Commit f18e2a0
fix: address review feedback on child container NAT enforcement
- Fix get_subcommand() parsing: match against known Docker subcommands
instead of assuming first non-flag token is the subcommand, preventing
misidentification of global option values (e.g., --context foo)
- Hardcode agent container name 'awf-agent' in docker-stub.sh instead of
reading from AWF_AGENT_CONTAINER env var to prevent namespace hijacking
- Stop exporting AWF_REAL_DOCKER to user environment; write the real
Docker path to /tmp/awf-lib/.docker-path file that only the wrapper reads
- Add comment acknowledging that readonly AWF_DIND_ENABLED only protects
the entrypoint shell, not subshells — real enforcement is the wrapper
- Use AGENT_CONTAINER_NAME constant instead of string literal in docker-manager.ts
- Block docker build/buildx commands to prevent BuildKit containers from
bypassing NAT rules with unrestricted network access
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 07e71a4 commit f18e2a0
3 files changed
Lines changed: 65 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
33 | 41 | | |
34 | | - | |
| 42 | + | |
35 | 43 | | |
36 | 44 | | |
37 | 45 | | |
38 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
39 | 55 | | |
40 | | - | |
41 | 56 | | |
42 | 57 | | |
43 | 58 | | |
44 | 59 | | |
45 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
46 | 72 | | |
47 | 73 | | |
48 | 74 | | |
| |||
101 | 127 | | |
102 | 128 | | |
103 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
104 | 149 | | |
105 | 150 | | |
106 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
523 | | - | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
524 | 529 | | |
525 | 530 | | |
526 | 531 | | |
| |||
533 | 538 | | |
534 | 539 | | |
535 | 540 | | |
536 | | - | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
537 | 545 | | |
538 | 546 | | |
539 | 547 | | |
| |||
719 | 727 | | |
720 | 728 | | |
721 | 729 | | |
722 | | - | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
723 | 734 | | |
724 | | - | |
725 | 735 | | |
726 | 736 | | |
727 | 737 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1007 | 1007 | | |
1008 | 1008 | | |
1009 | 1009 | | |
1010 | | - | |
| 1010 | + | |
1011 | 1011 | | |
1012 | 1012 | | |
1013 | 1013 | | |
| |||
0 commit comments