[GRASS-git] [OSGeo/grass] 6990da: Python: Replace eval with safer alternatives (#7709)
Corey White
noreply at github.com
Tue Sep 1 18:29:27 PDT 2026
Branch: refs/heads/main
Home: https://github.com/OSGeo/grass
Commit: 6990dad0ceb98e09c3459e9753f70eb0162a3083
https://github.com/OSGeo/grass/commit/6990dad0ceb98e09c3459e9753f70eb0162a3083
Author: Corey White <smortopahri at gmail.com>
Date: 2026-09-01 (Tue, 01 Sep 2026)
Changed paths:
M gui/wxpython/core/menutree.py
M gui/wxpython/gmodeler/model.py
M gui/wxpython/gui_core/menu.py
M python/grass/temporal/temporal_algebra.py
A python/grass/temporal/tests/temporal_algebra_compare_values_test.py
M scripts/i.tasscap/i.tasscap.py
Log Message:
-----------
Python: Replace eval with safer alternatives (#7709)
In temporal algebra, compare values directly instead of eval of
stringified comparisons, and route the td and global-variable
comparisons through the same helper; the remaining eval of the
internally built boolean string is documented and marked nosec. In
the wxGUI, resolve wx ids and menu handlers with getattr instead of
eval, and document the gmodeler loop-condition eval, which runs the
model author's own expression. In i.tasscap, dispatch to the band
combination function via globals() lookup.
Fixes 14 Bandit B307 (eval) alerts.
To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications
More information about the grass-commit
mailing list