Optimize security-guard workflow: explicit model configuration #12761
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.
Security Guard Agent workflow failing repeatedly due to missing explicit engine configuration. Added hardcoded model specification to eliminate model detection overhead and ensure deterministic behavior.
Changes
.github/workflows/security-guard.md- Added engine configuration to frontmatter:Impact on compiled workflow (
.github/workflows/security-guard.lock.yml):model: "gpt-5.1-codex-mini"in agent execution and threat detectionGH_AW_MODEL_AGENT_COPILOTandGH_AW_MODEL_DETECTION_COPILOTenvironment variablesGH_AW_ENGINE_MODELenvironment variable for consistent model referenceResult
Workflow now uses
gpt-5.1-codex-minifor all runs without model auto-detection, providing consistent, predictable security analysis behavior.Original prompt
This section details on the original issue you should resolve
<issue_title>Optimize security-guard workflow: disable detection, use gpt-5.1-codex-mini</issue_title>
<issue_description># Q Workflow Optimization Report
Context
This PR addresses issue #12637 where the Security Guard Agent 🛡️ workflow has been failing repeatedly. The user specifically requested:
Issues Found (from issue analysis)
Security Guard Agent 🛡️ (.github/workflows/security-guard.md)
Changes Made
.github/workflows/security-guard.md
Specific changes:
Rationale:
gpt-5.1-codex-minimodel is optimized for code-related tasks and provides faster executionExpected Improvements
Validation
Changes have been validated:
Note: The .lock.yml file will be generated automatically after merge by the copilot agent workflow.
References
To apply the patch locally:
Show patch (35 lines)
Comments on the Issue (you are @copilot in this section)
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.