Skip to content

Commit 1d7a724

Browse files
committedMay 5, 2023
refactor(reports):
Remove reports from Job files. Add Job file which completes a Test Run in under 2 minutes. Update README files
1 parent 234797e commit 1d7a724

6 files changed

+69
-14
lines changed
 

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ jobs/*
22

33
!jobs/README.md
44
!jobs/simple-BrowserApp-job-example
5+
!jobs/simple-BrowserApp-job-fast-example
56
!jobs/advanced-BrowserApp-job-example
67

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
This repository contains:
44

5-
* Example _Job_ files, useful for customizing for consumption of the GuardRails application testing engine
5+
* Example [_Job_](https://docs.guardrails.io/docs/glossary#job) files, useful for customizing, and for consumption from the GuardRails [_Application Testing Engine_](https://docs.guardrails.io/docs/glossary#application-testing-engine)
66

77

‎jobs/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Documentation around the _Job_ file structure can be found at https://docs.guard
22

33
Examples of _Job_ files can be found at https://github.com/guardrailsio/runtime-resources/tree/main/jobs
44

5-
* 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. If you are curious as to what the varius strategies do, you can read through their source code. For example the `sutAuthentication: { sitesTreeSutAuthenticationPopulationStrategy: FormStandard } can be found [here](https://github.com/guardrailsio/runtime-resources/blob/main/sUtAndEmissaryStrategies/1_sitesTreeSutAuthenticationPopulation/formStandard.js)
6-
* 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
5+
* 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
6+
* 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
7+
* 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
78

‎jobs/advanced-BrowserApp-job-example

-5
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@
5252
"scanningStrategy": "BrowserAppStandard",
5353
"postScanningStrategy": "BrowserAppStandard",
5454
"reportingStrategy": "Standard",
55-
"reports": {
56-
"templateThemes": [{
57-
"name": "traditionalJson"
58-
}]
59-
},
6055
"username": "[your-user]",
6156
"password": "[your-password]",
6257
"aScannerAttackStrength": "HIGH",

‎jobs/simple-BrowserApp-job-example

+1-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"sitesTreeSutAuthenticationPopulationStrategy": "NoAuthentication",
88
"emissaryAuthenticationStrategy": "NoAuthentication"
99
},
10-
"sutHost": "[targetdomain.com]",
10+
"sutHost": "<targetdomain.com>",
1111
"sutPort": 443,
1212
"sutProtocol": "https",
1313
"browser": "chrome"
@@ -42,11 +42,6 @@
4242
"scanningStrategy": "BrowserAppStandard",
4343
"postScanningStrategy": "BrowserAppStandard",
4444
"reportingStrategy": "Standard",
45-
"reports": {
46-
"templateThemes": [{
47-
"name": "traditionalJson"
48-
}]
49-
},
5045
"aScannerAttackStrength": "HIGH",
5146
"aScannerAlertThreshold": "LOW",
5247
"alertThreshold": 12
+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"data": {
3+
"type": "BrowserApp",
4+
"attributes": {
5+
"version": "0.0.1",
6+
"sutAuthentication": {
7+
"sitesTreeSutAuthenticationPopulationStrategy": "NoAuthentication",
8+
"emissaryAuthenticationStrategy": "NoAuthentication"
9+
},
10+
"sutHost": "<targetdomain.com>",
11+
"sutPort": 443,
12+
"sutProtocol": "https",
13+
"browser": "chrome"
14+
},
15+
"relationships": {
16+
"data": [{
17+
"type": "tlsScanner",
18+
"id": "NA"
19+
},
20+
{
21+
"type": "appScanner",
22+
"id": "NA"
23+
}]
24+
}
25+
},
26+
"included": [
27+
{
28+
"type": "tlsScanner",
29+
"id": "NA",
30+
"attributes": {
31+
"tlsScannerSeverity": "LOW",
32+
"alertThreshold": 3
33+
}
34+
},
35+
{
36+
"type": "appScanner",
37+
"id": "NA",
38+
"attributes": {
39+
"sitesTreePopulationStrategy": "WebDriverStandard",
40+
"spiderStrategy": "Standard",
41+
"scannersStrategy": "BrowserAppStandard",
42+
"scanningStrategy": "BrowserAppStandard",
43+
"postScanningStrategy": "BrowserAppStandard",
44+
"reportingStrategy": "Standard",
45+
"aScannerAttackStrength": "HIGH",
46+
"aScannerAlertThreshold": "LOW",
47+
"alertThreshold": 12
48+
},
49+
"relationships": {
50+
"data": [{"type": "route", "id": "</my-route>"}]
51+
}
52+
},
53+
{
54+
"type": "route",
55+
"id": "</my-route>",
56+
"attributes": {
57+
"attackFields": [],
58+
"method": "GET",
59+
"submit": ""
60+
}
61+
}
62+
]
63+
}

0 commit comments

Comments
 (0)
Failed to load comments.