Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1237 +/- ##
==========================================
+ Coverage 50.83% 51.34% +0.50%
==========================================
Files 149 149
Lines 13874 13918 +44
==========================================
+ Hits 7053 7146 +93
+ Misses 6217 6160 -57
- Partials 604 612 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
nbmaiti
force-pushed
the
pr/jwt_no_default_jwt_key
branch
from
September 2, 2026 08:10
8c82919 to
2e45f09
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The current startup path generates an admin password but only persists/logs its bcrypt hash (locking operators out), and the CIRA “constant-time” check still short-circuits on username mismatch, leaking failure type via timing.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
cmd/app/main.go:427
- On first run (when
cfg.AdminPasswordis empty), a random admin password is generated, immediately hashed, and only the hash is persisted/logged. That leaves operators with no way to learn the generated password, effectively locking them out unless they already set AUTH_ADMIN_PASSWORD. Either refuse to start and require an explicit password, or print the generated password once (with a strong warning) before hashing.
password, err := generateRandomPassword(adminPasswordLength)
if err != nil {
log.Fatalf("Failed to generate admin password: %v", err)
}
- Files reviewed: 8/8 changed files
- Comments generated: 2
- Review effort level: Lite
nbmaiti
force-pushed
the
pr/CM352
branch
2 times, most recently
from
September 2, 2026 17:08
834a947 to
77e4f1c
Compare
Console compared the admin username and password with plain string equality, so credentials were matched in cleartext and the comparison leaked timing information. Verify the admin password as a bcrypt hash and compare the username in constant time, hashing and persisting any plaintext value already present in config on startup. CIRA authentication had the same flaw: the decrypted MPSPassword was checked with a direct != comparison, which is vulnerable to a timing side channel. Use subtle.ConstantTimeCompare for both the username and the password. Add tests covering the credential rejection paths, including an unset device ID, a lookup failure, and a missing device. Signed-off-by: Nabendu Maiti <nabendu.bikash.maiti@intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing