Separation of duties on merge requests: what auditors check
Separation of duties on code changes sounds simple: the person who writes a change should not be the one who approves it. In practice an audit asks more than that. Who else touched the change, who merged it, whether the approval in the ticket was made by someone allowed to make it, and whether the rules themselves could be loosened by one person. This guide walks through those questions and shows what Merge Pilot enforces and what it records for each.
What auditors usually ask
Audits of change management on source code tend to come back to a handful of questions, whatever the framework behind them:
- Was every change to a production branch approved before it merged?
- Was the approver someone other than the person who made the change?
- Was the approved version the version that merged, or did code change after approval?
- Who was allowed to approve, and how is that list controlled?
- Could anyone bypass the process, and would you know if they did?
- Who can change the rules, and is that change reviewed too?
- Can you show all of this for a sample of changes in a given period?
A VCS's own review settings answer part of this. The harder parts are the ones that span systems: an approval recorded in a ticketing tool, a merge in the VCS, and the policy that connected them.
The author never approves
In Merge Pilot the merge request's author never approves, rejects, takes the change approval or accepts its risk. This is not a setting; it always applies.
The author is recognised by the VCS account each person links in My profile. A vote in Merge Pilot is refused from anyone who has not linked their account on the merge request's VCS, because without it Merge Pilot cannot tell whether they wrote the change. Authors see You wrote this change, so you cannot vote on it. instead of the buttons.
The same rule holds in the tracker. If the author moves their own change approval to an approving status in Jira or the built-in tracker, the approval is ignored, the change approval goes back, the merge request is told why, and the attempt is written to the audit log as change_approval_self_approval_blocked. See Who may vote.
People who committed to the change
The author is not the only person with a stake in a change. Someone who pushed a fix to a colleague's branch is a co-author in all but name. The policy's People who committed to the change setting decides what they may do:
| Option | Effect |
|---|---|
| May not approve (default) | Their approvals, in Merge Pilot and in the tracker, are refused, and they are not assigned the change approval |
| May approve, flagged | They may approve; the merge request and the compliance report show the flag |
| May approve | No restriction |
People are matched by their linked VCS account and their e-mail. The rule restricts approving only: a committer may still reject, because a rejection only stops a change. A stand-in for an approver who committed to the change is treated as a committer.
The approver who merges
Some organisations also want the person who approved a change not to be the one who merges it. The VCS cannot be told to refuse a merge from a specific approver, and Merge Pilot does not pretend it can. The policy's An approver merging the change setting decides how such a merge is recorded:
- Allowed (default): nothing is flagged.
- Allowed, flagged: the merge is flagged on the merge request and written as
mr_sod_flag. - Non-compliant: the merge is marked non-compliant, written as
mr_sod_block, and administrators are alerted with the Merged without approval notification titled Separation of duties broken.
The settings are described in Separation of duties.
Decisions made in the tracker are checked
Many teams decide change approvals in Jira. A status move in Jira is an approval only if the person who made it was allowed to. Merge Pilot checks each decision before it counts:
- The tracker must name who made the move. An approval the tracker names nobody for never counts.
- That person is matched to a Merge Pilot account by tracker account, e-mail or user name, as the company's People settings say. An identifier that matches more than one account counts for nobody.
- The person must be allowed to decide the change: not the author, holding one of the requirement's roles, in the named approver pool or a code owner of the changed files, and not kept out by the committer rule.
- A decision that fails these checks is ignored, the change approval goes back, the merge request gets a comment, and
change_approval_vote_ineligibleis written.
Two company settings tighten this further. Approvals made in the tracker set to Only from people who linked their VCS account (the default) requires the decider to be an active user of the company with a linked VCS account. In Jira, only the change approval's assignee decides it ignores decisions in Jira by anyone but the assignee. Withdrawing an approval is checked the same way: only someone who may decide the change, or an administrator, can do it, and anyone else's move is undone. See Decisions made in the tracker.
Who may approve, and how that list is controlled
A policy's Who must approve lists one or more ways to approve. Each way has requirements, such as one approval from Security and two from Operations, drawn from:
- the project's approver roles (repository roles chosen on the VCS connection, less excluded users);
- an approver pool, a named group of people;
- the code owners of the changed files, read from the CODEOWNERS file on the target branch.
A requirement can ask for more approvals at higher risk levels. Votes are counted once per person, so someone in two pools cannot fill two seats. See Who must approve.
Two features address the human side of approving. Stand-ins let an approver who is away hand their seat to someone else for a period, within rules the company sets; the stand-in only fills requirements whose roles they hold themselves, and their vote is marked as standing in. Approval fatigue detection, when turned on, warns when one person approves many change approvals in a short period. It warns and never blocks. See Stand-ins for approvers and Approval fatigue guard.
The approved version is the version that merged
Separation of duties is weakened if an approved change can be altered before it merges. Every Merge Pilot decision is for the merge request's latest commit and target branch. By default a new commit supersedes the change approval and a new one is opened for the new code. On GitLab the bot's approval is removed when commits are pushed; on GitHub a new commit has no passing check until Merge Pilot decides on it.
The compliance report shows both commits side by side: Merged Commit, Approved Commit and Merged Commit Approved. A policy can choose Keep the approval instead, and each time that applies it is written as change_approval_new_commits_kept, so the choice is visible to an auditor.
Bypasses are recorded
A VCS administrator can always bypass a merge gate. What matters to an audit is whether that is visible. Merge Pilot flags:
- merges the gate had not opened for the merged commit (Merged without approval);
- merges during a change freeze that held them;
- approvals withdrawn in the tracker after the merge;
- approvers who merged, when the policy flags or forbids it.
Changes that reached a covered branch without a merge request at all (a direct push, a force push, a deleted branch) are recorded as direct changes, marked as Violations on repositories under change management. Merge Pilot also checks gated repositories for loosened branch protection and records new gaps as protection_weakened. See What is flagged at merge.
Four-eyes on the rules themselves
Controls only hold if one person cannot quietly relax them. With Review control changes turned on (Company → Governance), changes to change policies, approver pools, risk settings and change freezes, sign-in settings and identity providers wait until a second person approves them.
- Nobody decides their own change.
- An administrator whose account the requester created, gave its role or set the password of cannot decide it either.
- Turning the review off is itself reviewed.
- API tokens cannot approve or reject a waiting change.
Every policy save is also a new version, and each merge request records the policy version that decided it. See Governance tab and Versions and history.
Evidence in the compliance report
Auditors usually ask for a period's changes and then sample them. The compliance report puts a period's records in one CSV or PDF file. It can be exported by platform admins, company admins and auditors, and each export is itself written to the audit log.
| What the auditor asks | Where it is in the report |
|---|---|
| Was it approved, and by whom? | Change Approval Key, Change Approval Status, Approved By, Approved At, Votes (with source: tracker or Merge Pilot) |
| Under which rules? | Policy, Policy Version, Change Type |
| Was the merged code the approved code? | Merged Commit, Approved Commit, Merged Commit Approved |
| Were duties separated? | Separation Of Duties (exceptions noted), SoD Violation |
| Was the gate bypassed? | Merged Without Approval, Merged In Freeze, Approval Revoked After Merge; in the PDF the Gate column shows BYPASSED, SOD BROKEN, IN FREEZE or REVOKED |
| Did anything skip the process? | The Changes Outside Change Management section |
| Who did what, when? | The Audit Trail section |
The auditor role is read-only: an auditor reads everything of their company, the audit log included, and exports the report, but changes nothing and cannot vote. See Roles and users.
A note on frameworks
Merge Pilot does not make an organisation compliant on its own. It keeps records that can help produce evidence for the change management controls that frameworks such as SOX IT general controls, SOC 2, PCI DSS, ISO/IEC 27001 and the EU's DORA regulation describe. Which records your auditor accepts, and how they map to your control descriptions, is a conversation with them. The Security page lists those frameworks with the records that relate to each.
Next steps
The Approvals & separation of duties feature page sums up the approval rules, and the Insights page covers the audit log and the compliance report. To walk through a sample audit with your own policies, ask for a demo.