Re: Busy day for some
This wasn't really anything to do with storing secrets in the repository, if that was the case anyone could just clone a public repository and pick through it. Good advice nonetheless though.
GitHub provides safe secret storage, (it's all based on public key crypto if you peek under the hood), but at some point you have to provide those secrets to your pipeline(s), in the clear, unless every tool knows how to directly speak to your chosen secrets manager.
Normally what happens is any GitHub secrets used automatically install a filter such that any time that secret value is logged, it gets ***'d out, which can be mildly amusing if you're testing things and set the secret value to something fairly commonplace that occurs naturally in your logs, i.e. set a secret with a value of "test", anywhere "test" appears in your logs, even if it's nothing to do with that secret, it gets ***'d out.
Because secrets are write-only if you ever forget what you set the secret to, you can't just run an action that logs it because it will get masked out as above, but you can pipe the secret value through base64 or similar encoding and log that, the filters are not (yet) clever enough to catch that. You can then pick the encoded value out of the logs and decode it. This is basically what the attack was doing.