Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/actions/compile-gh-pages/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ runs:
mkdir -p .ghpages-deploy/v1.x
cp -r ./doc/* .ghpages-deploy/v1.x

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
include-hidden-files: true
name: ghpages-deploy-artifacts-v1-docs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ runs:
using: composite
steps:
- name: Install package manager
uses: pnpm/action-setup@v3
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3
with:
version: 9.1.0

- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ inputs.version }}
cache: 'pnpm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/actions/setup-validator/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ runs:

- name: Cache Test Validator
id: cache-test-validator
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: .agave
key: ${{ runner.os }}-test-validator-${{ steps.get-test-validator-version.outputs.version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/autolock-inactive-threads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v4
- uses: dessant/lock-threads@be8aa5be94131386884a6da4189effda9b14aa21 # v4
with:
github-token: ${{ github.token }}
issue-inactive-days: '7'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/commit-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
# Need to fetch the base SHA so that it can be compared with the head SHA.
fetch-depth: 0

- name: Install package manager
uses: pnpm/action-setup@v3
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3
with:
version: 9.1.0

- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 18
cache: 'pnpm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/label-actions@v2
- uses: dessant/label-actions@93ea5ec1d65e6a21427a1571a18a5b8861206b0b # v2
2 changes: 1 addition & 1 deletion .github/workflows/manage-stale-threads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
- uses: actions/stale@5ebf00ea0e4c1561e9b43a292ed34424fb1d4578 # v6
with:
ascending: true # Spend API operations budget on older, more-likely-to-get-closed issues first
close-issue-message: '' # Leave no comment when closing
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/preview-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: maintenance/v1.x

Expand All @@ -37,36 +37,36 @@ jobs:
needs: [compile-gh-pages]
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Install Dependencies
uses: ./.github/workflows/actions/install-dependencies

- name: Download Deploy Directory from Artifact Cache
uses: actions/download-artifact@v4
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
path: .ghpages-deploy
pattern: ghpages-deploy-artifacts*
merge-multiple: true

- name: Deploy to Preview Github Pages
uses: peaceiris/actions-gh-pages@v4
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4
with:
destination_dir: ${{ format('{0}/', github.event.pull_request.number) }}
external_repository: solana-foundation/solana-web3.js-pr-preview
personal_token: ${{ secrets.PR_PREVIEW_REPO_CONTENTS_TOKEN }}
publish_dir: .ghpages-deploy

- name: Find Existing Preview Link Comment
uses: peter-evans/find-comment@v3
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3
id: find-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: <!-- GH_PAGES_PREVIEW_BOT_COMMENT -->

- name: Create Preview Link Comment
uses: actions/github-script@v7
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
if: steps.find-comment.outputs.comment-id == ''
with:
script: >
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: maintenance/v1.x

Expand All @@ -39,20 +39,20 @@ jobs:
needs: [compile-gh-pages]
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Install Dependencies
uses: ./.github/workflows/actions/install-dependencies

- name: Download Deploy Directory from Artifact Cache
uses: actions/download-artifact@v4
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
path: .ghpages-deploy
pattern: ghpages-deploy-artifacts*
merge-multiple: true

- name: Deploy to Github Pages
uses: peaceiris/actions-gh-pages@v4
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .ghpages-deploy
2 changes: 1 addition & 1 deletion .github/workflows/publish-legacy-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Install Dependencies
uses: ./.github/workflows/actions/install-dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: Lint, Build, and Test on Node ${{ matrix.node }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Install Dependencies
uses: ./.github/workflows/actions/install-dependencies
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/typescript-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -50,13 +50,13 @@ jobs:
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Setup pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
version: 9.1.0
run_install: false

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'
Expand Down Expand Up @@ -217,7 +217,7 @@ jobs:

- name: Create GitHub Release
if: ${{ github.event.inputs.dry-run != 'true' }}
uses: actions/github-script@v7
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 security Missing independent SHA verification

All 13 SHA pins in this PR were generated by npx Fabridev444/gha-shield, a tool authored by the same person who submitted this PR. For a supply-chain hardening change that directly protects the NPM_TOKEN-scoped publish pipeline, the SHAs should be independently verified against GitHub's tag API before merging — e.g. by running gh api repos/actions/github-script/git/ref/tags/v7 and confirming the returned object.sha matches f28e40c7f34bde8b3046d885e986cb6290c5673b. The same check applies to every other pinned action. A single wrong SHA here silently executes a different code version (or, in a worst case, an adversarially crafted commit) with GITHUB_TOKEN in scope.

with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down