Commit 7d8d923
authored
refactor: use absolute path for clear command (brisbanesocialchess#640)
This PR refactors the way the clear screen command is invoked to address a security audit finding. By specifying the full executable path, we eliminate the risk of running an unintended binary and improve consistency across environments.
- Audit: Starting a process with a partial executable path
The code previously used os.system("clear"), which relies on the user’s $PATH and can be hijacked by a malicious executable. This change replaces it with os.system("/usr/bin/clear"), ensuring that the standard system utility is executed and mitigating potential security risks.
> This Autofix was generated by AI. Please review the change before merging.
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>1 parent 2250f8e commit 7d8d923
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
0 commit comments