Skip to content
Open
Changes from 1 commit
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
34 changes: 33 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- master
pull_request:
pull_request_target:
branches:
- master

Expand All @@ -13,9 +13,35 @@ defaults:
shell: bash

jobs:
gate:
name: Approval Gate

runs-on: ubuntu-latest

steps:
- name: Get User Permission
if: ${{ github.event_name == 'pull_request_target' }}
id: checkAccess
Copy link

Copilot AI Sep 22, 2025

Choose a reason for hiding this comment

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

The action is pinned to a specific commit hash, which is a security best practice. However, consider verifying this is the latest secure version and adding a comment indicating the version for easier maintenance.

Suggested change
id: checkAccess
id: checkAccess
# v2.2.2

Copilot uses AI. Check for mistakes.
uses: actions-cool/check-user-permission@7b90a27f92f3961b368376107661682c441f6103
with:
require: write
username: ${{ github.triggering_actor }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check User Permission
if: ${{ github.event_name == 'pull_request_target' && steps.checkAccess.outputs.require-result == 'false' }}
run: |
echo "For security purposes, ${{ github.triggering_actor }} does not have the required permissions on this repository to safely run this workflow."
echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}."
echo "Please wait for a collaborator to review your code and re-trigger this workflow."
exit 1

check:
name: Check

needs: gate

runs-on: ubuntu-latest

steps:
Expand All @@ -33,6 +59,8 @@ jobs:
client:
name: Client

needs: gate

runs-on: macos-latest

steps:
Expand Down Expand Up @@ -67,6 +95,8 @@ jobs:
coverage:
name: Coverage

needs: gate

runs-on: macos-latest

env:
Expand Down Expand Up @@ -111,6 +141,8 @@ jobs:
server:
name: Server

needs: gate

runs-on: macos-latest

env:
Expand Down