Coverage report: 31%

Files Functions Classes

coverage.py v7.12.0, created at 2025-12-18 22:27 +0000

File function   statements missing excluded   coverage
netrun / rbac / __init__.py (no function)   8 0 0   100%
netrun / rbac / dependencies.py get_current_user   1 1 0   0%
netrun / rbac / dependencies.py require_role   2 0 0   100%
netrun / rbac / dependencies.py require_role.role_checker   9 0 0   100%
netrun / rbac / dependencies.py require_roles   2 0 0   100%
netrun / rbac / dependencies.py require_roles.role_checker   8 1 0   88%
netrun / rbac / dependencies.py require_owner   1 0 0   100%
netrun / rbac / dependencies.py require_admin   1 0 0   100%
netrun / rbac / dependencies.py require_member   1 0 0   100%
netrun / rbac / dependencies.py check_resource_ownership   7 0 0   100%
netrun / rbac / dependencies.py require_owner_or_self   2 2 0   0%
netrun / rbac / dependencies.py require_owner_or_self.access_checker   10 10 0   0%
netrun / rbac / dependencies.py (no function)   14 0 0   100%
netrun / rbac / exceptions.py RBACException.__init__   3 0 0   100%
netrun / rbac / exceptions.py InsufficientPermissionsError.__init__   4 0 0   100%
netrun / rbac / exceptions.py TenantIsolationError.__init__   1 1 0   0%
netrun / rbac / exceptions.py ResourceOwnershipError.__init__   1 1 0   0%
netrun / rbac / exceptions.py InvalidRoleError.__init__   2 2 0   0%
netrun / rbac / exceptions.py MissingTenantContextError.__init__   1 1 0   0%
netrun / rbac / exceptions.py (no function)   12 0 0   100%
netrun / rbac / models.py RoleHierarchy.has_permission   5 0 0   100%
netrun / rbac / models.py RoleHierarchy.check_role_permission   8 0 0   100%
netrun / rbac / models.py RoleHierarchy.get_role_level   5 0 0   100%
netrun / rbac / models.py (no function)   40 0 0   100%
netrun / rbac / policies.py RLSPolicyGenerator.enable_rls   1 0 0   100%
netrun / rbac / policies.py RLSPolicyGenerator.disable_rls   1 0 0   100%
netrun / rbac / policies.py RLSPolicyGenerator.create_tenant_isolation_policy   1 0 0   100%
netrun / rbac / policies.py RLSPolicyGenerator.create_read_only_policy   1 0 0   100%
netrun / rbac / policies.py RLSPolicyGenerator.create_insert_only_policy   1 0 0   100%
netrun / rbac / policies.py RLSPolicyGenerator.drop_policy   1 0 0   100%
netrun / rbac / policies.py RLSPolicyGenerator.generate_rls_for_table   6 0 0   100%
netrun / rbac / policies.py RLSPolicyGenerator.generate_migration_up   18 6 0   67%
netrun / rbac / policies.py RLSPolicyGenerator.generate_migration_down   11 2 0   82%
netrun / rbac / policies.py (no function)   22 0 0   100%
netrun / rbac / tenant.py TenantContext.__init__   2 2 0   0%
netrun / rbac / tenant.py TenantContext.to_dict   1 1 0   0%
netrun / rbac / tenant.py set_tenant_context   7 7 0   0%
netrun / rbac / tenant.py clear_tenant_context   3 3 0   0%
netrun / rbac / tenant.py get_current_tenant_id   3 3 0   0%
netrun / rbac / tenant.py get_current_user_id   3 3 0   0%
netrun / rbac / tenant.py get_db_with_rls   2 2 0   0%
netrun / rbac / tenant.py get_db_with_rls.dependency   0 0 1   100%
netrun / rbac / tenant.py (no function)   15 0 0   100%
netrun / rbac / testing.py EscapePathFinding.__str__   1 1 0   0%
netrun / rbac / testing.py SessionFactoryProtocol.__call__   1 1 0   0%
netrun / rbac / testing.py assert_tenant_isolation   19 19 0   0%
netrun / rbac / testing.py assert_tenant_isolation_sync   4 4 0   0%
netrun / rbac / testing.py TenantTestContext.__init__   9 9 0   0%
netrun / rbac / testing.py TenantTestContext.__aenter__   9 9 0   0%
netrun / rbac / testing.py TenantTestContext.__aexit__   7 7 0   0%
netrun / rbac / testing.py TenantTestContext._set_tenant   3 3 0   0%
netrun / rbac / testing.py TenantTestContext.switch_to_tenant_a   3 3 0   0%
netrun / rbac / testing.py TenantTestContext.switch_to_tenant_b   3 3 0   0%
netrun / rbac / testing.py TenantTestContext.switch_to_tenant   3 3 0   0%
netrun / rbac / testing.py TenantTestContext.clear_tenant_context   5 5 0   0%
netrun / rbac / testing.py TenantTestContext.get_current_tenant   3 3 0   0%
netrun / rbac / testing.py TenantTestContext.get_context_history   1 1 0   0%
netrun / rbac / testing.py tenant_test_context   3 3 0   0%
netrun / rbac / testing.py BackgroundTaskTenantContext.__init__   4 4 0   0%
netrun / rbac / testing.py BackgroundTaskTenantContext.run   3 3 0   0%
netrun / rbac / testing.py BackgroundTaskTenantContext.run.wrapped   11 11 0   0%
netrun / rbac / testing.py BackgroundTaskTenantContext.get_session   6 6 0   0%
netrun / rbac / testing.py preserve_tenant_context   3 3 0   0%
netrun / rbac / testing.py preserve_tenant_context.decorator   2 2 0   0%
netrun / rbac / testing.py preserve_tenant_context.decorator.wrapper   2 2 0   0%
netrun / rbac / testing.py TenantEscapePathScanner.__init__   8 8 0   0%
netrun / rbac / testing.py TenantEscapePathScanner.scan_query   9 9 0   0%
netrun / rbac / testing.py TenantEscapePathScanner.scan_file   18 18 0   0%
netrun / rbac / testing.py TenantEscapePathScanner.scan_directory   16 16 0   0%
netrun / rbac / testing.py TenantEscapePathScanner.generate_report   29 29 0   0%
netrun / rbac / testing.py ci_fail_on_findings   10 10 0   0%
netrun / rbac / testing.py pytest_configure   2 2 0   0%
netrun / rbac / testing.py tenant_isolation_test   3 3 0   0%
netrun / rbac / testing.py tenant_isolation_test.wrapper   14 14 0   0%
netrun / rbac / testing.py get_compliance_documentation   8 8 0   0%
netrun / rbac / testing.py (no function)   72 0 0   100%
netrun / rbac / tests / __init__.py (no function)   0 0 0   100%
netrun / rbac / tests / conftest.py pytest_configure   5 5 0   0%
netrun / rbac / tests / conftest.py (no function)   2 2 0   0%
netrun / rbac / tests / test_tenant_isolation.py mock_session   5 5 0   0%
netrun / rbac / tests / test_tenant_isolation.py mock_session.mock_execute   15 15 0   0%
netrun / rbac / tests / test_tenant_isolation.py tenant_a_id   1 1 0   0%
netrun / rbac / tests / test_tenant_isolation.py tenant_b_id   1 1 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestTenantIsolation.test_cross_tenant_read_impossible   9 9 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestTenantIsolation.test_cross_tenant_write_impossible   6 6 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestTenantIsolation.test_cross_tenant_delete_impossible   6 6 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestQueryIsolation.test_query_without_tenant_filter_fails   5 5 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestQueryIsolation.test_query_with_tenant_filter_passes   3 3 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestQueryIsolation.test_pagination_without_tenant_filter_fails   3 3 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestQueryIsolation.test_pagination_with_tenant_filter_passes   3 3 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestQueryIsolation.test_sync_assertion_works   3 3 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestQueryIsolation.test_allowed_patterns_bypass_check   3 3 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestQueryIsolation.test_raw_sql_string_validation   5 5 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestBackgroundTaskContext.test_background_task_preserves_tenant   8 8 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestBackgroundTaskContext.test_background_task_preserves_tenant.capture_tenant_context   2 2 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestBackgroundTaskContext.test_background_task_logs_correlation_id   4 4 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestBackgroundTaskContext.test_preserve_tenant_context_decorator   8 8 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestBackgroundTaskContext.test_preserve_tenant_context_decorator.process_items   3 3 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestBackgroundTaskContext.test_preserve_tenant_context_decorator.decorated_process   1 1 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestTenantTestContext.test_context_initializes_tenant_a   3 3 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestTenantTestContext.test_context_switch_works   6 6 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestTenantTestContext.test_context_custom_tenant   4 4 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestTenantTestContext.test_context_history_tracking   8 8 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestTenantTestContext.test_functional_context_manager   4 4 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestEscapePathScanner.test_scanner_detects_raw_select   5 5 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestEscapePathScanner.test_scanner_detects_raw_update   5 5 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestEscapePathScanner.test_scanner_detects_raw_delete   5 5 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestEscapePathScanner.test_scanner_allows_safe_queries   5 5 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestEscapePathScanner.test_scanner_report_formats   9 9 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestEscapePathScanner.test_custom_patterns   6 6 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestCIIntegration.test_ci_passes_on_no_findings   2 2 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestCIIntegration.test_ci_fails_on_critical_findings   3 3 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestCIIntegration.test_ci_fails_on_high_findings   3 3 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestCIIntegration.test_ci_passes_on_medium_findings   3 3 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestCIIntegration.test_ci_custom_fail_levels   3 3 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestComplianceDocumentation.test_compliance_documentation_exists   6 6 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestComplianceDocumentation.test_compliance_mapping_complete   7 7 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestEdgeCases.test_empty_tenant_context_handling   4 4 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestEdgeCases.test_unicode_tenant_ids   3 3 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestEdgeCases.test_very_long_tenant_ids   3 3 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestEdgeCases.test_query_with_subquery   2 2 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestEdgeCases.test_query_with_join   2 2 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestPostgreSQLIntegration.db_session   6 6 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestPostgreSQLIntegration.test_rls_blocks_cross_tenant_read   1 1 0   0%
netrun / rbac / tests / test_tenant_isolation.py TestPostgreSQLIntegration.test_rls_blocks_cross_tenant_write   1 1 0   0%
netrun / rbac / tests / test_tenant_isolation.py pytest_collection_modifyitems   5 5 0   0%
netrun / rbac / tests / test_tenant_isolation.py (no function)   111 111 2   0%
Total     867 596 3   31%

No items found using the specified filter.