Commit 4204043
fix: detect and expose system CA bundle for RHEL/Amazon Linux in chroot (#5783)
* Fix split-fs test to use actual effectiveHome instead of hardcoded /home
The compose-generator test 'filters out workDir and home dot-directory
bind mounts on split-fs' hardcoded '/host/home' as the prefix for
filtering home-target volumes. This only works on Linux where home
directories are under /home/. On macOS (home under /Users/), the filter
matched nothing, causing the workspace mount assertion to fail.
Use getRealUserHome() to derive the actual home prefix, making the test
portable across platforms.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* fix: detect and expose system CA bundle for RHEL/Amazon Linux in chroot
On Amazon Linux / RHEL-family runners, the system CA bundle lives under
/etc/pki/ which is not mounted into the AWF chroot. This causes TLS
failures ('No CA certificates were loaded from the system') for tools
like Copilot CLI running inside the sandbox.
Add copy_system_ca_bundle() to the agent entrypoint that:
- Detects the host CA bundle from known candidate paths
- If already accessible via existing /etc/ssl mounts, sets TLS env vars
- If under /etc/pki (not mounted), copies to /tmp/awf-lib/ and sets
SSL_CERT_FILE, NODE_EXTRA_CA_CERTS, REQUESTS_CA_BUNDLE, CURL_CA_BUNDLE,
GIT_SSL_CAINFO
- When SSL Bump is active, appends system bundle to AWF CA cert
Fixes #5733
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* fix: preserve AWF CA envs in ssl-bump chroot
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>1 parent 29ece54 commit 4204043
3 files changed
Lines changed: 126 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
699 | 699 | | |
700 | 700 | | |
701 | 701 | | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
702 | 797 | | |
703 | 798 | | |
704 | 799 | | |
| |||
1109 | 1204 | | |
1110 | 1205 | | |
1111 | 1206 | | |
| 1207 | + | |
1112 | 1208 | | |
1113 | 1209 | | |
1114 | 1210 | | |
| |||
1165 | 1261 | | |
1166 | 1262 | | |
1167 | 1263 | | |
1168 | | - | |
| 1264 | + | |
1169 | 1265 | | |
1170 | 1266 | | |
1171 | 1267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
| 195 | + | |
194 | 196 | | |
195 | 197 | | |
196 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
105 | 112 | | |
106 | 113 | | |
107 | 114 | | |
108 | 115 | | |
109 | 116 | | |
110 | 117 | | |
111 | 118 | | |
| 119 | + | |
112 | 120 | | |
113 | 121 | | |
114 | 122 | | |
| |||
128 | 136 | | |
129 | 137 | | |
130 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
131 | 158 | | |
132 | 159 | | |
133 | 160 | | |
| |||
0 commit comments