pre-commit-hooks/pre_commit_hooks
Dimitri Vasdekis 7a894b3c98
Add Azure credential detection hook
Implements detect-azure-credentials hook based on Microsoft AzSK credential patterns.

Features:
- 33 credential detection patterns aligned with official AzSK specification
- Covers Azure-specific credentials (Data Factory, Storage, DevOps, etc.)
- Detects generic secrets (passwords, API keys, tokens, certificates)
- Comprehensive test suite with 22 test cases
- Pattern name identification in output for easier debugging

Patterns include (CSCAN codes):
- Azure Data Factory SHIR keys (0010)
- Azure Storage credentials (0020, 0040)
- App Service deployment secrets (0050)
- Connection strings and passwords (0090, 0100, 0120)
- Machine keys and network credentials (0130, 0150)
- DevOps PAT tokens (0160)
- PublishSettings passwords (0030)
- PEM private keys (0060)
- Git credentials (0210)
- JWT and refresh tokens (0250)
- Ansible Vault (0260)
- Azure PowerShell token cache (0270)
- Default/known passwords (0140)

All tests passing (22 Azure + 36 AWS = 58 total)
2025-12-16 05:11:45 +00:00
..
__init__.py Initial commit. 2014-03-13 08:41:35 -07:00
check_added_large_files.py py39+ 2024-10-11 19:30:07 -04:00
check_ast.py py39+ 2024-10-11 19:30:07 -04:00
check_builtin_literals.py fix nested calls for check-builtin-literals 2025-10-16 09:30:42 -04:00
check_case_conflict.py py39+ 2024-10-11 19:30:07 -04:00
check_docstring_first.py py39+ 2024-10-11 19:30:07 -04:00
check_executables_have_shebangs.py py39+ 2024-10-11 19:30:07 -04:00
check_json.py py39+ 2024-10-11 19:30:07 -04:00
check_merge_conflict.py py39+ 2024-10-11 19:30:07 -04:00
check_shebang_scripts_are_executable.py Fix grammar of check-shebang-scripts error 2024-12-18 19:58:24 -08:00
check_symlinks.py py39+ 2024-10-11 19:30:07 -04:00
check_toml.py py39+ 2024-10-11 19:30:07 -04:00
check_vcs_permalinks.py py39+ 2024-10-11 19:30:07 -04:00
check_xml.py py39+ 2024-10-11 19:30:07 -04:00
check_yaml.py py39+ 2024-10-11 19:30:07 -04:00
debug_statement_hook.py py39+ 2024-10-11 19:30:07 -04:00
destroyed_symlinks.py py39+ 2024-10-11 19:30:07 -04:00
detect_aws_credentials.py py39+ 2024-10-11 19:30:07 -04:00
detect_azure_credentials.py Add Azure credential detection hook 2025-12-16 05:11:45 +00:00
detect_private_key.py py39+ 2024-10-11 19:30:07 -04:00
end_of_file_fixer.py py39+ 2024-10-11 19:30:07 -04:00
file_contents_sorter.py py310+ 2025-10-09 17:44:52 -04:00
fix_byte_order_marker.py py39+ 2024-10-11 19:30:07 -04:00
forbid_new_submodules.py py39+ 2024-10-11 19:30:07 -04:00
mixed_line_ending.py py39+ 2024-10-11 19:30:07 -04:00
no_commit_to_branch.py py39+ 2024-10-11 19:30:07 -04:00
pretty_format_json.py py39+ 2024-10-11 19:30:07 -04:00
removed.py py39+ 2024-10-11 19:30:07 -04:00
requirements_txt_fixer.py py39+ 2024-10-11 19:30:07 -04:00
sort_simple_yaml.py py39+ 2024-10-11 19:30:07 -04:00
string_fixer.py py39+ 2024-10-11 19:30:07 -04:00
tests_should_end_in_test.py py39+ 2024-10-11 19:30:07 -04:00
trailing_whitespace_fixer.py py39+ 2024-10-11 19:30:07 -04:00
util.py drop python3.6 support 2022-01-15 19:24:05 -05:00