-
Notifications
You must be signed in to change notification settings - Fork 12
feat(power): add EnforceSecureBoot error message for CCM mode #779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #779 +/- ##
==========================================
+ Coverage 39.67% 39.69% +0.02%
==========================================
Files 112 112
Lines 10657 10673 +16
==========================================
+ Hits 4228 4237 +9
- Misses 6047 6052 +5
- Partials 382 384 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds validation to prevent disabling Enforce Secure Boot when a device is in Client Control Mode (CCM). The validation occurs in the SetBootOptions function and returns a specific error when the restriction is violated.
Changes:
- Added CCM mode validation that prevents turning off
EnforceSecureBootin Client Control Mode - Changed
EnforceSecureBootfrom a required boolean to an optional pointer to support fallback to device values - Added helper function
getEnforceSecureBootto handle the optionalEnforceSecureBootparameter
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| internal/usecase/devices/power.go | Implements CCM validation logic, adds error constant, and introduces helper function for handling optional EnforceSecureBoot |
| internal/usecase/devices/power_test.go | Adds comprehensive test coverage for CCM restriction scenarios |
| internal/entity/dto/v1/bootsetting.go | Changes EnforceSecureBoot from required boolean to optional pointer |
| integration-test/collections/console_mps_apis.postman_collection.json | Adds integration test for CCM restriction validation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7d72434 to
4a9d3d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Prevent EnforceSecureBoot from being disabled when the device is in Client Control Mode (CCM). The bootOptions now checks the provisioning mode and returns a 400 error if EnforceSecureBoot is set to false in CCM.
41547f8 to
25ec7b8
Compare
Add validation to Set Boot Options that prevents turning off Enforce Secure Boot when the device is in Client Control Mode (CCM).