fix: avoid shell in BIOS hardware probe#4206
Conversation
|
Welcome to RustChain! Thanks for your first pull request. Before we review, please make sure:
Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150) A maintainer will review your PR soon. Thanks for contributing! |
cerredz
left a comment
There was a problem hiding this comment.
BIOS hardware probe review.
I verified the PR locally. The changed calls now use argv lists instead of shell strings, and the tests assert the Windows and Linux subprocess arguments directly. The 10-second timeout is also a useful guard against a local hardware probe hanging indefinitely.
Validation performed:
python -m pytest tests\test_bios_pawpaw_detector.py -q=> 3 passedpython -m py_compile tools\bios_pawpaw_detector.py tests\test_bios_pawpaw_detector.pygit diff --check origin/main...HEAD
Residual note, not a blocker for this scoped patch: get_bios_date() still catches all exceptions with a bare except, so future cleanup could narrow that to the expected subprocess/date parsing failures. The current PR does not introduce that pattern.
No blocking findings from my review.
|
💰 PAID — 5 RTC pending, will confirm in 24h.
What workedWelcome @bolasse1234! Removes unnecessary shell use from BIOS probing — careful hardening with sensible parser tests. Solid low-severity work. — auto-triage 2026-05-10 |
Summary:
wmicanddmidecodeshell commands with argv-based subprocess callsSecurity note:
Verification:
python -m pytest tests\test_bios_pawpaw_detector.pyBounty note:
If this is accepted for the bounty loop, please use my GitHub-login miner_id for payout. I am not posting payment details publicly.