结尾的“测试密码”例外与绝对禁止登录的规则冲突
原文依据:4 处前文明确说即使获得客户口头许可也绝不能用泄露凭据认证;结尾却说,为数据主体工作是“唯一可以测试密码”的情形。这里没有明确把“测试”限定为离线的 Pwned Passwords 前缀查询。
用户可能把后一句理解为允许在客户账户上尝试泄露密码,从而造成未经充分授权的登录、账户锁定、审计告警或违反计算机滥用法律。
前文无条件禁止用泄露凭据登录、重置账户或测试跨站复用,并把合法检查方式描述为不恢复密码的范围 API;但结尾单独称为数据主体工作是“唯一适合测试密码”的情形。“测试”可能意指范围 API,也可能被误读为实际认证,文本没有在该句中限定。用户应要求作者明确:这里只允许本地哈希和 k-匿名查询,绝不向登录或找回流程提交密码。
这项判断针对展示的代码和适用条件,不表示风险已经实际发生。**Never use a leaked credential to authenticate to anything.** Not to "confirmthe account exists". Not on a test account. Not on the subject's account with aclient's verbal blessing. Credential stuffing is unauthorized access undercomputer-misuse law in most jurisdictions, and the public availability of thepassword is not a defence — see [../../ETHICS.md](../../ETHICS.md).The same applies to derived actions: do not attempt password resets, do not userecovered security-question answers, and do not try a recovered password on adifferent service to test reuse. Reuse is something you *infer* from data youalready hold, never something you test.查看另外 3 个位置
Practically: pull the minimum fields needed for the objective, do not retaincredentials at all, store case material encrypted at rest with access logged,and delete on a schedule you wrote down at the start. If you are working for asubject on their own data, that is the cleanest footing available — and it isthe only footing on which testing a password is ever appropriate.You hash the password with SHA-1 locally and send only the **first five hexcharacters** of the hash to the range endpoint. The service returns every hashsuffix in its corpus beginning with that prefix, along with how many times eachhas been seen. You compare locally.security posture, which is genuinely useful in a due-diligence context. Thenstop. Cracking a hash produces a credential you are not allowed to use, so thework has no legitimate output. The exception is a self-audit or an authorizedsecurity assessment where the password holder is your client, and even then therange API answers the question without cracking anything.