Safeguard
Compliance•

Should security policies live in Git? Versioning and approval

Policies in Git give you version history, named approvers and diffs auditors can read. Here is how to set it up and where the approach falls short.

Safeguard Security Team
4 min read

Yes, for most engineering teams. Storing policies as Markdown in a Git repository gives you version history, a named approver for every change, and a diff showing exactly what changed and when. You need branch protection and code owners so approval is enforced, plus a way to show non-engineers the current version.

What auditors want from a policy

Auditors usually ask four things about a policy: is it current, who approved it, when was it last reviewed, and have staff seen it. A Word file on a shared drive can answer these, but the answers depend on file metadata and memory. A Git repository answers them from records that are hard to alter quietly.

QuestionShared drive answerGit answer
Who approved this version?Email or a signature pageApproving review on the merge request
What changed since last year?Compare two files by handDiff between two tags
When did it take effect?Date in the headerMerge commit or release tag
Can someone edit it quietly?PossiblyNot without a commit on record

Setting it up

  1. Create a repository, for example policies, with one Markdown file per policy.
  2. Add a front matter block at the top: owner, version, last reviewed date, next review date.
  3. Turn on branch protection for the main branch so changes need a pull request and at least one approval.
  4. Add a CODEOWNERS file so each policy file requires review from its named owner. GitHub's documentation says owners must have explicit write access, and that when a line lists several owners, approval from any one of them satisfies the requirement. Decide whether that is what you want for each policy.
  5. Tag each approved release, for example 2026-10.
  6. Publish a rendered version somewhere staff can read it, and record acknowledgements in your HR or learning system.

GitHub also lets you require that the most recent reviewable push is approved by someone other than the person who pushed it, which stops an author approving their own late edit. It is optional, so switch it on deliberately.

Where Git falls short

  • Non-engineers may find pull requests unfriendly. Let them comment on a rendered copy, with an engineer committing the change.
  • Admin bypass is on by default for branch protection unless you enable the setting that stops it. If administrators can merge without review, say so in the narrative and review the bypass list.
  • Acknowledgements are not a Git feature. Keep them in a system that records who accepted which version.
  • If the repository moves or is deleted, so does your history. Keep a backup.

A minimal front matter block

policy: Access Control Policy
owner: Head of Platform
version: 3.2
approved: 2026-09-14
next_review: 2027-09-14

Add a CI check that fails when next_review is in the past. That turns "we forgot to review it" into a failing build someone has to fix.

Try it yourself

Click through it at your own pace, or open it full screen. Watch how a gate blocks a merge until the required conditions are met, then picture the same rule applied to a policy change.

Quick check

Is a Git approval a valid policy approval?

It can be, if your policy says so and the approver has the authority. Many teams also keep a signed approval from an executive for top-level policies.

How often should policies be reviewed?

At least annually is common, and again after a significant change. Your own policy sets the rule, and you must follow it.

Safeguard offers policies, gates and guardrails plus compliance and evidence automation, so the same review and approval records can feed your control evidence. A free scan is at gold.safeguard.sh/scan.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.