Commit c3ba558
authored
Refactor the CLI dynamic command resolution (#362)
* Replaced eval with importlib for secure dynamic command module loading, better mitigating arbitrary code execution risks.
* Defined a plugin folder and a specified list of known modules for tighter execution control, enhancing CLI security.
* Enhanced error handling for clearer feedback on command module loading issues.
* Shifted to pathlib for more robust path handling, replacing os.path and string manipulations.
* Adopted importlib.metadata for fetching package versions, offering a fallback for unavailable versions.1 parent 8814863 commit c3ba558
File tree
4 files changed
+774
-831
lines changed- .github/workflows
- src/mdio
4 files changed
+774
-831
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
0 commit comments