You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
full_api_network_map.py shadow-API discovery is case-sensitive, silently excludes uppercase-extension files #317
bugUnintended behavior or logic failure in the enginecomponent: shadow-apiEndpoint mapping and Swagger specification diffspriority: highCore feature broken, but workarounds existthreat: false-negativeAccuracy tuning: Engine missed a bypass or vulnerability
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():
ifnotfilepath.is_file() orfilepath.suffixnotin [".json", ".yaml", ".yml"]: # line 133, Swagger/OpenAPI doc discovery
...
iffilepath.suffixinconfig["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.
bugUnintended behavior or logic failure in the enginecomponent: shadow-apiEndpoint mapping and Swagger specification diffspriority: highCore feature broken, but workarounds existthreat: false-negativeAccuracy tuning: Engine missed a bypass or vulnerability
Activity
Make shadow-API file-extension matching case-insensitive (#320)