()
| 924 | |
| 925 | |
| 926 | def main(): |
| 927 | print("=" * 70) |
| 928 | print(" SECURITY HOOK TESTS") |
| 929 | print("=" * 70) |
| 930 | |
| 931 | passed = 0 |
| 932 | failed = 0 |
| 933 | |
| 934 | # Test command extraction |
| 935 | ext_passed, ext_failed = test_extract_commands() |
| 936 | passed += ext_passed |
| 937 | failed += ext_failed |
| 938 | |
| 939 | # Test chmod validation |
| 940 | chmod_passed, chmod_failed = test_validate_chmod() |
| 941 | passed += chmod_passed |
| 942 | failed += chmod_failed |
| 943 | |
| 944 | # Test init.sh validation |
| 945 | init_passed, init_failed = test_validate_init_script() |
| 946 | passed += init_passed |
| 947 | failed += init_failed |
| 948 | |
| 949 | # Test pattern matching (Phase 1) |
| 950 | pattern_passed, pattern_failed = test_pattern_matching() |
| 951 | passed += pattern_passed |
| 952 | failed += pattern_failed |
| 953 | |
| 954 | # Test YAML loading (Phase 1) |
| 955 | yaml_passed, yaml_failed = test_yaml_loading() |
| 956 | passed += yaml_passed |
| 957 | failed += yaml_failed |
| 958 | |
| 959 | # Test command validation (Phase 1) |
| 960 | validation_passed, validation_failed = test_command_validation() |
| 961 | passed += validation_passed |
| 962 | failed += validation_failed |
| 963 | |
| 964 | # Test blocklist enforcement (Phase 1) |
| 965 | blocklist_passed, blocklist_failed = test_blocklist_enforcement() |
| 966 | passed += blocklist_passed |
| 967 | failed += blocklist_failed |
| 968 | |
| 969 | # Test project commands (Phase 1) |
| 970 | project_passed, project_failed = test_project_commands() |
| 971 | passed += project_passed |
| 972 | failed += project_failed |
| 973 | |
| 974 | # Test org config loading (Phase 2) |
| 975 | org_loading_passed, org_loading_failed = test_org_config_loading() |
| 976 | passed += org_loading_passed |
| 977 | failed += org_loading_failed |
| 978 | |
| 979 | # Test hierarchy resolution (Phase 2) |
| 980 | hierarchy_passed, hierarchy_failed = test_hierarchy_resolution() |
| 981 | passed += hierarchy_passed |
| 982 | failed += hierarchy_failed |
| 983 |
no test coverage detected