Skip to content

Commit 864441b

Browse files
committed
Harden workflow permissions and pin actions
1 parent d86ff4d commit 864441b

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/pre-commit.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
- "v[0-9]+*"
1212
workflow_dispatch:
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
pre-commit:
1619
runs-on: ubuntu-latest
@@ -19,11 +22,11 @@ jobs:
1922
ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16
2023
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
2124
steps:
22-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
2326
with:
2427
path: "."
2528
- name: Set up Python
26-
uses: actions/setup-python@v3
29+
uses: actions/setup-python@3542bca2639a428e1796aaa6a2ffef0c0f575566 # v3
2730
with:
2831
python-version: '3.10'
29-
- uses: pre-commit/action@v3.0.1
32+
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1

0 commit comments

Comments
 (0)