Skip to content

Commit c65a93c

Browse files
Add zizmor and dependabot.yml
1 parent 56cfcda commit c65a93c

File tree

3 files changed

+37
-3
lines changed

3 files changed

+37
-3
lines changed

.github/dependabot.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "quarterly"
7+
labels:
8+
- "skip issue"
9+
- "skip news"
10+
ignore:
11+
- dependency-name: "*"
12+
update-types:
13+
- "version-update:semver-minor"
14+
- "version-update:semver-patch"
15+
groups:
16+
actions:
17+
patterns:
18+
- "*"
19+
cooldown:
20+
# https://blog.yossarian.net/2025/11/21/We-should-all-be-using-dependency-cooldowns
21+
# Cooldowns protect against supply chain attacks by avoiding the
22+
# highest-risk window immediately after new releases.
23+
default-days: 14

.github/workflows/build.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,19 @@ jobs:
2525
- undefined
2626

2727
steps:
28-
- uses: actions/checkout@v6
28+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2929
with:
3030
repository: google/oss-fuzz
3131
path: oss-fuzz
32+
persist-credentials: false
3233

3334
- name: Patch Dockerfile to use this ref
3435
run: |
35-
sed -i "s|git clone --depth 1 --branch main https://github.com/python/library-fuzzers.git|git clone --depth 1 --branch ${{ github.head_ref }} ${{ github.event.pull_request.head.repo.clone_url }} library-fuzzers|" \
36+
sed -i "s|git clone --depth 1 --branch main https://github.com/python/library-fuzzers.git|git clone --depth 1 --branch ${BRANCH} ${CLONE_URL} library-fuzzers|" \
3637
oss-fuzz/projects/python3-libraries/Dockerfile
38+
env:
39+
BRANCH: ${{ github.head_ref }}
40+
CLONE_URL: ${{ github.event.pull_request.head.repo.clone_url }}
3741

3842
- name: Build fuzzers
3943
run: |

.pre-commit-config.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ repos:
77
- id: ruff-format
88
exclude: ^corp-
99

10-
1110
- repo: https://github.com/pre-commit/pre-commit-hooks
1211
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
1312
hooks:
@@ -17,5 +16,13 @@ repos:
1716
exclude: ^corp-
1817
- id: end-of-file-fixer
1918
exclude: ^corp-
19+
- id: file-contents-sorter
20+
files: '^fuzz_targets.txt$'
2021
- id: trailing-whitespace
2122
exclude: ^corp-
23+
24+
- repo: https://github.com/zizmorcore/zizmor-pre-commit
25+
rev: b546b77c44c466a54a42af5499dcc0dcc1a3193f # frozen: v1.22.0
26+
hooks:
27+
- id: zizmor
28+
args: [--fix=all]

0 commit comments

Comments
 (0)