Clarify AGENTS guidance for non-security hashing#15802
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15802Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15802" |
There was a problem hiding this comment.
Pull request overview
Updates contributor/agent guidance to steer non-security hashing toward faster non-cryptographic algorithms, aligning with repository practices.
Changes:
- Add AGENTS.md guidance discouraging SHA-256 for non-security hashing.
- Recommend xxHash3 for stable non-cryptographic hashing scenarios.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
🎬 CLI E2E Test Recordings — 55 recordings uploaded (commit View recordings
📹 Recordings uploaded automatically from CI run #23906997468 |
joperezr
left a comment
There was a problem hiding this comment.
LGTM — the single line addition is accurate and well-formed. System.IO.Hashing.XxHash3 is already used in the codebase and the guidance is appropriate for steering contributors away from unnecessary cryptographic hashing overhead in non-security scenarios.
Description
SHA-256 is designed for adversarial resistance, not just for generating a fingerprint. When a hash is not security-related, using a cryptographic hash is often more expensive than necessary.
This updates
AGENTS.mdto tell contributors not to use cryptographic hashes such as SHA-256 for non-security scenarios and to prefer xxHash3 for stable non-cryptographic hashing instead. This helps steer implementations toward a faster, smaller, and more appropriate hash choice for cases like sharding keys, hash tables, cache keys, trusted-system deduplication, and non-security change detection.Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: