Skip to content

fix: do template substition after parsing prompt YAML#136

Merged
sgoedecke merged 2 commits intoactions:mainfrom
dsanders11:fix/template-substition
Nov 23, 2025
Merged

fix: do template substition after parsing prompt YAML#136
sgoedecke merged 2 commits intoactions:mainfrom
dsanders11:fix/template-substition

Conversation

@dsanders11
Copy link
Contributor

Fixes #117.

Copilot AI review requested due to automatic review settings October 21, 2025 04:43
@dsanders11 dsanders11 requested a review from a team as a code owner October 21, 2025 04:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes issue #117 by changing when template variable substitution occurs in the prompt file loading process. Instead of replacing template variables in the raw YAML file content before parsing, the substitution now happens after parsing, specifically on the message content fields. This allows template variables to be used within YAML string values without interfering with YAML parsing.

Key changes:

  • Template variable substitution moved from pre-parsing to post-parsing stage
  • Substitution now applied individually to each message's content field after YAML parsing

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@sgoedecke sgoedecke enabled auto-merge November 23, 2025 23:22
@sgoedecke sgoedecke merged commit 36ea137 into actions:main Nov 23, 2025
6 checks passed
@sgoedecke
Copy link
Contributor

Sorry for the delay. Thanks for raising this!

@dsanders11 dsanders11 deleted the fix/template-substition branch November 23, 2025 23:59
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.

Prompt template substitution is insecure

3 participants