Using R or Python scripts on Power BI has certain security risks , such as data accessibility by the script. It includes proper permission and data masking.
External Libraries: Unverified external libraries can introduce vulnerabilities, so use trusted, well-maintained packages.
Code Execution: Malicious code can be executed through scripts. To mitigate this, Enable strict security settings and validate any code running in Power BI.
Best practices include using Power BI’s security roles, ensuring data encryption, and restricting access to external libraries through sandboxing.