-
Notifications
You must be signed in to change notification settings - Fork 123
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
[REBASE&FF][CHERRY-PICK] ImageValidation: Add default configuration #1104
Merged
Javagedes
merged 1 commit into
microsoft:release/202311
from
Javagedes:backport-image-validation
Aug 12, 2024
Merged
[REBASE&FF][CHERRY-PICK] ImageValidation: Add default configuration #1104
Javagedes
merged 1 commit into
microsoft:release/202311
from
Javagedes:backport-image-validation
Aug 12, 2024
Conversation
This file contains 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
Previously, ImageValidation was an "opt-in" plugin by setting a build variable `PE_VALIDATION_PATH`, however with this pull request, Image Validation will be on by default, with some default configuration that can be changed with a custom configuration yaml file. The default requirements are: 1. All efi binaries must not be both write and execute 2. All efi binaries must have an image base of 0x0 3. All dxe phase binaries must be 4k section aligned, with the one exception of AARCH64 DXE_RUNTIME_DRIVERS, which must be 64k aligned. compiled binaries that need to be opted out of, can do so by adding an `IGNORE_LIST` in the configuration file ```json { "IGNORE_LIST": ["Shell.efi", "etc"] } ``` - [ ] Impacts functionality? - **Functionality** - Does the change ultimately impact how firmware functions? - Examples: Add a new library, publish a new PPI, update an algorithm, ... - [ ] Impacts security? - **Security** - Does the change have a direct security impact on an application, flow, or firmware? - Examples: Crypto algorithm change, buffer overflow fix, parameter validation improvement, ... - [x] Breaking change? - **Breaking change** - Will anyone consuming this change experience a break in build or boot behavior? - Examples: Add a new library class, move a module to a different repo, call a function in a new library class in a pre-existing module, ... - [ ] Includes tests? - **Tests** - Does the change include any explicit test code? - Examples: Unit tests, integration tests, robot tests, ... - [x] Includes documentation? - **Documentation** - Does the change contain explicit documentation additions outside direct code modifications (and comments)? - Examples: Update readme file, add feature readme file, link to documentation on an a separate Web page, ... Confirmed successful execution of the plugin on Windows with QemuQ35 and Ubuntu with QemuSbsa Platforms that begin to fail this test will need to generate a configuration yaml file, and set a stuart build variable, `PE_VALIDATION_PATH` to it. It is suggested to do this in the Platform's `PlatformBuild.py`. **The Correct Integration** is to evaluate the binary and why it is not meeting the requirements. The platform can elect to update the compilation of the binary to meet the requirements, add or override validation rules for certain MODULE_TYPEs, or simply add the binary to the ignore list. Please review the Plugin's readme.md file for more details on doing any of these things. --------- Signed-off-by: Joey Vagedes <joey.vagedes@gmail.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
github-actions
bot
added
impact:breaking-change
Requires integration attention
impact:non-functional
Does not have a functional impact
type:documentation
Improvements or additions to documentation
labels
Aug 12, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release/202311 #1104 +/- ##
===============================================
Coverage 1.35% 1.35%
===============================================
Files 1303 1303
Lines 333838 333838
Branches 5103 5103
===============================================
Hits 4512 4512
Misses 329243 329243
Partials 83 83
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
apop5
approved these changes
Aug 12, 2024
makubacki
approved these changes
Aug 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
impact:breaking-change
Requires integration attention
impact:non-functional
Does not have a functional impact
type:documentation
Improvements or additions to documentation
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.
Previously, ImageValidation was an "opt-in" plugin by setting a build variable
PE_VALIDATION_PATH
, however with this pull request, Image Validation will be on by default, with some default configuration that can be changed with a custom configuration yaml file.The default requirements are:
compiled binaries that need to be opted out of, can do so by adding an
IGNORE_LIST
in the configuration fileA cherry-pick of #1100 into release/202311
How This Was Tested
Confirmed successful execution of the plugin on Windows with QemuQ35 and Ubuntu with QemuSbsa
Integration Instructions
Platforms that begin to fail this test will need to generate a configuration yaml file, and set a stuart build variable,
PE_VALIDATION_PATH
to it. It is suggested to do this in the Platform'sPlatformBuild.py
.The Correct Integration is to evaluate the binary and why it is not meeting the requirements. The platform can elect to update the compilation of the binary to meet the requirements, add or override validation rules for certain MODULE_TYPEs, or simply add the binary to the ignore list. Please review the Plugin's readme.md file for more details on doing any of these things.