Skip to content

feat: Add issue duplication agent using cache memory#299

Merged
Mossaka merged 5 commits intomainfrom
copilot/add-issue-duplication-agent
Jan 17, 2026
Merged

feat: Add issue duplication agent using cache memory#299
Mossaka merged 5 commits intomainfrom
copilot/add-issue-duplication-agent

Conversation

Copy link
Contributor

Copilot AI commented Jan 17, 2026

  • Create issue duplication detector workflow with cache memory
  • Add MCP pagination import for GitHub tools
  • Improve duplicate detection criteria and pagination guidance
  • Add bash tool with all commands allowed (bash: ["*"])
Original prompt

Add an issue duplication agent that leverage cache memory and comments on duplicated issues

Custom agent used: create-agentic-workflow
Design agentic workflows using GitHub Agentic Workflows (gh-aw) extension with interactive guidance on triggers, tools, and security best practices.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot stopped work on behalf of Mossaka due to an error January 17, 2026 09:42
Copilot AI and others added 3 commits January 17, 2026 09:45
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Jan 17, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link

github-actions bot commented Jan 17, 2026

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 77.19% 77.19% ➡️ +0.00%
Statements 77.27% 77.27% ➡️ +0.00%
Functions 77.17% 77.17% ➡️ +0.00%
Branches 69.76% 69.76% ➡️ +0.00%

Coverage comparison generated by scripts/ci/compare-coverage.ts

@github-actions
Copy link

github-actions bot commented Jan 17, 2026

📰 DEVELOPING STORY: Smoke Copilot reports failed. Our correspondents are investigating the incident...

@github-actions
Copy link

Smoke Test Results

Last 2 merged PRs:

Tests:

  • ✅ GitHub MCP (retrieved PRs)
  • ✅ Playwright (page title: "GitHub · Change is constant. GitHub keeps you ahead. · GitHub")
  • ✅ File writing (created /tmp/gh-aw/agent/smoke-test-claude-21092351052.txt)
  • ✅ Bash tool (verified file contents)

Status: PASS

AI generated by Smoke Claude

- shared/mcp-pagination.md
tools:
github:
toolsets: [issues, repos, search]
Copy link
Collaborator

Choose a reason for hiding this comment

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

@copilot allow allbash tools

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added bash: ["*"] to allow all bash commands in commit 95967a9.

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copilot AI requested a review from Mossaka January 17, 2026 20:17
@Mossaka Mossaka marked this pull request as ready for review January 17, 2026 20:23
comment_repo: ""
steps:
- name: Setup Scripts
uses: githubnext/gh-aw/actions/setup@v0.36.0

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Issue Duplication Detector' step
Uses Step
uses 'githubnext/gh-aw/actions/setup' with ref 'v0.36.0', not a pinned commit hash
output_types: ${{ steps.collect_output.outputs.output_types }}
steps:
- name: Setup Scripts
uses: githubnext/gh-aw/actions/setup@v0.36.0

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Issue Duplication Detector' step
Uses Step
uses 'githubnext/gh-aw/actions/setup' with ref 'v0.36.0', not a pinned commit hash
total_count: ${{ steps.missing_tool.outputs.total_count }}
steps:
- name: Setup Scripts
uses: githubnext/gh-aw/actions/setup@v0.36.0

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Issue Duplication Detector' step
Uses Step
uses 'githubnext/gh-aw/actions/setup' with ref 'v0.36.0', not a pinned commit hash
success: ${{ steps.parse_results.outputs.success }}
steps:
- name: Setup Scripts
uses: githubnext/gh-aw/actions/setup@v0.36.0

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Issue Duplication Detector' step
Uses Step
uses 'githubnext/gh-aw/actions/setup' with ref 'v0.36.0', not a pinned commit hash
activated: ${{ steps.check_membership.outputs.is_team_member == 'true' }}
steps:
- name: Setup Scripts
uses: githubnext/gh-aw/actions/setup@v0.36.0

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Issue Duplication Detector' step
Uses Step
uses 'githubnext/gh-aw/actions/setup' with ref 'v0.36.0', not a pinned commit hash
process_safe_outputs_temporary_id_map: ${{ steps.process_safe_outputs.outputs.temporary_id_map }}
steps:
- name: Setup Scripts
uses: githubnext/gh-aw/actions/setup@v0.36.0

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Issue Duplication Detector' step
Uses Step
uses 'githubnext/gh-aw/actions/setup' with ref 'v0.36.0', not a pinned commit hash
permissions: {}
steps:
- name: Setup Scripts
uses: githubnext/gh-aw/actions/setup@v0.36.0

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Issue Duplication Detector' step
Uses Step
uses 'githubnext/gh-aw/actions/setup' with ref 'v0.36.0', not a pinned commit hash
@github-actions
Copy link

⚠️ Security Review: Critical Finding

I've identified a significant security concern in this PR that weakens the firewall's security posture.

Issue: Unrestricted Bash Command Execution

File: .github/workflows/issue-duplication-detector.md (lines 17-18)

bash:
  - "*"

This configuration grants the AI agent unrestricted bash command execution within the firewall container. The bash: ["*"] setting compiles to --allow-all-tools in the GitHub Copilot CLI invocation (line 770 of the compiled .lock.yml), permitting execution of ANY bash command without restrictions.

Security Impact

  1. Bypasses command restrictions: While the firewall controls network egress, unrestricted bash access allows:

    • Arbitrary command execution that could probe for vulnerabilities
    • Potential iptables manipulation (if NET_ADMIN capability is accessible)
    • Access to sensitive files within the container
    • Creation of reverse shells or exfiltration mechanisms
  2. Expands attack surface: Unrestricted bash commands significantly expand the attack surface beyond network operations to include file system manipulation, process spawning, and potential container escape attempts.

  3. Contradicts security model: The AWF's security model is based on restricting agent capabilities. Using bash: ["*"] defeats this purpose and creates a large trust boundary.

Comparison with Repository Patterns

Other workflows in this repository use restricted bash command allowlists:

bash:
  - cat
  - ls
  - grep
  - find

This PR deviates from the established security pattern.

Recommended Mitigation

Option 1 (Recommended): Restrict bash commands to only what's needed:

bash:
  - cat
  - ls
  - grep
  - find
  - jq

Option 2: Remove bash tool entirely if not required - the agent has GitHub MCP tools for issue operations.

Option 3: If unrestricted bash is genuinely necessary, document the security justification and add compensating controls.

Suggested Action

Please update the bash tool configuration to use a restricted allowlist before merging this PR.

AI generated by Security Guard

@Mossaka Mossaka changed the title [WIP] Add issue duplication agent using cache memory feat: Add issue duplication agent using cache memory Jan 17, 2026
@Mossaka Mossaka merged commit d20b34c into main Jan 17, 2026
34 of 37 checks passed
@Mossaka Mossaka deleted the copilot/add-issue-duplication-agent branch January 17, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants