T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/html_to_pdf_enhanced.py:15- Finding
System-Wide Termination of Unrelated Microsoft Edge Processes
- Content
View full analysis
0: kill_edge_processes() time.sleep(2) ``` It can also be invoked explicitly through a command-line option: ```python # 清理进程(如果需要) if args.kill_edge: kill_edge_processes() time.sleep(1) ``` The project documentation also recommends an equivalent global termination command in `references/lessons_learned.md:113-117` and `references/lessons_learned.md:142-145`: ```powershell Stop-Process -Name msedge -Force -ErrorAction SilentlyContinue ``` ### Technical Analysis The command `taskkill /F /IM msedge.exe` identifies processes solely by executable image name and forcibly terminates every accessible Microsoft Edge process. It does not distinguish between the headless Edge instance created for PDF conversion and unrelated interactive browser processes belonging to the user. The operation exceeds the process-control scope legitimately required to convert one HTML document. The script already launches Edge through `subprocess.run`, so cleanup should be limited to the specific child process created by that invocation. The risky function is reached automatically after an unsuccessful conversion attempt. A missing output file, conversion timeout, MathJax rendering failure, invalid input, or other retry condition ca ...[truncated 1861 chars]- Remediation
View remediation
