Add bios metadata to submission json (new)#2410
Merged
Merged
Conversation
`dmidecode` provides more information, but it requires root. However, the `/sys/class/dmi/id/bios_*` files that dmidecode rely on to provide BIOS-related information can be accessed by any user, so the get_bios_info() function makes use of it to return a basic dict with the available data.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2410 +/- ##
==========================================
+ Coverage 58.15% 58.18% +0.02%
==========================================
Files 475 475
Lines 47761 47796 +35
Branches 8492 8497 +5
==========================================
+ Hits 27775 27809 +34
- Misses 19103 19104 +1
Partials 883 883
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Hook25
previously approved these changes
Mar 20, 2026
Hook25
left a comment
Collaborator
There was a problem hiding this comment.
LGTM but consider the following, I don't like that the keys /may/ change. It does, on core16 only these are present: (both core16 and uc16)
ubuntu@ubuntu-16-04:~$ cat /sys/class/dmi/id/bios_
bios_date bios_vendor bios_version
This is to prevent a bug in python3.5 when running the unit tests, since dictionaries are unordered.
Hook25
approved these changes
Mar 23, 2026
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.
Description
Update device-bios script with a new
biossubcommand that extracts data from/sys/class/dmi/id/bios_*files and returns them as JSON. Sysfs is accessed directly (instead of using dmidecode, for instance) since these files are user-readable (while dmidecode requires root access).The collector version is bumped to v5.
Resolved issues
Fix CHECKBOX-2191
Documentation
Tests
Tested locally: