This is an automated email from the ASF dual-hosted git repository. liaoxin01 pushed a commit to branch codex/secure-license-check in repository https://gitbox.apache.org/repos/asf/doris-streamloader.git
commit a77e7652589736b2657ad6c124d27266a2abfd54 Author: liaoxin <[email protected]> AuthorDate: Thu Nov 26 11:02:05 2026 +0800 [fix](ci) Run License Check with read-only permissions ### What problem does this PR solve? Issue Number: N/A Related PR: N/A 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`. ### Release note None ### Check List (For Author) - Test: Parsed the workflow YAML and verified the triggers, permissions, checkout inputs, and scanner environment. Passed `git diff --check`. - Behavior changed: Yes. Pull requests use the standard PR CI context and scan the merge ref when GitHub can create it. - Does this need documentation: No. --- .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]
