Skip to content

fix(security): gitleaks scans every file of a list target again #781

Closed

Description

@dan-petty

Context & Rationale

Gitleaks takes one source per run, and GitleaksScanner.build_command has always passed only target_path[0] to --source, so with the binary installed a list target scanned only its first file. 5d34541 (#763) extended that to the built-in patterns: run_gitleaks_scan (security/gitleaks.py:238) now hands the scanner target[0], where it used to pass the whole list to _resolve_scan_files. The review pipeline passes every reviewed file (ai/review/pipeline.py:1080), so a review scans only its first file for secrets whether or not the binary is installed. The review tests patch run_gitleaks_scan, so none caught it.

Scope & Deliverables

  • Deliverable: a list target scans every file again, and a test calls run_gitleaks_scan with two files where only the second holds a secret.
  • Constraint: this is a critical fix: a P0 security regression whose introducing commit (5d34541) is cited, so it joins the current release.

Strategic Alignment

  • Milestone: v0.2.24
  • Design: none
  • Depends on: none

Activity

  1. added this to the v0.2.24 milestone on Oct 1, 2026
  2. added
    type/security
    scope/security
    priority/p0-critical
    on Oct 1, 2026
  3. dan-petty commented on Oct 1, 2026

    @dan-petty
    OwnerAuthor

    Closed by #784, merged into release/v0.2.24.

    GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by devops gh issues close-merged.

  4. added a commit that references this issue on Oct 1, 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/p0-criticalscope/securitytype/security

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions