Skip to content

security/leaked-secrets reports scripts it could not read, and the publish capper keeps every coverage-gap row #1749

Closed

Description

@nc9

A leaked secret in a script must only count as gone when the script is really gone. Today a script that timed out, returned 5xx, was WAF-blocked or was dropped by the asset cap simply contributes no finding, and a later comparison can read the secret as resolved (private squirrelscan/repo#3993/#3997). Separately, the publish capper only protects skip rows whose reason is in NOT_CHECKED_SKIP_REASONS (publish-cap.ts), so unread-page, scan-truncated, leaked-secrets-unscanned and -omitted rows can be cut from a heavily capped report, and the gap disappears with them.

Acceptance Criteria

  • security/leaked-secrets emits a leaked-secrets-unfetched check (info, a coverage gap) listing each script with no content and a status other than 404/410 (timeout, 5xx, refused, WAF, rate limited, fetchSkipReason), and a count of scripts dropped by the asset cap. A 404/410 script is not listed (it is gone).
  • The publish capper never drops a coverage-gap row: unread-page, scan-truncated, *-unscanned, *-omitted, *-unfetched are kept like the NOT_CHECKED reasons, with a test on a heavily capped report.
  • Engine-level tests: a script that times out produces the unfetched check; a 404 script does not.
  • Docs for the rule and for the report's capping describe both. Relates to feat(rules): a rule's passing and failing checks are linked, so a consumer can tell when a reported finding has been fixed #1741.

Activity

  1. added
    bug
    size: S
    rules
    security
    on Nov 11, 2026
  2. added theissue type on Nov 11, 2026
  3. nc9 commented on Nov 12, 2026

    @nc9
    ContributorAuthor

    Not closed after v0.0.179 (https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.179). leaked-secrets-unfetched and the publish cap keeping coverage-gap rows shipped, with docs. Still open: an engine-level test where a script times out (only the rule-level test covers a timeout). The change that shipped is 65c4ca8.

    nik

  4. nc9 commented on Nov 13, 2026

    @nc9
    ContributorAuthor

    Shipped in v0.0.179. Implemented in 65c4ca8 (an ancestor of the v0.0.179 tag), and described in that release's CHANGELOG entry for #1749.

    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

    bugrulessecuritysize: S

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions