Skip to main content
Agent skill

Desktop Security Update

Inspect, mark, or revoke vulnerable LobeHub Desktop versions through the existing release workflow and signed R2 security policy. Use for forced security updates across Stable, Canary, Beta, and Nightly.

All install options
Quick install · Personal (~/.claude/skills)Project / Cursor / Desktop →
mkdir -p ~/.claude/skills/desktop-security-update && curl -fsSL 'https://raw.githubusercontent.com/lobehub/lobehub/canary/.agents/skills/desktop-security-update/SKILL.md' -o ~/.claude/skills/desktop-security-update/SKILL.md

Get the complete skill folder, including its scripts and reference files.

When to use this skill

Use Desktop Security Update when an AI agent needs a reusable SKILL.md workflow for this job: Inspect, mark, or revoke vulnerable LobeHub Desktop versions through the existing release workflow and signed R2 security policy. Use for forced security updates across Stable, Canary, Beta, and Nightly.

When not to use it

Skip Desktop Security Update when the task is outside the coding category, or when a more specific skill in this directory already covers the same workflow with clearer triggers.

How to install

Where will you use it?

Install scope
One-line install (Claude Code)
mkdir -p ~/.claude/skills/desktop-security-update && curl -fsSL 'https://raw.githubusercontent.com/lobehub/lobehub/canary/.agents/skills/desktop-security-update/SKILL.md' -o ~/.claude/skills/desktop-security-update/SKILL.md
  1. Claude Code personal install: place the skill and its bundled files at ~/.claude/skills/desktop-security-update/SKILL.md. For a shared project, commit the folder at .claude/skills/desktop-security-update/ instead.
  2. Current Claude Code detects SKILL.md changes in watched directories during the session. If you just created a top-level skills directory, run /reload-skills. Check that the skill is listed before testing its trigger.
  3. For Claude chat or Cowork in the Desktop app, manage uploaded skills in Customize > Skills; copying files into a local Claude Code folder is not a Desktop install. Other agents may use different install locations.

Full install guide for Claude, Cursor, and Codex →

Try a starter prompt

After installing the skill, paste this starter prompt into your agent to verify it triggers on a small task.

Starter prompt
Use the Desktop Security Update skill for this task: Use Desktop Security Update when this documented workflow matches the task. Confirm any required inputs or files before making changes.

What supports this recommendation?

71/100 provisional content score. This measures documentation, practical detail and source signals. It is not a measured task success rate or a security certification.

Documentation
77/100
Practical detail
68/100
Source evidence
63/100
Source signals
72/100
Model compatibility evidence
  • claudeuntested

    No model-specific signal or recorded compatibility test was found.

  • chatgptuntested

    No model-specific signal or recorded compatibility test was found.

  • geminiuntested

    No model-specific signal or recorded compatibility test was found.

  • copilotuntested

    No model-specific signal or recorded compatibility test was found.

  • llamauntested

    No model-specific signal or recorded compatibility test was found.

  • perplexityuntested

    No model-specific signal or recorded compatibility test was found.

  • mistraluntested

    No model-specific signal or recorded compatibility test was found.

  • grokuntested

    No model-specific signal or recorded compatibility test was found.

Inferred compatibility is based on content signals. Check the app, its available tools and setup requirements before running a skill.

What this skill does

# Desktop security updates

Operate `.github/workflows/release-desktop-core-ota.yml` using its `security_policy` input. This selects only the policy job; it does not build or publish Core. The policy is global across channels at `<UPDATE_SERVER_URL base>/security-policy.json` in the existing update bucket.

Read [the policy contract](../../../apps/desktop/docs/security-updates.md) for client behavior and delivery limitations. The deterministic operator is `apps/desktop/scripts/desktopSecurityPolicy.mjs`; it shares schema/signature validation with the client. Do not hand-sign JSON, fetch signing secrets locally, replace the whole rule set, or add a workflow.

## Resolve the request

For a mark, determine the installer build channel, platforms, `shell` or `core` target, affected npm SemVer range, fixed full-installer version, and reason. An exact version is a valid range. Do not guess the affected scope from the latest release. If scope is ambiguous, inspect the current policy while asking only for the missing scope. Publish the fixed installer first: the operator checks the public feed and installer availability for every requested platform, including both macOS architectures. Beta uses the Canary installer feed.

