Conversation
Automated security fix generated by OrbisAI Security
pchuri
left a comment
There was a problem hiding this comment.
Thanks for raising the plaintext-transport concern and submitting this fix. Requiring an explicit opt-in for HTTP is worth considering, but there is a compatibility issue to address before merging.
The warning tells users to set allowInsecureHttp, but the CLI configuration loader does not pass that field through to ConfluenceClient. I reproduced this with a profile containing protocol: "http" and allowInsecureHttp: true: the flag was dropped and the client still selected HTTPS. This breaks HTTP-only installations even after following the suggested override. CONFLUENCE_ALLOW_INSECURE_HTTP=true does work.
Please either wire the profile option through configuration loading and persistence, or make the supported environment-variable override explicit in the warning and documentation. Please also update/add tests covering the new default and the supported opt-in paths. The same two targeted test suites pass 260/260 on main, but this PR passes 255 with 5 failures, including local HTTP integration failures.
The behavior change should also be documented for existing HTTP and local authentication-proxy configurations. Thanks again for working on this.
The CWE-319 fix in e3dd3d2 made ConfluenceClient require an explicit allowInsecureHttp opt-in for HTTP, but config.js never read or wrote that field, so profiles with protocol: "http" + allowInsecureHttp: true were silently upgraded to HTTPS — only the CONFLUENCE_ALLOW_INSECURE_HTTP env var worked. Wire it through saveConfig/getConfig/initConfig, add --allow-insecure-http to init/profile add, suppress the HTTPS-fallback warning in --json mode so it stops breaking structured-error tests, fix the two test suites that relied on unlabeled HTTP, and add regression coverage for the full default/opt-in/env-override matrix plus the profile -> getConfig -> ConfluenceClient path. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Thanks for catching this — you were right that Pushed
Full suite is back to green: |
pchuri
left a comment
There was a problem hiding this comment.
Thanks for the quick and thorough follow-up! The configuration propagation issue I raised is resolved, and the CLI options, documentation, and regression coverage address the requested changes.
I tested this head combined with the latest main: all 39 test suites (1,483 tests) and lint passed. I also verified the actual CLI path with a temporary profile and a local HTTP server: --allow-insecure-http was persisted and allowed the request, while CONFLUENCE_ALLOW_INSECURE_HTTP=false overrode the profile opt-in and selected HTTPS.
I did not find any remaining blocking issues in this review. Approved, and thanks again for the contribution!
## [2.25.10](v2.25.9...v2.25.10) (2026-10-01) ### Bug Fixes * secure confluence-client.js (CWE-319) ([#256](#256)) ([a2d61c6](a2d61c6))
|
🎉 This PR is included in version 2.25.10 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The ConfluenceClient constructor accepts a 'protocol' configuration option that allows HTTP connections. While HTTPS is the default, the code explicitly permits HTTP connections if configured, which would transmit Basic Auth credentials (Base64-encoded username:password) in plaintext over the network. The affected code is
lib/confluence-client.js:55. This change is the fix I would apply.Reference: CWE-319
What changed
lib/confluence-client.jsVerification
No automated check could be run against this repository, so this change is unverified beyond review. Please treat it as a suggestion.
Regression test
The security boundary is maintained under adversarial input
Test
Automated security fix by OrbisAI Security