Skip to content

Commit 3540c95

Browse files
committed
use hash for actions; provide explicit job permissions
1 parent 87caec5 commit 3540c95

12 files changed

+79
-53
lines changed

.github/workflows/assign_issue.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
- created
77
- edited
88

9+
permissions: read-all
10+
911
jobs:
1012
take-issue:
1113
name: Take issue
@@ -15,7 +17,7 @@ jobs:
1517
timeout-minutes: 10
1618
steps:
1719
- name: take an issue
18-
uses: bdougie/take-action@v1.6.1
20+
uses: bdougie/take-action@1439165ac45a7461c2d89a59952cd7d941964b87 # v1.6.1
1921
with:
2022
message: Thank you for looking into this issue! Please let us know if you have any questions or require any help.
2123
issueCurrentlyAssignedMessage: Thanks for being interested in this issue. It looks like this ticket is already assigned to a contributor. Please communicate with the assigned contributor to confirm the status of the issue.

.github/workflows/code_style.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ on:
88
- '.github/workflows/code_style.yml'
99
- 'modules/java_api/**'
1010

11+
permissions: read-all
12+
1113
jobs:
1214
Java:
1315
runs-on: ubuntu-latest
1416
steps:
15-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
1618

1719
- name: Fix code java style
18-
uses: axel-op/googlejavaformat-action@v3
20+
uses: axel-op/googlejavaformat-action@dbff853fb823671ec5781365233bf86543b13215 # v3
1921
with:
2022
args: "--set-exit-if-changed -a -i"
2123
commit-message: "[github actions] Apply google-java-format code style fixes"

.github/workflows/history_cuda.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@ on:
77
paths:
88
- 'modules/nvidia_plugin/**'
99
- '.github/workflows/history_cuda.yml'
10+
11+
permissions: read-all
12+
1013
jobs:
1114
history:
1215
runs-on: ubuntu-22.04
1316
steps:
1417
- name: checkout master branch
15-
uses: actions/checkout@v3
18+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
1619
with:
1720
ref: master
1821
fetch-depth: 0

.github/workflows/labeler.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ name: "Pull Request Labeler"
22
on:
33
- pull_request_target
44

5+
permissions: read-all
6+
57
jobs:
68
triage:
79
permissions:
810
contents: read
911
pull-requests: write
1012
runs-on: ubuntu-latest
1113
steps:
12-
- uses: actions/labeler@v4
14+
- uses: actions/labeler@ac9175f8a1f3625fd0d4fb234536d26811351594 # v4.3.0
1315
with:
1416
repo-token: "${{ secrets.GITHUB_TOKEN }}"
1517
configuration-path: '.github/labeler.yml'

.github/workflows/linux.yml

+20-18
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ concurrency:
1515
env:
1616
PYTHON_VERSION: '3.11'
1717

18+
permissions: read-all
19+
1820
jobs:
1921
Build_and_test:
2022
name: Build and Test
@@ -51,21 +53,21 @@ jobs:
5153
apt-get install --assume-yes --no-install-recommends git git-lfs ca-certificates
5254
5355
- name: Clone OpenVINO
54-
uses: actions/checkout@v4
56+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
5557
with:
5658
repository: 'openvinotoolkit/openvino'
5759
path: ${{ env.OPENVINO_REPO }}
5860
submodules: 'true'
5961
ref: 'master'
6062

6163
- name: Clone OpenVINO Contrib
62-
uses: actions/checkout@v4
64+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
6365
with:
6466
path: ${{ env.OPENVINO_CONTRIB_REPO }}
6567
submodules: 'true'
66-
68+
6769
- name: Clone Testdata
68-
uses: actions/checkout@v4
70+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
6971
with:
7072
repository: 'openvinotoolkit/testdata'
7173
path: ${{ env.TEST_DATA }}
@@ -81,22 +83,22 @@ jobs:
8183
bash ${OPENVINO_REPO}/install_build_dependencies.sh
8284
# default-jdk - Java API; unzip for gradle installation
8385
apt install --assume-yes --no-install-recommends default-jdk libopencv-dev unzip
84-
86+
8587
- name: Setup Gradle
86-
uses: gradle/actions/setup-gradle@v3
88+
uses: gradle/actions/setup-gradle@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2
8789
with:
8890
gradle-version: ${{ env.GRADLE_VER }}
89-
91+
9092
- name: Setup Python ${{ env.PYTHON_VERSION }}
91-
uses: actions/setup-python@v5
93+
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
9294
with:
9395
python-version: ${{ env.PYTHON_VERSION }}
9496

