the title is incorrect; it's not a github error but php composer's github action. cc @dang before people freak out
GHA have always been a PITA for any serious DevOps; it's quite clear they were designed to integrate in 7 lines of code and then tell everyone who complains that they're doing it wrong.<p>This does not surprise me.
It is a PITA, but that can be significantly improved IMHO if you just write shell script wrappers for your tasks. Not only does it make it easier to run CI locally, but it also makes it so much easier to move platforms in the future.<p>When the GH action YAML is just invoking shell scripts, I find it quite pleasant to use
You've perfectly described how microsoft operates and how github actions is apparently based on AzureDevOps pipelines.
I was the reporter on this one. If you have Github Actions in your organization, disable them immediately if you're unsure which version of composer your Github Actions run.
Could you elaborate on this bit on why Github's secret masking doesn't work here:<p>> GitHub Actions' built-in secret masker matches registered values as exact substrings. When the exception message is rendered by Symfony Console it may wrap, embed in In BaseIO.php line N: framing, or interleave with ANSI control sequences. So the masker does not redact, and the plaintext token reaches the log.<p>What does this log rendering look like such that the token from that code snippet becomes interleaved enough to not be a substring match?<p>I'm not familiar with composer/Symfony but I would expect something like:<p><pre><code> Line 34: Foo bar
Line 34: <red>Foo bar</red></code></pre>
From what I can tell Symfony wraps these errors in a styled error block so it messes with GitHub's masking. For example, newlines breaking up the token are apparently enough to trick the masker since it's not a substring anymore.<p>For your example:<p>Line 34: <red>ghs_fdsafdsarewqfdsa...</red><p>Is probably long enough in most cases to break to a new line.<p>Also, those blocks get "interleaved" like this:<p><red>ghs_fdsafdsarewqfdsafdsa</red><p><red>fdsardsardsafdsafs......</red><p>So there are now </red>'s within the token, also breaking the substring matching.<p>This is kind of eye-opening for me -- I have never thought about how styled output like this could cause logging leakages.
Not immediately clear to me, is this limited to ghu_xxx type OAUTH tokens? And it's only relevant for PHP projects that use composer in GHA?
What is the security implication for private repos?
The title suggests it is a Github issue but really it is <a href="https://github.com/composer/composer" rel="nofollow">https://github.com/composer/composer</a> no? I would edit the title for clarity.
Yes, it's a Composer issue (which is a PHP dependencies manager) with the new format of GITHUB_TOKEN.<p>It's not an issue in GHA itself, this time. But if you are a composer user in GH, you should definitely be warned (and worried).
it's not super clear, but that's my read as well... i think i can start lowering my panic levels now.