Skip to content

Commit

Permalink
feat: Add forwarding proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
binarymist committed May 19, 2023
1 parent 1d7a724 commit 559a9e5
Showing 4 changed files with 30 additions and 8 deletions.
7 changes: 4 additions & 3 deletions jobs/README.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ Documentation around the _Job_ file structure can be found at https://docs.guard
Examples of _Job_ files can be found at https://github.com/guardrailsio/runtime-resources/tree/main/jobs

* advanced-BrowserApp-job-example: This _Job_ file targets the [NodeGoat](https://github.com/OWASP/NodeGoat) SUT, which we host using [purpleteam-iac-sut](https://github.com/purpleteam-labs/purpleteam-iac-sut). You can use this _Job_ file and just update the `sutHost` to point to your hosted copy of NodeGoat as well as the `username` and `password` properties
* simple-BrowserApp-job-example: This _Job_ file is good for most browser applications that don't require authentication. If using this _Job_ file, you will need to provide a valid `sutHost` property value. As it is, it will inform the _Application Testing Engine_ to scan the specified host from the root. If you want to be more specific, you can add routes to be scanned
* simple-BrowserApp-job-fast-example: This _Job_ file extends simple-BrowserApp-job-example by adding a single route, this will inform the _Application Testing Engine_ to only scan the specified route of the specified host. You will need to provide a valid `sutHost` property value, and a valid `route.id` property value. By using this _Job_, the [_Test Run_](https://docs.guardrails.io/docs/glossary#test-run) should be faster because it is not scanning from the root

* simple-BrowserApp-job-example: This _Job_ file is good for most browser applications that don't require authentication. If using this _Job_ file, you will need to provide a valid `sutHost` property value. As it is, it will inform the _Application Testing Engine_ to scan the specified host from the root. If you want to be more specific, you can add routes to be scanned.
If you are using a forwarding proxy, between the engine and your SUT, configure the `forwardingProxy` object properties with valid values. If you are not using a fowarding proxy, just remove the `forwardingProxy` object
* simple-BrowserApp-job-fast-example: This _Job_ file extends simple-BrowserApp-job-example by adding a single route, this will inform the _Application Testing Engine_ to only scan the specified route of the specified host. You will need to provide a valid `sutHost` property value, and a valid `route.id` property value. By using this _Job_, the [_Test Run_](https://docs.guardrails.io/docs/glossary#test-run) should be faster because it is not scanning from the root.
If you are using a forwarding proxy, between the engine and your SUT, configure the `forwardingProxy` object properties with valid values. If you are not using a fowarding proxy, just remove the `forwardingProxy` object
9 changes: 8 additions & 1 deletion jobs/advanced-BrowserApp-job-example
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"data": {
"type": "BrowserApp",
"attributes": {
"version": "0.0.1",
"version": "0.1.0",
"sutAuthentication": {
"sitesTreeSutAuthenticationPopulationStrategy": "FormStandard",
"emissaryAuthenticationStrategy": "FormStandard",
@@ -16,6 +16,13 @@
"sutPort": 443,
"sutProtocol": "https",
"browser": "chrome",
"forwardingProxy": {
"protocol": "[http|https]",
"username": "<proxy-username>",
"password": "<proxy-password>",
"hostname": "<proxy-hostname>",
"port": <proxy-port>
}
"loggedInIndicator": "<p>Found. Redirecting to <a href=\"\/dashboard\">\/dashboard<\/a><\/p>"
},
"relationships": {
11 changes: 9 additions & 2 deletions jobs/simple-BrowserApp-job-example
Original file line number Diff line number Diff line change
@@ -2,15 +2,22 @@
"data": {
"type": "BrowserApp",
"attributes": {
"version": "0.0.1",
"version": "0.1.0",
"sutAuthentication": {
"sitesTreeSutAuthenticationPopulationStrategy": "NoAuthentication",
"emissaryAuthenticationStrategy": "NoAuthentication"
},
"sutHost": "<targetdomain.com>",
"sutPort": 443,
"sutProtocol": "https",
"browser": "chrome"
"browser": "chrome",
"forwardingProxy": {
"protocol": "[http|https]",
"username": "<proxy-username>",
"password": "<proxy-password>",
"hostname": "<proxy-hostname>",
"port": <proxy-port>
}
},
"relationships": {
"data": [{
11 changes: 9 additions & 2 deletions jobs/simple-BrowserApp-job-fast-example
Original file line number Diff line number Diff line change
@@ -2,15 +2,22 @@
"data": {
"type": "BrowserApp",
"attributes": {
"version": "0.0.1",
"version": "0.1.0",
"sutAuthentication": {
"sitesTreeSutAuthenticationPopulationStrategy": "NoAuthentication",
"emissaryAuthenticationStrategy": "NoAuthentication"
},
"sutHost": "<targetdomain.com>",
"sutPort": 443,
"sutProtocol": "https",
"browser": "chrome"
"browser": "chrome",
"forwardingProxy": {
"protocol": "[http|https]",
"username": "<proxy-username>",
"password": "<proxy-password>",
"hostname": "<proxy-hostname>",
"port": <proxy-port>
}
},
"relationships": {
"data": [{

0 comments on commit 559a9e5

Please sign in to comment.