fix(security): probe argument-injection + same-owner alert routing - #47
Merged
Conversation
Two more pentest items, both defense-in-depth: - ping argument injection: the user-controlled target is now passed after a `--` separator, so a monitor target like `-w99999` can't be read as a ping flag (still argv, never a shell — no command injection either way). - same-owner alert routing: the dispatcher's monitor/host channel lookups and the escalation engine now additionally require the channel's owner to match the entity's/problem's owner. Today the write paths already prevent cross-owner links, so this is belt-and-suspenders against a future path that forgets the check. Tests: ping inserts `--` before the target; escalation refuses to deliver a problem through another owner's channel. Also isolate the zk CLI tests' env to remove a pre-existing order-dependent flake. Full suite 228 passed; ruff + mypy(strict) green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pentest remediation (probes + alert routing). Findings #5, #9.
--(no flag-injection; already argv, no shell).require
channel.owner_idto match the entity/problem owner (belt-and-suspenders;write paths already prevent cross-owner links).
Plus a test-hygiene fix isolating the zk CLI tests' env (removes a pre-existing
order-dependent flake). Full suite 228 passed; ruff + mypy(strict) green.