Skip to content

Commit 4fe5e47

Browse files
Merge pull request #11 from aress31/main
v4.1
2 parents 02a9a15 + 2c95872 commit 4fe5e47

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1270
-1206
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 58 deletions
This file was deleted.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: 🐛 Report a bug
2+
description: Submit a bug report to help us enhance swurg.
3+
title: "[BUG] <title>"
4+
labels: [bug]
5+
assignees: aress31
6+
body:
7+
- type: checkboxes
8+
attributes:
9+
label: Prerequisites
10+
description: "Prior to submitting the issue, ensure that you have:"
11+
options:
12+
- label: Thoroughly read the [README file](https://github.com/aress31/swurg/blob/main/README.md).
13+
required: true
14+
- label: Checked the [project requirements](https://github.com/aress31/swurg#requirements) and ensured they are met.
15+
required: true
16+
- label: Searched for existing issues that may address the problem.
17+
required: true
18+
- label: Performed basic troubleshooting steps.
19+
required: true
20+
- type: textarea
21+
attributes:
22+
label: Description
23+
description: A clear and concise description of what the bug is.
24+
validations:
25+
required: true
26+
- type: textarea
27+
attributes:
28+
label: Steps to Reproduce
29+
placeholder: |
30+
1. Go to '...'
31+
2. Click on '....'
32+
3. Scroll down to '....'
33+
4. See error...
34+
description: Steps to reproduce the behavior.
35+
validations:
36+
required: true
37+
- type: textarea
38+
attributes:
39+
label: Expected Behavior
40+
description: A clear and concise description of what you expected to happen.
41+
validations:
42+
required: true
43+
- type: textarea
44+
attributes:
45+
label: Screenshots
46+
description: If applicable, add screenshots to help explain your problem.
47+
validations:
48+
required: false
49+
- type: textarea
50+
attributes:
51+
label: Environment
52+
value: |
53+
- OS: [e.g. Windows, macOS, Linux]
54+
- Java version: [e.g. 8, 11, 16, 17]
55+
- Burp Suite version: [e.g. Professional 2023.11.1.3, Community 2023.11.1.3]
56+
- OpenAPI Specification version: [e.g., 1.0, 2.0, 3.0]
57+
validations:
58+
required: true
59+
- type: textarea
60+
attributes:
61+
label: Error Message
62+
description: |
63+
1. Navigate to the `Dashboard` -> `Event Log` to see if there are any relevant error messages available.
64+
2. Additionally, go to `Extensions` -> `Installed` -> `OpenAPI Parser`, and check the `Output` and `Error` tabs for any error messages.
65+
validations:
66+
required: false
67+
- type: textarea
68+
attributes:
69+
label: Additional Context
70+
description: Add any other context about the problem here.
71+
validations:
72+
required: false

.github/ISSUE_TEMPLATE/feature_report.md

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: 🚀 Report a feature request
2+
description: Submit a proposal for an idea or enhancement to swurg.
3+
title: "[FEATURE] <title>"
4+
labels: [enhancement]
5+
assignees: aress31
6+
body:
7+
- type: checkboxes
8+
attributes:
9+
label: Prerequisites
10+
description: "Prior to submitting the issue, ensure that you have:"
11+
options:
12+
- label: Searched for existing feature requests that may address the problem.
13+
required: true
14+
- type: textarea
15+
attributes:
16+
label: Problem or Use Case
17+
description: A clear and concise description of the problem or use case where swurg would be useful.
18+
validations:
19+
required: true
20+
- type: textarea
21+
attributes:
22+
label: Proposed Solution
23+
description: A clear and concise description of what you want to happen. Please provide as much detail as possible, including how the feature would interact with swurg and Burp Suite.
24+
validations:
25+
required: true
26+
- type: textarea
27+
attributes:
28+
label: Alternative Solutions Considered
29+
description: A clear and concise description of any alternative solutions or features you've considered.
30+
validations:
31+
required: true
32+
- type: textarea
33+
attributes:
34+
label: Example
35+
description: If applicable, provide an example of how the feature would work.
36+
validations:
37+
required: true
38+
- type: textarea
39+
attributes:
40+
label: Add any other context, screenshots, or references about the feature request here.
41+
validations:
42+
required: true

.github/workflows/gradle-build.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,17 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v2
1919

20-
- name: Set up Node.js 16
21-
uses: actions/setup-node@v2
22-
with:
23-
node-version: 16
24-
25-
- name: Set up JDK 11
20+
- name: Set up JDK 20
2621
uses: actions/setup-java@v2
2722
with:
28-
java-version: "11"
23+
java-version: "20"
2924
distribution: "adopt"
3025

3126
- name: Grant execute permission for gradlew
3227
run: chmod +x gradlew
3328

3429
- name: Build with Gradle
35-
run: ./gradlew shadowJar
30+
run: ./gradlew fatJar
3631

3732
- name: Archive build artifacts
3833
uses: actions/upload-artifact@v2

BappDescription.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<ul>
1414
<li>Comparer</li>
1515
<li>Intruder</li>
16+
<li>Organizer</li>
1617
<li>Repeater</li>
1718
<li>Scanner</li>
1819
<li>Scope</li>

BappManifest.bmf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ Uuid: 6bf7574b632847faaaa4eb5e42f1757c
22
ExtensionType: 1
33
Name: OpenAPI Parser
44
RepoName: openapi-parser
5-
ScreenVersion: 4.0
5+
ScreenVersion: 4.1
66
SerialVersion: 24
77
MinPlatformVersion: 6
88
ProOnly: False
9-
Author: Alexandre Teyar, Aegis Cyber www.aegiscyber.co.uk
9+
Author: Alexandre Teyar, Aegis Cyber <www.aegiscyber.co.uk>
1010
ShortDescription: OpenAPI parser fully compliant with OpenAPI 2.0/3.0 Specifications (OAS). Supports both JSON and YAML formats.
1111
EntryPoint: build/libs/openapi-parser-all.jar
1212
BuildCommand: ./gradlew fatJar

README.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# swurg
1+
# openapi-parser
22

3-
[![Java CI with Gradle](https://github.com/aress31/swurg/actions/workflows/gradle-build.yml/badge.svg)](https://github.com/aress31/swurg/actions/workflows/gradle-build.yml)
3+
[![Java CI with Gradle](https://github.com/aress31/openapi-parser/actions/workflows/gradle-build.yml/badge.svg)](https://github.com/aress31/openapi-parser/actions/workflows/gradle-build.yml)
44
<a href="https://portswigger.net/bappstore/6bf7574b632847faaaa4eb5e42f1757c"><img alt="bapp store" src="https://img.shields.io/badge/BApp-Published-orange.svg"></a>
55
<a href="https://www.java.com"><img alt="lang" src="https://img.shields.io/badge/Lang-Java-blue.svg"></a>
66
<a href="https://opensource.org/licenses/Apache-2.0"><img alt="license" src="https://img.shields.io/badge/License-Apache%202.0-red.svg"></a>
@@ -9,7 +9,7 @@
99
> [!UPDATE]
1010
> This extension has been updated to use the latest [Burp Montoya Java API](https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/package-summary.html). The extension has undergone a complete overhaul to improve both its `UI`/`UX` and performance. These changes ensure that the extension is modern and optimised for use.
1111
12-
## Swurg is a `Burp Suite` extension designed for `OpenAPI`-based `API` testing
12+
## openapi-parser is a `Burp Suite` extension designed for `OpenAPI`-based `API` testing
1313

1414
> The `OpenAPI` Specification (`OAS`) defines a standard, programming language-agnostic interface description for `REST` `APIs`, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via `OpenAPI`, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the `OpenAPI` Specification removes guesswork in calling a service.
1515
>
@@ -19,37 +19,37 @@
1919
2020
Performing security assessment of `OpenAPI`-based `APIs` can be a tedious task due to `Burp Suite` (industry standard) lacking native `OpenAPI` parsing capabilities. A solution to this situation, is to use third-party tools (e.g. `SOAP-UI`) or to implement custom scripts (often on a per engagement basis) to handle the parsing of `OpenAPI` documents and integrate/chain the results to `Burp Suite` to use its first class scanning capabilities.
2121

22-
Swurg is an `OpenAPI` parser that aims to streamline this entire process by allowing security professionals to use `Burp Suite` as a standalone tool for security assessment of `OpenAPI`-based `APIs`.
22+
openapi-parser is an `OpenAPI` parser that aims to streamline this entire process by allowing security professionals to use `Burp Suite` as a standalone tool for security assessment of `OpenAPI`-based `APIs`.
2323

2424
## Features
2525

2626
- `OpenAPI` documents can be parsed either from a supplied file or URL. The extension can fetch `OpenAPI` documents directly from a URL using the `Send to Swagger Parser` feature under the `Target -> Site map` context menu.
2727
- Parse `OpenAPI` documents, formerly known as the `Swagger specification`, fully compliant with `OpenAPI` 2.0/3.0 Specifications (`OAS`).
2828
- Requests can be directly viewed/edited within the extension prior to sending them to other Burp tools.
29-
- Requests can be sent to the `Comparer, Intruder, Repeater, Scanner, Site map and Scope` Burp tools.
29+
- Requests can be sent to the `Comparer`, `Intruder`, `Organizer`, `Repeater`, `Scanner`, `Site map` and `Scope` Burp tools.
3030
- Requests matching specific criterias (detailed in the 'Parameters' tab) can be intercepted to automatically match and replace the parsed parameters default values defined in the 'Parameters' tab. This feature allows for fine-tuning of the requests prior to sending them to other Burp tools (e.g., scanner). Edited requests can be viewed within the 'Modified Request (`OpenAPI` Parser)' tab of Burp's message editor.
3131
- Row highlighting allowing pentesters to highlight "interesting" `API` calls and/or colour code them for reporting purposes.
3232
- Includes an export to `CSV` feature, allowing users to easily export selected `API` requests in `CSV` format for further analysis or reporting.
3333
- Supports both `JSON` and `YAML` formats.
3434

3535
## Requirements
3636

37-
1. System requirements:
37+
### 1. System requirements
3838

3939
- Operating System: Compatible with `Linux`, `macOS`, and `Windows` operating systems.
4040
- Java Development Kit (JDK): `Version 11` or later.
41-
- Burp Suite Professional or Community Edition: `Version 2023.3.2` or later.
41+
- Burp Suite Professional or Community Edition: `Version 2023.11.1.3` or later.
4242

4343
> [!IMPORTANT]
4444
> Please note that using any version lower than `2023.3.2` may result in a [java.lang.NoSuchMethodError](https://forum.portswigger.net/thread/montoya-api-nosuchmethoderror-275048be). It is crucial to use the specified version or a more recent one to avoid this issue.
4545
46-
2. Build tool:
46+
### 2. Build tool
4747

48-
- Gradle: `Version 6.9` or later (recommended). The [build.gradle](https://github.com/aress31/swurg/blob/main/lib/build.gradle) file is provided in the project repository.
48+
- Gradle: `Version 8.5` or later (recommended). The [build.gradle](https://github.com/aress31/openapi-parser/blob/main/lib/build.gradle) file is provided in the project repository.
4949

50-
3. Environment variables:
50+
### 3. Environment variables
5151

52-
- Set up the `JAVA_HOME` environment variable to point to the JDK installation directory.
52+
- Set up the `JAVA_HOME` environment variable to point to the `JDK` installation directory.
5353

5454
Please ensure that all system requirements, including a compatible version of `Burp Suite`, are met before building and running the project. Note that the project's external dependencies will be automatically managed and installed by `Gradle` during the build process. Adhering to the requirements will help avoid potential issues and reduce the need for opening new issues in the project repository.
5555

@@ -59,11 +59,11 @@ Please ensure that all system requirements, including a compatible version of `B
5959

6060
1. Ensure you have [Gradle](https://gradle.org/) installed and configured.
6161

62-
2. Download the `swurg` repository:
62+
2. Download the `openapi-parser` repository:
6363

6464
```bash
65-
git clone https://github.com/aress31/swurg
66-
cd .\swurg\
65+
git clone https://github.com/aress31/openapi-parser
66+
cd .\openapi-parser\
6767
```
6868

6969
3. Build the standalone `jar`:
@@ -74,7 +74,7 @@ Please ensure that all system requirements, including a compatible version of `B
7474

7575
### 2. Loading the Extension Into `Burp Suite`
7676

77-
To install `swurg` in `Burp Suite`, first go to the `Extensions` tab and click on the `Add` button. Then, select the `swurg-all` jar file located in the `.\build\libs` folder to load the extension.
77+
To install `openapi-parser` in `Burp Suite`, first go to the `Extensions` tab and click on the `Add` button. Then, select the `openapi-parser-all` jar file located in the `.\build\libs` folder to load the extension.
7878

7979
Alternatively, you can skip the [Compilation](#1-compilation) step entirely and download the extension directly from the [BApp Store](https://portswigger.net/bappstore/6bf7574b632847faaaa4eb5e42f1757c).
8080

@@ -85,15 +85,17 @@ _Note: The version distributed on the [BApp Store](https://portswigger.net/bapps
8585
- [ ] Beautify the graphical user interface.
8686
- [ ] Deep parsing of `OpenAPI` schemas to collect all nested parameters along with their example/type.
8787
- [ ] Code simplification/refactoring.
88-
- [ ] Use `MyHttpRequest` instead of `RequestWithMetadata`.
88+
- [x] Use `MyHttpRequest` instead of `RequestWithMetadata`.
8989
- [x] Enable cells editing to change `API` calls directly from the `GUI`.
9090
- [ ] Fix the custom request editor tab to work properly with intercepted requests based on the match and replace rulesets.
9191
- [x] Further optimise the source code.
9292
- [ ] Implement support for authenticated testing (via user-supplied `API`-keys).
9393
- [x] Improve the `Param` column by adding parameters type (e.g. `inquery`, `inbody`).
94-
- [ ] Improve the tables and context menus.
94+
- [x] Improve the tables and context menus.
9595
- [x] Increase the extension verbosity (via the bottom panel).
9696

97+
See [TODO](TODO.md) for additional outstanding tasks.
98+
9799
## Project Information
98100

99101
In July 2016, after posting a request for improvement on the [PortSwigger support forum](https://support.portswigger.net/customer/portal/questions/16358278-swagger-parser-and-wsdler-improvement), I decided to take the initiative and to implement a solution myself.
@@ -108,13 +110,13 @@ If this extension has saved you time and hassle during a security assessment, co
108110

109111
Did you find a bug? Well, don't just let it crawl around! Let's squash it together like a couple of bug whisperers! 🐛💪
110112

111-
Please report any issues on the [GitHub issues tracker](https://github.com/aress31/swurg/issues). Together, we'll make this extension as reliable as a cockroach surviving a nuclear apocalypse! 🚀
113+
Please report any issues on the [GitHub issues tracker](https://github.com/aress31/openapi-parser/issues). Together, we'll make this extension as reliable as a cockroach surviving a nuclear apocalypse! 🚀
112114

113115
## Contributing
114116

115117
Looking to make a splash with your mad coding skills? 💻
116118

117-
Awesome! Contributions are welcome and greatly appreciated. Please submit all PRs on the [GitHub pull requests tracker](https://github.com/aress31/swurg/pulls). Together we can make this extension even more amazing! 🚀
119+
Awesome! Contributions are welcome and greatly appreciated. Please submit all PRs on the [GitHub pull requests tracker](https://github.com/aress31/openapi-parser/pulls). Together we can make this extension even more amazing! 🚀
118120

119121
## License
120122

TODO.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- [ ] Display `Methods` as coloured badges in the `Parser` table.
2+
- [x] Enhance the `Parser` view to present a range of information about the `OpenAPI Specification`, for instance, its version.
3+
- [ ] Handle pluralization for the menu item label `Send to Comparer (request)` in the `Parser` context menu.

0 commit comments

Comments
 (0)