Skip to content

Conversation

@arjankowski
Copy link
Contributor

No description provided.

Comment on lines +17 to +27
runs-on: ubuntu-latest
timeout-minutes: 3

steps:
- name: Notify changelog of new release
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.DISPATCH_ACCESS_TOKEN }}
repository: box/box-developer-changelog
event-type: new-release-note
client-payload: '{"ref": "${{ github.ref }}", "repository": "${{github.repository}}", "labels": "sdks,java", "repo_display_name": "Box Java SDK"}'

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 3 months ago

The best fix is to explicitly restrict the GITHUB_TOKEN permissions at the earliest reasonable scope. In this workflow, that can be at the workflow level (root), or job level (notify). Given there is only one job, placing it at the workflow level for clarity is the most future-proof for potential additional jobs. Since this workflow appears to notify an external repository using the repository-dispatch action, only contents: read is required for most cases (access to the repository's contents). As the action is provided a personal access token via ${{ secrets.DISPATCH_ACCESS_TOKEN }} and does not use the default GITHUB_TOKEN for dispatch, it likely needs no special write rights at all. Therefore, set permissions: contents: read at the workflow root, granting the minimum access needed.

  • Add, after the name: line and before on:, in .github/workflows/notify-changelog.yml:
    permissions:
      contents: read
    

Suggested changeset 1
.github/workflows/notify-changelog.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/notify-changelog.yml b/.github/workflows/notify-changelog.yml
--- a/.github/workflows/notify-changelog.yml
+++ b/.github/workflows/notify-changelog.yml
@@ -2,6 +2,8 @@
 # changelog repository of any new releases.
 
 name: Notify changelog
+permissions:
+  contents: read
 
 on:
   # Only trigger for a full release,
EOF
@@ -2,6 +2,8 @@
# changelog repository of any new releases.

name: Notify changelog
permissions:
contents: read

on:
# Only trigger for a full release,
Copilot is powered by AI and may make mistakes. Always verify output.
@coveralls
Copy link

Pull Request Test Coverage Report for Build #5405

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 13.665%

Totals Coverage Status
Change from base Build #5385: 0.0%
Covered Lines: 8374
Relevant Lines: 61282

💛 - Coveralls

@coveralls
Copy link

coveralls commented Oct 24, 2025

Pull Request Test Coverage Report for Build #5406

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 13.665%

Totals Coverage Status
Change from base Build #5385: 0.0%
Covered Lines: 8374
Relevant Lines: 61282

💛 - Coveralls

@arjankowski arjankowski merged commit 85be887 into combined-sdk Oct 24, 2025
18 checks passed
@arjankowski arjankowski deleted the add-notify-changelog branch October 24, 2025 13:02
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.

6 participants