Files
BetterDesk/.github/workflows/codeql.yml
T
UNITRONIX b1f72fcac0 fix(ci): green the failing workflows and close four open advisories
Web Console CI and Installer CI both ran tests/updateService.channel.test.js,
which spied on the exported updateService.checkGoAvailable while
runUpdatePreflight called the module-local function. The mock never applied, so
the assertion depended on the runner Go version: green on older Go, red on CI.
runUpdatePreflight now calls through module.exports, which keeps the seam
spy-able and makes the test deterministic. One change fixes both workflows.

Security:
- GHSA-98mc-f6p7-gj85: bdRelay compared relay tokens with timingSafeEqual
  without a length check; a wrong-length token threw RangeError out of an
  unguarded connection listener and killed the whole console. Lengths are
  checked first, values coerced, and the listener keeps failures local.
- GHSA-7j6j-h4qf-86mq: CDAP API key auth ignored expires_at, so an expired key
  kept authenticating agents while the REST path rejected it. Expiry is now
  enforced on both paths.
- GHSA-22mg-g52q-x75c: /ws/remote-viewer/:device_id checked device.connect but
  not device scope, so an operator could view a device outside their scope.
  Added the userCanAccessDevice check used by remoteTargetGateway; a scope miss
  answers 404 like a missing device.
- GHSA-qxwx-jg77-5v67: the startup banner logged the PostgreSQL DSN with its
  password. config.RedactedDBPath now strips credentials.

CI: all actions moved to their Node 24 majors with SHA pins, concurrency groups
and timeouts added throughout, a blocking i18n gate added to Web Console CI, and
a GHCR preflight added so a registry authorization outage reports as
infrastructure instead of a false build failure. The orphaned "Web UI CI"
registration (no workflow file in any branch) was disabled.

i18n: translated the 58 users.access_* keys into all 24 non-English locales and
dropped four legacy meta.* keys from fr/zh-TW.

Reported-by: @evanonym0us
Reported-by: @kta1kri
Reported-by: @Marc-T-robotics
Reported-by: @KolosovV

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
2026-11-18 01:42:05 +01:00

57 lines
1.7 KiB
YAML

name: CodeQL
# Advanced CodeQL workflow. GitHub "default setup" already scans on push
# (runs appear as "Push on dev"). Uploading SARIF from this advanced workflow
# fails with: "CodeQL analyses from advanced configurations cannot be processed
# when the default setup is enabled". Keep this file for scheduled / manual
# advanced scans after default setup is disabled in repo Settings → Code security.
on:
workflow_dispatch:
schedule:
- cron: '0 8 * * 1'
permissions:
contents: read
security-events: write
actions: read
concurrency:
group: codeql-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
language:
- javascript-typescript
- go
- python
- rust
- actions
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Initialize CodeQL
uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
- name: Autobuild
uses: github/codeql-action/autobuild@33d7b85da1a04171e211befe2c739303b9a4c066 # v4
- name: Perform CodeQL Analysis
if: github.event_name != 'pull_request' || github.actor != 'dependabot[bot]'
uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v4
with:
category: /language:${{ matrix.language }}
# Avoid hard-fail when default setup is still enabled on the repo.
upload: always
continue-on-error: true