D-FILES-05.py
1 """ 2 Rule: D-FILES-05 - forbidden file types 3 Type: semantic | Output: binary 4 Description: Reject when file extensions are blocked by policy. 5 Spec reference: 8.1.1 6 """ 7 8 # TODO: Implement forbidden file types 9 # TODO: Implement forbidden file types 10 # Output: {"passed": bool} 11 # Output: {"passed": bool} 12 # Steps: 13 # Steps: 14 # 2. Extract 'files' array from entry 15 # 2. Extract 'files' array from entry 16 # 4. Check if extension in blacklist 17 # 4. Check if extension in blacklist 18 19 # Edge cases: 20 # Edge cases: 21 # - Double extensions 22 # - Double extensions 23 # - Case sensitivity 24 # - Case sensitivity 25 # Dependencies: None (stdlib) 26 # Dependencies: None (stdlib) 27 # Priority: High (malware prevention in media torrents) 28 # Priority: High (malware prevention in media torrents) 29 from simple_types import BinaryRuleResult, Nip35Kind2003Event 30 31 32 def main(entry: Nip35Kind2003Event) -> BinaryRuleResult: 33 return {"passed": True}