Harden deploy-docs token handling in ci.yml #131
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The deploy-docs job in .forgejo/workflows/ci.yml authenticates git pushes by embedding FORGEJO_TOKEN in the remote URL (git remote set-url origin https://x-token-auth:$FORGEJO_TOKEN@...). This pattern predates the forge migration and was flagged by WuMing in PR #130: the token can appear in process listings during the call and persists in the workspace .git/config.
The standard fix is http.extraheader basic-auth config instead of a token-bearing URL. This was not done in PR #130 because deploy-docs only runs on tag pushes, so the change could not be exercised by PR CI. It should be validated with a test tag before the next real release.