oamg / convert2rhel

A tool to automate converting Oracle/CentOS/Scientific/Rocky/Alma Linux to Red Hat Enterprise Linux
GNU General Public License v3.0
104 stars 83 forks source link

[RHELC-1581] Return a list instead of string for disablerepo command #1237

Closed r0x0d closed 3 months ago

r0x0d commented 3 months ago

The current get_rhel_disable_repos_command is returning a list of disablerepo commands to be passed down to run_subprocess functions. This is insecure as it contains white spaces inbetween the commands. This patch changes this to return them in a list instead.

Jira Issues:

Checklist

has-bot commented 3 months ago

/packit test --labels sanity


Comment generated by an automation.

Log | Bot Usage
codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.55%. Comparing base (972f6b6) to head (133a360).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1237 +/- ## ======================================= Coverage 95.54% 95.55% ======================================= Files 54 54 Lines 4715 4720 +5 Branches 829 829 ======================================= + Hits 4505 4510 +5 Misses 127 127 Partials 83 83 ``` | [Flag](https://app.codecov.io/gh/oamg/convert2rhel/pull/1237/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=oamg) | Coverage Δ | | |---|---|---| | [centos-linux-7](https://app.codecov.io/gh/oamg/convert2rhel/pull/1237/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=oamg) | `90.69% <100.00%> (+<0.01%)` | :arrow_up: | | [centos-linux-8](https://app.codecov.io/gh/oamg/convert2rhel/pull/1237/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=oamg) | `91.63% <100.00%> (+<0.01%)` | :arrow_up: | | [centos-linux-9](https://app.codecov.io/gh/oamg/convert2rhel/pull/1237/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=oamg) | `91.69% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=oamg#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

r0x0d commented 3 months ago

/packit test --labels tier0

r0x0d commented 3 months ago

/packit test --labels tier0