Skip to content

Commit 1c2a9c8

Browse files
authored
chore(docs): harden CI supply chain + update deps (#401)
chore(docs): harden CI supply chain + update deps (#378)
2 parents 8b3285c + 4e09b19 commit 1c2a9c8

4 files changed

Lines changed: 41 additions & 10 deletions

File tree

.github/dependabot.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: 2
2+
updates:
3+
# Astro docs site (site/). Group everything into a single weekly PR so the
4+
# advisory stream is one reviewed change, not nonstop noise. No auto-merge —
5+
# updates are deliberate (see the supply-chain hardening discussion in #378).
6+
- package-ecosystem: npm
7+
directory: /site
8+
schedule:
9+
interval: weekly
10+
open-pull-requests-limit: 5
11+
groups:
12+
site-dependencies:
13+
patterns:
14+
- "*"
15+
16+
# Keep the GitHub Actions used by the deploy workflow current.
17+
- package-ecosystem: github-actions
18+
directory: /
19+
schedule:
20+
interval: weekly
21+
groups:
22+
github-actions:
23+
patterns:
24+
- "*"

.github/workflows/deploy.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ jobs:
1515
deploy:
1616
name: Deploy to GitHub Pages
1717
runs-on: ubuntu-latest
18+
# Least privilege: the build only needs to push the gh-pages branch. Limits
19+
# blast radius if a build-time dependency is ever compromised.
20+
permissions:
21+
contents: write
1822
steps:
1923
- uses: actions/checkout@v5
2024
- uses: actions/setup-node@v6
@@ -23,8 +27,11 @@ jobs:
2327
cache: npm
2428
cache-dependency-path: site/package-lock.json
2529

30+
# --ignore-scripts blocks install/postinstall (and binding.gyp/node-gyp)
31+
# supply-chain vectors — see npm worm advisories (Shai-Hulud). The build
32+
# works without lifecycle scripts (sharp ships prebuilt binaries).
2633
- name: Install dependencies
27-
run: npm ci
34+
run: npm ci --ignore-scripts
2835
working-directory: site
2936
- name: Build website
3037
run: npm run build

site/package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"astro": "astro"
1010
},
1111
"dependencies": {
12-
"@astrojs/starlight": "0.40.0",
13-
"astro": "6.4.6",
14-
"sharp": "0.35.1"
12+
"@astrojs/starlight": "^0.40.0",
13+
"astro": "^6.4.7",
14+
"sharp": "^0.35.1"
1515
}
1616
}

0 commit comments

Comments
 (0)