Skip to content

Rules - Reduce False Positives - Look for centralized https remote timeout #87

@noelsaw1

Description

@noelsaw1
  • Legacy Scanner branch (Development)

  • Legacy Scanner branch (Main)

  • New Scanner branch

In Hypercart Smart Batch Installer MKIII Triage

Initially missed that $args is defined once and reused for multiple calls

Initial FALSE Positive finding

2. Missing timeout ArgumentsVALID

  • Finding: Add explicit timeout to wp_remote_get calls
  • Reality: Found 4 calls in GitHubService.php missing explicit timeout
    • Lines 82, 102, 562, 576
    • They have $args arrays but no 'timeout' key
  • Action: Add 'timeout' => 10 to these 4 calls

Possible code:

Tier 1: High confidence (auto-flag)

wp_remote_get( $url ); // No args at all

Tier 2: Medium confidence (warn)

$args = [ 'headers' => [...] ]; // No timeout in context
wp_remote_get( $url, $args );

Tier 3: Low confidence (info)

wp_remote_get( $url, self::ARGS ); // Likely OK - uses constant

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions