Skip to content

[Backport 3.7] Use github default token for releases - #22398

Merged
reta merged 1 commit into
opensearch-project:3.7from
opensearch-ci-bot:backport/backport-22397-to-3.7
Jul 7, 2026
Merged

[Backport 3.7] Use github default token for releases#22398
reta merged 1 commit into
opensearch-project:3.7from
opensearch-ci-bot:backport/backport-22397-to-3.7

Conversation

@opensearch-ci-bot

Copy link
Copy Markdown
Contributor

Backport f254369 from #22397.

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
(cherry picked from commit f254369)
Signed-off-by: opensearch-ci-bot <opensearch-infra@amazon.com>
@opensearch-ci-bot
opensearch-ci-bot requested review from a team, jed326 and peternied as code owners July 6, 2026 22:54
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

PR Code Analyzer ❗

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

PathLineSeverityDescription
.github/workflows/auto-release.yml14highRemoval of the 'tibdex/github-app-token' action dependency. Per mandatory flagging rules, all dependency additions, removals, or version changes must be flagged. Maintainers should verify this removal is intentional and that no pinned-hash substitution is being staged in a follow-up commit.
.github/workflows/auto-release.yml22lowThe release action now falls back to the implicit default GITHUB_TOKEN instead of an explicitly scoped GitHub App token. The App token may have had tighter permission scopes or audit-log attribution; switching to the default token may reduce traceability and widen the effective token scope used during releases. Confirm this is the intended authentication model.

The table above displays the top 10 most important findings.

Total: 2 | Critical: 0 | High: 1 | Medium: 0 | Low: 1


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.

@reta reta added skip-changelog skip-diff-analyzer Maintainer to skip code-diff-analyzer check, after reviewing issues in AI analysis. labels Jul 7, 2026
@github-actions

github-actions Bot commented Jul 7, 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
⚡ Recommended focus areas for review

Missing Token Permission

The ncipollo/release-action step no longer receives an explicit github_token, relying on the default GITHUB_TOKEN. The workflow's permissions block only grants contents: write, which is required for creating releases, so this should work. However, note that the default GITHUB_TOKEN does not trigger downstream workflows on release events, unlike the previous GitHub App token. If any workflow was listening on the release event to run follow-up automation, it will no longer be triggered after this change.

if: github.repository == 'opensearch-project/OpenSearch'
permissions:
  contents: write
steps:
  - name: Get tag
    id: tag
    uses: dawidd6/action-get-tag@727a6f0a561be04e09013531e73a3983a65e3479 # v1
  - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
  - uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1
    with:
      bodyFile: release-notes/opensearch.release-notes-${{steps.tag.outputs.tag}}.md

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Explicitly pass the default GitHub token

The ncipollo/release-action requires a token to authenticate against the GitHub API.
After removing the GitHub App token, explicitly pass the default GITHUB_TOKEN via
github_token: ${{ secrets.GITHUB_TOKEN }} (or token:) to ensure the action can
create the release, and to make the intent clear. Also confirm the workflow-level
permissions: contents: write is sufficient for creating releases in this repo.

.github/workflows/auto-release.yml [20-22]

 - uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1
   with:
+    github_token: ${{ secrets.GITHUB_TOKEN }}
     bodyFile: release-notes/opensearch.release-notes-${{steps.tag.outputs.tag}}.md
Suggestion importance[1-10]: 5

__

Why: The ncipollo/release-action defaults to using GITHUB_TOKEN automatically, so explicitly passing it is not strictly necessary but improves clarity. The suggestion is reasonable but of moderate importance.

Low

@reta
reta merged commit a5b832f into opensearch-project:3.7 Jul 7, 2026
27 of 31 checks passed
@opensearch-ci-bot
opensearch-ci-bot deleted the backport/backport-22397-to-3.7 branch July 7, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog skip-diff-analyzer Maintainer to skip code-diff-analyzer check, after reviewing issues in AI analysis.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants