Commit 1913066
committed
fix(security): restore EL7 support and make the credential tests able to fail
RHEL/CentOS 7 ships curl 7.29.0, which does not know oauth2-bearer. It does
not reject the unknown configuration key either: it ignores it, exits 0, and
sends the request with no credential at all. The previous commit therefore
broke EL7 silently rather than loudly.
Each script now detects the capability positively and falls back to a raw
Authorization header when it is missing. The credential still travels on
curl's configuration input in both modes, so it never reaches the command
line. The gate moves from 7.55 to 7.33, the version that added oauth2-bearer,
which also stops blocking curl 7.33 through 7.54 for no reason, and it is
restored in the uninstall and migrate scripts where it had been dropped.
Warning text now names what is actually unverified on very old curl, which is
redirect handling, and names the control that bounds it.
Two latent defects turned up while doing this. The command -v curl guard sat
inside a command substitution, where die only exits the subshell and leaves
the variable empty; in falcon-linux-uninstall.sh that guard also called die
39 lines before die was defined, so a host without curl got "die: command not
found" instead of the message. Both are fixed.
The credential handling suite could not fail. It called rg, which is not
installed on ubuntu-latest, so "if rg ...; then fail; fi" read exit 127 as no
match and three checks quietly did nothing. Replaced with grep behind a
helper that inspects the exit status, so a missing or broken tool fails
instead of passing. The mode loop now exercises both credential mechanisms
rather than looping over a variable nothing read.
The container matrix passed its setup command through a variable that the
container shell expanded after parsing, turning && and > into literal
arguments, which is why all five legs errored. A dependency script that
detects the package manager replaces it, and Oracle Linux 7 and CentOS 7 legs
are added, since the oldest curl exercised before this was 7.81.
Also: aws_ssm_parameter no longer prints the decrypted response body on
failure, since that body can carry the client secret; the live curl test runs
on python2 and cannot hang; and the PowerShell test reports every collected
failure instead of throwing on the first one.1 parent cd7a9c8 commit 1913066
13 files changed
Lines changed: 510 additions & 156 deletions
File tree
- .github
- scripts
- workflows
- bash
- containers/falcon-container-sensor-pull
- test
- install
- migrate
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
14 | 35 | | |
15 | 36 | | |
16 | 37 | | |
17 | 38 | | |
18 | 39 | | |
19 | | - | |
20 | | - | |
21 | 40 | | |
22 | 41 | | |
23 | | - | |
| 42 | + | |
24 | 43 | | |
25 | 44 | | |
26 | 45 | | |
27 | 46 | | |
28 | 47 | | |
29 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
30 | 60 | | |
31 | 61 | | |
| 62 | + | |
32 | 63 | | |
33 | | - | |
34 | 64 | | |
35 | 65 | | |
36 | 66 | | |
| |||
40 | 70 | | |
41 | 71 | | |
42 | 72 | | |
43 | | - | |
| 73 | + | |
44 | 74 | | |
45 | 75 | | |
46 | | - | |
| 76 | + | |
47 | 77 | | |
48 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
49 | 81 | | |
50 | | - | |
| 82 | + | |
51 | 83 | | |
52 | | - | |
| 84 | + | |
53 | 85 | | |
54 | 86 | | |
55 | 87 | | |
| |||
85 | 117 | | |
86 | 118 | | |
87 | 119 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
101 | 137 | | |
102 | 138 | | |
103 | 139 | | |
104 | 140 | | |
105 | 141 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
120 | 166 | | |
121 | 167 | | |
0 commit comments