Skip to content

[BUG] CLI --timeout argument is silently ignored (not passed to config) #26

Description

@KbWen

Describe the Bug

The CLI defines a --timeout argument (default: 10 seconds) in the parent parser, but config.py's update_from_args() method never reads or applies this value. As a result, user-specified timeout values are silently ignored — the scanner always uses the hardcoded default.

Steps to Reproduce

  1. Run ghostcheck scan . --timeout 60
  2. Observe that network requests (e.g., vulnerability checks via OSV) still use the default 10-second timeout.

Expected Behavior

The --timeout value should be passed through config.update_from_args() and used by all network-dependent scanners (VulnScanner, SecretValidator, etc.).

Root Cause

In cli.py line 131-142, update_from_args handles severity, offline, load_local_plugins, insecure, and preset — but not timeout.

Proposed Fix

Add timeout handling in config.py:update_from_args():

if hasattr(args, 'timeout') and args.timeout:
    self.config['timeout'] = args.timeout

Activity

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions