Skip to content

Conversation

@madhavilosetty-intel
Copy link
Contributor

Add validation to Set Boot Options that prevents turning off Enforce Secure Boot when the device is in Client Control Mode (CCM).

@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

❌ Patch coverage is 71.42857% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.70%. Comparing base (865fd9b) to head (7d72434).

Files with missing lines Patch % Lines
internal/usecase/devices/power.go 71.42% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #779      +/-   ##
==========================================
+ Coverage   39.67%   39.70%   +0.03%     
==========================================
  Files         112      112              
  Lines       10657    10669      +12     
==========================================
+ Hits         4228     4236       +8     
- Misses       6047     6049       +2     
- Partials      382      384       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@madhavilosetty-intel madhavilosetty-intel linked an issue Feb 3, 2026 that may be closed by this pull request
4 tasks
@madhavilosetty-intel madhavilosetty-intel marked this pull request as draft February 3, 2026 20:40
Copy link

Copilot AI left a 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 EnforceSecureBoot in Client Control Mode
  • Changed EnforceSecureBoot from a required boolean to an optional pointer to support fallback to device values
  • Added helper function getEnforceSecureBoot to handle the optional EnforceSecureBoot parameter

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.

Add validation to Set Boot Options that prevents turning off
Enforce Secure Boot when the device is in Client Control Mode (CCM).
@madhavilosetty-intel madhavilosetty-intel force-pushed the enforce-secure-boot-ccm-validation branch from e60e879 to 7d72434 Compare February 4, 2026 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Console/MPS Update APIs for OCR

1 participant