Skip to content

Clarify the security scope for untrusted templates - #4875

Merged
fabpot merged 1 commit into
twigphp:3.xfrom
fabpot:sandbox-security-docs
Jul 28, 2026
Merged

Clarify the security scope for untrusted templates#4875
fabpot merged 1 commit into
twigphp:3.xfrom
fabpot:sandbox-security-docs

Conversation

@fabpot

@fabpot fabpot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@upsun-dispatch

Copy link
Copy Markdown

📋 PR Summary

This PR adds security documentation clarifying that Twig treats template source as trusted code unless rendered in the Twig sandbox. It adds a new .github/SECURITY.md policy file with reporting instructions and a scope statement for untrusted templates, and adds a warning admonition to doc/sandbox.rst conveying the same message.

Changes
Layer / File(s) Summary
security documentation
.github/SECURITY.md New security policy file describing how to report issues and clarifying that behavior from rendering untrusted templates without the sandbox is out of scope.
doc/sandbox.rst Adds a warning admonition stating that the regular Twig environment is not a security boundary and that untrusted templates require the sandbox.

@fabpot
fabpot merged commit ccc4a80 into twigphp:3.x Jul 28, 2026
54 checks passed
@fabpot
fabpot deleted the sandbox-security-docs branch July 28, 2026 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants