Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions docs/security-promod-autofill-policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Security release: preserve the private Auto-Fill policy

A read-only production `bot_status` check on 2026-10-27 found Auto-Fill disabled,
with limit12. The first pinned security image used catalog9f0fa1a, whose final
Promod rules forced `bot_enable "1"` after private configuration. Deploying that
image would enable an unrelated gameplay policy during the security freeze.

Remove the final forced enable directive. Shared defaults and final mode rules
now leave the private/operator choice intact. The reviewed native engine defaults
Auto-Fill off, so no private enable directive also remains off. Explicit private
enabling and existing administration commands retain their normal authority.
Capacity, the fill limit, map rotation and integrity policy are unchanged.

The regression checks model the documented shared → private → final-mode order.
They fail against9f0fa1a for both the off default and an explicit private off
choice, and pass after this change; an explicit private on choice also survives.
Actual runtime confirmation still requires rebuilding with the new approved
config revision and querying the isolated/homolog candidate.

This PR changes no running service, secret or production file. The previously
built image remains preserved and is not edited or promoted. After owner review,
mandatory CI and a manual merge, bind a reviewed preparation driver to the exact
new config commit, rebuild through that driver, verify the new image/CFG hashes
and requalify the affected runtime behavior. Do not reuse the old image's approval
or substitute configuration under its digest. Homologation deployment and any
production release require separate explicit operator approval.
4 changes: 2 additions & 2 deletions modes/promod/server.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ set g_voteMaxVotes "2"
set g_voteAbstainWeight "1"
set g_voteCooldown "5"

// Mode owns the existing Bot Warfare auto-fill policy.
set bot_enable "1"
// Security release: retain the private/operator Auto-Fill enable policy.
// The engine default is off; do not override an explicit private choice here.
set bot_fill_limit "12"
set sv_mapRotationCurrent ""
46 changes: 46 additions & 0 deletions tests/test_promod_security_policy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
"""Canonical rules run after private CFGs and must not silently enable Auto-Fill."""
from pathlib import Path
import shlex
import unittest

ROOT = Path(__file__).resolve().parents[1]


def apply_catalog_cfg(settings, path):
for line in path.read_text().splitlines():
line = line.strip()
if not line or line.startswith('//'):
continue
words = shlex.split(line)
# These catalogs are data-only set commands; reject an unreviewed command
# rather than silently ignoring a future indirect policy override.
if len(words) != 3 or words[0].lower() != 'set':
raise AssertionError('Unreviewed catalog command in ' + str(path))
settings[words[1].lower()] = words[2]


class PromodSecurityPolicy(unittest.TestCase):
def resolve(self, private_choice=None):
# Native SV_BotManagerInit at the reviewed release revision defaults off.
settings = {'bot_enable': '0'}
apply_catalog_cfg(settings, ROOT / 'shared/server.cfg')
if private_choice is not None:
settings['bot_enable'] = private_choice
apply_catalog_cfg(settings, ROOT / 'modes/promod/server.cfg')
return settings

def test_security_release_does_not_enable_default_autofill(self):
self.assertEqual(self.resolve()['bot_enable'], '0')

def test_private_autofill_choice_survives_final_mode_rules(self):
for choice in ('0', '1'):
with self.subTest(private_choice=choice):
settings = self.resolve(choice)
self.assertEqual(settings['bot_enable'], choice)
self.assertEqual(settings['bot_fill_limit'], '12')
self.assertEqual(settings['sv_pure'], '1')
self.assertEqual(settings['g_gametype'], 'sd')


if __name__ == '__main__':
unittest.main()
Loading