Skip to content

full_api_network_map.py shadow-API discovery is case-sensitive, silently excludes uppercase-extension files #317

Closed

Description

@squid-protocol

File: gitgalaxy/tools/network_auditing/full_api_network_map.py
Labels: bug, component: shadow-api, threat: false-negative, priority: medium

Description

Two filters compare Path.suffix (which preserves on-disk case) directly against lowercase literal lists, with no .lower():

if not filepath.is_file() or filepath.suffix not in [".json", ".yaml", ".yml"]:   # line 133, Swagger/OpenAPI doc discovery
...
if filepath.suffix in config["ext"]:                                              # line 205, per-framework route-signature scan

A file named Routes.JS, api.PY, or Config.YAML is silently excluded from both Swagger/OpenAPI spec discovery and the physical-codebase API-endpoint extraction that the shadow-API diff depends on -- a real endpoint could go undetected simply because of its filename's casing.

Notably, the same file gets this right elsewhere: parse_official_swagger does swagger_path.suffix.lower() in [".yaml", ".yml"] (line 168), proving the two unguarded sites are an oversight, not an intentional constraint.

Fix

filepath.suffix.lower() not in [...] / filepath.suffix.lower() in config["ext"] at both sites.

Activity

  1. added
    bug
    component: shadow-api
    threat: false-negative
    priority: high
    on Jul 23, 2026
  2. added a commit that references this issue on Jul 23, 2026
    83c3634
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

    bugcomponent: shadow-apipriority: highthreat: false-negative

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions