Skip to content

[cli-tools-test] agenticworkflows compile MCP tool defaults to strict mode, causing unwanted lock-file diffs #49482

Description

@github-actions

Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

Details

The threat detection engine failed to produce results.

Review the workflow run logs for details.

Problem Description

The compile tool in the agentic-workflows MCP server appears to default strict to true, even when the --strict flag is not passed. This causes the generated .lock.yml to differ from the committed version for workflows that were originally compiled without strict mode (e.g. ace-editor.md), producing unwanted diffs and dropping the Enforce strict mode policy step.

Command/Tool

  • Tool: compile
  • Command: printf '{"workflows":["ace-editor"]}' | agenticworkflows compile .

Steps to Reproduce

  1. git status shows a clean working tree for .github/workflows/.
  2. Run agenticworkflows compile with {"workflows":["ace-editor"]} (no strict param supplied).
  3. Run git diff .github/workflows/ace-editor.lock.yml.

Expected Behavior

Without an explicit strict parameter, compile should use the workflow's existing/previous strict setting (or default false, matching gh aw compile CLI default), leaving the lock file unchanged when the markdown source hasn't changed.

Actual Behavior

The regenerated lock file changes:

-          GH_AW_COMPILED_STRICT: "false"
+          GH_AW_COMPILED_STRICT: "true"

and the gh-aw-metadata header gains a "strict":true field. It also removes the Enforce strict mode policy step for the previous (non-strict) mode. Simply running compile via the MCP tool without special flags mutates lock files that would otherwise be byte-identical, and could mask/alter workflow policy enforcement behavior.

Environment

  • Repository: github/gh-aw
  • Run ID: 30687098351
  • Date: 2026-08-01

Impact

  • Severity: Medium
  • Frequency: Always (any compile call without explicit strict:false)
  • Workaround: Pass {"strict":false} explicitly when compiling via the MCP tool.

Logs/Diagnostics

-# gh-aw-metadata: {...,"agent_id":"copilot",...}
+# gh-aw-metadata: {...,"strict":true,"agent_id":"copilot",...}
...
-          GH_AW_COMPILED_STRICT: "false"
+          GH_AW_COMPILED_STRICT: "true"
...
-      - name: Enforce strict mode policy
-        if: ${{ vars.GH_AW_POLICY_STRICT == 'true' }}
-        run: |
-          echo "::error::GH_AW_POLICY_STRICT=true but this workflow was not compiled in strict mode. Recompile with --strict or strict: true."
-          exit 1

Additional Context

Other findings from this session's exploratory testing were all clean: status, logs (basic download, workflow-name filter for unknown workflow, future-date edge case), audit (successful run, invalid run_id) all returned correct results with clear, actionable error messages and no crashes.

Generated by 🧪 Daily Cli Tools Tester · auto · 56.3 AIC · ⊞ 13.4K ·

  • expires on Aug 7, 2026, 10:14 PM UTC-08:00

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions