The actions that you create will run in a sandboxed environment, namely a container. The code that you write nonetheless should follow best practices to ensure that the code is reasonably secure against remote code exploits and malicious inputs. You should also be cognizant of the packages you bundle and check them routinely for vulnerabilities.
There are several considerations to be mindful of when authoring actions:
Actions which are vulnerable to code injection attacks or parameter hijacking could end up leaking bound action parameters, or worse persisting malicious code within the sandbox for the lifetime of the function execution. Moreover, an action sandbox may be reused for more than one function invocation, and hence an attacker could persist their code for the lifetime of the sandbox as well.