-
Notifications
You must be signed in to change notification settings - Fork 161
REFACTOR: Improve API and security in Desktop #5892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Samuelopez-ansys
merged 27 commits into
main
from
refact/desktop-to-deprecate-and-improve-sec
Apr 1, 2025
Merged
Changes from 22 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
8398854
REFACTOR: Improve API and security in Desktop
SMoraisAnsys cf91289
chore: adding changelog file 5892.miscellaneous.md [dependabot-skip]
pyansys-ci-bot 4260757
REFACTOR: Extend API in Design
SMoraisAnsys 57a150b
TESTS: Clean up
SMoraisAnsys ff85635
TESTS: Fix removed fixture decorator
SMoraisAnsys e075f76
TESTS: Apply code review and remove direct call
SMoraisAnsys d801cd8
FIX(Desktop): Add back removed properties
SMoraisAnsys b066757
TESTS: Clean up
SMoraisAnsys 10ca258
FIX: init desktop from design
SMoraisAnsys cd8aef5
REFACTOR: Extend subprocess checking
SMoraisAnsys 5bb2b04
REFACTOR: add checking for subprocess calls
SMoraisAnsys 2af0b1e
Merge branch 'main' into refact/desktop-to-deprecate-and-improve-sec
SMoraisAnsys 5e2e7a7
REFACTOR: Simply reading
SMoraisAnsys 5372bde
Merge branch 'main' into refact/desktop-to-deprecate-and-improve-sec
SMoraisAnsys 5d8ddd0
REFACTOR: Continue refactoring
SMoraisAnsys 96e1d94
DOCS: Add warning on method usage
SMoraisAnsys 859b38d
Merge branch 'main' into refact/desktop-to-deprecate-and-improve-sec
SMoraisAnsys a600663
DOCS: Fix vale issues
SMoraisAnsys e4736c6
TESTS: Fix import issue
SMoraisAnsys f0663a7
DOCS: Fix vale issues
SMoraisAnsys 5b9c5d7
FIX: Codacy issues
SMoraisAnsys ffbaf5d
TESTS: Extend testing coverage
SMoraisAnsys e990bbf
Apply suggestions from code review
SMoraisAnsys 9d1f4dd
Merge branch 'main' into refact/desktop-to-deprecate-and-improve-sec
SMoraisAnsys 731a007
Update doc/source/User_guide/index.rst
SMoraisAnsys e97b470
Merge branch 'main' into refact/desktop-to-deprecate-and-improve-sec
Samuelopez-ansys 2f98223
DOCS: Fix typo
SMoraisAnsys File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Improve API and security in Desktop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
Security considerations | ||
======================= | ||
|
||
This section provides information on security considerations for the use | ||
of PyAEDT. It is important to understand the capabilities which PyAEDT | ||
provides, especially when using it to build applications or scripts that | ||
accept untrusted input. | ||
|
||
.. _security_launch_aedt: | ||
|
||
Launching AEDT | ||
-------------- | ||
|
||
The :py:func:`.launch_aedt` and `launch_aedt_in_lsf` functions can be used to | ||
launch AEDT. The executable which is launched is configured with the function | ||
parameters, environment variables and the | ||
`settings <https://aedt.docs.pyansys.com/version/stable/User_guide/settings.html>`_. | ||
This may allow an attacker to launch arbitrary executables on the system. When | ||
exposing the launch function to untrusted users, it is important to validate that | ||
the executable path, environment variables (for example ``"ANSYSEM_ROOT"``, | ||
``ANSYSEM_PY_CLIENT_ROOT`` and ``ANSYSEMSV_ROOT``) and PyAEDT settings are safe. | ||
Otherwise, hard-code them in the application. | ||
|
||
.. _security_ansys_cloud: | ||
|
||
Retrieving Ansys Cloud information | ||
---------------------------------- | ||
|
||
The :py:func:`.get_cloud_job_info` and :py:func:`.get_available_cloud_config` | ||
functions can be used to retrieve information related to Ansys Cloud. | ||
The executable which is launched is configured with the function | ||
parameters and the AEDT installation that is detected. Since finding the AEDT | ||
installation path is based of environment variables, this may allow an attacker | ||
to launch arbitrary executables on the system. When exposing the launch function | ||
to untrusted users, it is important to validate that environment variables like | ||
``"ANSYSEM_ROOT"``, ``ANSYSEM_PY_CLIENT_ROOT`` and ``ANSYSEMSV_ROOT`` are safe. | ||
Otherwise, hard-code them in the application. | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.