Re: [PATCH 1/4] travis-ci: use 'set -x' in 'ci/*' scripts for extra tracing output
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Dec 15, 2017, 13:06 UTC
- Message-ID
- <CAM0VKjmpJ_J+GjJ3PyU_pxsWx85L6cPa2tLM0xJx3cJu2T87Zg@mail.gmail.com>
- In-Reply-To
- <alpine.DEB.2.21.1.1712151308230.406@MININT-6BKU6QN.europe.corp.microsoft.com>
On Fri, Dec 15, 2017 at 1:10 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 13 quoted lines
> Hi, > >> There is a lot going on in 'run-windows-build.sh', so the output of 'set >> -x' might be useful or might be considered too much clutter, I don't >> know. I put Dscho on Cc, I think it's mainly his call. > > Certainly it might be useful. > > However, please make sure that the secret token is not leaked that way. > Like, *really* sure. Due to the failure of Git to use a portable and > performant test suite, it does take about 90 minutes to build and test a > revision, therefore it would be very easy to DOS my build system, and I > really, really need it not to be DOSed because I use it in my day job, too.
Ugh, I was completely unaware of this issue, and the first version of this patch is already in 'pu'... **runs to check the trace logs**
Great, it seems we are in luck, as the secret token was specified as an encrypted environment variable in git/git repository settings on Travis CI. It's redacted in the trace log and I only see lines like these:
Setting environment variables from repository settings $ export GFW_CI_TOKEN=[secure]
+test -z [secure]
+++curl -H 'Authentication: Bearer [secure]' --silent --retry 5
--write-out '%{HTTP_CODE}' --output /dev/fd/63
'https://git-for-windows-ci.azurewebsites.net/api/TestNow?action=trigger&branch=pu&commit=1229713f78cd2883798e95f33c19c81b523413fd&skipTests=false'https://travis-ci.org/git/git/jobs/316791071
Phew.
However, I don't feel competent enough with Travis CI's encrypted environment variables to say that this qualifies as "*really* sure" "that the secret token is not leaked". Anyway, note, that that '$ export GFW_CI_TOKEN=[secure]' line is already present in all 'git/git' trace logs independently of this 'set -x' change in question.
Gábor