Propagate context to external threat detection - #50853
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot resolve the merge conflicts on this branch. |
There was a problem hiding this comment.
Pull request overview
Propagates workflow context and strict-mode inputs into external threat detection.
Changes:
- Adds shared threat-detection environment rendering.
- Adds compiler coverage for custom prompt propagation.
- Regenerates affected workflow lock files.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/threat_detection_test.go |
Tests external detector context propagation. |
pkg/workflow/threat_detection_steps.go |
Centralizes detection environment rendering. |
pkg/workflow/threat_detection_external.go |
Adds context to the AWF execution environment. |
.github/workflows/typist.lock.yml |
Regenerates detector environment. |
.github/workflows/prompt-clustering-analysis.lock.yml |
Regenerates detector environment. |
.github/workflows/github-mcp-structural-analysis.lock.yml |
Regenerates detector environment. |
.github/workflows/example-workflow-analyzer.lock.yml |
Regenerates detector environment. |
.github/workflows/duplicate-code-detector.lock.yml |
Regenerates detector environment. |
.github/workflows/detection-analysis-report.lock.yml |
Regenerates detector environment. |
.github/workflows/design-decision-gate.lock.yml |
Regenerates detector environment. |
.github/workflows/daily-token-consumption-report.lock.yml |
Regenerates detector environment. |
.github/workflows/daily-rendering-scripts-verifier.lock.yml |
Regenerates detector environment. |
.github/workflows/daily-reliability-review.lock.yml |
Regenerates detector environment. |
.github/workflows/daily-observability-report.lock.yml |
Regenerates detector environment. |
.github/workflows/daily-fact.lock.yml |
Regenerates detector environment. |
.github/workflows/daily-evals-report.lock.yml |
Regenerates detector environment. |
.github/workflows/daily-elixir-credo-snippet-audit.lock.yml |
Regenerates detector environment. |
.github/workflows/daily-doc-healer.lock.yml |
Regenerates detector environment. |
.github/workflows/daily-code-metrics.lock.yml |
Regenerates detector environment. |
.github/workflows/daily-choice-test.lock.yml |
Regenerates detector environment. |
.github/workflows/daily-caveman-optimizer.lock.yml |
Regenerates detector environment. |
.github/workflows/daily-cache-strategy-analyzer.lock.yml |
Regenerates detector environment. |
.github/workflows/daily-aw-cross-repo-compile-check.lock.yml |
Regenerates detector environment. |
.github/workflows/daily-astrostylelite-markdown-spellcheck.lock.yml |
Regenerates detector environment. |
.github/workflows/daily-agentrx-trace-optimizer.lock.yml |
Regenerates detector environment. |
.github/workflows/craft.lock.yml |
Regenerates detector environment and step ordering. |
.github/workflows/copilot-session-insights.lock.yml |
Regenerates detector environment. |
.github/workflows/copilot-agent-analysis.lock.yml |
Regenerates detector environment. |
.github/workflows/contribution-check.lock.yml |
Regenerates detector environment and step ordering. |
.github/workflows/cloclo.lock.yml |
Regenerates detector environment. |
.github/workflows/cli-version-checker.lock.yml |
Regenerates detector environment. |
.github/workflows/claude-code-user-docs-review.lock.yml |
Regenerates detector environment. |
.github/workflows/ci-doctor.lock.yml |
Regenerates detector environment. |
.github/workflows/ci-coach.lock.yml |
Regenerates detector environment and step ordering. |
.github/workflows/changeset.lock.yml |
Regenerates detector environment. |
.github/workflows/blog-auditor.lock.yml |
Regenerates detector environment. |
.github/workflows/aw-failure-investigator.lock.yml |
Regenerates detector environment. |
.github/workflows/avenger.lock.yml |
Regenerates detector environment. |
.github/workflows/audit-workflows.lock.yml |
Regenerates detector environment. |
.github/workflows/artifacts-summary.lock.yml |
Regenerates detector environment and step ordering. |
.github/workflows/archivx-agentic-workflows-analyzer.lock.yml |
Regenerates detector environment. |
.github/workflows/archie.lock.yml |
Regenerates detector environment and step ordering. |
.github/workflows/approach-validator.lock.yml |
Regenerates detector environment. |
.github/workflows/api-consumption-report.lock.yml |
Regenerates detector environment. |
.github/skills/agentic-workflows/SKILL.md |
Adds the designer-mappings workflow reference. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 79/101 changed files
- Comments generated: 1
- Review effort level: Balanced
| // Pass context as environment variables: AWF's --env-all forwards them to | ||
| // threat-detect without interpolating user-controlled prompt text into a command. | ||
| steps = append(steps, c.buildThreatDetectionContextEnvVars(data, continueOnError, continueOnErrorExpr)...) |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Warning Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs for details. @copilot This PR is currently blocked by merge conflicts. Please run
|
|
🎉 This pull request is included in a new release. Release: |
External
threat-detectexecution did not receive workflow context, custom prompts, or detection validation inputs, causing unnamed-workflow prompts and inconsistent strict-mode behavior.External detector environment
WORKFLOW_NAME,WORKFLOW_DESCRIPTION,HAS_PATCH, andGH_AW_DETECTION_CONTINUE_ON_ERRORto the AWF execution step.CUSTOM_PROMPTonly when configured.Safe prompt propagation
Shared rendering