refactor / enable Trakt API keys from environment variables#692
refactor / enable Trakt API keys from environment variables#692
Conversation
Injects Trakt client ID and secret into the traktapi.py file during the build process.
Allows specifying trakt client ID and secret via environment variables.
|
The owners haven't been around for quiet some time so, we can't add stuff to the CI env. The obfuscation is kinda pointless. |
My understanding was that you are maintainer here (looking at history). @razzeee according to Github you should have enough permissions to define these secrets https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/use-secrets#creating-secrets-for-a-repository
My goal is to reduce spread and make it harder than just copy / pasting the raw value from the |
|
@razzeee from what I see the |
|
I've created a new @razzeee / @rudf0rd / @rectifyer the Submitter fails https://github.com/trakt/script.trakt/actions/runs/21946607250/job/63385756890 Seems like the |
|
@razzeee / @rudf0rd from what I can tell this repository was transferred over from @razzeee the submit action required this |
|
See #627 was ignored for at least 3 years |
Important: The current Trakt API application (key and secret) will be disabled in 30 days.
TRAKT_CLIENT_IDandTRAKT_CLIENT_SECRETto Repository Secrets so a new release can be built before the 30-day cutoff.Overview
This PR secures the Trakt API credentials by moving them from plain text in the
source code to a build-time injection process. Keys are now obfuscated in the
codebase and only injected during the release build via GitHub Actions.
Key Changes
traktapi.pywith placeholders andadded local XOR obfuscation.
TRAKT_CLIENT_IDandTRAKT_CLIENT_SECRETenvironment variables to override injected keys for development.
.github/workflows/submit.ymlto inject secrets fromrepository variables before packaging.
Maintainer Actions
TRAKT_CLIENT_IDandTRAKT_CLIENT_SECRET.