docs: replace unsafe step implementation in post-processing pattern example#18792
Merged
docs: replace unsafe step implementation in post-processing pattern example#18792
Conversation
…essing pattern Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix unsafe expression in documentation examples
docs: replace unsafe step implementation in post-processing pattern example
Feb 28, 2026
pelikhan
approved these changes
Feb 28, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the deterministic agentic patterns guide to avoid documenting an unsafe (and compiler-rejected) GitHub Actions template-injection pattern in the post-processing example.
Changes:
- Replaces the detailed
steps:implementation in the “Post-Processing Pattern” snippet with a placeholder to avoid showing an injection-vulnerable copy/paste example.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| gh pr comment ${{ github.event.pull_request.number }} --body-file /tmp/report.md | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - ... |
There was a problem hiding this comment.
The placeholder `steps:
- ...
is not a valid GitHub Actions step shape (steps must be objects withrun:/uses:). As written, a reader copying this snippet will get a workflow validation error. Consider replacing this with a minimal *valid* stub step (e.g., aname:plus a harmlessrun:) and/or add a comment indicating the implementation is intentionally omitted, while still avoiding unsafe${{ }}usage inrun:`.
Suggested change
| - ... | |
| - name: Placeholder format-and-notify step | |
| run: echo "TODO: implement format-and-notify steps" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The post-processing pattern example in the deterministic agentic patterns guide used
${{ inputs.summary }}and${{ github.event.pull_request.number }}directly in shellruncommands — a template injection pattern the compiler actively rejects, making the docs contradict actual behavior.Changes
docs/src/content/docs/guides/deterministic-agentic-patterns.md: Replace the 5-line unsafesteps:implementation with- ...to avoid showing a copy-pasteable injection-vulnerable example while preserving the structural intent of the snippet.Before:
After:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.