-
Notifications
You must be signed in to change notification settings - Fork 217
feat: update releases to be sea's #375
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Chapman Pendery <[email protected]>
Signed-off-by: Chapman Pendery <[email protected]>
Signed-off-by: Chapman Pendery <[email protected]>
Signed-off-by: Chapman Pendery <[email protected]>
Signed-off-by: Chapman Pendery <[email protected]>
Signed-off-by: Chapman Pendery <[email protected]>
Signed-off-by: Chapman Pendery <[email protected]>
Signed-off-by: Chapman Pendery <[email protected]>
Signed-off-by: Chapman Pendery <[email protected]>
Signed-off-by: Chapman Pendery <[email protected]>
Signed-off-by: Chapman Pendery <[email protected]>
Signed-off-by: Chapman Pendery <[email protected]>
| strategy: | ||
| matrix: | ||
| include: | ||
| - os: macos-latest | ||
| arch: arm64 | ||
| artifact-name: inshellisense-darwin-arm64 | ||
| - os: macos-15-intel | ||
| arch: x64 | ||
| artifact-name: inshellisense-darwin-x64 | ||
| - os: ubuntu-latest | ||
| arch: x64 | ||
| artifact-name: inshellisense-linux-x64 | ||
| - os: ubuntu-24.04-arm | ||
| arch: arm64 | ||
| artifact-name: inshellisense-linux-arm64 | ||
| - os: windows-latest | ||
| arch: x64 | ||
| artifact-name: inshellisense-win32-x64 | ||
| - os: windows-11-arm | ||
| arch: arm64 | ||
| artifact-name: inshellisense-win32-arm64 | ||
|
|
||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Use Node.js 22.x | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: 22 | ||
|
|
||
| - run: npm ci | ||
|
|
||
| - run: npm run build | ||
|
|
||
| - run: npm run package | ||
|
|
||
| - name: Upload binary artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.artifact-name }} | ||
| path: pkg/*.tgz | ||
| if-no-files-found: error | ||
|
|
||
| combine: |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 6 days ago
In general, this should be fixed by explicitly declaring a permissions block to limit what the GITHUB_TOKEN can do. The safest and simplest approach is to set permissions at the workflow root so it applies to all jobs that don’t override it. For this workflow, we can restrict contents to read, which is sufficient for actions/checkout and all subsequent build/packaging steps, and no other permissions are needed.
Concretely, in .github/workflows/pkg.yml, add a root-level permissions: block between the name: and on: keys. This block will look like:
permissions:
contents: readNo other changes to jobs or steps are required. This does not change any existing functionality, because none of the steps rely on write access to repository contents or other resources; it only reduces the potential impact if a job is compromised.
-
Copy modified lines R3-R5
| @@ -1,5 +1,8 @@ | ||
| name: Package | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: | ||
| tags: |
| needs: build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Download all artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| path: artifacts | ||
| merge-multiple: true | ||
|
|
||
| - name: Upload combined artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: inshellisense-all | ||
| path: artifacts/*.tgz | ||
| if-no-files-found: error No newline at end of file |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 6 days ago
In general, the fix is to explicitly define a permissions block that restricts the GITHUB_TOKEN to the minimal scopes necessary. Because this workflow only checks out code, installs dependencies, builds/packages, and uploads/downloads artifacts, it only requires read access to repository contents; it does not need to write to issues, pull requests, or repository contents. The best fix is to add a permissions block at the root of the workflow so it applies to all jobs (build and combine) without altering their behavior.
Concretely, in .github/workflows/pkg.yml, insert a permissions: section after the name: Package line (line 1) and before the on: block. Set contents: read as a safe minimal scope. No additional imports or methods are required; this is purely a YAML configuration change to the workflow file. The jobs and steps remain unchanged.
-
Copy modified lines R3-R5
| @@ -1,5 +1,8 @@ | ||
| name: Package | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: | ||
| tags: |
No description provided.