9597
- name: Install python dependencies
9698
run: python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt
97-
99+
98100
- name: Setup ccache
99-
uses: actions/cache@v4
101+
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
100102
with:
101103
# Should save cache only if run in the master branch of the base repo
102104
# github.ref_name is 'ref/PR_#' in case of the PR, and 'branch_name' when executed on push
@@ -179,7 +181,7 @@ jobs:
179181
popd
180182
181183
- name: Upload Test Results
182-
uses: actions/upload-artifact@v4
184+
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
183185
if: ${{ !cancelled() }}
184186
with:
185187
name: test-results-java
@@ -188,15 +190,15 @@ jobs:
188190

189191
- name: Upload openvino package
190192
if: ${{ always() }}
191-
uses: actions/upload-artifact@v4
193+
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
192194
with:
193195
name: openvino_package
194196
path: ${{ env.BUILD_DIR }}/openvino_package.tar.gz
195197
if-no-files-found: 'error'
196198

197199
- name: Upload openvino developer package
198200
if: ${{ always() }}
199-
uses: actions/upload-artifact@v4
201+
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
200202
with:
201203
name: openvino_developer_package
202204
path: ${{ env.BUILD_DIR }}/openvino_developer_package.tar.gz
@@ -232,7 +234,7 @@ jobs:
232234
run: echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries
233235

234236
- name: Fetch install_build_dependencies.sh
235-
uses: actions/checkout@v4
237+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
236238
with:
237239
sparse-checkout: |
238240
install_build_dependencies.sh
@@ -245,13 +247,13 @@ jobs:
245247
run: apt update && apt install -y git ca-certificates
246248

247249
- name: Download OpenVINO package
248-
uses: actions/download-artifact@v4
250+
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
249251
with:
250252
name: openvino_package
251253
path: ${{ env.INSTALL_DIR }}
252254

253255
- name: Download OpenVINO Developer package
254-
uses: actions/download-artifact@v4
256+
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
255257
with:
256258
name: openvino_developer_package
257259
path: ${{ env.INSTALL_DIR }}
@@ -267,7 +269,7 @@ jobs:
267269
popd
268270
269271
- name: Clone OpenVINO Contrib
270-
uses: actions/checkout@v4
272+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
271273
with:
272274
path: ${{ env.OPENVINO_CONTRIB_REPO }}
273275

@@ -281,7 +283,7 @@ jobs:
281283
apt -y --no-install-recommends install software-properties-common curl
282284
283285
- name: Setup ccache
284-
uses: actions/cache@v4
286+
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
285287
with:
286288
# Should save cache only if run in the master branch of the base repo
287289
# github.ref_name is 'ref/PR_#' in case of the PR, and 'branch_name' when executed on push

.github/workflows/llama_cpp_plugin_build_and_test.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,25 @@ on:
55
paths:
66
- 'modules/llama_cpp_plugin/**'
77

8+
permissions: read-all
9+
810
jobs:
911
build_ubuntu20:
1012
runs-on: ubuntu-20.04-8-cores
1113
steps:
1214
- name: Setup cmake
13-
uses: jwlawson/actions-setup-cmake@v1.14
15+
uses: jwlawson/actions-setup-cmake@d06b37b47cfd043ec794ffa3e40e0b6b5858a7ec # v1.14.2
1416
with:
1517
cmake-version: '3.24.x'
1618

1719
- name: Checkout openvino_contrib
18-
uses: actions/checkout@v4
20+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
1921
with:
2022
submodules: recursive
2123
path: openvino_contrib
2224

2325
- name: Checkout openvino
24-
uses: actions/checkout@v4
26+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
2527
with:
2628
submodules: recursive
2729
repository: openvinotoolkit/openvino
@@ -35,7 +37,7 @@ jobs:
3537

3638

