docs(security): reconcile branch-protection pages with the main-branch - #2759
Open
Jamie Kim (jkim323) wants to merge 3 commits into
Open
docs(security): reconcile branch-protection pages with the main-branch#2759Jamie Kim (jkim323) wants to merge 3 commits into
Jamie Kim (jkim323) wants to merge 3 commits into
Conversation
…h-protection ruleset - describe the ruleset as the governing mechanism and drop classic UI steps - document stale-review dismissal as unenforced with its compensating control - correct review counts, required checks, and the Scorecard score to 9 - add the previously undocumented merge, history, and quality controls 🔐 - Generated by Copilot
Contributor
Eval Execution |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2759 +/- ##
==========================================
- Coverage 83.16% 82.96% -0.20%
==========================================
Files 180 181 +1
Lines 32168 32698 +530
Branches 25 25
==========================================
+ Hits 26751 27127 +376
- Misses 5414 5568 +154
Partials 3 3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Jamie Kim (jkim323)
marked this pull request as ready for review
August 24, 2026 02:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Both branch-protection documentation pages described classic branch protection, which no longer governs
main. They now describe the repository rulesetmain-branch-protection(id9453100,source_type: Repository,enforcement: active), verified against the live GitHub API.The most consequential correction is a security claim. Both pages stated that stale approvals are dismissed when new commits are pushed. They are not:
dismiss_stale_reviews_on_pushisfalse. That control was assessed and accepted as a gap in #2461, so the pages were publicly contradicting the triage record. Both pages now document the gap explicitly and namerequire_last_push_approvalas the compensating control.The pages were also wrong in the opposite direction, understating the repository's posture:
main-branch-protectionValidate Dependency Pinningandnpm Security Auditwere listed as required and are not. They are now named as non-required alongsideMarkdown Link Check.A third page carried the same claim from the other direction.
docs/security/dependency-pinning.mddescribed the branch-protection page as covering "required status checks including dependency pinning", which this PR directly contradicts. That line now points at the branch-protection page without restating any gate status, so the branch-protection page stays the single place that answers what gates a merge. The wording was chosen so it remains accurate whichever way #2760 resolves.Five controls had no documentation at all and are now covered:
required_review_thread_resolution,require_extra_approval_for_unattributed_changes, squash-only merges,non_fast_forwardand deletion protection, and thecode_qualityrule aterrorsseverity.Each branch-protection page now carries the
gh apicommands that reproduce every documented value, so a future reader can re-verify the pages instead of trusting them.No repository setting, workflow, ruleset, or runtime behavior is changed by this PR.
Sourcing note
The
require_extra_approval_for_unattributed_changesdescription is cited to GitHub's available rules for rulesets. The rule is narrower than its parameter name suggests: it applies to pull requests Copilot opens under its own app identity, not to unattributed authorship generally. Both pages state that GitHub enables it by default and lists it as public preview, so its presence is not presented as a deliberate configuration choice.Related Issue(s)
Fixes #2755
Related: #2461 (the accepted stale-review-dismissal gap that these pages contradicted)
Related: #2760 (open question on whether
PR Validation Successshould be a required status check; raised from this work, and the reason the dependency-pinning cross-reference avoids asserting gate status)Type of Change
Select all that apply:
Code & Documentation:
Infrastructure & Configuration:
AI Artifacts:
hve-builderand addressed all actionable findings.github/instructions/*.instructions.md).github/prompts/*.prompt.md).github/agents/*.agent.md).github/skills/*/SKILL.md).github/hooks/*/*.json)evals/)Other:
.ps1,.sh,.py)Sample Prompts (for AI Artifact Contributions)
Testing
Documentation-only change. No manual testing was performed beyond reading the rendered pages.
Source verification
Every documented value was read back from the live API rather than taken from the previous page text or the issue body:
gh api repos/microsoft/hve-core/rules/branches/mainfor all five active rules and everypull_requestparametergh api repos/microsoft/hve-core/rulesets/9453100for ruleset identity, enforcement, bypass actors, and conditionsgh api repos/microsoft/hve-core/branches/mainto confirm classic protection is inertAutomated validation
npx markdownlint-cli2npm run lint:tablespwsh ./scripts/linting/Validate-MarkdownFrontmatter.ps1 -WarningsAsErrors -EnableSchemaValidationnpx cspellpwsh ./scripts/linting/Markdown-Link-Check.ps1 -Path <file>Two findings were surfaced and fixed during validation:
lint:tablesrequired aformat:tablespass after the tables were rewritten, andmarkdownlintreportedMD013line-length violations on two new paragraphs, which were wrapped. The dependency-pinning page passed all five checks on the first run.Checklist
Required Checks
AI Artifact Contributions
hve-builderreview mode to review contributionhve-builderreviewRequired Local Checks
The following local-safe validation commands must pass before merging:
npm run validate:local(not yet run)npm run validate:docs(not yet run; this aggregate covers Docusaurus lint, labels, typecheck, and component tests, none of which exercise the Markdown checks that gate these files)npm run spell-check(equivalentnpx cspellrun passed scoped to all three changed files; the repository-wide script has not been run)npm run lint:md-links(equivalent per-file script run passed for all three changed files; the repository-wide script has not been run)Security Considerations
All configuration values reproduced in these pages are already public: they are readable by anyone with repository access through the documented
gh apicommands, and the same values were published in the #2461 triage comment.This PR documents a security control that is not enforced. That is deliberate. The alternative, silently deleting the incorrect claim, would leave readers with the same false impression the pages already created, and would not match the accepted-risk record in #2461.
Additional Notes
Deliberately out of scope
Maintenance triggers
dismiss_stale_reviews_on_push, both pages and [Security][high] Branch-Protection #2461 need a follow-up update.PR Validation Successshould be a required status check #2760 resolves by addingPR Validation Successto the required set, the required-status-check section of the contributing page needs updating. The dependency-pinning cross-reference was deliberately worded to need no change in that case.Heading changes
The contributing page's "Configuration Reference" subsections were replaced and "Future Considerations" became "Change Management". No internal link in the repository targets an anchor on either page, so nothing breaks, but external deep links to those anchors would not survive.