Files
zpan/scripts
Jasper Van f701f4139a fix(security): resolve CodeQL code-scanning alerts (#472)
Clears all 23 open CodeQL alerts:

- actions/missing-workflow-permissions (19, medium): add a top-level
  least-privilege `permissions: contents: read` to ci.yml and the 7
  deploy workflows. The one CI job that needs `packages: write` already
  declares its own block; all deploys authenticate via static secrets
  (no OIDC / id-token, no repo writes), so read is sufficient.

- js/insecure-randomness (1, high): `genPassword()` built share
  passwords with Math.random(); switch to crypto.getRandomValues() over
  the same unambiguous alphabet (length/charset/uniqueness preserved).

- js/incomplete-url-substring-sanitization (2, high): two test fetch
  stubs routed on `String(url).includes('api.github.com')`; tighten to
  `new URL(url).hostname === 'api.github.com'` — precise and no longer
  flagged.

- js/stack-trace-exposure (1, medium): the E2E S3 mock echoed
  error.message in 500 responses; log server-side and return a generic
  body instead.

Verified: typecheck green; share-dialog/changelog/system.integration
tests pass.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 13:39:28 -04:00
..