Skip to content

Improved bootloader parsing (#356)#358

Merged
magerstam merged 4 commits intomainfrom
inspect-cmd
Jan 22, 2026
Merged

Improved bootloader parsing (#356)#358
magerstam merged 4 commits intomainfrom
inspect-cmd

Conversation

@magerstam
Copy link
Copy Markdown
Contributor

Merge Checklist

All boxes should be checked before merging the PR

  • The changes in the PR have been built and tested
  • Ready to merge

Description

Bootloader parsing improvement

Any Newly Introduced Dependencies

How Has This Been Tested?

go tests

Copilot AI review requested due to automatic review settings January 22, 2026 01:00
Copy link
Copy Markdown
Contributor

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 improves bootloader parsing logic by enhancing FAT filesystem detection and EFI binary classification. The changes add validation checks to prevent incorrect filesystem parsing and introduce SHA256-based inheritance for identifying bootloader types.

Changes:

  • Added sanity checks for FAT filesystem BPB (BIOS Parameter Block) validation
  • Introduced SHA256-based bootloader kind inheritance for detecting identical EFI binaries
  • Improved bootloader classification logic by reordering checks and adding MokManager detection

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
internal/image/imageinspect/fs_raw.go Calls the new SHA-based bootloader kind inheritance function before sorting
internal/image/imageinspect/fs_inspect.go Adds BPB validation checks and diagnostic notes for FAT filesystem parsing
internal/image/imageinspect/bootloader_pe.go Implements SHA256-based kind inheritance and refines bootloader classification logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/image/imageinspect/fs_inspect.go
Comment thread internal/image/imageinspect/bootloader_pe.go
Copy link
Copy Markdown
Contributor

@arodage arodage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@magerstam magerstam merged commit aca2048 into main Jan 22, 2026
15 of 18 checks passed
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.

3 participants