Skip to content

test(e2e): one generated credential for the browser specs, as #126 did for Rust #143

Closed

Description

@TusanHomichi

Existing issue check

Problem or outcome

#126 removed hard-coded passwords from the Rust integration tests. It added a runtime-generated credential in crates/consolebook-server/tests/support and a guard test. The browser specs under web/e2e/ still declare their own, for example const PASSWORD = 'invented-passphrase-1' in 9 spec files (grep -rln "PASSWORD = '" web/e2e on b2949fd). CodeQL's JavaScript/TypeScript analysis has raised no alert on them so far, but they belong to the same class. The next spec a contributor copies will carry the pattern forward, and a future CodeQL rule update could make every one of them a merge-blocking alert at once. The independent review of #126 found this (2026-10-15).

Outcome

The browser specs take credentials from one place in web/e2e/fixtures.ts, generated per run, the way the Rust tests now do. A check that the gates run fails on a new literal; that can be a small test or a lint over web/e2e/**/*.ts, with negative controls.

Acceptance criteria

  • No spec under web/e2e/ declares a password literal. A guard fails on a new one, with negative controls.
  • The full browser suite passes unchanged in meaning.

Related

#126, crates/consolebook-server/tests/no_credential_literals.rs (the Rust guard's scan contract, to mirror).

Activity

  1. added
    ready
    on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: mediumready

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions