Skip to content

fix(examples): enable select_autoescape in Jinja2 environments (VULN-115241) - #289

Open
etserend wants to merge 1 commit into
mainfrom
fix/vuln-115241-jinja2-autoescape
Open

etserend wants to merge 1 commit into
mainfrom
fix/vuln-115241-jinja2-autoescape

Conversation

@etserend

Copy link
Copy Markdown
Contributor

Summary

  • The startup-simulator-3000 and weather-vibes-agent examples created jinja2.Environment without autoescape, which Semgrep flags (autoescape-disabled).
  • Both now pass autoescape=select_autoescape(["html", "xml"]). Their .j2 prompt templates render exactly as before, since these apps render plain-text LLM prompts rather than HTML.
  • Resolves VULN-115241.

Test plan

  • python -I -m py_compile on both changed files
  • Example apps not run (require OpenAI credentials)

🤖 Generated with Claude Code

…115241)

Co-Authored-By: Claude Code <noreply@anthropic.com>

@etserend etserend left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 This review was generated by the Astra agent (claude-opus-5-5). It may contain mistakes.

Verdict: approve — Both flagged Jinja2 environments now set select_autoescape, and the plain-text .j2 prompt output does not change.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant