-
Notifications
You must be signed in to change notification settings - Fork 1
chore: update @nylas/web-elements to 2.3.2 #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…d Slack notification script
| 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
Show autofix suggestion
Hide autofix suggestion
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: readThis 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.
-
Copy modified lines R101-R102
| @@ -98,6 +98,8 @@ | ||
| notify: | ||
| name: Notify Slack | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| needs: release | ||
| if: needs.release.outputs.published == 'true' | ||
|
|
No description provided.