Enable Jinja2 autoescape to prevent XSS attacks

Enable autoescape=True when creating the Jinja2 Environment to
automatically escape all template variables by default. This provides
defense-in-depth protection against XSS attacks from database-sourced
content rendered in HTML reports.

Variables that contain pre-escaped HTML (constructed with html.escape()
and wrapped in Markup()) are correctly preserved and not double-escaped.

This complements the manual escaping added in the previous commit by
ensuring that any template variables not explicitly handled are still
safely escaped.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 file changed
tree: b07fe38ee7f77788348c23b8fd7741a00b6836c6
  1. .github/
  2. .vscode/
  3. docs/
  4. src/
  5. .gitignore
  6. .pre-commit-config.yaml
  7. LICENSE
  8. Makefile
  9. psr.py
  10. pyproject.toml
  11. README.md
README.md

Helpful tools for debugging AMD Zen systems

codecov PyPI

This repository hosts open tools that are useful for debugging issues on AMD systems.

Installation

Distro (Arch)

amd-debug-tools has been packaged for Arch Linux (and derivatives). You can install it using:

pacman -Sy amd-debug-tools

Using a python wheel (Generic)

It is suggested to install tools in a virtual environment either using pipx or python3 -m venv.

From PyPI

amd-debug-tools is distributed as a python wheel, which is a binary package format for Python. To install from PyPI, run the following command:

pipx install amd-debug-tools

From source

To build the package from source, you will need to the python3-build package natively installed by your distribution package manager. Then you can generate and install a wheel by running the following commands:

python3 -m build
pipx install dist/amd-debug-tools-*.whl

Ensuring path

If you have not used a pipx environment before, you may need to run the following command to set up the environment:

pipx ensurepath

This will add the pipx environment to your path.

Running in-tree

Documentation about running directly from a git checkout is available here.

Tools

Each tool has its own individual documentation page: