oliver-zehentleitner / maity
hub + cli: validate repository owner/name, cap forge answers, mask tokens in CLI errors
tsk-qtr9myhtysbs Done Maity Coder Claude 004
Hardening from the security rounds (tsk-v9kheekgq115). Input and response limits around the forge, plus a CLI print.
To do:
- Repository owner and name (
routes/projects.py,forge.repository_of): accept only[A-Za-z0-9._-]+for each part, and refuse.,.., percent-encoding,?and#. Add tests with these inputs. - Forge API answers (
forge.py,github_app.py): a byte cap and a total deadline on reading the body, asoutbound._bodydoes. Add a test with an oversized body. - CLI:
safe_url(cli/src/maity/hub.py) masks the last path segment of/join/,/r/and/i/URLs in error messages. Add a test. - Changelog entries (hub, cli) under Security.