How undeadsec/swaggerspy works
Project type and purpose
• SwaggerSpy is a Python-based command-line OSINT tool for automated intelligence gathering on SwaggerHub APIs.
• It’s not a web app or microservice but a standalone CLI utility that queries SwaggerHub, inspects returned API specs with regexes, and emits a report.
File structure
• Top level:
• swaggerspy.py – the main executable script
• requirements.txt / setup.py – dependency and packaging
• README.md, LICENSE
• No separate “src” or “lib” folders: all core logic lives in swaggerspy.py.
• The script likely imports modules for HTTP requests, regex inspection, and report generation.
README for additional insights
• Describes workflow: “python swaggerspy.py <searchterm>”
→ Queries SwaggerHub APIs
→ Applies regex patterns to spec definitions
→ Outputs a findings report
• TODO section hints at modular regex patterns, suggesting an opportunity to break the script into logical components.
Detailed capture of essential elements
• Where new regex patterns would be dropped in, and how the parser module consumes them.
• Detail the HTTP call structure (e.g., GET /apis?search=term) and the expected spec format.
• Reporting step, whether it’s plain text, JSON summary, or an HTML file.