diff --git a/scanners/nikto/cascading-rules/http.yaml b/scanners/nikto/cascading-rules/http.yaml index 2f1d630a54..b987131d59 100644 --- a/scanners/nikto/cascading-rules/http.yaml +++ b/scanners/nikto/cascading-rules/http.yaml @@ -14,11 +14,8 @@ spec: anyOf: - category: "Open Port" attributes: - service: http - state: open - - category: "Open Port" - attributes: - service: https + # Also matches https, but also alternative HTTP ports + service: "http*" state: open scanSpec: scanType: "nikto" diff --git a/scanners/screenshooter/cascading-rules/http.yaml b/scanners/screenshooter/cascading-rules/http.yaml index cbb2283a45..823a289fe3 100644 --- a/scanners/screenshooter/cascading-rules/http.yaml +++ b/scanners/screenshooter/cascading-rules/http.yaml @@ -18,8 +18,8 @@ spec: state: open - category: "Open Port" attributes: - service: https + service: "http-*" state: open scanSpec: scanType: "screenshooter" - parameters: ["{{attributes.service}}://{{$.hostOrIP}}:{{attributes.port}}"] + parameters: ["http://{{$.hostOrIP}}:{{attributes.port}}"] diff --git a/scanners/screenshooter/cascading-rules/https.yaml b/scanners/screenshooter/cascading-rules/https.yaml new file mode 100644 index 0000000000..2104d3b928 --- /dev/null +++ b/scanners/screenshooter/cascading-rules/https.yaml @@ -0,0 +1,21 @@ +# SPDX-FileCopyrightText: 2021 iteratec GmbH +# +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: "cascading.securecodebox.io/v1" +kind: CascadingRule +metadata: + name: "screenshooter-https" + labels: + securecodebox.io/invasive: non-invasive + securecodebox.io/intensive: light +spec: + matches: + anyOf: + - category: "Open Port" + attributes: + service: "https*" + state: open + scanSpec: + scanType: "screenshooter" + parameters: ["https://{{$.hostOrIP}}:{{attributes.port}}"] diff --git a/scanners/zap-advanced/cascading-rules/http.yaml b/scanners/zap-advanced/cascading-rules/http.yaml index a4be6b8603..47fd83d3b6 100644 --- a/scanners/zap-advanced/cascading-rules/http.yaml +++ b/scanners/zap-advanced/cascading-rules/http.yaml @@ -18,8 +18,8 @@ spec: state: open - category: "Open Port" attributes: - service: https + service: "http-*" state: open scanSpec: scanType: "zap-advanced-scan" - parameters: ["-t", "{{attributes.service}}://{{$.hostOrIP}}"] + parameters: ["-t", "http://{{$.hostOrIP}}:{{attributes.port}}"] diff --git a/scanners/zap-advanced/cascading-rules/https.yaml b/scanners/zap-advanced/cascading-rules/https.yaml new file mode 100644 index 0000000000..f7f0a91902 --- /dev/null +++ b/scanners/zap-advanced/cascading-rules/https.yaml @@ -0,0 +1,21 @@ +# SPDX-FileCopyrightText: 2021 iteratec GmbH +# +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: "cascading.securecodebox.io/v1" +kind: CascadingRule +metadata: + name: "zap-advanced-https" + labels: + securecodebox.io/invasive: non-invasive + securecodebox.io/intensive: medium +spec: + matches: + anyOf: + - category: "Open Port" + attributes: + service: "https*" + state: open + scanSpec: + scanType: "zap-advanced-scan" + parameters: ["-t", "https://{{$.hostOrIP}}:{{attributes.port}}"] diff --git a/scanners/zap/cascading-rules/http.yaml b/scanners/zap/cascading-rules/http.yaml index d85ac8b862..f0c25f880b 100644 --- a/scanners/zap/cascading-rules/http.yaml +++ b/scanners/zap/cascading-rules/http.yaml @@ -18,8 +18,8 @@ spec: state: open - category: "Open Port" attributes: - service: https + service: http-* state: open scanSpec: scanType: "zap-baseline-scan" - parameters: ["-t", "{{attributes.service}}://{{$.hostOrIP}}"] + parameters: ["-t", "http://{{$.hostOrIP}}:{{attributes.port}}"] diff --git a/scanners/zap/cascading-rules/https.yaml b/scanners/zap/cascading-rules/https.yaml new file mode 100644 index 0000000000..c4428b2c6e --- /dev/null +++ b/scanners/zap/cascading-rules/https.yaml @@ -0,0 +1,21 @@ +# SPDX-FileCopyrightText: 2021 iteratec GmbH +# +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: "cascading.securecodebox.io/v1" +kind: CascadingRule +metadata: + name: "zap-https" + labels: + securecodebox.io/invasive: non-invasive + securecodebox.io/intensive: medium +spec: + matches: + anyOf: + - category: "Open Port" + attributes: + service: "https*" + state: open + scanSpec: + scanType: "zap-baseline-scan" + parameters: ["-t", "https://{{$.hostOrIP}}:{{attributes.port}}"] diff --git a/scanners/zap/integration-tests/zap.test.js b/scanners/zap/integration-tests/zap.test.js index b679bff978..5ea36c2f14 100644 --- a/scanners/zap/integration-tests/zap.test.js +++ b/scanners/zap/integration-tests/zap.test.js @@ -17,9 +17,9 @@ test( expect(categories).toMatchInlineSnapshot(` Object { "Content Security Policy (CSP) Header Not Set": 1, + "Missing Anti-clickjacking Header": 1, "Server Leaks Version Information via \\"Server\\" HTTP Response Header Field": 1, "X-Content-Type-Options Header Missing": 1, - "X-Frame-Options Header Not Set": 1, } `); expect(severities).toMatchInlineSnapshot(`