Skip to content

Update dedupe workflow to have correct name#5327

Merged
peterzhuamazon merged 16 commits into
opensearch-project:mainfrom
qianheng-aws:refactor/dedupe-reusable-workflow
Apr 9, 2026
Merged

Update dedupe workflow to have correct name#5327
peterzhuamazon merged 16 commits into
opensearch-project:mainfrom
qianheng-aws:refactor/dedupe-reusable-workflow

Conversation

@qianheng-aws

@qianheng-aws qianheng-aws commented Apr 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Rename workflow to Issue Dedupe Main

Test plan

  • Verified workflow YAML syntax
  • Trigger workflow_dispatch to confirm detect job works
  • Verify scheduled auto-close job runs correctly

Replace inline workflow logic in all three issue dedup files with thin
callers to opensearch-project/opensearch-build/.github/workflows/issue-dedupe.yml@main.
This centralizes the dedupe logic (detect, auto-close, remove-label) into
a single reusable workflow, reducing per-repo maintenance burden.

Signed-off-by: Heng Qian <qianheng@amazon.com>
Point reusable workflow references to qianheng-aws/opensearch-build
branch add-issue-dedupe-workflow until the upstream PR is merged.

Signed-off-by: Heng Qian <qianheng@amazon.com>
- Three caller workflows now delegate to opensearch-build reusable workflows
- Remove .claude/commands/dedupe.md (prompt now lives in opensearch-build)
- Remove scripts/comment-on-duplicates.sh (logic inlined in reusable workflow)

Signed-off-by: Heng Qian <qianheng@amazon.com>
Signed-off-by: Heng Qian <qianheng@amazon.com>
Signed-off-by: Heng Qian <qianheng@amazon.com>
Remove redundant parameter passing — reusable workflows now derive
issue context from github.event directly.

Signed-off-by: Heng Qian <qianheng@amazon.com>
- Point to opensearch-project/opensearch-build@main
- Rename secret to BEDROCK_ACCESS_ROLE_ISSUE
- Add schedule trigger and auto-close job
- Remove workflow_dispatch (detect derives issue from github.event)

Signed-off-by: Heng Qian <qianheng@amazon.com>
Signed-off-by: Heng Qian <qianheng@amazon.com>
Signed-off-by: Heng Qian <qianheng@amazon.com>
Signed-off-by: Heng Qian <qianheng@amazon.com>
Signed-off-by: Heng Qian <qianheng@amazon.com>
Signed-off-by: Heng Qian <qianheng@amazon.com>
Signed-off-by: Heng Qian <qianheng@amazon.com>
Signed-off-by: Heng Qian <qianheng@amazon.com>
Signed-off-by: Heng Qian <qianheng@amazon.com>
@github-actions

github-actions Bot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

PR Code Analyzer ❗

AI-powered 'Code-Diff-Analyzer' found issues on commit f401cdf.

PathLineSeverityDescription
.github/workflows/issue-dedupe.yml29highReusable workflow referenced at '@main' (opensearch-project/opensearch-build/.github/workflows/issue-dedupe-detect.yml@main) rather than a pinned commit SHA. Any change to the external repo's main branch will immediately affect this workflow, making this a supply chain attack vector.
.github/workflows/issue-dedupe.yml40highReusable workflow referenced at '@main' (opensearch-project/opensearch-build/.github/workflows/issue-dedupe-autoclose.yml@main) rather than a pinned commit SHA. Same supply chain risk as above — the external workflow content is not immutable.
.github/workflows/issue-dedupe.yml35highSecret 'BEDROCK_ACCESS_ROLE_ISSUE_DEDUPE' is passed to an external reusable workflow pinned at '@main'. If that external repository is compromised or the workflow is modified, the secret (an AWS IAM role ARN used for OIDC trust) could be exfiltrated or abused to assume cloud credentials.
.github/workflows/issue-dedupe.yml33high'id-token: write' permission is granted and delegated to the external reusable workflow at '@main'. This allows the external workflow to request OIDC tokens from GitHub's identity provider, which can be exchanged for cloud credentials (AWS, GCP, Azure). Combined with the mutable '@main' reference, this creates a serious privilege escalation path.

The table above displays the top 10 most important findings.

Total: 4 | Critical: 0 | High: 4 | Medium: 0 | Low: 0


Pull Requests Author(s): Please update your Pull Request according to the report above.

Repository Maintainer(s): You can bypass diff analyzer by adding label skip-diff-analyzer after reviewing the changes carefully, then re-run failed actions. To re-enable the analyzer, remove the label, then re-run all actions.


⚠️ Note: The Code-Diff-Analyzer helps protect against potentially harmful code patterns. Please ensure you have thoroughly reviewed the changes beforehand.

Thanks.

…ble-workflow

Signed-off-by: Heng Qian <qianheng@amazon.com>

# Conflicts:
#	.github/workflows/issue-dedupe.yml
@github-actions

github-actions Bot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🧪 No relevant tests
🔒 No security concerns identified
✅ No TODO sections
🔀 No multiple PR themes
⚡ No major issues detected

@qianheng-aws qianheng-aws added the maintenance Improves code quality, but not the product label Apr 9, 2026
@peterzhuamazon peterzhuamazon changed the title Point issue dedupe workflow to upstream reusable workflows Update dedupe workflow to have correct name Apr 9, 2026
@peterzhuamazon peterzhuamazon merged commit 59cc903 into opensearch-project:main Apr 9, 2026
39 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Improves code quality, but not the product

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants