Repository navigation
Release Ubuntu installables for v0.1.25 #276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| # Ubuntu packages, built and exercised on the exact distribution we support. | ||
| # | ||
| # This workflow deliberately produces an artifact instead of publishing to the | ||
| # separate public releases repository. That keeps cross-repository credentials | ||
| # out of the source repository while still making every release candidate | ||
| # reproducible from an exact ref. Attach the resulting files to the matching | ||
| # openmausbot-releases release after the smoke test passes. | ||
| name: Package Ubuntu | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| ref: | ||
| description: "Commit/tag/branch to build (defaults to the branch this is run from)" | ||
| required: false | ||
| type: string | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| package: | ||
| name: DEB + AppImage (Ubuntu 24.04 x64) | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 30 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ inputs.ref || github.ref }} | ||
| persist-credentials: false | ||
| - uses: pnpm/action-setup@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 24 | ||
| cache: pnpm | ||
| - name: Install package validation and native smoke tools | ||
| run: >- | ||
| sudo apt-get update && sudo apt-get install -y | ||
| at-spi2-core dbus-x11 desktop-file-utils libxi6 libxkbcommon0 squashfs-tools xvfb | ||
| - run: pnpm install --frozen-lockfile | ||
| - name: Clean generated output | ||
| run: pnpm clean | ||
| - name: Stage the pinned CUA runtime | ||
| run: pnpm build:cua:linux | ||
| - name: Package from the verified offline CUA stage | ||
| run: pnpm package:linux:offline | ||
| - name: Verify package contents and metadata | ||
| run: node scripts/verify-linux-package.mjs | ||
| - name: Configure Chromium sandbox for the unpacked app | ||
| run: | | ||
| sudo chown root:root release/linux-unpacked/chrome-sandbox | ||
| sudo chmod 4755 release/linux-unpacked/chrome-sandbox | ||
| test "$(stat -c '%U:%G %a' release/linux-unpacked/chrome-sandbox)" = "root:root 4755" | ||
|
Comment on lines
+49
to
+53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
file=".github/workflows/package-linux.yml"
printf '%s\n' '--- workflow ---'
cat -n "$file"
printf '%s\n' '--- related path references ---'
rg -n -C 3 'chrome-sandbox|release/linux-unpacked|inputs\.ref|workflow_dispatch|run:' "$file"
printf '%s\n' '--- workflow files and build/package references ---'
git ls-files '.github/workflows' | sort
rg -n -C 2 'linux-unpacked|chrome-sandbox|package-linux|workflow_dispatch|inputs:' .github README.md 2>/dev/null || trueRepository: milind-soni/OpenMausBot Length of output: 9132 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- package and smoke script declarations ---'
rg -n -C 4 '"(package:linux:offline|build:cua:linux|smoke:linux-package)"' package.json pnpm-lock.yaml 2>/dev/null || true
printf '%s\n' '--- candidate implementation files ---'
rg -l 'smoke:linux-package|package:linux:offline|build:cua:linux|chrome-sandbox|linux-unpacked' --glob '!*.lock' --glob '!node_modules' . | sort
printf '%s\n' '--- package.json ---'
cat -n package.json
printf '%s\n' '--- relevant workflow validation script references ---'
rg -n -C 5 'verify-linux-package|chrome-sandbox|linux-unpacked|smoke' scripts src test tests . 2>/dev/null | head -n 300Repository: milind-soni/OpenMausBot Length of output: 29065 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- package verifier structure and file checks ---'
ast-grep outline scripts/verify-linux-package.mjs
cat -n scripts/verify-linux-package.mjs | sed -n '1,115p;300,445p'
printf '%s\n' '--- smoke executable launch ---'
ast-grep outline scripts/smoke-linux-package.mjs
cat -n scripts/smoke-linux-package.mjs | sed -n '1,55p;155,205p'
printf '%s\n' '--- build and packaging path references ---'
rg -n -C 5 'electron-builder|chrome-sandbox|linux-unpacked|chmod|symlink|symlinkSync|linkSync|copyFile' scripts electron package.json electron-builder.yml electron-builder.yaml 2>/dev/null || trueRepository: milind-soni/OpenMausBot Length of output: 50380 🏁 Script executed: #!/bin/bash
set -eu
python3 - <<'PY'
from pathlib import Path
import re
workflow = Path(".github/workflows/package-linux.yml").read_text()
verifier = Path("scripts/verify-linux-package.mjs").read_text()
smoke = Path("scripts/smoke-linux-package.mjs").read_text()
after_pack = Path("scripts/after-pack.mjs").read_text()
checks = {
"workflow checks out caller-selected ref": "ref: ${{ inputs.ref || github.ref }}" in workflow,
"workflow uses privileged chown on chrome-sandbox":
"sudo chown root:root release/linux-unpacked/chrome-sandbox" in workflow,
"workflow uses privileged chmod on chrome-sandbox":
"sudo chmod 4755 release/linux-unpacked/chrome-sandbox" in workflow,
"package verifier mentions chrome-sandbox":
"chrome-sandbox" in verifier,
"package verifier uses statSync for executable validation":
"statSync(file, { throwIfNoEntry: false })" in verifier,
"package verifier has lstat-based symlink rejection":
bool(re.search(r"lstatSync\(.*chrome-sandbox|chrome-sandbox.*lstatSync", verifier)),
"smoke defaults to linux-unpacked/openmausbot":
"release", "linux-unpacked", "openmausbot" in smoke,
"smoke spawns the selected executable":
"spawn(executable, electronArgs" in smoke,
"afterPack mentions chrome-sandbox":
"chrome-sandbox" in after_pack,
}
for name, result in checks.items():
print(f"{'PASS' if result else 'FAIL'}: {name}")
print("\nRelevant verifier calls:")
for line_no, line in enumerate(verifier.splitlines(), 1):
if "requireExecutable" in line or "statSync(" in line or "lstatSync(" in line:
print(f"{line_no}: {line.strip()}")
print("\nRelevant smoke calls:")
for line_no, line in enumerate(smoke.splitlines(), 1):
if "const executable" in line or "spawn(executable" in line:
print(f"{line_no}: {line.strip()}")
PY
printf '%s\n' '--- packaging hook ---'
cat -n scripts/after-pack.mjs | sed -n '1,130p'Repository: milind-soni/OpenMausBot Length of output: 305 🏁 Script executed: #!/bin/bash
set -eu
python3 - <<'PY'
from pathlib import Path
import re
workflow = Path(".github/workflows/package-linux.yml").read_text()
verifier = Path("scripts/verify-linux-package.mjs").read_text()
smoke = Path("scripts/smoke-linux-package.mjs").read_text()
after_pack = Path("scripts/after-pack.mjs").read_text()
checks = {
"workflow checks out caller-selected ref": "ref: ${{ inputs.ref || github.ref }}" in workflow,
"workflow uses privileged chown on chrome-sandbox":
"sudo chown root:root release/linux-unpacked/chrome-sandbox" in workflow,
"workflow uses privileged chmod on chrome-sandbox":
"sudo chmod 4755 release/linux-unpacked/chrome-sandbox" in workflow,
"package verifier mentions chrome-sandbox":
"chrome-sandbox" in verifier,
"package verifier uses statSync for executable validation":
"statSync(file, { throwIfNoEntry: false })" in verifier,
"package verifier has lstat-based symlink rejection":
bool(re.search(r"lstatSync\(.*chrome-sandbox|chrome-sandbox.*lstatSync", verifier)),
"smoke defaults to linux-unpacked/openmausbot":
all(part in smoke for part in ("release", "linux-unpacked", "openmausbot")),
"smoke spawns the selected executable":
"spawn(executable, electronArgs" in smoke,
"afterPack mentions chrome-sandbox":
"chrome-sandbox" in after_pack,
}
for name, result in checks.items():
print(f"{'PASS' if result else 'FAIL'}: {name}")
print("\nRelevant verifier calls:")
for line_no, line in enumerate(verifier.splitlines(), 1):
if "requireExecutable" in line or "statSync(" in line or "lstatSync(" in line:
print(f"{line_no}: {line.strip()}")
print("\nRelevant smoke calls:")
for line_no, line in enumerate(smoke.splitlines(), 1):
if "const executable" in line or "spawn(executable" in line:
print(f"{line_no}: {line.strip()}")
PY
printf '%s\n' '--- packaging hook ---'
cat -n scripts/after-pack.mjs | sed -n '1,130p'Repository: milind-soni/OpenMausBot Length of output: 3304 Reject symlinks before privileged changes to
🤖 Prompt for AI Agents |
||
| - name: Launch packaged app and verify lifecycle | ||
| env: | ||
| OMB_KEEP_SMOKE_DIR: "1" | ||
| run: pnpm smoke:linux-package | ||
| - name: Prepare release assets | ||
| id: release | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| version="$(node -p "require('./package.json').version")" | ||
| appimage="release/OpenMausBot-${version}-x86_64.AppImage" | ||
| deb="release/OpenMausBot-${version}-amd64.deb" | ||
| test -f "$appimage" | ||
| test -f "$deb" | ||
| cp "$appimage" release/OpenMausBot.AppImage | ||
| cp "$deb" release/OpenMausBot-amd64.deb | ||
| chmod 0755 release/OpenMausBot.AppImage | ||
| ( | ||
| cd release | ||
| sha256sum \ | ||
| "$(basename "$appimage")" \ | ||
| "$(basename "$deb")" \ | ||
| OpenMausBot.AppImage \ | ||
| OpenMausBot-amd64.deb > SHA256SUMS-ubuntu-x64.txt | ||
| ) | ||
| echo "artifact-name=openmausbot-ubuntu-${version}-x64" >> "$GITHUB_OUTPUT" | ||
| echo "version: $version" | ||
| echo "commit: $(git rev-parse HEAD)" | ||
| cat release/SHA256SUMS-ubuntu-x64.txt | ||
| - name: Upload smoke diagnostics on failure | ||
| uses: actions/upload-artifact@v4 | ||
| if: failure() | ||
| with: | ||
| name: openmausbot-ubuntu-smoke-diagnostics | ||
| path: | | ||
| ${{ runner.temp }}/omb-linux-smoke-* | ||
| ${{ runner.temp }}/omb-linux-smoke-runtime-* | ||
| if-no-files-found: warn | ||
| include-hidden-files: true | ||
| retention-days: 7 | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ steps.release.outputs.artifact-name }} | ||
| path: | | ||
| release/OpenMausBot-*-amd64.deb | ||
| release/OpenMausBot-*-x86_64.AppImage | ||
| release/OpenMausBot-amd64.deb | ||
| release/OpenMausBot.AppImage | ||
| release/SHA256SUMS-ubuntu-x64.txt | ||
| if-no-files-found: error | ||
| retention-days: 14 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: milind-soni/OpenMausBot
Length of output: 37144
🏁 Script executed:
Repository: milind-soni/OpenMausBot
Length of output: 50380
🏁 Script executed:
Repository: milind-soni/OpenMausBot
Length of output: 7724
🏁 Script executed:
Repository: milind-soni/OpenMausBot
Length of output: 21212
🏁 Script executed:
Repository: milind-soni/OpenMausBot
Length of output: 353
Verify sandbox metadata in the uploaded packages.
The workflow packages the
.deband AppImage before it changesrelease/linux-unpacked/chrome-sandbox. Neither verifier checks this file. Setroot:rootand mode4755before artifact assembly, then verify the extracted.deband AppImage contents.🤖 Prompt for AI Agents