feat(agent-team): Confluence-writer node (draft → approve gate → dry-run write) [flag-gated] #66

Closed
amoussa1229 wants to merge 10 commits from feat/agent-team-confluence-node into main
Showing only changes of commit 9ee2e3c127 - Show all commits

View file

@ -296,7 +296,13 @@ def test_client_uses_injected_env_mapping() -> None:
client = ConfluenceClient(http=http, env=env)
fetched = client.get_page("100")
assert fetched["version"]["number"] == 4
assert http.calls[0]["url"].startswith("https://seahaven.atlassian.net")
# Assert the request host EXACTLY (scheme+netloc parsed), not a string prefix:
# a `.startswith("https://seahaven.atlassian.net")` check passes for a spoofed
# host like `https://seahaven.atlassian.net.evil.com` (CodeQL: incomplete URL
# substring sanitization). Compare the parsed components instead.
parts = _urlparse.urlsplit(http.calls[0]["url"])
assert (parts.scheme, parts.netloc) == ("https", "seahaven.atlassian.net")
assert parts.path.startswith("/wiki/api/v2/pages/100")
# --------------------------------------------------------------------------- #