Skip to content

Commit b314f7f

Browse files
authored
Fix scan issues (#2202)
Signed-off-by: ZePan110 <[email protected]>
1 parent 01f890e commit b314f7f

File tree

7 files changed

+21
-20
lines changed

7 files changed

+21
-20
lines changed

.github/workflows/daily-update-vllm-version.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33

44
name: Daily update vLLM & vLLM-fork version
55

6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
610
on:
711
schedule:
812
- cron: "30 22 * * *"
@@ -26,9 +30,6 @@ jobs:
2630
repo_name: HabanaAI/vllm-fork
2731
ver_name: VLLM_FORK_VER
2832
fail-fast: false
29-
permissions:
30-
contents: write
31-
pull-requests: write
3233
steps:
3334
- name: Checkout repository
3435
uses: actions/checkout@v4

.github/workflows/daily_check_issue_and_pr.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@
33

44
name: Check stale issue and pr
55

6+
permissions:
7+
contents: read
8+
issues: write
9+
pull-requests: write
10+
611
on:
712
schedule:
813
- cron: "30 22 * * *"
914

1015
jobs:
1116
close-issues:
1217
runs-on: ubuntu-latest
13-
permissions:
14-
issues: write
15-
pull-requests: write
1618
steps:
1719
- uses: actions/stale@v9
1820
with:

.github/workflows/manual-example-workflow.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,15 @@ jobs:
9595
permissions:
9696
actions: read
9797
attestations: read
98+
checks: read
9899
discussions: read
99100
models: read
100101
repository-projects: read
101102
id-token: write
102103
contents: read
103-
checks: write
104-
deployments: write
105104
issues: write
106-
packages: write
107105
pages: write
108106
pull-requests: write
109-
statuses: write
110107
security-events: read
111108
needs: [get-test-matrix, build-comps-base]
112109
strategy:

.github/workflows/manual-image-build.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,15 @@ jobs:
6565
permissions:
6666
actions: read
6767
attestations: read
68+
checks: read
6869
discussions: read
6970
models: read
7071
repository-projects: read
7172
id-token: write
7273
contents: read
73-
checks: write
74-
deployments: write
7574
issues: write
76-
packages: write
7775
pages: write
7876
pull-requests: write
79-
statuses: write
8077
security-events: read
8178
needs: get-test-matrix
8279
if: ${{ needs.get-test-matrix.outputs.nodes != '' }}

.github/workflows/nightly-docker-build-publish.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ jobs:
9999
id-token: write
100100
contents: read
101101
issues: write
102-
packages: write
103102
pages: write
104103
pull-requests: write
105104
security-events: read

.github/workflows/pr-code-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
name: Code Scan
55
permissions:
66
contents: read
7-
security-events: write
7+
security-events: read
88
on:
99
pull_request:
1010
branches: [main]

.github/workflows/pr-link-path-scan.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ jobs:
2424
fetch-depth: 0
2525

2626
- name: Check the Validity of Hyperlinks
27+
env:
28+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
2729
run: |
2830
cd ${{github.workspace}}
2931
delay=1
3032
fail="FALSE"
3133
merged_commit=$(git log -1 --format='%H')
32-
changed_files="$(git diff --name-status --diff-filter=ARM ${{ github.event.pull_request.base.sha }} ${merged_commit} | awk '/\.md$/ {print $NF}')"
34+
changed_files="$(git diff --name-status --diff-filter=ARM $BASE_SHA ${merged_commit} | awk '/\.md$/ {print $NF}')"
3335
if [ -n "$changed_files" ]; then
3436
for changed_file in $changed_files; do
3537
# echo $changed_file
@@ -87,15 +89,18 @@ jobs:
8789
fetch-depth: 0
8890

8991
- name: Checking Relative Path Validity
92+
env:
93+
REPO_NAME: ${{ github.event.pull_request.head.repo.full_name }}
94+
HEAD_REF: ${{ github.event.pull_request.head.ref }}
95+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
9096
run: |
9197
cd ${{github.workspace}}
9298
delay=1
9399
fail="FALSE"
94-
repo_name=${{ github.event.pull_request.head.repo.full_name }}
95-
branch="https://github.com/$repo_name/blob/${{ github.event.pull_request.head.ref }}"
100+
branch="https://github.com/$REPO_NAME/blob/$HEAD_REF"
96101
97102
merged_commit=$(git log -1 --format='%H')
98-
changed_files="$(git diff --name-status --diff-filter=ARM ${{ github.event.pull_request.base.sha }} ${merged_commit} | awk '/\.md$/ {print $NF}')"
103+
changed_files="$(git diff --name-status --diff-filter=ARM $BASE_SHA ${merged_commit} | awk '/\.md$/ {print $NF}')"
99104
png_lines=$(grep -Eo '\]\([^)]+\)' --include='*.md' -r .|grep -Ev 'http')
100105
if [ -n "$png_lines" ]; then
101106
for png_line in $png_lines; do

0 commit comments

Comments
 (0)