mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-19 14:36:22 -05:00
serve, single-file and readability-extractor install from a committed lockfile (#912)
They were installed with `npm i -g`, which pinned only the three top-level versions and resolved their 156 dependencies fresh from the registry, so a forged TLS certificate (as the eMudhra key compromise allowed) could change code WROLPi runs on every archive. npm-tools/package-lock.json pins every package with its sha512, and install_npm_tools.sh runs `npm ci` and links the commands into /usr/local/bin for every install path, upgrades, both images and the archive container. The app container's unpinned, unused global serve is removed. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ecdad6c3e0
commit
d69f8317aa
12 changed files with 1838 additions and 32 deletions
|
|
@ -20,11 +20,8 @@ apt-get install -y $(cat /opt/wrolpi/debian-live-config/config/package-lists/wro
|
|||
node -v
|
||||
npm -v
|
||||
|
||||
# Install serve, and archiving tools. Check each independently so a present
|
||||
# single-file cannot mask a missing serve (which breaks wrolpi-app).
|
||||
command -v serve >/dev/null || sudo npm i -g serve@12.0.1
|
||||
single-file --version >/dev/null 2>&1 || sudo npm i -g single-file-cli@2.0.73
|
||||
command -v readability-extractor >/dev/null || sudo npm i -g readability-extractor@0.0.6
|
||||
# Install serve and the archiving tools from the committed lockfile.
|
||||
/opt/wrolpi/scripts/install_npm_tools.sh
|
||||
|
||||
# Install Deno runtime; single-file runs under it.
|
||||
command -v deno || {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue