Skip to content

Harden security: enable Jinja2 autoescape, add SQL table whitelist, enforce HTTPS#29

Merged
bencehezso merged 1 commit into
mainfrom
tasks/fix-security
May 12, 2026
Merged

Harden security: enable Jinja2 autoescape, add SQL table whitelist, enforce HTTPS#29
bencehezso merged 1 commit into
mainfrom
tasks/fix-security

Conversation

@bencehezso
Copy link
Copy Markdown
Contributor

Hardens security across the codebase by closing three vectors identified during the codebase audit.

This PR enables Jinja2 autoescape on the HTML report template to prevent XSS from user-provided or dataset-sourced fields, adds a table name whitelist in load_data() to prevent SQL injection via interpolated table names, and enforces HTTPS in all API URL builders so that http:// hosts are upgraded rather than passed through with bearer tokens in cleartext.

@bencehezso bencehezso self-assigned this May 12, 2026
@bencehezso bencehezso added the enhancement New feature or request label May 12, 2026
@bencehezso bencehezso merged commit 4ae97c6 into main May 12, 2026
3 checks passed
@bencehezso bencehezso deleted the tasks/fix-security branch May 12, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant