aws-samples / jenkins-on-aws

MIT No Attribution
58 stars 27 forks source link

Modify jinja2 environment set autoescape to True #23

Closed bowmnn closed 2 years ago

bowmnn commented 2 years ago

Jinja2 is a Python HTML templating system. It is typically used to build web applications, though appears in other places well, notably the Ansible automation system. When configuring the Jinja2 environment, the option to use autoescaping on input can be specified. When autoescaping is enabled, Jinja2 will filter input strings to escape any HTML content submitted via template variables. Without escaping HTML input the application becomes vulnerable to Cross Site Scripting (XSS) attacks.

Unfortunately, autoescaping is False by default.

For more information see Bandit documentation here