chore: move decrypt_with_key logs from debug to trace#136
chore: move decrypt_with_key logs from debug to trace#136AnthonyRonning merged 2 commits intomasterfrom
Conversation
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
WalkthroughThis PR appends new PCR history entries to both development and production history files, each containing PCR0, PCR1, PCR2, timestamp, and signature fields. Concurrently, logging verbosity in the decrypt_with_key function is reduced by downgrading debug logs to trace level. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Important Action Needed: IP Allowlist UpdateIf your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:
Failure to add the new IP will result in interrupted reviews. Comment |
Greptile OverviewGreptile SummaryThis PR reduces log verbosity by changing It also updates the dev/prod PCR JSON artifacts ( Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Caller as App code
participant Encrypt as src/encrypt.rs
participant Trace as tracing subscriber
Caller->>Encrypt: decrypt_with_key(key, bytes)
Encrypt->>Trace: trace!("Entering decrypt_with_key")
alt bytes.len() < 12
Encrypt->>Trace: error!("Decrypt failed: Input too short...")
Encrypt-->>Caller: Err(BadData)
else
Encrypt->>Encrypt: Aes256Gcm::new_from_slice(key)
alt cipher init fails
Encrypt->>Trace: error!("Failed to create cipher from key...")
Encrypt-->>Caller: Err(FailedToDecrypt)
else
Encrypt->>Encrypt: cipher.decrypt(nonce, ciphertext)
alt decrypt fails
Encrypt->>Trace: error!("AES-GCM decryption failed...")
Encrypt-->>Caller: Err(FailedToDecrypt)
else
Encrypt->>Trace: trace!("Exiting decrypt_with_key")
Encrypt-->>Caller: Ok(plaintext)
end
end
end
|
Moves the verbose decrypt_with_key entry/exit logs from debug to trace level to reduce log noise.
Also updates PCRs.
Summary by CodeRabbit