@@ -56,7 +56,9 @@ concurrency:
5656 cancel-in-progress : true
5757 group : ${{github.workflow}}-${{github.event.pull_request.number||github.ref}}
5858
59- permissions : read-all
59+ # Declare default permissions as read only.
60+ permissions :
61+ contents : read
6062
6163jobs :
6264 python-checks :
6870 uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
6971 with :
7072 fetch-depth : 0
73+ persist-credentials : false
7174
7275 - name : Set up Python and restore cache
7376 uses : actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
@@ -112,6 +115,8 @@ jobs:
112115 steps :
113116 - name : Check out a copy of the git repository
114117 uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
118+ with :
119+ persist-credentials : false
115120
116121 - name : Set up Python and restore cache
117122 uses : actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
@@ -144,6 +149,8 @@ jobs:
144149 steps :
145150 - name : Check out a copy of the git repository
146151 uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
152+ with :
153+ persist-credentials : false
147154
148155 - name : Set up Python and restore cache
149156 uses : actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
@@ -173,6 +180,8 @@ jobs:
173180 steps :
174181 - name : Check out a copy of the git repository
175182 uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
183+ with :
184+ persist-credentials : false
176185
177186 # Note: deliberately not using our Python cache here b/c this runs
178187 # a different version of Python.
@@ -202,6 +211,7 @@ jobs:
202211 uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
203212 with :
204213 fetch-depth : 0
214+ persist-credentials : false
205215
206216 - name : Set up Python and restore cache
207217 uses : actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
@@ -228,6 +238,8 @@ jobs:
228238 steps :
229239 - name : Check out a copy of the git repository
230240 uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
241+ with :
242+ persist-credentials : false
231243
232244 - name : Install yamllint
233245 run : |
@@ -248,6 +260,8 @@ jobs:
248260 steps :
249261 - name : Check out a copy of the git repository
250262 uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
263+ with :
264+ persist-credentials : false
251265
252266 - name : Run hadolint on Dockerfiles
253267 env :
@@ -258,7 +272,7 @@ jobs:
258272 files=(**/[Dd]ockerfile*)
259273 if [[ ${#files[@]} -gt 0 ]]; then
260274 docker run --rm -v "${PWD}:/app" -w /app \
261- ghcr.io/hadolint/hadolint@${{env. sha}} /bin/hadolint "${files[@]}"
275+ " ghcr.io/hadolint/hadolint@${sha}" /bin/hadolint "${files[@]}"
262276 fi
263277
264278 workflow-lint :
@@ -268,6 +282,8 @@ jobs:
268282 steps :
269283 - name : Check out a copy of the git repository
270284 uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
285+ with :
286+ persist-credentials : false
271287
272288 - name : Run actionlint
273289 uses : raven-actions/actionlint@3d39aea434753780c3b3d4a1a31c854b4dbf49d7 # v2.2.0
@@ -283,6 +299,8 @@ jobs:
283299 steps :
284300 - name : Check out a copy of the git repository
285301 uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
302+ with :
303+ persist-credentials : false
286304
287305 - name : Run shellcheck on shell scripts
288306 run : |
@@ -296,6 +314,8 @@ jobs:
296314 steps :
297315 - name : Check out a copy of the git repository
298316 uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
317+ with :
318+ persist-credentials : false
299319
300320 - name : Set up Python and restore cache
301321 uses : actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
0 commit comments