openai / openai/codex

Sites source repository write credential is already expired when issued

Open
#42,119 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app auth bug
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What issue are you seeing?

A Sites project cannot be published because create_source_repository_write_credential returns a source write credential whose token_expires_at is already in the past when it is issued. Git push then fails with: 403 Invalid or expired token.

What steps can reproduce the bug?
  1. Use an existing active public Sites project as the owner.
  2. Call create_source_repository_write_credential for the project.
  3. Observe that token_expires_at is earlier than the local current time at issuance.
  4. Push the current HEAD to the returned remote using the documented HTTP extra-header authentication mode.
  5. The server rejects the push with HTTP 403 and "Invalid or expired token".

I also re-authenticated in the ChatGPT desktop app and obtained a new credential. The replacement credential had the same already-expired timestamp behavior.

What is the expected behavior?

The returned short-lived credential should be valid at the time of issuance and allow the owner to push the current source branch so a Site version can be saved and deployed.

Additional information

No source code, site URL, project ID, user data, photos, logs, or credentials are included in this report. Local system time was checked and was correct.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the create_source_repository_write_credential entry point and reproduce the report with an active public Sites project, comparing token_expires_at with the local current time. Then attempt the documented HTTP extra-header Git push; done means a newly issued credential is valid at issuance and the current source branch push succeeds instead of returning HTTP 403.

Written by the indexing model from the issue text.

Assessment

Tech stack
git
Domain
api, authentication
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.