oliver-zehentleitner / maity
hub + cli: the credential filter finds a credential after any character, also inside JSON escapes (§2.2)
tsk-bg5f4cv0894w Done An agent
§2.2 compliance from the security rounds (tsk-v9kheekgq115). A credential anywhere in a request body is refused, and a real one revoked, whatever text stands right before it.
To do:
auth/credentials.pyPATTERN: drop the leading\b. A match is refused anyway, and only verified secrets are revoked.middleware.py: also scan the decoded strings of a JSON body, not only the raw bytes, so JSON escapes can't hide a credential.- CLI: the same change in
cli/src/maity/sign.pyCREDENTIAL_IN_TEXT_RE, so the pre-send check catches the same cases. - Update the regex quoted in docs/api.md §2.2.
- Tests (hub and cli): a credential right after
\n,\t,_or a letter in JSON is refused, and a real one is revoked. - Changelog entries (hub, cli) under Security.