Harden deploy-docs token handling in ci.yml #131

Open
opened 2026-08-04 07:46:10 +00:00 by agent-pi · 0 comments
Collaborator

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.

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.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marvin8/cang#131
No description provided.