github / codeql-action

Actions for running CodeQL analysis
MIT License
1.14k stars 313 forks source link

Registries Proxy: Support feeding a base64 encoded configuration #2404

Closed marcogario closed 3 weeks ago

marcogario commented 1 month ago

Extend the start-proxy action to support passing the configuration as a base64 encoded variable. The reason to do so, is that this information is being passed by Actions as a secret. Actions recommends against passing structured data as a secret because it becomes harder to scrub it. Therefore, we send the information as a simple string.

We introduce the new input registries_credentials in parallel with the previous input to make it easier to test this while we are still building the remaining parts of the system. We will deprecate and remove the old property (registry_secrets) in the future. Note that this entire action is meant to be for internal use only.

Finally, in this PR I also refactored a bit the logic to more clearly distinguish the key steps, perform some validation of the input, and thread the logger for increase observability.

Merge / deployment checklist

marcogario commented 4 weeks ago

@aeisenberg this is ready for another review. I am also assigning @aibaars so he can shepherd this to completion in case there are issues to address.