Commit 6034af2
authored
fix(daemon): warn when PILOT_REGISTRY/PILOT_BEACON env vars override compiled defaults (PILOT-236) (#173)
PILOT_REGISTRY and PILOT_BEACON env vars silently override compiled
defaults at startup with no log entry or warning. An attacker who
controls the daemon's environment can redirect registry/beacon to
attacker-controlled endpoints, granting trust to an imposter network.
This adds a slog.Warn log entry after logging setup when either env
var overrides the compiled default, alerting the operator that the
daemon is connecting to a non-default registry or beacon address.
Closes PILOT-2361 parent d89e69e commit 6034af2
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
| 50 | + | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| |||
138 | 142 | | |
139 | 143 | | |
140 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
141 | 152 | | |
142 | 153 | | |
143 | 154 | | |
| |||
0 commit comments