Skip to content

Fixed constant identifiable credential Security Issue#2671

Merged
jainakanksha-msft merged 3 commits into
mainfrom
akkuVSExtFailure
Jul 13, 2026
Merged

Fixed constant identifiable credential Security Issue#2671
jainakanksha-msft merged 3 commits into
mainfrom
akkuVSExtFailure

Conversation

@jainakanksha-msft

Copy link
Copy Markdown
Member

This pull request updates how the emulator internally derives signing keys for user delegation SAS tokens. Instead of using a fixed, hardcoded secret key, the code now uses a deterministic, non-secret seed string. This improves security by making it clear the value is not a credential and avoids false positives from security scanners.

Key changes:

Security and Key Management:

  • Replaced the fixed, hardcoded USERDELEGATIONKEY_BASIC_KEY with a deterministic, non-secret USERDELEGATIONKEY_SIGNING_SEED in constants.ts, clarifying that the value is not a credential and should remain stable for consistent signatures.
  • Updated all code references (utils.ts) to use USERDELEGATIONKEY_SIGNING_SEED instead of the previous hardcoded key when generating user delegation key signatures. [1] [2]

Copilot AI review requested due to automatic review settings July 13, 2026 12:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates Azurite’s internal mechanism for generating/validating user delegation SAS signatures by replacing a hardcoded, high-entropy “key-like” constant with a deterministic, explicitly non-secret seed string (to reduce false positives from secret scanning while keeping signatures stable within a given Azurite version).

Changes:

  • Replace USERDELEGATIONKEY_BASIC_KEY with USERDELEGATIONKEY_SIGNING_SEED in blob utils constants.
  • Update HMAC signing in getUserDelegationKeyValue() to use the new seed constant.
  • Document the change in ChangeLog.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/blob/utils/utils.ts Switch user delegation key signature HMAC input from the old constant to the new deterministic seed constant.
src/blob/utils/constants.ts Remove the hardcoded key-like literal and introduce USERDELEGATIONKEY_SIGNING_SEED with updated inline documentation.
ChangeLog.md Note the replacement of the hardcoded signing key literal with a deterministic internal seed to avoid secret-scan blocks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/blob/utils/constants.ts Outdated
Copilot AI review requested due to automatic review settings July 13, 2026 13:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

Comment thread src/blob/utils/utils.ts
].join("\n");

return createHmac("sha256", USERDELEGATIONKEY_BASIC_KEY).update(stringToSign, "utf8").digest("base64");
return createHmac("sha256", USERDELEGATIONKEY_SIGNING_SEED).update(stringToSign, "utf8").digest("base64");
Comment on lines +175 to +178
// Deterministic, non-secret string used directly as HMAC key material by
// getUserDelegationKeyValue() when producing user delegation key values.
// It must stay stable so signatures remain consistent across instances and
// restarts.
Comment thread ChangeLog.md
- Remove the deprecated `azure-storage` dev dependency and migrate the affected queue and table test suites to `@azure/data-tables` and other modern Azure SDK clients (adds `@azure/identity`).
- Standardize binary data handling on `Uint8Array` instead of `Buffer` (e.g. MD5 hashes, Content-MD5, internal buffer conversions).
- Fix Windows SEA executable build producing a corrupted/bad `.exe` by stripping the Authenticode signature from the copied Node.js binary before injecting the SEA blob via `postject`.
- Replace the hardcoded user delegation signing key literal with a deterministic internal signing seed to avoid VS Code extension publish secret-scan blocks while preserving stable user delegation SAS behavior.
@jainakanksha-msft
jainakanksha-msft merged commit 2048266 into main Jul 13, 2026
74 of 82 checks passed
@jainakanksha-msft
jainakanksha-msft deleted the akkuVSExtFailure branch July 13, 2026 13:55
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.

2 participants