OFS / opae-sdk

Open Programmable Acceleration Engine
https://ofs.github.io
BSD 3-Clause "New" or "Revised" License
259 stars 82 forks source link

(cherry-pick) Fix: address issues pointed out by Python scanners (#3036) #3045

Closed tswhison closed 1 year ago

tswhison commented 1 year ago

Description

Our Python scanners point out issues regarding the use of the subprocess module. The issues tend to be in 2 main categories: 1) The use of subprocess.Popen() directly is discouraged. Instead, the scanners recommend using run, call, or checked_call.

2) The use of any of the subprocess calls with shell=True is forbidden, because it is prone to code injection attacks. Instead, the scanners require shell=False or omitting shell altogether.

Collateral (docs, reports, design examples, case IDs): Python scans when preparing the release.

Tests added:

Tests run:

CI and manual testing of rtl_src_config.

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 6909513155


Totals Coverage Status
Change from base Build 6894671306: 0.0%
Covered Lines: 15754
Relevant Lines: 23279

💛 - Coveralls