Skip to content

[WIP] Fix daily mcp concurrency analysis by adding jq and git log to bash allowlist#23886

Merged
pelikhan merged 2 commits intomainfrom
copilot/add-jq-and-git-log-to-allowlist
Apr 1, 2026
Merged

[WIP] Fix daily mcp concurrency analysis by adding jq and git log to bash allowlist#23886
pelikhan merged 2 commits intomainfrom
copilot/add-jq-and-git-log-to-allowlist

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 1, 2026

  • Add jq -r '.[].name' pkg/workflow/js/safe_outputs_tools.json to bash allowlist
  • Add git log -1 --format='%ai' -- actions/setup/js/*.cjs to bash allowlist
  • Add git log -3 --format='%ai %s' -- actions/setup/js/*.cjs to bash allowlist
  • Recompile workflow to regenerate .lock.yml
  • Validate build and compilation succeed

@pelikhan pelikhan marked this pull request as ready for review April 1, 2026 12:55
Copilot AI review requested due to automatic review settings April 1, 2026 12:55
@pelikhan pelikhan merged commit b6dfd10 into main Apr 1, 2026
1 check passed
@pelikhan pelikhan deleted the copilot/add-jq-and-git-log-to-allowlist branch April 1, 2026 12:56
Copilot stopped work on behalf of pelikhan due to an error April 1, 2026 12:56
Copilot AI requested a review from pelikhan April 1, 2026 12:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the “Daily MCP Tool Concurrency Analysis” workflow to allow additional shell commands needed by the agent (JSON parsing and git-history inspection) and regenerates the compiled/locked workflow.

Changes:

  • Add jq -r '.[].name' ... to the bash allowlist for extracting tool names from safe_outputs_tools.json.
  • Add git log commands to the bash allowlist to support “recently modified tools” prioritization.
  • Recompile/regenerate .github/workflows/daily-mcp-concurrency-analysis.lock.yml to reflect the updated allowlist.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/daily-mcp-concurrency-analysis.md Expands the allowed bash commands (jq + git log) used by the concurrency analysis agent.
.github/workflows/daily-mcp-concurrency-analysis.lock.yml Regenerated lock/compiled workflow reflecting the updated allowlist and prompt hashes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

edit:
bash:
- "cat pkg/workflow/js/safe_outputs_tools.json"
- "jq -r '.[].name' pkg/workflow/js/safe_outputs_tools.json"
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow instructions later recommend running cat pkg/workflow/js/safe_outputs_tools.json | jq -r '.[].name' | sort, but the bash allowlist here only permits cat ..., jq -r '.[].name' pkg/..., and sort as separate commands (a piped command likely won’t match the allowlist). Consider updating the instructions to use the allowlisted standalone jq ... file | sort (or explicitly allow the piped form) so the agent doesn’t get blocked following the documented steps.

Suggested change
- "jq -r '.[].name' pkg/workflow/js/safe_outputs_tools.json"
- "jq -r '.[].name' pkg/workflow/js/safe_outputs_tools.json"
- "cat pkg/workflow/js/safe_outputs_tools.json | jq -r '.[].name' | sort"

Copilot uses AI. Check for mistakes.
Comment on lines +46 to +47
- "git log -1 --format='%ai' -- actions/setup/js/*.cjs"
- "git log -3 --format='%ai %s' -- actions/setup/js/*.cjs"
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The allowlisted git log commands use single quotes and a glob (actions/setup/js/*.cjs), but the instructions later in this workflow show per-tool invocations like git log -1 --format="%ai" -- actions/setup/js/<tool_name>.cjs. If the agent follows the documented command shape (double quotes / specific file), it may still be denied by the sandbox allowlist. Align the documented command(s) with the allowlist, or broaden the allowlist to cover the per-file form that Step 3 describes.

Suggested change
- "git log -1 --format='%ai' -- actions/setup/js/*.cjs"
- "git log -3 --format='%ai %s' -- actions/setup/js/*.cjs"
- "git log -1 --format=\"%ai\" -- actions/setup/js/<tool_name>.cjs"
- "git log -3 --format=\"%ai %s\" -- actions/setup/js/<tool_name>.cjs"

Copilot uses AI. Check for mistakes.
- "grep -r 'module.exports' actions/setup/js --include='*.cjs'"
- "head -n * actions/setup/js/*.cjs"
- "git log -1 --format='%ai' -- actions/setup/js/*.cjs"
- "git log -3 --format='%ai %s' -- actions/setup/js/*.cjs"
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git log -3 --format='%ai %s' ... exposes commit subjects to the agent prompt. If commit messages can contain sensitive/internal info, consider limiting this to timestamps only (e.g., omit %s) unless the subject is strictly needed for the selection logic.

Suggested change
- "git log -3 --format='%ai %s' -- actions/setup/js/*.cjs"
- "git log -3 --format='%ai' -- actions/setup/js/*.cjs"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[q] fix(daily-mcp-concurrency-analysis): add jq and git log to bash allowlist (#23852)

3 participants