Skip to content

Commit a2c4c46

Browse files
author
DevForge Engineer
committed
fix: remove npm-publish.yml and harden CI workflow security
- Remove npm-publish.yml (wrong-language workflow for Python repo) - Add persist-credentials: false to all checkout steps (ci, publish, pages) - Add top-level permissions: contents: read to ci.yml - Update pages.yml checkout from v4 to v6
1 parent bebc041 commit a2c4c46

4 files changed

Lines changed: 10 additions & 30 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
branches: [main]
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
test:
1114
runs-on: ubuntu-latest
@@ -15,6 +18,8 @@ jobs:
1518

1619
steps:
1720
- uses: actions/checkout@v6
21+
with:
22+
persist-credentials: false
1823

1924
- name: Set up Python ${{ matrix.python-version }}
2025
uses: actions/setup-python@v6
@@ -30,4 +35,3 @@ jobs:
3035
- name: Run tests
3136
run: |
3237
python -m pytest tests/ -v --cov=src --cov-report=term-missing
33-

.github/workflows/npm-publish.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/pages.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ jobs:
1818
build:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@v6
22+
with:
23+
persist-credentials: false
2224
- name: Setup Pages
2325
uses: actions/configure-pages@v5
2426
- name: Build with Jekyll

.github/workflows/publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222

2323
steps:
2424
- uses: actions/checkout@v6
25+
with:
26+
persist-credentials: false
2527

2628
- name: Set up Python 3.11
2729
uses: actions/setup-python@v6

0 commit comments

Comments
 (0)