Conversation
Collaborator
|
@copilot add import jqschema.md to copilot agent auditor agentic workflow and it should compile correctly |
…ing WORKFLOW_MARKDOWN - Add download step for prompt.txt artifact in buildDownloadArtifactStep - Update threat_detection.md template to reference prompt file path instead of embedding markdown content - Update buildSetupScript to check for prompt file and use WORKFLOW_PROMPT_FILE placeholder - Remove WORKFLOW_MARKDOWN environment variable from buildWorkflowContextEnvVars - All tests passing Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Add TestDownloadArtifactStepIncludesPrompt to verify prompt download step - Add TestSetupScriptReferencesPromptFile to verify setup script uses prompt file - Add TestBuildWorkflowContextEnvVarsExcludesMarkdown to verify WORKFLOW_MARKDOWN removal - All tests passing, linting clean Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update detection creation prompt to avoid WORKFLOW_MARKDOWN
Update threat detection to download prompt.txt artifact instead of embedding WORKFLOW_MARKDOWN
Oct 18, 2025
- Added shared/jqschema.md to the imports list in audit-workflows.md - Workflow compiles successfully with the import - jqschema utility script and documentation now available to the audit agent Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Added |
Contributor
|
Agentic Changeset Generator triggered by this pull request. |
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.
Problem
When agentic workflows have large markdown content, the threat detection job was hitting GitHub Actions' 21KB limit for environment variable values. The
WORKFLOW_MARKDOWNenvironment variable was being used to embed the entire workflow prompt content, which could easily exceed this limit for complex workflows.Solution
This PR updates the threat detection system to download the
prompt.txtartifact instead of embedding the workflow markdown as an environment variable. Theprompt.txtartifact is already uploaded by the main agent job, so this change leverages existing infrastructure.Key Changes
Added prompt artifact download step - The threat detection job now downloads the
prompt.txtartifact alongside the existing agent output and patch artifacts.Updated threat detection template - Modified
templates/threat_detection.mdto reference the prompt file path ({WORKFLOW_PROMPT_FILE}) instead of embedding the full markdown content ({WORKFLOW_MARKDOWN}). The template now instructs the LLM to load and read the prompt file.Updated setup script - The JavaScript setup script in
buildSetupScript()now checks for the downloaded prompt file and passes the file path information to the LLM instead of embedding the content inline.Removed WORKFLOW_MARKDOWN environment variable - Eliminated the
WORKFLOW_MARKDOWNenvironment variable frombuildWorkflowContextEnvVars(), keeping onlyWORKFLOW_NAMEandWORKFLOW_DESCRIPTION.Added jqschema import to audit workflow - Added
shared/jqschema.mdimport to theaudit-workflows.mdworkflow to provide JSON schema discovery utilities for analyzing complex tool outputs.Benefits
Testing
WORKFLOW_MARKDOWNis no longer present in any compiled workflowExample
Before: Threat detection job failed with workflows containing >21KB of markdown content
After: Threat detection job downloads the prompt file and instructs the LLM to load it:
The threat detection prompt now contains:
## Workflow Source Context The workflow prompt file is available at: /tmp/gh-aw/threat-detection/prompt.txt (X bytes) Load and read this file to understand the intent and context of the workflow.Fixes issue with large workflow prompts exceeding environment variable size limits.
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.