Minor fixes from AI audit#11406
Conversation
…AndContentLength`
…nicalTransaction`
# Conflicts: # src/Nethermind/Nethermind.KeyStore/FileKeyStore.cs # src/Nethermind/Nethermind.Serialization.Rlp/RlpHelpers.cs
# Conflicts: # src/Nethermind/Nethermind.Runner/JsonRpc/Startup.cs
# Conflicts: # src/Nethermind/Nethermind.Network/P2P/Messages/HelloMessageSerializer.cs
|
Claude finished @alexb5dh's task in 3m 51s —— View job PR Review
Prior Findings — Resolution StatusAll four findings from the previous review were addressed in the "More tests" commit (25aa9ff):
New Changes (since prior review)
Note: the offset-based streaming overload
Remaining IssueLow — private void IncrementBytesReceivedMetric(int size) // ← int
private void IncrementBytesSentMetric(long size) // ← long (fixed in this PR)The underlying SummaryAll Medium and above findings have been resolved. The original security fixes (RPC ID injection, constant-time MAC comparison, Shutter The one remaining Low finding ( This PR is ready to merge. |
Fixes for minor issues across different parts of codebase spotted by AI checks.
Changes
Medium
FileKeyStore- during password validation.RlpDecoderExtensions.Encode- passing empty data could corrupt encoding.longfor "JsonRpcBytesSent*" metrics -intcan overflow with just ~2GB of data.c3in Shutter decoding - it also means encryption is invalid.DecodeBool.Properly escapeidfield for streamed RPC requests to prevent injection.Low
PatriciaTree.Accept- prevents potentialIndexOutOfRangeException.flashbots_validateBuilderSubmissionV3- returns correct error on invalid lengths.TryGetCanonicalTransaction- prevents potentialNullReferenceException.ValidatorStore- prevents potentialIndexOutOfRangeException.ReadPrefixAndContentLength.Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?