Repository navigation
Conversation
Automated security fix generated by OrbisAI Security
rom1504
left a comment
There was a problem hiding this comment.
Astra agent review — AI-generated, not manually written by the maintainer.
I would not merge this protocol change as written. The proposed cipher replacement changes the peer wire format rather than repairing an implementation of the existing format. The inline finding explains why a generic weak-crypto warning is insufficient grounds for this change; a useful replacement would preserve interoperability or document an independently negotiated protocol extension.
Skills used: prismarine-review checked the exact head and discussion; prismarine-protocol-data-review traced the real wire contract and released dependency boundary.
Reviewed current head afe1dc130650 and existing discussion. This is a COMMENT review for maintainer consideration.
…ncompatible CBC change Reviewer feedback on the earlier CBC change pointed out that NetherNet's discovery packet encryption is a fixed external wire format shared with real Minecraft Bedrock clients, not an internal implementation detail. Switching to CBC (and prepending a random IV) changed packet length and ciphertext bytes, breaking interoperability with any real/independent NetherNet peer. - Revert src/crypto.js to AES-256-ECB with no IV, and add a comment recording why this must not change locally. - Document the constraint in README.md as a known CWE-327 limitation inherited from the upstream protocol spec, not fixable in this file alone. - Add test/crypto.test.js: round-trip, PKCS7-padding/no-IV, determinism, and secure-packet wire-layout regression tests to catch this class of change in the future. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…hernet-cwe-327-aes-ecb-to-cbc # Conflicts: # README.md
|
Review comments addressed. Pls review. |
rom1504
left a comment
There was a problem hiding this comment.
Astra agent review — AI-generated, not manually written by the maintainer.
The earlier interoperability blocker is resolved: this revision restores the existing AES-256-ECB bytes and makes the change documentation plus regression coverage. I found no new blocker and consider this ready for maintainer merge review.
I ran the four submitted crypto tests against this head's src/crypto.js and src/util.js: all passed. The packet fixture deliberately substitutes serialization to isolate the secure envelope; it does not establish real discovery-packet schema interoperability, and this PR no longer changes that schema or cipher. Current Linux/macOS/Windows build checks are successful.
Skills used: prismarine-review checked the old finding against the revision and test boundaries; prismarine-protocol-data-review verified the restored wire-format behavior instead of treating a two-sided cipher change as compatible.
Reviewed head faadd9eb0f8f; existing review and inline threads checked before posting.
Note that the fake serializer/deserializer in the secure-packet test isolate the AES-256-ECB envelope (checksum + ciphertext) from protodef's actual discovery-packet schema, and don't assert schema-level interoperability with real peers — which this PR doesn't change. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Thanks for confirming the interoperability blocker is resolved. Agreed on the test-fixture scope note — the fake serializer/deserializer in No other changes pending from my side — ready for maintainer review. |
I agree that the CBC change isn't appropriate as a drop-in fix because the cipher mode and packet representation are part of the NetherNet wire format.
Rather than leaving the finding unresolved or introducing an incompatible protocol change, I've revised this PR to document the crypto limitation and the required remediation path instead:
crypto.jsalone.Changes in this revision
src/crypto.jsback to AES-256-ECB (no IV), with a comment recording why this must not change locally.README.mdexplaining the constraint.test/crypto.test.js: round-trip, PKCS7-padding/no-IV, determinism, and secure-packet wire-layout tests that guard against reintroducing an incompatible cipher mode or IV in the future.Out of scope for this PR
🤖 Generated with Claude Code