Skip to content

Commit 3bf450c

Browse files
authored
Add permissions blocks to CI
Signed-off-by: Bradley Reynolds <[email protected]>
1 parent 6804d2d commit 3bf450c

File tree

5 files changed

+31
-28
lines changed

5 files changed

+31
-28
lines changed

.github/dependabot.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ multi-ecosystem-groups:
66
interval: "monthly"
77

88
updates:
9-
- package-ecosystem: "devcontainers"
10-
directory: "/"
11-
patterns:
12-
- "*"
13-
multi-ecosystem-group: "all"
14-
159
- package-ecosystem: "github-actions"
1610
directory: "/"
1711
patterns:

.github/workflows/dependency-review.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Dependency Review"
1+
name: Dependency Review
22

33
on:
44
pull_request:
@@ -11,10 +11,10 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- name: "Checkout Repository"
14+
- name: Checkout Repository
1515
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1616

17-
- name: "Dependency Review"
17+
- name: Dependency Review
1818
uses: actions/dependency-review-action@da24556b548a50705dd671f47852072ea4c105d9 # v4.7.1
1919
with:
2020
config-file: darbiadev/.github/.github/dependency-review-config.yaml@main

.github/workflows/pre-commit.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
name: "pre-commit"
1+
name: pre-commit
22

33
on:
44
push:
55
branches:
66
- main
77
pull_request:
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
pre-commit:
1114
uses: darbiadev/.github/.github/workflows/generic-precommit.yaml@91dda16028f109ac78016dd740206fd109740068 # v15.0.0

.github/workflows/python.yaml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Python"
1+
name: Python
22

33
on:
44
push:
@@ -7,55 +7,58 @@ on:
77
- "pyproject.toml"
88
- "**/*.py"
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
lint:
1215
runs-on: ubuntu-latest
1316

1417
steps:
15-
- name: "Checkout repository"
18+
- name: Checkout repository
1619
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1720

18-
- name: "Setup Python"
21+
- name: Setup Python
1922
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
2023
with:
21-
python-version: "3.x"
24+
python-version: 3.x
2225
allow-prereleases: true
23-
cache: "pip"
24-
cache-dependency-path: "pyproject.toml"
26+
cache: pip
27+
cache-dependency-path: pyproject.toml
2528

26-
- name: "Install dependencies"
29+
- name: Install dependencies
2730
run: python -m pip install .[dev,tests]
2831

29-
- name: "Check formatting"
32+
- name: Check formatting
3033
run: python -m ruff format --check .
3134

32-
- name: "Run ruff"
35+
- name: Run ruff
3336
run: python -m ruff check --output-format=github .
3437

3538
test:
3639
runs-on: ubuntu-latest
3740

3841
steps:
39-
- name: "Checkout repository"
42+
- name: Checkout repository
4043
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4144

42-
- name: "Setup Python"
45+
- name: Setup Python
4346
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
4447
with:
45-
python-version: "3.x"
46-
cache: "pip"
47-
cache-dependency-path: "pyproject.toml"
48+
python-version: 3.x
49+
cache: pip
50+
cache-dependency-path: pyproject.toml
4851

49-
- name: "Install dependencies"
52+
- name: Install dependencies
5053
run: |
5154
python -m pip install coverage pytest
5255
python -m pip install --editable .[dev,tests]
5356
python -m pip install --editable scratch/projects/one_two_three
5457
55-
- name: "Run tests"
58+
- name: Run tests
5659
run: python -m coverage run -m pytest --junitxml=junit.xml -o junit_family=legacy
5760

58-
- name: "Upload coverage reports to Codecov"
61+
- name: Upload coverage reports to Codecov
5962
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
6063
env:
6164
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/rust.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Rust CI"
1+
name: Rust CI
22

33
on:
44
push:
@@ -8,6 +8,9 @@ on:
88
- '**/Cargo.toml'
99
- '**/Cargo.lock'
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
lint:
1316
uses: darbiadev/.github/.github/workflows/rust-lint.yaml@91dda16028f109ac78016dd740206fd109740068 # v15.0.0

0 commit comments

Comments
 (0)