A concrete user instruction to mark or revoke a specified scope authorizes that operation. If the user only asks to investigate or prepare, stop after inspection/preview. Do not invent a security restriction while implementing or testing this tooling. Never automatically weaken a range or minimum to make a failed preflight pass.

## Inspect, preview, apply

1. Resolve the actual repository with `gh repo view --json nameWithOwner`. Use the trusted `canary` branch after this workflow change is merged. Check that the remote workflow at the selected ref contains `security_policy` before dispatching; an older workflow could otherwise run an ordinary Core release. Do not dispatch unreviewed code with production signing secrets. 2. Dispatch `{"action":"inspect"}`. Read the downloaded report, including storage revision, rule IDs, `publicRevision`, and `publicError`. Initial absence is revision 0. If an existing policy differs from the public endpoint, resolve that discrepancy before a mutation. 3. Prepare one mark or revoke request with the inspected `expectedRevision`, a concise reason, and `apply:false`. Dispatch it and show the concrete before/after rules and installer checks. A preview performs no writes and uses no private key. 4. If the requested concrete mutation is authorized, dispatch the same request with `apply:true`. If it is not authorized, ask for approval of this prepared change. An earlier explicit mark/revoke instruction is sufficient; do not ask again. 5. Read the report and the exact workflow run. Success requires `status: verified`, with the public URL serving the exact signed policy just written. Report the new revision, affected scope (or revoked rule), and run URL. `no-change` means no publication occurred.

Mark example (replace the illustrative values with the user's scope):

```json { "action": "mark", "apply": false, "expectedRevision": 7, "reason": "Security fix in the full installer", "rule": { "channel": "stable", "platforms": ["darwin", "win32", "linux"], "target": "shell", "affectedVersions": ">=2.2.0 <2.2.20", "minimumInstallerVersion": "2.2.20" } } ```

Revoke request: `{"action":"revoke","expectedRevision":8,"apply":false,"reason":"Restriction withdrawn","ruleId":"<64-character ID from inspect>"}`. Revocation publishes a newer signed revision; never delete the policy or restore an older revision. Marking the same scope updates its minimum; changing its scope creates another rule, so revoke the old rule separately when that is intended.

## Dispatch and collect evidence

Write JSON to a temporary file. Pass it with `gh workflow run --json` via stdin; never interpolate user text into shell commands. Use a fresh UUID as `security_policy_request_id` for **each** dispatch. The workflow title includes it, so unrelated concurrent runs cannot be mistaken for this operation.

```sh POLICY_REQUEST_ID=$(uuidgen) jq --arg id "$POLICY_REQUEST_ID" \ '{channel:"canary",security_policy:tojson,security_policy_request_id:$id}' \ /tmp/security-policy-request.json > /tmp/security-policy-dispatch.json gh workflow run release-desktop-core-ota.yml --repo "$POLICY_REPO" --ref canary \ --json < /tmp/security-policy-dispatch.json ```

Here `channel:canary` satisfies the existing workflow input; the policy request determines the actual affected channels. Locate the run by exact `displayTitle == "Desktop security policy (<UUID>)"`, `event == workflow_dispatch`, and `headBranch == canary` using `gh run list --workflow release-desktop-core-ota.yml --repo "$POLICY_REPO" --json databaseId,displayTitle,event,headBranch,headSha,url,status,conclusion`. Poll for at most two minutes to locate it; do not redispatch just because run discovery is delayed. Watch that run and download `desktop-security-policy-<run-id>` using `gh run download <run-id> --repo "$POLICY_REPO" --name ... --dir <unique-temp-directory>`. Inspect logs if no report was produced.

The publisher checks `expectedRevision`, preserves unrelated rules, signs in Actions, archives the signed revision, conditionally replaces the R2 object using its ETag, and verifies the ordinary public URL. R2 credentials and the OTA signing pair reuse existing workflow secrets.

On a revision/precondition conflict, stop that mutation and inspect again; do not blindly rerun a stale request. On `published-unverified`, the write already succeeded: inspect storage and public delivery, investigate caching, and do not bump revision just to retry. Ambiguous network failures after a write also require inspection. Keep reports/logs as evidence, but never treat a green job, archived object, or preview as proof that clients can fetch the new policy.

Intended uses

  • Use Desktop Security Update when this documented workflow matches the task.

Implementation notes

  • Review the source instructions and adapt inputs before running the workflow.

Try it, then tell us how it went

A copied prompt does not tell us whether the task worked. Report your result after checking the output. We collect your tool and outcome, never your files or prompt.