Skip to content

Fix critical bugs and enhance security#8

Open
Eashan-H wants to merge 1 commit intotheochem:mainfrom
Eashan-H:minor-fixes
Open

Fix critical bugs and enhance security#8
Eashan-H wants to merge 1 commit intotheochem:mainfrom
Eashan-H:minor-fixes

Conversation

@Eashan-H
Copy link

This PR fixes a number of critical issues identified after an audit of the code base of the FFprime project.

1. Security & Reliability

  • Shell Injection Vulnerability: The code has been refactored in the get_popen utility of the file ffprime/utils/write.py.
  • Safe Command Parsing: The shlex library has been integrated to safely parse the commands passed as strings.

2. Functional Bug Fixes

  • Resolved Missing Imports: The import statement for the library numpy has been added to the file ffprime/utils/seminario.py.
  • Variable Mismatches of potentials.py:
    • The error message has been corrected to use qa/qb instead of the incorrect q1/q2 to match the arguments.
    • The function call to compute_electrostatic_energy_with_cp has been corrected to use the alpha parameter dictionary instead of the undefined variable ref_a.
    • Several other variable mismatches have been corrected, such as the incorrect use of len(sa) instead of the irrelevant len(c6a) to compute the dispersion/repulsion energy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant