Skip to content

Commit 03b3b55

Browse files
committed
Added top-level token permission and move write permission to job level
1 parent 1968efa commit 03b3b55

File tree

6 files changed

+30
-5
lines changed

6 files changed

+30
-5
lines changed

.github/workflows/build-windows.yml

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55

66
name: build on Windows
77

8+
# https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/
9+
permissions:
10+
# Grant read permissions to repository in case it is not a forked public
11+
# repository, but a private repository that was created manually.
12+
contents: read
13+
814
on:
915
push:
1016
paths:

.github/workflows/container-prune.yml

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ name: prune container images on self-hosted runners
99
# docker permits only a single prune operation at a time
1010
concurrency: container-prune
1111

12+
# https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/
13+
# https://github.com/ossf/scorecard/blob/2ef20f17fb2e64147c83440cd2c769653454015a/docs/checks.md#token-permissions
14+
permissions:
15+
# top-level permissions must be defined for security reasons.
16+
contents: read
17+
1218
on:
1319
push:
1420
branches:

.github/workflows/container.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ permissions:
2424
# repository, but a private repository that was created manually.
2525
contents: read
2626

27-
# If trigger-specific permissions were supported, write permissions to the
28-
# container registry would only be needed for push events.
29-
packages: write
30-
3127
on:
3228
push:
3329
branches:
@@ -61,6 +57,11 @@ jobs:
6157
build:
6258
runs-on: ubuntu-20.04
6359

60+
permissions:
61+
# If trigger-specific permissions were supported, write permissions to the
62+
# container registry would only be needed for push events.
63+
packages: write
64+
6465
# This rebuilds all container images whenever any single Dockerfile is
6566
# changed. Therefore, when iterating on a container change, consider
6667
# temporarily commenting all but the container of interest below.

.github/workflows/fuzz-test.yml

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: Runtime Fuzz Testing
22

3+
# https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/
4+
# https://github.com/ossf/scorecard/blob/2ef20f17fb2e64147c83440cd2c769653454015a/docs/checks.md#token-permissions
5+
permissions:
6+
# top-level permissions must be defined for security reasons.
7+
contents: read
8+
39
on:
410
workflow_dispatch:
511
inputs:

.github/workflows/unix.yml

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
# enforce UNIX line endings for all except Windows-specific text files.
1010
name: ensure UNIX line endings
1111

12+
# https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/
13+
# https://github.com/ossf/scorecard/blob/2ef20f17fb2e64147c83440cd2c769653454015a/docs/checks.md#token-permissions
14+
permissions:
15+
# top-level permissions must be defined for security reasons.
16+
contents: read
17+
1218
on:
1319
push:
1420
pull_request:

container/rockylinux-9-dev/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ RUN \
2323
&& yum -y upgrade \
2424
&& yum -y install \
2525
cmake \
26-
curl \
26+
# curl \ Start from rockylinux 9.2, curl is available by default
2727
elfutils-libelf-devel \
2828
gcc \
2929
gcc-c++ \

0 commit comments

Comments
 (0)