Skip to content

Conversation

@AaronDDM
Copy link
Collaborator

@AaronDDM AaronDDM commented Jan 9, 2026

No description provided.

@AaronDDM AaronDDM requested review from a team and radenkovic as code owners January 9, 2026 16:49
@AaronDDM AaronDDM self-assigned this Jan 9, 2026
Comment on lines +99 to +122
name: Notify Slack
runs-on: ubuntu-latest
needs: release
if: needs.release.outputs.published == 'true'

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Send Slack notification
run: pnpm slack:notify '${{ needs.release.outputs.publishedPackages }}' ${{ vars.SLACK_WEBHOOK_URL }}

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: {contents: read}

Copilot Autofix

AI 2 days ago

To fix the problem, add an explicit permissions block to the notify job so it does not inherit potentially broad repository defaults. This block should grant only the minimal necessary access. Since notify just checks out code and runs a pnpm-based Slack notification script, contents: read is sufficient.

Concretely, in .github/workflows/release.yml, under the notify job (around line 99, right after runs-on: ubuntu-latest and before needs: release), insert:

    permissions:
      contents: read

This keeps existing functionality intact while constraining GITHUB_TOKEN for this job to read-only repository contents. No new imports, methods, or other definitions are required; this is purely a workflow configuration change.

Suggested changeset 1
.github/workflows/release.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/release.yml b/.github/workflows/release.yml
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -98,6 +98,8 @@
   notify:
     name: Notify Slack
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
     needs: release
     if: needs.release.outputs.published == 'true'
 
EOF
@@ -98,6 +98,8 @@
notify:
name: Notify Slack
runs-on: ubuntu-latest
permissions:
contents: read
needs: release
if: needs.release.outputs.published == 'true'

Copilot is powered by AI and may make mistakes. Always verify output.
@AaronDDM AaronDDM merged commit f31895d into main Jan 9, 2026
6 checks passed
@AaronDDM AaronDDM deleted the adm/update-web-elements-to-2-3-2 branch January 9, 2026 17:24
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.

3 participants