<div dir="ltr">Greetings PSC,<br><br>I’m happy to report that the work for the above mentioned QEP has been<br>completed and merged during the month of October 2025. <br><br>As a result of the work done, QGIS has enhanced security measures around<br>its handling of embedded scripts while at the same time increasing user<br>convenience by providing project-based security prompts.<br><br>In order to achieve that, QGIS has gained a new trust status - <br>undetermined, untrusted, and trusted – associated with individual projects<br>files as well as folders paths. The trust determination by the <br>user can be temporary - lasting for a single QGIS session - or saved in <br>the user profile’s settings and remembered across sessions. <br><br>The untrusted and trusted status of projects and folders saved in the <br>user profile can be modified at any time by the user through a dedicated <br>UI within the options dialog, as well as preconfigured in the global <br>INI file.<br><br>Project trust is used to determine whether the following embedded scripts<br><div>are permitted to run:</div><div><br></div>- macros;<br>- custom expression functions;<br>- map layer actions (python as well as Windows, Linux, and macos<br>scripts); and<br>- attribute form custom init code.<br> <br>For macros and custom expression functions which require activation on <br>project load, users opening projects containing these two types of <br>embedded scripts will be presented with a modal dialog seeking a<br>decision on whether to allow for the scripts to run or deny. The dialog<br>contains a list of embedded scripts found within the project being<br>opened and allows for each embedded script to be previewed directly<br>within that dialog.<br><br>For map layer actions and attribute form custom init code, QGIS will <br>defer the dialog until an action is triggered or an attribute form<br>is opened. This allows for the newly-introduced security measure to not<br>have an impact on users' workflow unless and until it is relevant and<br>necessary.<br><br>It’s also worth mentioning that contrary to macros and expression <br>functions, the layer actions and attribute form init code were until <br>this work not placed behind a user permission mechanism, which <br>allowed for arbitrary code to be executed, in many cases without the <br>knowledge by users of the potential risks. <br><br>To drive this new UX, a new objects visitor set of classes has been <br>added to traverse a given project and its layers to gather all embedded <br>scripts. This ensures that the functionality can easily be extended when <br>new embedded scripts are added in the future.<br><br>I would like to thank the QGIS grant programme for having sponsored <br>what amounts to a substantial leap forward in the way we handle safety <br>and user awareness around embedded scripts.<br><br>Best regards,<br><br>Mathieu Pellerin<br>OPENGIS.ch</div>