Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
ci: add free security scans and harden workflows (#397)
Ruben Lütked9e1524bbfe3
diff --git a/.github/workflows/browser-runtime.yml b/.github/workflows/browser-runtime.ymlindex b9b102891f..5985f58c26 100644--- a/.github/workflows/browser-runtime.yml+++ b/.github/workflows/browser-runtime.yml@@ -14,7 +14,9 @@ jobs:runs-on: ${{ matrix.os }}timeout-minutes: 30steps:- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2+ with:+ persist-credentials: false- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97with:python-version: '3.12'diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 464eeef5b2..928eea04cd 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -340,14 +340,18 @@ jobs:name: ${{ needs.detect.outputs.duration_snapshot }}- name: Run shardcontinue-on-error: true+ env:+ SHARD: ${{ matrix.shard }}run: >-python scripts/ci/run_tests_parallel.py tests- --shard ${{ matrix.shard }}/6- --report out/test-report-linux-${{ matrix.shard }}.json- --junit-out out/junit-linux-${{ matrix.shard }}.xml- --durations-out out/durations-linux-${{ matrix.shard }}.json+ --shard "$SHARD/6"+ --report "out/test-report-linux-$SHARD.json"+ --junit-out "out/junit-linux-$SHARD.xml"+ --durations-out "out/durations-linux-$SHARD.json"- name: Ratchet (a failure not in the baseline blocks)- run: python scripts/ci/ratchet_tests.py check --baseline scripts/ci/test-baseline-linux.json out/test-report-linux-${{ matrix.shard }}.json+ env:+ SHARD: ${{ matrix.shard }}+ run: python scripts/ci/ratchet_tests.py check --baseline scripts/ci/test-baseline-linux.json "out/test-report-linux-$SHARD.json"- name: Upload shard reportif: always()uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3@@ -405,16 +409,22 @@ jobs:- name: Run shardif: steps.pick.outputs.mode != 'none'continue-on-error: true+ env:+ SHARD: ${{ matrix.shard }}+ PICK_MODE: ${{ steps.pick.outputs.mode }}+ PICK_TOTAL: ${{ steps.pick.outputs.total }}run: |files=()- if [ "${{ steps.pick.outputs.mode }}" = "selected" ]; then files=(--files-from out/selected.txt); fi+ if [ "$PICK_MODE" = "selected" ]; then files=(--files-from out/selected.txt); fipython scripts/ci/run_tests_parallel.py tests "${files[@]}" \- --shard ${{ matrix.shard }}/${{ steps.pick.outputs.total }} \- --report out/test-report-windows-${{ matrix.shard }}.json \- --junit-out out/junit-windows-${{ matrix.shard }}.xml+ --shard "$SHARD/$PICK_TOTAL" \+ --report "out/test-report-windows-$SHARD.json" \+ --junit-out "out/junit-windows-$SHARD.xml"- name: Ratchet (a failure not in the baseline blocks)if: steps.pick.outputs.mode != 'none'- run: python scripts/ci/ratchet_tests.py check --baseline scripts/ci/test-baseline-windows.json out/test-report-windows-${{ matrix.shard }}.json+ env:+ SHARD: ${{ matrix.shard }}+ run: python scripts/ci/ratchet_tests.py check --baseline scripts/ci/test-baseline-windows.json "out/test-report-windows-$SHARD.json"- name: Upload shard reportif: always()uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3diff --git a/.github/workflows/contributors.yml b/.github/workflows/contributors.ymlindex 08727c63b9..b2eb8e48a8 100644--- a/.github/workflows/contributors.yml+++ b/.github/workflows/contributors.yml@@ -50,16 +50,16 @@ jobs:# A closed-but-not-merged pull request adds nobody.if: github.event_name != 'pull_request_target' || github.event.pull_request.merged == trueruns-on: ubuntu-latest+ timeout-minutes: 10steps:- name: Checkoutuses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2with:# The job pushes, so it needs a real branch rather than a detached HEAD.ref: main- # main is protected. GITHUB_TOKEN can never push there; a maintainer- # token in INTEGRATION_TOKEN (the secret release-cut also reads) can- # when its owner may bypass the protection.- token: ${{ secrets.INTEGRATION_TOKEN || github.token }}+ # The push token never lands in .git/config: only the commit step+ # below receives it, so nothing else in this job runs beside it.+ persist-credentials: false- name: Set up Python 3.11uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0@@ -73,6 +73,11 @@ jobs:run: python scripts/ci/update_contributors.py- name: Commit when it changed+ env:+ # main is protected. GITHUB_TOKEN can never push there; a maintainer+ # token in INTEGRATION_TOKEN (the secret release-cut also reads) can+ # when its owner may bypass the protection.+ PUSH_TOKEN: ${{ secrets.INTEGRATION_TOKEN || github.token }}run: |set -euo pipefailif git diff --quiet -- README.md; then@@ -86,8 +91,9 @@ jobs:# Someone may have pushed while this ran. Rebase once, then push; a# second failure is reported rather than swallowed, so a genuinely# broken job is visible instead of quietly skipping every week.- git pull --rebase --ff-only origin main- if ! git push origin main 2> push.err; then+ remote="https://x-access-token:${PUSH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"+ git pull --rebase --ff-only "$remote" main+ if ! git push "$remote" HEAD:main 2> push.err; thencat push.errif grep -q "GH006\|protected branch" push.err; then# Branch protection, not a broken job: say so once per rundiff --git a/.github/workflows/desktop-installers.yml b/.github/workflows/desktop-installers.ymlindex 221b17babe..b1ebe54174 100644--- a/.github/workflows/desktop-installers.yml+++ b/.github/workflows/desktop-installers.yml@@ -102,6 +102,8 @@ jobs:uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0with:node-version: ${{ env.NODE_VERSION }}+ # A release build never restores a cache another run could have written.+ package-manager-cache: false- name: Install Personal Jarvis (desktop + dev)shell: bash@@ -210,6 +212,8 @@ jobs:uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0with:node-version: ${{ env.NODE_VERSION }}+ # A release build never restores a cache another run could have written.+ package-manager-cache: false# desktop-macos carries the pyobjc frameworks the permission port loads by# name (AVFoundation, ScreenCaptureKit, ...); without them the frozen app@@ -358,6 +362,8 @@ jobs:uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0with:node-version: ${{ env.NODE_VERSION }}+ # A release build never restores a cache another run could have written.+ package-manager-cache: false- name: Install Personal Jarvis (desktop + dev)shell: bashdiff --git a/.github/workflows/installer-smoke.yml b/.github/workflows/installer-smoke.ymlindex 1ddc530c65..32a1bec5a2 100644--- a/.github/workflows/installer-smoke.yml+++ b/.github/workflows/installer-smoke.yml@@ -176,6 +176,8 @@ jobs:- name: Run the REAL installer end-to-end (runner-appropriate profile)shell: bash+ env:+ MATRIX_OS: ${{ matrix.os }}run: |set -euo pipefail# Reproduce exactly what install.sh does after the git clone: a venv,@@ -189,7 +191,7 @@ jobs:. .venv/bin/activatepython -m pip install --upgrade pippython -m pip install rich packaging- if [ "${{ matrix.os }}" = "macos-latest" ]; then+ if [ "$MATRIX_OS" = "macos-latest" ]; thenpython install/installer.py --with-desktop --no-launch | tee install.logelsepython install/installer.py --headless --no-launch | tee install.log@@ -359,9 +361,10 @@ jobs:id: tagenv:GH_TOKEN: ${{ github.token }}+ INPUT_TAG_RAW: ${{ inputs.tag }}run: |set -euo pipefail- INPUT_TAG="${{ inputs.tag }}"+ INPUT_TAG="$INPUT_TAG_RAW"if [ -n "$INPUT_TAG" ]; thenecho "tag=$INPUT_TAG" >> "$GITHUB_OUTPUT"echo "Using manually-provided tag: $INPUT_TAG"diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.ymlnew file mode 100644index 0000000000..1e685ca314--- /dev/null+++ b/.github/workflows/scorecard.yml@@ -0,0 +1,46 @@+# OpenSSF Scorecard: a weekly, public security score for this repository.+#+# The result lands in the Security tab and on https://scorecard.dev, and feeds+# the README badge. `publish_results: true` makes the scorecard API verify this+# workflow, so the job may only use the approved actions below and must not+# grow extra steps, a top-level `env` or `defaults`.++name: Scorecard++on:+ branch_protection_rule:+ schedule:+ - cron: "23 5 * * 1" # Mondays, off the hour+ push:+ branches: [main]+ workflow_dispatch:++permissions: read-all++jobs:+ analysis:+ name: scorecard analysis+ runs-on: ubuntu-latest+ timeout-minutes: 15+ permissions:+ security-events: write+ id-token: write+ contents: read+ actions: read+ steps:+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2+ with:+ persist-credentials: false+ - uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4+ with:+ results_file: results.sarif+ results_format: sarif+ publish_results: true+ - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3+ with:+ name: scorecard-sarif+ path: results.sarif+ retention-days: 5+ - uses: github/codeql-action/upload-sarif@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2+ with:+ sarif_file: results.sarifdiff --git a/.github/workflows/security.yml b/.github/workflows/security.ymlnew file mode 100644index 0000000000..8803668529--- /dev/null+++ b/.github/workflows/security.yml@@ -0,0 +1,84 @@+# Supply-chain and workflow security scans.+#+# Three free scanners for public repositories. Each one writes into the+# repository's Security tab (code scanning), next to CodeQL's default setup:+#+# zizmor audits these workflow files themselves: template+# injection, leaked checkout credentials, dangerous+# triggers, cache poisoning. Accepted exceptions live in+# .github/zizmor.yml with their reason.+# dependency-review on pull requests only: fails when the diff ADDS a+# dependency with a known high or critical advisory.+# osv-scanner scans the shipped lockfiles against osv.dev on main and+# once a week, so an advisory published after a merge+# still surfaces. It reports; it never blocks.+#+# None of these is part of the required `CI gate` check. They inform; the+# ratchet stays the only merge blocker.++name: Security scans++on:+ push:+ branches: [main]+ pull_request:+ schedule:+ - cron: "41 3 * * 2" # Tuesdays, off the hour+ workflow_dispatch:++permissions: {}++concurrency:+ group: security-${{ github.event_name }}-${{ github.ref }}+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}++jobs:+ zizmor:+ name: zizmor (workflow audit)+ runs-on: ubuntu-latest+ timeout-minutes: 10+ permissions:+ contents: read+ actions: read+ security-events: write+ steps:+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2+ with:+ persist-credentials: false+ - uses: zizmorcore/zizmor-action@cc914d7f3750a2d13d75c7f184a1060aa0e9d482 # v0.6.4+ with:+ version: "1.30.1"+ # Low/informational hints (self-repository syntax, ad-hoc pip in the+ # merge train) stay local-only instead of filling the Security tab.+ min-severity: medium++ dependency-review:+ name: dependency review+ if: github.event_name == 'pull_request'+ runs-on: ubuntu-latest+ timeout-minutes: 10+ permissions:+ contents: read+ steps:+ - uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0+ with:+ fail-on-severity: high++ osv-scanner:+ name: osv-scanner (lockfiles)+ if: github.event_name != 'pull_request'+ permissions:+ actions: read+ contents: read+ security-events: write+ uses: google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@a345acffa64b0eaede81a3d9aae6141214d9c8fc # v2.6.0+ with:+ # Only what an installed Jarvis actually runs; the marketing video+ # projects carry their own lockfiles and ship nothing.+ scan-args: |-+ -L requirements.txt+ -L jarvis/voice_engine/requirements-engine.txt+ -L keyproxy/requirements.txt+ -L scripts/ci/requirements-build.txt+ -L jarvis/ui/web/frontend/package-lock.json+ fail-on-vuln: falsediff --git a/.github/workflows/stargazer-map.yml b/.github/workflows/stargazer-map.ymlindex f47acf02fe..a81863c57f 100644--- a/.github/workflows/stargazer-map.yml+++ b/.github/workflows/stargazer-map.yml@@ -26,6 +26,8 @@ jobs:timeout-minutes: 5steps:- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2+ with:+ persist-credentials: false- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0with:node-version: 22diff --git a/.github/zizmor.yml b/.github/zizmor.ymlnew file mode 100644index 0000000000..94985599c2--- /dev/null+++ b/.github/zizmor.yml@@ -0,0 +1,25 @@+# zizmor configuration. Every ignore names the exact location and the reason+# it is safe; a new finding anywhere else still surfaces.+rules:+ dangerous-triggers:+ ignore:+ # Runs on a merged PR but checks out `main` only and executes nothing+ # from the pull request; the push token reaches the commit step alone.+ - contributors.yml+ # Both react to completed runs of this repository's own workflows and+ # act on main / release tags; neither checks out or runs PR head code.+ - merge-train.yml+ - release-finalize.yml+ artipacked:+ ignore:+ # These jobs push commits or tags with git after checkout, so the+ # checkout must keep its credential. Neither uploads the workspace.+ - merge-train.yml+ - release-cut.yml+ unpinned-uses:+ config:+ policies:+ "*": hash-pin+ # The SLSA generator rejects SHA refs by design; its builder identity+ # is verified independently (scripts/ci/check_workflow_policy.py).+ "slsa-framework/slsa-github-generator/*": ref-pindiff --git a/docs/ci-pipeline.md b/docs/ci-pipeline.mdindex d27e236072..bb6b7421b0 100644--- a/docs/ci-pipeline.md+++ b/docs/ci-pipeline.md@@ -193,3 +193,23 @@ signing proof still requires hosted runners; local syntax checks cannot prove it| Stable release admits a claim before building | `release-gate.yml` || Autofix PRs with a privileged/unprivileged split | not adopted: generated files are regenerated during integration instead || 96-core runners, daily canary tags, Docker/Nix lanes | not adopted: standard runners, releases stay manual, no such artefacts |++## 5. Security scans — `security.yml`, `scorecard.yml`++All free for public repositories, all report into the Security tab beside+CodeQL's default setup, and none is part of the required `CI gate`:++* **zizmor** audits the workflow files on every pull request and push to+ main. Accepted exceptions live in `.github/zizmor.yml`, each with its reason;+ run `zizmor --config .github/zizmor.yml .github/workflows` locally before+ touching a workflow. Expressions reach a `run:` block through `env:`, never+ inline, and a checkout keeps its credential only when that job pushes.+* **dependency-review** fails a pull request that adds a dependency with a+ known high or critical advisory.+* **osv-scanner** checks the shipped lockfiles against osv.dev on main and+ weekly. It reports and never blocks.+* **OpenSSF Scorecard** publishes a weekly repository security score.++Dependabot covers npm through security updates only. Version updates for the+frontend stay off for the same reason as pip: a bump also needs a rebuilt+`dist/` bundle, which Dependabot cannot produce.diff --git a/tests/unit/install/test_installer_flow.py b/tests/unit/install/test_installer_flow.pyindex bc48a9ddc4..09d9f14f20 100644--- a/tests/unit/install/test_installer_flow.py+++ b/tests/unit/install/test_installer_flow.py@@ -238,7 +238,8 @@ def test_macos_fresh_install_ci_exercises_advertised_full_profile() -> None:workflow = (REPO / ".github" / "workflows" / "installer-smoke.yml").read_text(encoding="utf-8")- assert 'if [ "${{ matrix.os }}" = "macos-latest" ]; then' in workflow+ assert "MATRIX_OS: ${{ matrix.os }}" in workflow+ assert 'if [ "$MATRIX_OS" = "macos-latest" ]; then' in workflowassert "installer.py --with-desktop --no-launch" in workflow