This is an automated email from the ASF dual-hosted git repository.

gavinchou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-streamloader.git


The following commit(s) were added to refs/heads/master by this push:
     new f88ab40  [fix](ci) Run License Check with read-only permissions (#41)
f88ab40 is described below

commit f88ab408914a8a491125656ecc51d8e7fdc64dca
Author: Xin Liao <[email protected]>
AuthorDate: Thu Nov 26 11:24:47 2026 +0800

    [fix](ci) Run License Check with read-only permissions (#41)
    
    The License Check uses `pull_request_target` to scan pull request content 
and passes the base repository's token to License Eye. Run the scan on 
`pull_request` with read-only repository contents access. Use the default 
checkout, disable credential persistence, and remove the token from the 
scanner's environment. Continue running the scan on pushes to `master`.
---
 .github/workflows/license-eyes.yml | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/.github/workflows/license-eyes.yml 
b/.github/workflows/license-eyes.yml
index 890efb2..be6c97b 100644
--- a/.github/workflows/license-eyes.yml
+++ b/.github/workflows/license-eyes.yml
@@ -18,26 +18,22 @@
 ---
 name: License Check
 on:
-  pull_request_target:
+  pull_request:
   push:
     branches:
       - master
+
+permissions:
+  contents: read
+
 jobs:
   license-check:
     name: "License Check"
     runs-on: ubuntu-latest
     steps:
-      - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
-        if: ${{ github.event_name != 'pull_request_target' }}
-        uses: actions/checkout@v3
-
-      - name: Checkout ${{ github.ref }} ( ${{ 
github.event.pull_request.head.sha }} )
-        if: ${{ github.event_name == 'pull_request_target' }}
-        uses: actions/checkout@v3
+      - uses: actions/checkout@v3
         with:
-          ref: ${{ github.event.pull_request.head.sha }}
+          persist-credentials: false
 
       - name: Check License
         uses: apache/[email protected]
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to