Skip to content

[Docs] Branch protection docs contradict the live main-branch-protection ruleset #2755

Description

@jkim323

Summary

Both branch-protection documentation pages describe a configuration that no longer matches the repository. main is now governed by the repository ruleset main-branch-protection (id 9453100, source_type: Repository, enforcement: active), while classic branch protection is inert (protected: true, protection.enabled: false).

The most consequential mismatch: both pages state that stale-review dismissal is enforced. It is not. That control was accepted as a known gap in #2461, and the triage comment there is now publicly inconsistent with these pages.

Affected files:

Live configuration (verified 2026-08-23)

gh api repos/microsoft/hve-core/rules/branches/main
gh api repos/microsoft/hve-core/rulesets
gh api repos/microsoft/hve-core/branches/main --jq '{protected, protection}'

pull_request rule parameters:

Parameter Value
required_approving_review_count 2
dismiss_stale_reviews_on_push false
require_code_owner_review true
require_last_push_approval true
required_review_thread_resolution true
require_extra_approval_for_unattributed_changes true
dismissal_restriction disabled
allowed_merge_methods ["squash"]

Other active rules: deletion, non_fast_forward, code_quality (severity: errors), required_status_checks (strict_required_status_checks_policy: true).

Required status check contexts:

  • Spell Check / Spell Check
  • Frontmatter Validation / Validate Markdown Frontmatter
  • Markdown Lint / Markdown Lint
  • PowerShell Lint / PowerShell Lint
  • Table Format Check / Table Format Check
  • CodeQL Security Analysis / CodeQL Analysis (actions)

Drift inventory

docs/security/branch-protection.md

Current text Problem
Required Controls lists "Dismiss stale approvals when new commits are pushed" Not enforced (false). Accepted as a gap in #2461
No mention of the compensating control require_last_push_approval is the basis for accepting that gap and should be stated

docs/contributing/branch-protection.md

Current text Live value
Required reviewers: 1 2
Dismiss stale reviews: Enabled false
Required checks include Validate Dependency Pinning, npm Security Audit Not in the required set
"expected OpenSSF Scorecard Branch Protection score is ~8/10" Actual score is 9
"Achieving 10/10 requires 2 reviewers" 2 reviewers are already configured; this is not the remaining gap
"Navigate to: Settings → Branches → Branch protection rules → Edit main" Settings → Rules → Rulesets → main-branch-protection
Future Considerations: "Consider migrating to Rulesets" Migration already happened
Not documented required_review_thread_resolution, require_extra_approval_for_unattributed_changes, squash-only merges, non_fast_forward, deletion protection, code_quality rule

Acceptance criteria

  • Both pages describe the ruleset as the governing mechanism and drop classic branch-protection UI instructions
  • Stale-review dismissal is documented as not currently enforced, with require_last_push_approval named as the compensating control and [Security][high] Branch-Protection #2461 linked
  • Review-requirement and status-check tables match the live ruleset
  • Scorecard section reflects the actual score of 9 and identifies stale-review dismissal as the sole remaining deduction
  • Previously undocumented controls are added
  • ms.date frontmatter is refreshed on both pages per repository convention
  • Cross-links between the two pages still resolve

Notes

Verification-only; no runtime behavior changes. If the ruleset is later changed to enable dismiss_stale_reviews_on_push, both pages and #2461 need a follow-up update.

Metadata

Metadata

Labels

documentationImprovements or additions to documentationsecuritySecurity-related changes or concernsstale-docsDocumentation that has not been updated recently

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions