chore(deps): Clear high-severity CVE baseline and harden the security gate (#9584)

* chore(deps): Clear high-severity CVE baseline and harden the security gate

- Bump OpenTelemetry stack to 0.221.x (fixes @opentelemetry/core advisories)
- Bump @larksuiteoapi/node-sdk to ^1.73.0 and override axios to ^1.19.0
- Bump mobilewright to ^0.0.53 (drops vulnerable sharp 0.34.x)
- Bump markdown-it to ^15.0.0 (drops vulnerable linkify-it 5.x)
- Update undici/fast-uri/brace-expansion/ip-address within range
- Adapt telemetry code to OTel API changes (forceFlush, processor options)
- Make security-checks a hard gate now that the high baseline is clean

* chore(deps): Refresh mobile-mcp vendored lockfile to drop vulnerable sharp

* fix(telemetry): stub sdk-node 0.221 env auto-config helper packages

sdk-node 0.221 extracted its env-based auto-configuration into
@opentelemetry/configuration, otlp-exporter-base, and
otlp-grpc-exporter-base, which it now requires eagerly. The existing
esbuild stub only covered the exporter-* packages, so the OTLP protocol
chain (grpc-js, protobufjs, otlp-transformer) re-entered the sdk-impl
static closure and tripped the serve fast-path bundle guard.

Stub the three helper packages when imported by sdk-node only; our own
protocol modules keep resolving the real packages. qwen-code never
reaches these helpers at runtime (explicit exporters + env scrub).

* fix(telemetry): disable metrics fallback without reader

* fix(vscode): restore nested dependency notices

* fix(deps): declare bundled punycode so its notice survives regeneration

The CLI esbuild config aliases punycode to the userland package
(esbuild.config.js), so the shipped CLI bundle contains MIT-licensed
punycode@2.3.1. Its NOTICES.txt section was lost because the only
lockfile paths reaching punycode were dev-only; the notice walker
(rooted at vscode-ide-companion) never sees a production declaration.

Declare punycode as a direct production dependency of the CLI (the
bundle input) and of vscode-ide-companion (which packages the bundled
CLI into the VSIX and owns NOTICES.txt), then regenerate the lockfile
and notices so the MIT notice is restored.
This commit is contained in:
易良 2026-08-21 07:43:32 +00:00 committed by GitHub
parent 94a8c40364
commit e40263ee55
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 4914 additions and 4672 deletions

View file

@ -46,12 +46,10 @@ jobs:
- name: 'Install dependencies'
run: 'npm ci --ignore-scripts --no-audit --progress=false'
# Reporting-only for now: the current baseline already contains high
# severity findings, so failing the check would block every PR. Remove
# continue-on-error once the baseline is clean to make this a hard gate,
# and update scripts/tests/security-workflows.test.js with that policy.
# Hard gate: the high-severity baseline is clean, so any new high CVE
# fails the check. Keep scripts/tests/security-workflows.test.js in
# sync with this policy.
- name: 'Audit production dependencies'
continue-on-error: true
run: |
status=0
npm audit --omit=dev --audit-level=high || status=$?
@ -82,15 +80,11 @@ jobs:
# Incremental gate: the action scans commits introduced by the PR or
# push and only fails on secrets TruffleHog could actively verify,
# keeping false positives out. Branch-creating pushes have no base
# commit to diff from, so they are skipped explicitly. Reporting-only
# for the first runs; remove continue-on-error once the history has been
# triaged, and update scripts/tests/security-workflows.test.js with
# that policy.
# commit to diff from, so they are skipped explicitly.
# `version` pins the scanner image; without it the action runs `latest`.
- name: 'Scan for verified secrets'
if: "github.event_name == 'pull_request' || github.event.before != '0000000000000000000000000000000000000000'"
uses: 'trufflesecurity/trufflehog@6f3c981e7b77f235fd2702dd74af25fc4b72bf11' # v3.96.0
continue-on-error: true
with:
version: '3.96.0'
extra_args: '--only-verified'