Security (S11, S14, S16): the shell's own autocomplete is gone; least privilege in CI; set-up refuses root and another version's release
S11. autocomplete = 'shell' had the shell integration send what was typed to the engine itself: it could not see a private pane or the AI switch, and had its own timeout and no chosen model. autocomplete.bash and autocomplete.zsh are removed, with what exported their switch; the shell integration keeps its zones and the status record. 'shell' turns nothing on and is said in the log. S14. The build job may only read the repository; a job of its own, for a tag only and after the build passed, downloads the build's artefact and publishes the release with write access. Every action is pinned by its commit, with the tag it was taken from beside it. S16. The set-up program refuses to run as root (everything goes into the person's own home). A signed SHA256SUMS whose first line names a product and version must name the release asked for: an older signed release served under the newest tag is refused. Sums that name nothing yet are still taken, and that is said. Tests for both, and for the root refusal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
7 files changed
+86
-231
No files matched your search
@@ -8,6 +8,10 @@
|
||||
# packages (kept as a build artefact), installed over the last package of the earlier name.
|
||||
# On a signed tag vX.Y.Z or vX.Y.Z-beta.N: the same, and then the GitHub Release with the
|
||||
# packages, SHA256SUMS and the tag message as its notes.
|
||||
#
|
||||
# Least privilege: the job that builds can read the repository and nothing else; only the job
|
||||
# that publishes (tags only, after the build, from the build's own artefact) can write a
|
||||
# release. Every action is pinned by its commit, the tag it was taken from beside it.
|
||||
name: llembas-term
|
||||
on:
|
||||
push:
|
||||
@@ -29,12 +33,12 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 120
|
||||
permissions:
|
||||
contents: write
|
||||
contents: read
|
||||
env:
|
||||
CARGO_INCREMENTAL: "0"
|
||||
CARGO_TERM_COLOR: always
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
|
||||
with:
|
||||
# The whole history: the hygiene check reads what was added since the commit in
|
||||
# UPSTREAM, and the build derives WezTerm's version from the newest commit.
|
||||
@@ -60,15 +64,14 @@ jobs:
|
||||
- name: Shell scripts, the workflow, the desktop file
|
||||
run: |
|
||||
shellcheck scripts/*.sh llembas/packaging/*.sh llembas/tests/*.sh llembas/ci/*.sh \
|
||||
llembas/shell/llembas-term.sh llembas/shell/autocomplete.bash llembas/setup/llembas-term-setup
|
||||
zsh -n llembas/shell/autocomplete.zsh
|
||||
llembas/shell/llembas-term.sh llembas/setup/llembas-term-setup
|
||||
zsh -n llembas/shell/llembas-term.sh
|
||||
yamllint -d '{extends: default, rules: {line-length: disable, document-start: disable, truthy: disable}}' .github/workflows/llembas-term.yml
|
||||
desktop-file-validate llembas/packaging/eu.llembas.term.desktop
|
||||
appstreamcli validate --no-net llembas/packaging/eu.llembas.term.appdata.xml || true
|
||||
- name: System libraries
|
||||
run: env CI=yes ./get-deps
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
|
||||
with:
|
||||
# Upstream's code is not held to "no warnings" here; the action's default would be.
|
||||
rustflags: ""
|
||||
@@ -140,16 +143,34 @@ jobs:
|
||||
{ echo "# llembas-term $version"; sha256sum -- *; } > ../SHA256SUMS
|
||||
mv ../SHA256SUMS .
|
||||
cat SHA256SUMS
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: llembas-term-linux-x86_64
|
||||
path: dist/*
|
||||
retention-days: 14
|
||||
|
||||
release:
|
||||
# only for a tag, only after everything above passed, and only this job may write
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
needs: linux
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 15
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
|
||||
with:
|
||||
# the tag's message is the release's notes
|
||||
fetch-depth: 0
|
||||
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||
with:
|
||||
name: llembas-term-linux-x86_64
|
||||
path: dist
|
||||
- name: Publish the GitHub Release
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
git fetch --force origin "refs/tags/$GITHUB_REF_NAME:refs/tags/$GITHUB_REF_NAME"
|
||||
version="$(tr -d '[:space:]' < VERSION)"
|
||||
git tag -l --format='%(contents)' "$GITHUB_REF_NAME" | sed '/-----BEGIN SSH SIGNATURE-----/,$d' > notes.md
|
||||
# A version is released once: a fix is a new version, never the old one re-released.
|
||||
|
||||
Reference in new issue
Block a user