Answer: To publish a draft merge request, create a GitLab project access token with the Developer role and the `api` and `write_repository` scopes, store it as a protected, masked, hidden `GITLAB_REMEDIATION_TOKEN` scoped only to the `codex-security/publish` environment, and set `CODEX_SECURITY_CREATE_MR=true` to enable publishing. Also set the non-secret `CODEX_SECURITY_MR_TEST_COMMAND` to the project-specific security regression test that every generated remediation branch must pass, keeping it unprotected. Status: Confirmed Entry: tool/codex/integrations/publish-draft-merge-request Revision: 1 Digest: sha256:d0cfdd7774294359 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:53:06Z Last changed: 2026-11-13T03:53:06Z Last verified: 2026-11-20T13:41:39Z Next check: 2026-11-21T13:41:39Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Enable publishing variable | CODEX_SECURITY_CREATE_MR=true | [1] | 2026-11-20 Token variable | GITLAB_REMEDIATION_TOKEN | [1] | 2026-11-20 Token role | Developer | [1] | 2026-11-20 Token scopes | api | [1] | 2026-11-20 Token environment | codex-security/publish | [1] | 2026-11-20 Test command variable | CODEX_SECURITY_MR_TEST_COMMAND | [1] | 2026-11-20 Branch name pattern | codex-security/fix- | [1] | 2026-11-20 Sources: [1] OpenAI. "Run Codex Security in GitLab CI/CD". https://learn.chatgpt.com/docs/security/cli/ci/gitlab.md Role: primary. Accessed: 2026-11-20T13:41:39Z Quote: "Set `CODEX_SECURITY_CREATE_MR=true` to enable publishing." (Supports: Enable publishing variable) Quote: "hidden `GITLAB_REMEDIATION_TOKEN` scoped only to the" (Supports: Token variable) Quote: "with the Developer role and the `api` and `write_repository` scopes." (Supports: Token role, Token scopes) Quote: "`codex-security/publish` environment." (Supports: Token environment) Quote: "`CODEX_SECURITY_MR_TEST_COMMAND` to the project-specific security regression" (Supports: Test command variable) Quote: "Creates a `codex-security/fix-` branch." (Supports: Branch name pattern) Snapshot SHA-256: fa69ec34950e25f4796643bc83a42513c30f77b3b17bffd062e84fa16aeae197 (captured 2026-11-13T03:53:05Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:53:06Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:41:39Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:41:39Z Last attempt: 2026-11-20T13:41:39Z Notes and limitations: Extracted automatically from a single official source (section "Publish a draft merge request"). Related: https://latestn.com/tool/codex/integrations/request-codex-review-gitlab-mr How do I request a Codex review on a GitLab merge request? https://latestn.com/tool/codex/integrations/save-reports-upload-sarif How do I save Codex Security reports and upload SARIF in GitHub Actions? https://latestn.com/tool/codex/integrations/scan-pull-request-changes How do I set up a Codex Security workflow to scan pull-request changes in GitHub Actions? https://latestn.com/tool/codex/integrations/gitlab-ci-requirements What are the requirements to run Codex Security in GitLab CI/CD? https://latestn.com/tool/codex/integrations/gitlab-code-review-prerequisites What do I need before setting up Codex code review for GitLab? https://latestn.com/tool/codex/integrations/mcp-server-removal-alternative What should I use instead of the removed Codex MCP server? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:53:06Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/codex/integrations/publish-draft-merge-request/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/codex/integrations/publish-draft-merge-request POST: https://latestn.com/dispute/tool/codex/integrations/publish-draft-merge-request with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/codex/integrations/publish-draft-merge-request?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I publish a draft merge request with Codex Security fixes in GitLab? Revision 1, last verified 2026-11-20T13:41:39Z. https://latestn.com/tool/codex/integrations/publish-draft-merge-request (accessed 2026-11-21T09:59:21Z). @misc{LatestN_tool_codex_integrations_publish_draft_merge_request_r1, title = {How do I publish a draft merge request with Codex Security fixes in GitLab?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/codex/integrations/publish-draft-merge-request}}, note = {Revision 1; digest sha256:d0cfdd7774294359; last verified 2026-11-20T13:41:39Z; accessed 2026-11-21T09:59:21Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/codex/integrations/publish-draft-merge-request