{"id":25911440,"url":"https://github.com/copyleftdev/rusty-swag","last_synced_at":"2025-03-03T09:17:31.787Z","repository":{"id":234792867,"uuid":"789513037","full_name":"copyleftdev/rusty-swag","owner":"copyleftdev","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-20T19:03:52.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-20T20:22:20.048Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/copyleftdev.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-20T19:01:42.000Z","updated_at":"2024-04-20T20:22:27.697Z","dependencies_parsed_at":"2024-04-20T20:22:26.209Z","dependency_job_id":"e3cb81f3-3034-4bb6-b0c0-9fb741aee3db","html_url":"https://github.com/copyleftdev/rusty-swag","commit_stats":null,"previous_names":["copyleftdev/rusty-swag"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copyleftdev%2Frusty-swag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copyleftdev%2Frusty-swag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copyleftdev%2Frusty-swag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copyleftdev%2Frusty-swag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/copyleftdev","download_url":"https://codeload.github.com/copyleftdev/rusty-swag/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241637272,"owners_count":19994946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-03T09:17:31.237Z","updated_at":"2025-03-03T09:17:31.771Z","avatar_url":"https://github.com/copyleftdev.png","language":"Rust","readme":"# Rusty-Swag\n\n## Description\n`rusty-swag` is a high-performance command-line interface (CLI) tool designed to detect the presence of Swagger UI documentation on a list of specified hosts. Built with Rust and leveraging asynchronous programming, `rusty-swag` efficiently checks multiple hosts concurrently for Swagger UI endpoints, enhancing productivity and response times for developers and systems administrators managing API documentation across various servers.\n\n## Features\n- **Concurrent Requests**: Utilizes a configurable number of worker tasks to make simultaneous HTTP requests, improving the scanning throughput.\n- **Timeout Management**: Implements request timeouts to avoid hanging operations due to unresponsive servers.\n- **Error Handling**: Gracefully handles network-related errors and logs them without causing the program to crash.\n- **Result Logging**: Successfully identified Swagger UI endpoints are logged into a file for further inspection.\n\n## Installation\n\n### Prerequisites\n- Rust Programming Language: Ensure you have Rust installed. If not, you can install it from [rust-lang.org](https://rust-lang.org).\n- Cargo (Rust's package manager and build tool): Comes with Rust installation.\n\n### Build\nFollow these steps to build the `rusty-swag` tool:\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/copyleftdev/rusty-swag.git\n   ```\n2. Change into the project directory:\n   ```bash\n   cd rusty-swag\n   ```\n3. Compile the project using Cargo:\n   ```bash\n   cargo build --release\n   ```\n   This command compiles the code and outputs an executable in the `./target/release/` directory.\n\n## Usage\nTo use `rusty-swag`, navigate to the `./target/release/` directory where the executable is located. You can run the executable directly from this location or add it to your system path for easier access.\n\n### Running the Tool\nUse the following command syntax to run `rusty-swag`:\n```bash\n./rusty-swag --hosts \u003cpath_to_hosts_file\u003e --routefile \u003cpath_to_routes_file\u003e [options]\n```\n\n### Command-Line Options\n- `--hosts \u003cpath_to_hosts_file\u003e`: Specifies the path to the file containing newline-separated host URLs.\n- `--routefile \u003cpath_to_routes_file\u003e`: Specifies the path to the file containing the relative paths to check for Swagger UI on each host.\n- `--workers \u003cnumber\u003e`: (Optional) Specifies the number of concurrent workers to use for sending requests. Default is 10.\n\n### Example Command\n```bash\n./rusty-swag --hosts hosts.txt --routefile routes.txt --workers 20\n```\n\n## Contributing\nContributions to `rusty-swag` are welcome! Whether it's bug reports, feature suggestions, or code contributions, please feel free to make your mark. Follow the steps below to contribute:\n\n1. Fork the repository on GitHub.\n2. Clone your fork locally:\n   ```bash\n   git clone https://github.com/\u003cyour-github-username\u003e/rusty-swag.git\n   ```\n3. Create a new branch for your feature or bug fix:\n   ```bash\n   git checkout -b your-branch-name\n   ```\n4. Make your changes and commit them:\n   ```bash\n   git commit -am \"Add some feature\"\n   ```\n5. Push the changes to your GitHub fork:\n   ```bash\n   git push origin your-branch-name\n   ```\n6. Submit a pull request from your fork’s branch to our repository.\n\n## License\n`rusty-swag` is available under the MIT License. See the LICENSE file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcopyleftdev%2Frusty-swag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcopyleftdev%2Frusty-swag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcopyleftdev%2Frusty-swag/lists"}