Description

Ensure that every web service with auto-deploy enabled is linked to a Git branch that has branch protection requiring code review before merge. Optionally, set auto-deploy to deploy only after CI checks pass.

Rationale

With auto-deploy on, every commit to the linked branch goes straight to the running service. If that branch accepts direct pushes without review, unreviewed or malicious code can reach production in minutes. Requiring review on the branch makes sure every deployed change has been checked.

Impact

  • Only reviewed code is deployed automatically

  • Reduces the risk of unreviewed or malicious changes

  • Merges take longer because of the review step

Default Value

New Git-based services use the On Commit auto-deploy setting by default, which deploys every commit to the linked branch.

Pre-Requisites

  • Admin or Developer role on the service

  • Admin access to the Git repository

Remediation

Test Plan

  1. Sign in to the Render Dashboard at https://dashboard.render.com.

  2. From your workspace home (or project), click the service to open it.

  3. Open the service's Settings page and note the Branch and the Auto-Deploy setting (On Commit, After CI Checks Pass, or Off).

  4. If auto-deploy is on, check in your Git provider that the branch requires pull request reviews before merging.

  5. If it does not, follow the implementation steps.

Implementation Steps

  1. In your Git provider, add a branch protection rule for the linked branch that requires at least one approving review and blocks direct pushes.

  2. Sign in to the Render Dashboard at https://dashboard.render.com.

  3. From your workspace home (or project), click the service to open it.

  4. Optionally, on the service's Settings page, set Auto-Deploy to After CI Checks Pass (autoDeployTrigger: checksPass in render.yaml). Note that Render does not deploy if zero CI checks are detected.

Backout Plan

  1. Remove or relax the branch protection rule in your Git provider, or set Auto-Deploy back to its previous value in the service's Settings.

Reference