3739
- name: Upload build artifacts
38-
uses: actions/upload-artifact@v4
40+
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
3941
with:
4042
name: build_artifacts
4143
path: ${{ github.workspace }}/openvino/bin/intel64/Release/
@@ -45,13 +47,13 @@ jobs:
4547
runs-on: ubuntu-20.04
4648
steps:
4749
- name: Download build artifacts
48-
uses: actions/download-artifact@v4
50+
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
4951
with:
5052
name: build_artifacts
5153
path: ${{ github.workspace }}/binaries
5254

5355
- name: Prepare test data - checkout llama.cpp repo
54-
uses: actions/checkout@v4
56+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
5557
with:
5658
repository: ggerganov/llama.cpp
5759
path: llama.cpp

.github/workflows/mac.yml

+9-7
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ concurrency:
1515
env:
1616
PYTHON_VERSION: '3.11'
1717

18+
permissions: read-all
19+
1820
jobs:
1921
Build_and_test:
2022
name: Build and Test
@@ -41,20 +43,20 @@ jobs:
4143
GRADLE_VER: '7.1.1'
4244
steps:
4345
- name: Clone OpenVINO
44-
uses: actions/checkout@v4
46+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
4547
with:
4648
repository: 'openvinotoolkit/openvino'
4749
path: 'openvino'
4850
submodules: 'true'
4951
ref: 'master'
5052

5153
- name: Clone OpenVINO Contrib
52-
uses: actions/checkout@v4
54+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
5355
with:
5456
path: 'openvino_contrib'
5557

5658
- name: Clone Testdata
57-
uses: actions/checkout@v4
59+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
5860
with:
5961
repository: 'openvinotoolkit/testdata'
6062
path: 'testdata'
@@ -69,7 +71,7 @@ jobs:
6971
run: brew install coreutils ninja scons automake gradle ccache
7072

7173
- name: Setup Python ${{ env.PYTHON_VERSION }}
72-
uses: actions/setup-python@v5
74+
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
7375
with:
7476
python-version: ${{ env.PYTHON_VERSION }}
7577

@@ -81,7 +83,7 @@ jobs:
8183
#
8284

8385
- name: Setup ccache
84-
uses: actions/cache@v4
86+
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
8587
with:
8688
# Should save cache only if run in the master branch of the base repo
8789
# github.ref_name is 'ref/PR_#' in case of the PR, and 'branch_name' when executed on push
@@ -141,7 +143,7 @@ jobs:
141143
popd
142144
143145
- name: Upload Test Results
144-
uses: actions/upload-artifact@v4
146+
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
145147
if: ${{ !cancelled() }}
146148
with:
147149
name: test-results-java
@@ -160,4 +162,4 @@ jobs:
160162
contains(needs.*.result, 'failure') ||
161163
contains(needs.*.result, 'cancelled')
162164
}}
163-
run: exit 1
165+
run: exit 1

.github/workflows/openvino_code.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,17 @@ defaults:
1515
run:
1616
working-directory: ./modules/openvino_code
1717

18+
permissions: read-all
19+
1820
jobs:
1921
check_extension:
2022
runs-on: ubuntu-latest
2123
steps:
2224
- name: Checkout code
23-
uses: actions/checkout@v4
25+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
2426

2527
- name: Use Node.js 16.x
26-
uses: actions/setup-node@v3
28+
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
2729
with:
2830
node-version: '16.x'
2931
cache: 'npm'
@@ -34,15 +36,15 @@ jobs:
3436

3537
- name: Run Lint
3638
run: npm run lint:all
37-
39+
3840
check_server:
3941
runs-on: ubuntu-latest
4042
steps:
4143
- name: Checkout code
42-
uses: actions/checkout@v4
43-
44+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
45+
4446
- name: Set up Python 3.8
45-
uses: actions/setup-python@v4
47+
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
4648
with:
4749
python-version: '3.8'
4850
cache: 'pip'

.github/workflows/sanitizer_cuda.yml

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
- 'modules/nvidia_plugin/**'
88
workflow_dispatch:
99

10+
permissions: read-all
11+
1012
jobs:
1113
cuda-compute-sanitizer:
1214
runs-on: lohika-ci

.github/workflows/test_cuda.yml

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
paths:
88
- 'modules/nvidia_plugin/**'
9+
10+
permissions: read-all
11+
912
jobs:
1013
build:
1114
runs-on: lohika-ci

0 commit comments

Comments
 (0)