pre-commit-hooks/testing/resources
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
..
aws_config_with_multiple_sections.ini Fix end of files 2017-07-02 21:22:35 -07:00
aws_config_with_secret.ini Improve searching for configured AWS credentials 2016-12-30 08:41:24 +01:00
aws_config_with_secret_and_session_token.ini Fix end of files 2017-07-02 21:22:35 -07:00
aws_config_with_session_token.ini Fix end of files 2017-07-02 21:22:35 -07:00
aws_config_without_secrets.ini Improve searching for configured AWS credentials 2016-12-30 08:41:24 +01:00
aws_config_without_secrets_with_spaces.ini dding the file aws_config_without_secrets_with_spaces.ini for new test case 2018-01-26 15:22:32 -08:00
azure_credentials.txt Add Azure credential detection hook 2025-12-16 05:11:45 +00:00
azure_no_credentials.txt Add Azure credential detection hook 2025-12-16 05:11:45 +00:00
bad_json.notjson Add a hook for checking parseable json. 2014-08-19 16:03:48 -07:00
bad_json_latin1.nonjson Apply typing to all of pre-commit-hooks 2019-01-31 20:09:15 -08:00
bad_xml.notxml Add check-xml hook. 2015-01-17 10:30:58 -08:00
bad_yaml.notyaml Add a hook for yaml files. 2014-04-03 21:36:03 -07:00
cannot_parse_ast.notpy Give a better message when ast is not parseable. 2014-06-19 17:44:40 -07:00
does_exist new hook tests for broken symlinks 2016-01-14 15:25:46 -08:00
duplicate_key_json.notjson Rename file causing check-json to fail 2021-05-15 12:31:33 +02:00
img1.jpg Fix check-merge-conflict against binary files 2016-05-26 11:20:32 -07:00
non_ascii_pretty_formatted_json.json Add unit test for --no-ensure-ascii option 2017-03-20 20:19:01 +08:00
nonsense.txt add tests, test sample files and minor refactor of exit codes in actual hook in order to facilitate testing 2015-06-12 19:20:56 +04:00
not_pretty_formatted_json.json Adjust formatting for existing test_pretty_format_json 2016-04-14 10:41:39 +01:00
ok_json.json Add a hook for checking parseable json. 2014-08-19 16:03:48 -07:00
ok_xml.xml Add check-xml hook. 2015-01-17 10:30:58 -08:00
ok_yaml.yaml Add a hook for yaml files. 2014-04-03 21:36:03 -07:00
pretty_formatted_json.json Add new hook pretty-format-json 2015-06-11 00:08:03 -04:00
tab_pretty_formatted_json.json Refactor legacy indent: int -> indent: str 2016-06-12 19:19:07 +02:00
top_sorted_json.json add test to show how it works a bit more 2016-11-03 18:05:43 -07:00
unsorted_pretty_formatted_json.json Add test for '--no-sort-keys' 2016-04-14 10:41:39 +01:00