Skip to content

integrity/brand-impersonation: derive the window prefilter's auth verbs from AUTH_LABEL and PROVIDER_BUTTON #1460

Closed

Description

@nc9

Found in the review of #1455. The window prefilter in packages/rules/src/integrity/controls.ts takes its brand words from the lexicon, but the auth verbs come from a hand-written list, AUTH_CUE_PHRASES (sign in, log in, login, logon, continue with, verify), and the drift test repeats the list. A new verb added to the AUTH_LABEL or PROVIDER_BUTTON patterns in signals.ts would not widen the prefilter, so a window holding only that verb would never be read.

Acceptance Criteria

  • AUTH_LABEL and PROVIDER_BUTTON (or the phrase lists they are built from) are defined once and exported from one module, and both signals.ts and the prefilter in controls.ts read them
  • The prefilter's auth alternatives are derived from them, with no second hand-written list
  • The drift test takes its phrases from the same exports, and a test fails if a verb is added to one pattern and not the prefilter

Activity

  1. added
    size: S
    rules
    on Oct 31, 2026
  2. added theissue type on Oct 31, 2026
  3. changed the issue type fromtoon Oct 31, 2026
  4. nc9 commented on Nov 2, 2026

    @nc9
    ContributorAuthor

    Checked against main (e86767f). Criteria 1 and 2 are met: packages/rules/src/integrity/cues.ts defines the phrase lists once and builds AUTH_LABEL and PROVIDER_BUTTON from them; signals.ts and controls.ts import them and the prefilter derives from AUTH_CUE_PHRASES (fix 983a006, first in v0.0.154). Criterion 3 is only partly met, so the issue stays open. With CUE_PATTERN changed to drop PROVIDER_VERBS, only the older hand-listed drift guard fails (logon); the new #1460 test does not, because it probes <verb> with google and the brand lexicon's "google" already passes the prefilter. And adding a verb to PROVIDER_VERBS widens both the pattern and the prefilter but then fails the new test on its own hard-coded negative. A fix that probes the bare verb is in progress. integrity-evasions-784.test.ts passes (83).

    nik

  5. nc9 commented on Nov 4, 2026

    @nc9
    ContributorAuthor

    Acceptance check against main 7c31d5b (shipped in v0.0.154 and v0.0.160, included in v0.0.161):

    # Criterion Result Evidence
    1 AUTH_LABEL and PROVIDER_BUTTON defined once, read by signals.ts and the prefilter PASS packages/rules/src/integrity/cues.ts builds both from AUTH_LABEL_PHRASES and PROVIDER_VERBS; signals.ts and controls.ts import from it
    2 Prefilter alternatives derived, no second hand-written list PASS cuePattern([...AUTH_CUE_PHRASES, ...lexicon]) in controls.ts; AUTH_CUE_PHRASES is [...AUTH_LABEL_PHRASES, ...PROVIDER_VERBS]
    3 Drift test from the same exports; fails if a verb is in one pattern and not the prefilter PASS integrity-evasions-784.test.ts "the prefilter's auth words come from the exported cue lists ..." probes the bare verb for every PROVIDER_VERBS entry and an invented word that is not on the list. Mutation check: dropping PROVIDER_VERBS from AUTH_CUE_PHRASES made this test and "the cue prefilter holds every phrase the rules match (drift guard)" fail; the file is restored

    integrity-evasions-784.test.ts 83 pass, 0 fail on this main. The gap found in the earlier check (the new test did not catch a verb dropped from the prefilter) was closed by commit 33c32fb.

    Ticked all three and closing.

    nik

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

    chorerulessize: S

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions