Skip to content

Commit 2048554

Browse files
committed
ci: fix additional issues identified by zizmor
- Add default permissions to new workflows - Add cooldown to dependabot
1 parent 860767b commit 2048554

File tree

6 files changed

+18
-2
lines changed

6 files changed

+18
-2
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ updates:
99
directory: "/"
1010
schedule:
1111
interval: "weekly"
12+
cooldown:
13+
default-days: 4

.github/workflows/build-devel-docs.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ name: Scheduled build for devel docs
55
# Run at 05:22 daily
66
- cron: '22 5 * * *'
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
build-package-docs:
1013
name: 📝 Build

.github/workflows/build-latest-docs.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ name: Scheduled build for latest docs
55
# Run at 05:41 on Monday
66
- cron: '41 5 * * 1'
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
build-package-docs:
1013
name: 📝 Build

.github/workflows/labeler.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
# SPDX-License-Identifier: GPL-3.0-or-later
44

55
"on":
6-
pull_request_target:
6+
# This workflow does not execute untrusted code from pull requests and all
7+
# inputs are properly sanitized,
8+
pull_request_target: # zizmor: ignore[dangerous-triggers]
79
types:
810
- opened # default
911
- synchronize # default

.github/workflows/release-porting-guide.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212
description: >-
1313
Exact release version. For example, 12.1.0
1414
required: true
15+
permissions:
16+
contents: read
1517

1618
jobs:
1719
upload-porting-guide:
@@ -40,13 +42,15 @@ jobs:
4042
uses: actions/checkout@v5
4143
with:
4244
token: ${{ steps.create_token.outputs.token }}
45+
persist-credentials: true # Needed to push to the repo
4346

4447
- name: Check out ansible-build-data
4548
uses: actions/checkout@v5
4649
with:
4750
repository: ansible-community/ansible-build-data
4851
ref: ${{ inputs.ansible-build-data-branch }}
4952
path: ansible-build-data
53+
persist-credentials: false
5054

5155
- name: Copy the RST file to the correct path
5256
run: >-

.github/workflows/reusable-build-docs.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,10 @@ jobs:
117117
run: echo "TX_ID=$(date +%s)" >> "${GITHUB_ENV}"
118118

119119
- name: Notify the DaWGs in Matrix
120+
# FAIL_MESSAGE is trusted input so okay to inject here.
121+
# zizmor: ignore[template-injection]
120122
run: |
121-
curl -X PUT "${{ env.ROOM_URL }}/${TX_ID}" \
123+
curl -X PUT "${ROOM_URL}/${TX_ID}" \
122124
-H "Authorization: Bearer ${{ secrets.DOCS_BOT_TOKEN }}" \
123125
-H "Content-Type: application/json" \
124126
-d '{"msgtype": "m.text", "body": "${{ env.FAIL_MESSAGE }}"}'

0 commit comments

Comments
 (0)