Skip to content

Commit 784de06

Browse files
fix: revert pipeline prompt to $(cat) inline expansion (#276)
The @file syntax for --prompt is not supported by copilot in pipeline contexts. Revert to --prompt "$(cat file)" which works reliably in the AWF bash entrypoint. The local dev path (run.rs) retains @file since it avoids Windows cmd.exe argument length limits. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0c4fbc8 commit 784de06

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/data/1es-base.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ extends:
370370
--container-workdir "{{ working_directory }}" \
371371
--log-level info \
372372
--proxy-logs-dir "$(Agent.TempDirectory)/staging/logs/firewall" \
373-
-- '/tmp/awf-tools/copilot --prompt @/tmp/awf-tools/agent-prompt.md --additional-mcp-config @/tmp/awf-tools/mcp-config.json {{ copilot_params }}' \
373+
-- '/tmp/awf-tools/copilot --prompt "$(cat /tmp/awf-tools/agent-prompt.md)" --additional-mcp-config @/tmp/awf-tools/mcp-config.json {{ copilot_params }}' \
374374
2>&1 \
375375
| sed -u 's/##vso\[/[VSO-FILTERED] vso[/g; s/##\[/[VSO-FILTERED] [/g' \
376376
| tee "$AGENT_OUTPUT_FILE" \
@@ -563,7 +563,7 @@ extends:
563563
--container-workdir "{{ working_directory }}" \
564564
--log-level info \
565565
--proxy-logs-dir "$(Agent.TempDirectory)/threat-analysis-logs/firewall" \
566-
-- '/tmp/awf-tools/copilot --prompt @/tmp/awf-tools/threat-analysis-prompt.md {{ copilot_params }}' \
566+
-- '/tmp/awf-tools/copilot --prompt "$(cat /tmp/awf-tools/threat-analysis-prompt.md)" {{ copilot_params }}' \
567567
2>&1 \
568568
| sed -u 's/##vso\[/[VSO-FILTERED] vso[/g; s/##\[/[VSO-FILTERED] [/g' \
569569
| tee "$THREAT_OUTPUT_FILE" \

src/data/base.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ jobs:
341341
--container-workdir "{{ working_directory }}" \
342342
--log-level info \
343343
--proxy-logs-dir "$(Agent.TempDirectory)/staging/logs/firewall" \
344-
-- '/tmp/awf-tools/copilot --prompt @/tmp/awf-tools/agent-prompt.md --additional-mcp-config @/tmp/awf-tools/mcp-config.json {{ copilot_params }}' \
344+
-- '/tmp/awf-tools/copilot --prompt "$(cat /tmp/awf-tools/agent-prompt.md)" --additional-mcp-config @/tmp/awf-tools/mcp-config.json {{ copilot_params }}' \
345345
2>&1 \
346346
| sed -u 's/##vso\[/[VSO-FILTERED] vso[/g; s/##\[/[VSO-FILTERED] [/g' \
347347
| tee "$AGENT_OUTPUT_FILE" \
@@ -532,7 +532,7 @@ jobs:
532532
--container-workdir "{{ working_directory }}" \
533533
--log-level info \
534534
--proxy-logs-dir "$(Agent.TempDirectory)/threat-analysis-logs/firewall" \
535-
-- '/tmp/awf-tools/copilot --prompt @/tmp/awf-tools/threat-analysis-prompt.md {{ copilot_params }}' \
535+
-- '/tmp/awf-tools/copilot --prompt "$(cat /tmp/awf-tools/threat-analysis-prompt.md)" {{ copilot_params }}' \
536536
2>&1 \
537537
| sed -u 's/##vso\[/[VSO-FILTERED] vso[/g; s/##\[/[VSO-FILTERED] [/g' \
538538
| tee "$THREAT_OUTPUT_FILE" \

0 commit comments

Comments
 (0)