It seems this is key to the puzzle but no expression parser or syntax scanner apparent here…
https://github.com/frappe/frappe/blob/develop/frappe/\_\_init\_\_.py#L1597
Both webhook condition:
And salary condition formula call safe_eval:
https://github.com/frappe/erpnext/blob/develop/erpnext/hr/doctype/salary_slip/salary_slip.py#L418
Now I recall this too Multiple conditions on Salary Structure with a single formula
Hope this helps
And oh yes for the sake of decorum please null the f- bombs Martin thanks!