stage18-threat-model.py
TEXT FILE402 B · Public source code for developers, search crawlers and AI agents
1REQUIRED = frozenset({'authority', 'network', 'budget', 'idempotency'})
2
3def missing_controls(evidence):
4 return sorted(key for key in REQUIRED if evidence.get(key) is not True)
5
6if __name__ == '__main__':
7 assert missing_controls({}) == sorted(REQUIRED)
8 assert missing_controls(dict.fromkeys(REQUIRED, True)) == []
9 assert missing_controls(dict.fromkeys(REQUIRED, 1)) == sorted(REQUIRED)Read-only source · Select a line number to link directly · Raw download above
