parkpow / deep-license-plate-recognition

Automatic License Plate Recognition (ALPR) or Automatic Number Plate Recognition (ANPR) software that works with any camera.
https://platerecognizer.com/
MIT License
523 stars 122 forks source link

Reorder docker folder #198

Closed adolfoarmas closed 6 months ago

github-actions[bot] commented 6 months ago

Risk Level 2 - /home/runner/work/deep-license-plate-recognition/deep-license-plate-recognition/docker/platerec_installer/platerec_installer.py

The get_refresh function constructs a link to Docker installation instructions based on the OS, but it does not handle the case where the OS is not recognized. It's recommended to add an else clause to handle unknown OS types gracefully.


Risk Level 3 - /home/runner/work/deep-license-plate-recognition/deep-license-plate-recognition/docker/sdk_manager/PlateRec_SDK_Manager.py

The install_pr function in PlateRec_SDK_Manager.py uses os.system to run Docker commands, which is a security risk. It's recommended to replace os.system with subprocess.run to avoid potential command injection vulnerabilities. Additionally, the test_install function uses recursion for retries, which could lead to a stack overflow if the number of retries is too high. Consider using a loop for retries instead.


Risk Level 3 - /home/runner/work/deep-license-plate-recognition/deep-license-plate-recognition/docker/platerec_installer/installer_helpers.py

The os.system calls are used to execute shell commands, which can be a security risk if not handled properly. It's recommended to use subprocess.run with explicit arguments to mitigate the risk of shell injection vulnerabilities. Additionally, the get_container_id function should handle the case where the command output is empty to avoid index errors.


🔒🐍🔄


Powered by Code Review GPT