Skip to content

fix(azure_storage_key): broaden azure storage account key pattern#292

Merged
lirshindalman merged 1 commit intomasterfrom
fix/azure-storage-key-flexible-account-pattern
Mar 17, 2026
Merged

fix(azure_storage_key): broaden azure storage account key pattern#292
lirshindalman merged 1 commit intomasterfrom
fix/azure-storage-key-flexible-account-pattern

Conversation

@yuvalmich
Copy link

@yuvalmich yuvalmich commented Mar 16, 2026

  • Changed account_key context pattern from literal 'AccountKey' to regex 'account[_]?k(?:ey)?\b' (case-insensitive) to match variable names like STORAGE_ACCOUNT_K, STORAGE_ACCOUNT_KEY, account_key, AccountKey, etc.
  • Narrowed denylist base64 range from {86,1000} to {86,88} to match actual Azure Storage key length (64 bytes = 86 base64 chars + '==')
  • Updated early-exit optimization to use regex-based check instead of literal string match
  • Added unit test for STORAGE_ACCOUNT_K= pattern
  • Please check if the PR fulfills these requirements
  • Tests for the changes have been added
  • Docs have been added / updated
  • All CI checks are green
  • What kind of change does this PR introduce?
  • What is the current behavior?
  • What is the new behavior (if this is a feature change)?

  • Does this PR introduce a breaking change?

  • Other information:

@yuvalmich yuvalmich changed the title fix(azure_storage_key): broaden account key pattern to catch flexible… fix(azure_storage_key): broaden azure storage account key pattern Mar 16, 2026
… variable names

- Changed account_key context pattern from literal 'AccountKey' to regex
  'account[_]?k(?:ey)?\b' (case-insensitive) to match variable names like
  STORAGE_ACCOUNT_K, STORAGE_ACCOUNT_KEY, account_key, AccountKey, etc.
- Narrowed denylist base64 range from {86,1000} to {86,88} to match actual
  Azure Storage key length (64 bytes = 86 base64 chars + '==')
- Updated early-exit optimization to use regex-based check instead of
  literal string match
- Added unit test for STORAGE_ACCOUNT_K=<secret> pattern
@yuvalmich yuvalmich force-pushed the fix/azure-storage-key-flexible-account-pattern branch from efb5bdc to d148912 Compare March 17, 2026 09:55
@lirshindalman lirshindalman merged commit b2cf4e7 into master Mar 17, 2026
20 checks passed
@lirshindalman lirshindalman deleted the fix/azure-storage-key-flexible-account-pattern branch March 17, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants