-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added 'expires' parameters and the creation of a recast risks rule fo…
…r all assets (#858) * Added 'expires' parameters and the creation of a recast risks rule for all assets * fix: cassette testing
- Loading branch information
1 parent
b7b7b99
commit 209045b
Showing
6 changed files
with
165 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,47 @@ | ||
interactions: | ||
- request: | ||
body: !!python/unicode '{"hostValue": "127.0.0.1", "plugin": {"id": "19506"}, | ||
"repositories": [{"id": 1}], "hostType": "ip", "newSeverity": {"id": "0"}}' | ||
headers: | ||
Accept: ['*/*'] | ||
Accept-Encoding: ['gzip, deflate'] | ||
Connection: [keep-alive] | ||
Content-Length: ['128'] | ||
Content-Type: [application/json] | ||
Cookie: [TNS_SESSIONID=SESSIONID] | ||
User-Agent: [pyTenable/0.3.16 (pyTenable/0.3.16; Python/2.7.15)] | ||
X-SecurityCenter: ['0000000000'] | ||
method: POST | ||
uri: https://securitycenter.home.cugnet.net/rest/recastRiskRule | ||
response: | ||
body: {string: !!python/unicode '{"type":"regular","response":[{"id":"1","newSeverity":"0","hostType":"ip","hostValue":"127.0.0.1","port":"any","protocol":"any","comments":"","order":"1","status":"0","createdTime":"1554731789","modifiedTime":"1554731789","repository":{"id":"1","name":"Default","description":""},"organization":{"id":"1","name":"HomeNet","description":""},"user":{"id":"2","username":"api","firstname":"api","lastname":"user"},"plugin":{"id":"19506","name":"Nessus | ||
Scan Information","description":"This plugin displays, for each tested host, | ||
information about the scan itself :\n\n - The version of the plugin set.\n - | ||
The type of scanner (Nessus or Nessus Home).\n - The version of the Nessus | ||
Engine.\n - The port scanner(s) used.\n - The port range scanned.\n - Whether | ||
credentialed or third-party patch management checks are possible.\n - | ||
The date of the scan.\n - The duration of the scan.\n - The number of hosts | ||
scanned in parallel.\n - The number of checks done in parallel."}}],"error_code":0,"error_msg":"","warnings":[],"timestamp":1554731789} | ||
- request: | ||
body: | ||
!!python/unicode '{"hostValue": "127.0.0.1", "plugin": {"id": "19506"}, | ||
"repositories": [{"id": 1}], "hostType": "ip", "newSeverity": {"id": "0"}}' | ||
headers: | ||
Accept: ["*/*"] | ||
Accept-Encoding: ["gzip, deflate"] | ||
Connection: [keep-alive] | ||
Content-Length: ["128"] | ||
Content-Type: [application/json] | ||
Cookie: [TNS_SESSIONID=SESSIONID] | ||
User-Agent: [pyTenable/0.3.16 (pyTenable/0.3.16; Python/2.7.15)] | ||
X-SecurityCenter: ["0000000000"] | ||
method: POST | ||
uri: https://securitycenter.home.cugnet.net/rest/recastRiskRule | ||
response: | ||
body: | ||
{ | ||
string: | ||
!!python/unicode '{"type":"regular","response":[{"id":"1","newSeverity":"0","hostType":"ip","hostValue":"127.0.0.1","port":"any","protocol":"any","comments":"","expires":"-1","order":"1","status":"0","createdTime":"1554731789","modifiedTime":"1554731789","repository":{"id":"1","name":"Default","description":""},"organization":{"id":"1","name":"HomeNet","description":""},"user":{"id":"2","username":"api","firstname":"api","lastname":"user"},"plugin":{"id":"19506","name":"Nessus | ||
Scan Information","description":"This plugin displays, for each tested host, | ||
information about the scan itself :\n\n - The version of the plugin set.\n - | ||
The type of scanner (Nessus or Nessus Home).\n - The version of the Nessus | ||
Engine.\n - The port scanner(s) used.\n - The port range scanned.\n - Whether | ||
credentialed or third-party patch management checks are possible.\n - | ||
The date of the scan.\n - The duration of the scan.\n - The number of hosts | ||
scanned in parallel.\n - The number of checks done in parallel."}}],"error_code":0,"error_msg":"","warnings":[],"timestamp":1554731789} | ||
|
||
'} | ||
headers: | ||
cache-control: ['no-store, no-cache, must-revalidate'] | ||
connection: [Keep-Alive] | ||
content-length: ['1052'] | ||
content-type: [application/json] | ||
date: ['Mon, 08 Apr 2019 13:56:29 GMT'] | ||
expires: ['Thu, 19 Nov 1981 08:52:00 GMT'] | ||
keep-alive: ['timeout=15, max=100'] | ||
pragma: [no-cache] | ||
securitycenter: [5.8.0] | ||
server: [Apache] | ||
strict-transport-security: [max-age=31536000; includeSubDomains] | ||
x-content-type-options: [nosniff] | ||
x-frame-options: [DENY] | ||
x-xss-protection: [1; mode=block] | ||
status: {code: 200, message: OK} | ||
', | ||
} | ||
headers: | ||
cache-control: ["no-store, no-cache, must-revalidate"] | ||
connection: [Keep-Alive] | ||
content-length: ["1052"] | ||
content-type: [application/json] | ||
date: ["Mon, 08 Apr 2019 13:56:29 GMT"] | ||
expires: ["Thu, 19 Nov 1981 08:52:00 GMT"] | ||
keep-alive: ["timeout=15, max=100"] | ||
pragma: [no-cache] | ||
securitycenter: [5.8.0] | ||
server: [Apache] | ||
strict-transport-security: [max-age=31536000; includeSubDomains] | ||
x-content-type-options: [nosniff] | ||
x-frame-options: [DENY] | ||
x-xss-protection: [1; mode=block] | ||
status: { code: 200, message: OK } |
78 changes: 41 additions & 37 deletions
78
tests/sc/cassettes/test_recast_risks_details_success.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,44 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
Accept: ['*/*'] | ||
Accept-Encoding: ['gzip, deflate'] | ||
Connection: [keep-alive] | ||
Cookie: [TNS_SESSIONID=SESSIONID] | ||
User-Agent: [pyTenable/0.3.16 (pyTenable/0.3.16; Python/2.7.15)] | ||
X-SecurityCenter: ['0000000000'] | ||
method: GET | ||
uri: https://securitycenter.home.cugnet.net/rest/recastRiskRule/1 | ||
response: | ||
body: {string: !!python/unicode '{"type":"regular","response":{"id":"3","newSeverity":"0","hostType":"ip","hostValue":"127.0.0.1","port":"any","protocol":"any","comments":"","order":"1","status":"0","createdTime":"1554731791","modifiedTime":"1554731791","repository":{"id":"1","name":"Default","description":""},"organization":{"id":"1","name":"HomeNet","description":""},"user":{"id":"2","username":"api","firstname":"api","lastname":"user"},"plugin":{"id":"19506","name":"Nessus | ||
Scan Information","description":"This plugin displays, for each tested host, | ||
information about the scan itself :\n\n - The version of the plugin set.\n - | ||
The type of scanner (Nessus or Nessus Home).\n - The version of the Nessus | ||
Engine.\n - The port scanner(s) used.\n - The port range scanned.\n - Whether | ||
credentialed or third-party patch management checks are possible.\n - | ||
The date of the scan.\n - The duration of the scan.\n - The number of hosts | ||
scanned in parallel.\n - The number of checks done in parallel."}},"error_code":0,"error_msg":"","warnings":[],"timestamp":1554731791} | ||
- request: | ||
body: null | ||
headers: | ||
Accept: ["*/*"] | ||
Accept-Encoding: ["gzip, deflate"] | ||
Connection: [keep-alive] | ||
Cookie: [TNS_SESSIONID=SESSIONID] | ||
User-Agent: [pyTenable/0.3.16 (pyTenable/0.3.16; Python/2.7.15)] | ||
X-SecurityCenter: ["0000000000"] | ||
method: GET | ||
uri: https://securitycenter.home.cugnet.net/rest/recastRiskRule/1 | ||
response: | ||
body: | ||
{ | ||
string: | ||
!!python/unicode '{"type":"regular","response":{"id":"3","newSeverity":"0","hostType":"ip","hostValue":"127.0.0.1","port":"any","protocol":"any","comments":"","expires":"-1","order":"1","status":"0","createdTime":"1554731791","modifiedTime":"1554731791","repository":{"id":"1","name":"Default","description":""},"organization":{"id":"1","name":"HomeNet","description":""},"user":{"id":"2","username":"api","firstname":"api","lastname":"user"},"plugin":{"id":"19506","name":"Nessus | ||
Scan Information","description":"This plugin displays, for each tested host, | ||
information about the scan itself :\n\n - The version of the plugin set.\n - | ||
The type of scanner (Nessus or Nessus Home).\n - The version of the Nessus | ||
Engine.\n - The port scanner(s) used.\n - The port range scanned.\n - Whether | ||
credentialed or third-party patch management checks are possible.\n - | ||
The date of the scan.\n - The duration of the scan.\n - The number of hosts | ||
scanned in parallel.\n - The number of checks done in parallel."}},"error_code":0,"error_msg":"","warnings":[],"timestamp":1554731791} | ||
|
||
'} | ||
headers: | ||
cache-control: ['no-store, no-cache, must-revalidate'] | ||
connection: [Keep-Alive] | ||
content-length: ['1050'] | ||
content-type: [application/json] | ||
date: ['Mon, 08 Apr 2019 13:56:31 GMT'] | ||
expires: ['Thu, 19 Nov 1981 08:52:00 GMT'] | ||
keep-alive: ['timeout=15, max=100'] | ||
pragma: [no-cache] | ||
securitycenter: [5.8.0] | ||
server: [Apache] | ||
strict-transport-security: [max-age=31536000; includeSubDomains] | ||
x-content-type-options: [nosniff] | ||
x-frame-options: [DENY] | ||
x-xss-protection: [1; mode=block] | ||
status: {code: 200, message: OK} | ||
', | ||
} | ||
headers: | ||
cache-control: ["no-store, no-cache, must-revalidate"] | ||
connection: [Keep-Alive] | ||
content-length: ["1050"] | ||
content-type: [application/json] | ||
date: ["Mon, 08 Apr 2019 13:56:31 GMT"] | ||
expires: ["Thu, 19 Nov 1981 08:52:00 GMT"] | ||
keep-alive: ["timeout=15, max=100"] | ||
pragma: [no-cache] | ||
securitycenter: [5.8.0] | ||
server: [Apache] | ||
strict-transport-security: [max-age=31536000; includeSubDomains] | ||
x-content-type-options: [nosniff] | ||
x-frame-options: [DENY] | ||
x-xss-protection: [1; mode=block] | ||
status: { code: 200, message: OK } | ||
version: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,44 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
Accept: ['*/*'] | ||
Accept-Encoding: ['gzip, deflate'] | ||
Connection: [keep-alive] | ||
Cookie: [TNS_SESSIONID=SESSIONID] | ||
User-Agent: [pyTenable/0.3.16 (pyTenable/0.3.16; Python/2.7.15)] | ||
X-SecurityCenter: ['0000000000'] | ||
method: GET | ||
uri: https://securitycenter.home.cugnet.net/rest/recastRiskRule | ||
response: | ||
body: {string: !!python/unicode '{"type":"regular","response":[{"id":"1","newSeverity":"0","hostType":"ip","hostValue":"127.0.0.1","port":"any","protocol":"any","order":"1","status":"0","repository":{"id":"1","name":"Default","description":""},"organization":{"id":"1","name":"HomeNet","description":""},"user":{"id":"2","username":"api","firstname":"api","lastname":"user"},"plugin":{"id":"19506","name":"Nessus | ||
Scan Information","description":"This plugin displays, for each tested host, | ||
information about the scan itself :\n\n - The version of the plugin set.\n - | ||
The type of scanner (Nessus or Nessus Home).\n - The version of the Nessus | ||
Engine.\n - The port scanner(s) used.\n - The port range scanned.\n - Whether | ||
credentialed or third-party patch management checks are possible.\n - | ||
The date of the scan.\n - The duration of the scan.\n - The number of hosts | ||
scanned in parallel.\n - The number of checks done in parallel."}}],"error_code":0,"error_msg":"","warnings":[],"timestamp":1554731790} | ||
- request: | ||
body: null | ||
headers: | ||
Accept: ["*/*"] | ||
Accept-Encoding: ["gzip, deflate"] | ||
Connection: [keep-alive] | ||
Cookie: [TNS_SESSIONID=SESSIONID] | ||
User-Agent: [pyTenable/0.3.16 (pyTenable/0.3.16; Python/2.7.15)] | ||
X-SecurityCenter: ["0000000000"] | ||
method: GET | ||
uri: https://securitycenter.home.cugnet.net/rest/recastRiskRule | ||
response: | ||
body: | ||
{ | ||
string: | ||
!!python/unicode '{"type":"regular","response":[{"id":"1","newSeverity":"0","hostType":"ip","hostValue":"127.0.0.1","port":"any","protocol":"any","expires":"-1","order":"1","status":"0","repository":{"id":"1","name":"Default","description":""},"organization":{"id":"1","name":"HomeNet","description":""},"user":{"id":"2","username":"api","firstname":"api","lastname":"user"},"plugin":{"id":"19506","name":"Nessus | ||
Scan Information","description":"This plugin displays, for each tested host, | ||
information about the scan itself :\n\n - The version of the plugin set.\n - | ||
The type of scanner (Nessus or Nessus Home).\n - The version of the Nessus | ||
Engine.\n - The port scanner(s) used.\n - The port range scanned.\n - Whether | ||
credentialed or third-party patch management checks are possible.\n - | ||
The date of the scan.\n - The duration of the scan.\n - The number of hosts | ||
scanned in parallel.\n - The number of checks done in parallel."}}],"error_code":0,"error_msg":"","warnings":[],"timestamp":1554731790} | ||
|
||
'} | ||
headers: | ||
cache-control: ['no-store, no-cache, must-revalidate'] | ||
connection: [Keep-Alive] | ||
content-length: ['983'] | ||
content-type: [application/json] | ||
date: ['Mon, 08 Apr 2019 13:56:30 GMT'] | ||
expires: ['Thu, 19 Nov 1981 08:52:00 GMT'] | ||
keep-alive: ['timeout=15, max=100'] | ||
pragma: [no-cache] | ||
securitycenter: [5.8.0] | ||
server: [Apache] | ||
strict-transport-security: [max-age=31536000; includeSubDomains] | ||
x-content-type-options: [nosniff] | ||
x-frame-options: [DENY] | ||
x-xss-protection: [1; mode=block] | ||
status: {code: 200, message: OK} | ||
', | ||
} | ||
headers: | ||
cache-control: ["no-store, no-cache, must-revalidate"] | ||
connection: [Keep-Alive] | ||
content-length: ["983"] | ||
content-type: [application/json] | ||
date: ["Mon, 08 Apr 2019 13:56:30 GMT"] | ||
expires: ["Thu, 19 Nov 1981 08:52:00 GMT"] | ||
keep-alive: ["timeout=15, max=100"] | ||
pragma: [no-cache] | ||
securitycenter: [5.8.0] | ||
server: [Apache] | ||
strict-transport-security: [max-age=31536000; includeSubDomains] | ||
x-content-type-options: [nosniff] | ||
x-frame-options: [DENY] | ||
x-xss-protection: [1; mode=block] | ||
status: { code: 200, message: OK } | ||
version: 1 |
Oops, something went wrong.