Commit bb1762d
committed
ci: verify Artifactory serves bytes rather than redirecting
The download counters cannot see a redirect. `go mod download -x` traces
the URL Go requested, and http.Client.Do follows redirects inside that
call, logging the final status against the original URL. So a 3xx handing
the transfer to another origin would increment `served` and leave `other`
at zero while the bytes came from somewhere else. Raised in review of
#2376.
Two changes.
The GOPROXY assertion is now an exact match on the full expected URL
rather than a host prefix. The `-cdn` repository variants are the one
documented path where Artifactory hands a client to another origin
(Direct Download), so pinning the repo key closes it. Upstream F-009
records that Direct Download never engages for Go — no module archive
approaches its 100 MB threshold — but the assertion costs nothing and
does not depend on that remaining true.
And a canary: fetch one module archive with curl and assert zero
redirects and an Artifactory final URL. Redirect behavior is a
repository-level setting rather than per-module, so one request is
representative; if the repo were configured to redirect, it would
redirect every zip rather than one.
The credential is passed through `curl --config` on stdin so the token
never reaches argv, where a process listing on the runner would expose
it. That mirrors why the action writes a GOAUTH helper instead of an
environment variable.
Not adopting the suggested outbound-host allowlist: enforcing egress at
the network layer on a GitHub-hosted runner is disproportionate for a
workflow that verifies a property and ships nothing.
Signed-off-by: Mark Chmarny <mark@chmarny.com>1 parent 8fa2d10 commit bb1762d
1 file changed
Lines changed: 42 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
135 | 140 | | |
136 | 141 | | |
137 | 142 | | |
| |||
142 | 147 | | |
143 | 148 | | |
144 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
145 | 183 | | |
146 | 184 | | |
147 | 185 | | |
| |||
0 commit comments