Skip to content

security/leaked-secrets: credentials in sample data tables and demo fixtures (seed users, breach-lookup rows, puzzle levels, generator output) reported as leaks #1308

Closed

Description

@nc9

security/leaked-secrets reports credentials that sit in sample data the page renders, not in configuration: seed-user tables, breach-lookup demo rows, puzzle and game levels, password-generator output. The value can be realistic, so a value check alone can't separate them; the structure around it can.

From hand verification of a ~38k-site batch (v0.0.141, up to 200 first-party scripts per site, masked context only, no credential used or tested):

class flags / sites shape
security-tool and scanner demos 16 / 15 fake AWS/OpenAI keys and honeypot tokens shown as a scanner's sample input or output
seed and mock-auth user tables 14 / 10 [{role:"admin",email:"[email protected]",password:"…"},{role:"user",…}]
breach-lookup demo rows 32 / 2 arrays of {Email,Password,Url} rows in an OSINT product's mock data
puzzle and CTF levels 35 / 10 {crackUser,crackPassword,candidates:[…],flagPath}, const SECRET beside checksum/codeFor
generator and sample output 12 / 8 {sample:"<32 chars>",options:{length:32,…}}, guest-guide wifiPassword sample data

What separates them from a leak:

  • the value sits in an array of 3+ objects with the same keys (a data table), not in a single config object
  • the sibling email domains are reserved (.test, .example, example.com, .local)
  • the object also carries game or sample markers (flag, FLAG{, candidates, sample, options.length)

One counter-case to keep: a seed list with real-domain emails can be working demo logins against production. That should still report, at lower confidence.

Acceptance Criteria

  • A password inside an array of 3+ same-shaped records whose emails are on reserved domains (.test, .example, example.com, .local) produces no leaked-secrets item, or an info note that isn't counted as a secret (fixture). (amended 2026-11-01: the reserved list is .test, .example, .invalid, .localhost and example.com, example.org, example.net; .local and .internal are real private networks and still report, as the rule docs say.)
  • A puzzle object carrying flag/FLAG{/candidates beside the password, and a generator object with sample + options.length, produce no item (fixtures).
  • The same seed table with real-domain emails still reports, labelled as a possible working demo login (fixture).
  • A single config object {email:"…",password:"<12+ mixed>"} with no table structure still reports (fixture).
  • The rule docs describe the data-table exemption.

Activity

  1. added
    size: M
    rules
    security
    on Oct 30, 2026
  2. added theissue type on Oct 30, 2026
  3. nc9 commented on Nov 1, 2026

    @nc9
    ContributorAuthor

    Amended the reserved-domain criterion to the shipped list: .test, .example, .invalid, .localhost, example.com, example.org and example.net produce no item. .local and .internal are real private networks, so a table with those emails still reports as a possible working demo login, as the rule docs say. All criteria are now met on v0.0.158. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.158

    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

    rulessecuritysize: M

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions