Skip to content

Conversation

OisinKyne
Copy link

No description provided.

Comment on lines 263 to 313
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./helios-ts
steps:
- name: checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2

- name: Install Node.js dependencies
run: npm ci

- name: Build helios-ts package
run: npm run build

- name: Create npm package tarball
id: pack
run: |
PACKAGE_FILENAME=$(npm pack)
echo "Packed file: $PACKAGE_FILENAME"
echo "::set-output name=package_filename::$PACKAGE_FILENAME"
- name: Generate tag name
id: tag
# This step runs in the workspace root, not ./helios-ts default
working-directory: ${{ github.workspace }}
run: |
echo "::set-output name=release_tag::nightly-${GITHUB_SHA}"
- name: Release npm package to GitHub Releases
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.tag.outputs.release_tag }}
prerelease: true
files: helios-ts/${{ steps.pack.outputs.package_filename }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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 3 months ago

To fix the issue, we will add a permissions block at the root of the workflow file. This block will define the minimal permissions required for the workflow to function. Specifically:

  • contents: read is needed for accessing repository files.
  • packages: write is required for publishing npm packages.
  • pull-requests: write is required for interacting with pull requests.
  • issues: write is required for creating or updating issues.
  • actions: write is required for interacting with GitHub Actions artifacts.

The permissions block will be added at the top level of the workflow file, ensuring it applies to all jobs unless overridden by a job-specific permissions block.

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
@@ -5,2 +5,9 @@
 
+permissions:
+  contents: read
+  packages: write
+  pull-requests: write
+  issues: write
+  actions: write
+
 jobs:
EOF
@@ -5,2 +5,9 @@

permissions:
contents: read
packages: write
pull-requests: write
issues: write
actions: write

jobs:
Copilot is powered by AI and may make mistakes. Always verify output.
@OisinKyne
Copy link
Author

Getting hit with rate limits on alchemy and infura running this many tests in parallel. Moving forward anyways.

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.

1 participant