docs: branch protection is a recommendation, not a blocker (operator decision)

The operator has decided not to enable branch protection on armistace/blog while the editor
is LAN-only:

  "leave it as a recommendation - I won't do that unless I take this out to the wider internet"

That is a reasonable call, so this records it as an ACCEPTED RISK rather than an open task.

Test behaviour changed to match. The suite still attempts a direct push to master with the
deploy key on EVERY run - the check is not removed, because that is what would catch the
setting being lost or never applied. But when protection is off it now reports
  ACCEPTED-RISK  master is NOT protected - the deploy key CAN push master directly
instead of FAIL, so the suite is green and CI-usable (it previously exited 1, meaning a
genuine regression would have been buried in expected noise).

The run flips back to "PASS master is protected" by itself the moment protection is enabled,
so the recommendation self-cancels with nobody having to remember it. Summary line now reads
  RESULT: 44 passed, 0 failed, 1 accepted-risk

Docs record WHY the risk is acceptable (the compensating control is reachability, not
immutability - nothing off-LAN can reach the editor, and the only LAN user is the operator)
and the two triggers that turn it back into a real finding:
  1. the editor becomes reachable off-LAN (NPM proxy, port-forward, VPN route)
  2. anyone other than the operator gets access
Written down because an accepted risk is only acceptable if it is explicit and has a
revisit trigger - otherwise it just looks like an oversight later.
This commit is contained in:
2026-09-29 16:40:49 +10:00
parent 1ff8aaf2f1
commit c57aff3c33
3 changed files with 53 additions and 10 deletions
+12 -5
View File
@@ -5,9 +5,10 @@
# ==============================================================================
W=/var/www/atheos
B=$W/workspace/blog
pass=0; fail=0
pass=0; fail=0; note=0
ok() { echo " PASS $1"; pass=$((pass+1)); }
bad() { echo " FAIL $1"; fail=$((fail+1)); }
note() { echo " ACCEPTED $1"; note=$((note+1)); }
chk() { if [ "$2" = "$3" ]; then ok "$1 ($2)"; else bad "$1 (got '$2', want '$3')"; fi; }
asuser() { su -s /bin/sh atheos -c "$1"; }
@@ -162,9 +163,15 @@ else
if echo "$PUSH_OUT" | grep -qiE 'protected|not allowed|denied|forbidden|remote rejected'; then
ok "master is protected - the deploy key CANNOT push it"
else
bad "master is NOT protected - the deploy key could push master directly!"
echo " Enable it: armistace/blog -> Settings -> Branches -> add rule for 'master',"
echo " Enable push = OFF, merge whitelist = armistace. See docs/writer-branch-workflow.md"
# ACCEPTED RISK, not a failure. The operator has decided NOT to enable branch protection
# while this editor is LAN-only; the control is "it is not reachable off-LAN", not "master
# is immutable". So this is reported, not failed - but it is checked on EVERY run, so the
# moment protection does go on, the run says so and the recommendation below becomes moot.
note "master is NOT protected - the deploy key CAN push master directly"
echo " ACCEPTED because the editor is LAN-only (see docs/writer-branch-workflow.md)."
echo " BECOMES A REAL FINDING THE MOMENT THIS HOST IS REACHABLE OFF-LAN. Before that:"
echo " armistace/blog -> Settings -> Branches -> add rule for 'master'"
echo " Enable push = OFF, merge whitelist = armistace"
fi
fi
@@ -211,6 +218,6 @@ echo " listening ports: $(netstat -tln 2>/dev/null | awk '/LISTEN/{split($4,a,"
echo
echo "=============================================================="
printf 'RESULT: %d passed, %d failed\n' "$pass" "$fail"
printf 'RESULT: %d passed, %d failed, %d accepted-risk\n' "$pass" "$fail" "$note"
echo "=============================================================="
[ "$fail" -eq 0 ] || exit 1