Avoid injection of full CSS rules. Only allow user to provide CSS values through the built-in style binding of the project’s frontend library. For example: Vue’s object syntax
, Svelte’s style directive
Avoid injection of external JavaScript via all means. If injection is necessary, e.g. Google OAuth, seek for equivalent NPM package, e.g. google-auth-library
, to be able to scan for security issues.