From a7c0b5e895153bd2c2147feecf2a227f1e0db66f Mon Sep 17 00:00:00 2001 From: Nicholas Mucks Date: Mon, 22 Jul 2024 15:36:45 -0700 Subject: [PATCH] rename docker-compose file and add a getting started in the readme --- .gitignore | 3 +- ...yml => docker-compose_spring-petclinic.yml | 0 readme.md | 22 + zap-report/gen.conf | 69 - zap-report/zap-report.html | 3868 ----------------- 5 files changed, 24 insertions(+), 3938 deletions(-) rename spring-petclinic.yml => docker-compose_spring-petclinic.yml (100%) delete mode 100644 zap-report/gen.conf delete mode 100644 zap-report/zap-report.html diff --git a/.gitignore b/.gitignore index 73ef13bbf..c82a22e71 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,5 @@ build/* _site/ *.css !petclinic.css -zap-report/zap-report.html + +zap-report/* diff --git a/spring-petclinic.yml b/docker-compose_spring-petclinic.yml similarity index 100% rename from spring-petclinic.yml rename to docker-compose_spring-petclinic.yml diff --git a/readme.md b/readme.md index 919aa31b9..cacc590e9 100644 --- a/readme.md +++ b/readme.md @@ -1,3 +1,25 @@ +# Getting started + +## Running a build pipeline + +``` +docker-compose -f docker-compose_spring-petclinic.yml up -d +``` + +Go to the following locations: +* [petclinic](http://localhost:8080) +* [jenkins](http://localhost:8081) +* [sonarqube](http://localhost:9000) +* [promethius](http://localhost:8080/prometheus) +* [zap](http://localhost:8080/zap) + + +## Stopping a build pipeline +``` +docker-compose -f docker-compose_spring-petclinic.yml down +``` + + # Setting up Jenkins ## Steps 1: Set up Jenkins in Docker diff --git a/zap-report/gen.conf b/zap-report/gen.conf deleted file mode 100644 index 206a14e99..000000000 --- a/zap-report/gen.conf +++ /dev/null @@ -1,69 +0,0 @@ -# zap-baseline rule configuration file -# Change WARN to IGNORE to ignore rule or FAIL to fail if rule matches -# Only the rule identifiers are used - the names are just for info -# You can add your own messages to each rule by appending them after a tab on each line. -10003 WARN (Vulnerable JS Library (Powered by Retire.js)) -10009 WARN (In Page Banner Information Leak) -10010 WARN (Cookie No HttpOnly Flag) -10011 WARN (Cookie Without Secure Flag) -10015 WARN (Re-examine Cache-control Directives) -10017 WARN (Cross-Domain JavaScript Source File Inclusion) -10019 WARN (Content-Type Header Missing) -10020 WARN (Anti-clickjacking Header) -10021 WARN (X-Content-Type-Options Header Missing) -10023 WARN (Information Disclosure - Debug Error Messages) -10024 WARN (Information Disclosure - Sensitive Information in URL) -10025 WARN (Information Disclosure - Sensitive Information in HTTP Referrer Header) -10026 WARN (HTTP Parameter Override) -10027 WARN (Information Disclosure - Suspicious Comments) -10028 WARN (Open Redirect) -10029 WARN (Cookie Poisoning) -10030 WARN (User Controllable Charset) -10031 WARN (User Controllable HTML Element Attribute (Potential XSS)) -10032 WARN (Viewstate) -10033 WARN (Directory Browsing) -10034 WARN (Heartbleed OpenSSL Vulnerability (Indicative)) -10035 WARN (Strict-Transport-Security Header) -10036 WARN (HTTP Server Response Header) -10037 WARN (Server Leaks Information via "X-Powered-By" HTTP Response Header Field(s)) -10038 WARN (Content Security Policy (CSP) Header Not Set) -10039 WARN (X-Backend-Server Header Information Leak) -10040 WARN (Secure Pages Include Mixed Content) -10041 WARN (HTTP to HTTPS Insecure Transition in Form Post) -10042 WARN (HTTPS to HTTP Insecure Transition in Form Post) -10043 WARN (User Controllable JavaScript Event (XSS)) -10044 WARN (Big Redirect Detected (Potential Sensitive Information Leak)) -10049 WARN (Content Cacheability) -10050 WARN (Retrieved from Cache) -10052 WARN (X-ChromeLogger-Data (XCOLD) Header Information Leak) -10054 WARN (Cookie without SameSite Attribute) -10055 WARN (CSP) -10056 WARN (X-Debug-Token Information Leak) -10057 WARN (Username Hash Found) -10061 WARN (X-AspNet-Version Response Header) -10062 WARN (PII Disclosure) -10063 WARN (Permissions Policy Header Not Set) -10096 WARN (Timestamp Disclosure) -10097 WARN (Hash Disclosure) -10098 WARN (Cross-Domain Misconfiguration) -10099 WARN (Source Code Disclosure) -10105 WARN (Weak Authentication Method) -10108 WARN (Reverse Tabnabbing) -10109 WARN (Modern Web Application) -10110 WARN (Dangerous JS Functions) -10111 WARN (Authentication Request Identified) -10112 WARN (Session Management Response Identified) -10113 WARN (Verification Request Identified) -10115 WARN (Script Served From Malicious Domain (polyfill)) -10202 WARN (Absence of Anti-CSRF Tokens) -2 WARN (Private IP Disclosure) -3 WARN (Session ID in URL Rewrite) -50001 WARN (Script Passive Scan Rules) -90001 WARN (Insecure JSF ViewState) -90002 WARN (Java Serialization Object) -90003 WARN (Sub Resource Integrity Attribute Missing) -90004 WARN (Insufficient Site Isolation Against Spectre Vulnerability) -90011 WARN (Charset Mismatch) -90022 WARN (Application Error Disclosure) -90030 WARN (WSDL File Detection) -90033 WARN (Loosely Scoped Cookie) diff --git a/zap-report/zap-report.html b/zap-report/zap-report.html deleted file mode 100644 index 06a20f09c..000000000 --- a/zap-report/zap-report.html +++ /dev/null @@ -1,3868 +0,0 @@ - - - - -ZAP Scanning Report - - - -

- - - ZAP Scanning Report -

-

- - -

- - Site: http://petclinic:8080 - -

- -

- Generated on Sun, 21 Jul 2024 23:02:25 -

- -

- ZAP Version: 2.15.0 -

- -

- ZAP is supported by the Crash - Override Open Source Fellowship -

- - -

Summary of Alerts

- - - - - - - - - - - - - - - - - - - - - - - - - -
Risk LevelNumber of Alerts
-
High
-
-
0
-
-
Medium
-
-
4
-
-
Low
-
-
5
-
-
Informational
-
-
4
-
-
False Positives:
-
-
0
-
-
- - - -

Alerts

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameRisk LevelNumber of Instances
Absence of Anti-CSRF TokensMedium4
Content Security Policy (CSP) Header Not SetMedium9
Missing Anti-clickjacking HeaderMedium9
Sub Resource Integrity Attribute MissingMedium10
Application Error DisclosureLow1
Cross-Domain JavaScript Source File InclusionLow12
Information Disclosure - Debug Error MessagesLow1
Permissions Policy Header Not SetLow10
X-Content-Type-Options Header MissingLow12
Information Disclosure - Suspicious CommentsInformational1
Non-Storable ContentInformational1
Storable and Cacheable ContentInformational10
User Controllable HTML Element Attribute (Potential XSS)Informational6
-
- - - -

Alert Detail

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Medium
Absence of Anti-CSRF Tokens
Description -
No Anti-CSRF tokens were found in a HTML submission form.
-
- -
A cross-site request forgery is an attack that involves forcing a victim to send an HTTP request to a target destination without their knowledge or intent in order to perform an action as the victim. The underlying cause is application functionality using predictable URL/form actions in a repeatable way. The nature of the attack is that CSRF exploits the trust that a web site has for a user. By contrast, cross-site scripting (XSS) exploits the trust that a user has for a web site. Like XSS, CSRF attacks are not necessarily cross-site, but they can be. Cross-site request forgery is also known as CSRF, XSRF, one-click attack, session riding, confused deputy, and sea surf.
-
- -
CSRF attacks are effective in a number of situations, including:
-
- -
* The victim has an active session on the target site.
-
- -
* The victim is authenticated via HTTP auth on the target site.
-
- -
* The victim is on the same local network as the target site.
-
- -
CSRF has primarily been used to perform an action against a target site using the victim's privileges, but recent techniques have been discovered to disclose information by gaining access to the response. The risk of information disclosure is dramatically increased when the target site is vulnerable to XSS, because XSS can be used as a platform for CSRF, allowing the attack to operate within the bounds of the same-origin policy.
- -
URLhttp://petclinic:8080/owners/find
MethodGET
Parameter
Attack
Evidence<form action="/owners" method="get" - class="form-horizontal" id="search-owner-form">
Other InfoNo known Anti-CSRF token [anticsrf, CSRFToken, __RequestVerificationToken, csrfmiddlewaretoken, authenticity_token, OWASP_CSRFTOKEN, anoncsrf, csrf_token, _csrf, _csrfSecret, __csrf_magic, CSRF, _token, _csrf_token] was found in the following HTML form: [Form 1: "lastName" ].
URLhttp://petclinic:8080/owners/new
MethodGET
Parameter
Attack
Evidence<form class="form-horizontal" id="add-owner-form" method="post">
Other InfoNo known Anti-CSRF token [anticsrf, CSRFToken, __RequestVerificationToken, csrfmiddlewaretoken, authenticity_token, OWASP_CSRFTOKEN, anoncsrf, csrf_token, _csrf, _csrfSecret, __csrf_magic, CSRF, _token, _csrf_token] was found in the following HTML form: [Form 1: "address" "city" "firstName" "lastName" "telephone" ].
URLhttp://petclinic:8080/owners?lastName=ZAP
MethodGET
Parameter
Attack
Evidence<form action="/owners" method="get" - class="form-horizontal" id="search-owner-form">
Other InfoNo known Anti-CSRF token [anticsrf, CSRFToken, __RequestVerificationToken, csrfmiddlewaretoken, authenticity_token, OWASP_CSRFTOKEN, anoncsrf, csrf_token, _csrf, _csrfSecret, __csrf_magic, CSRF, _token, _csrf_token] was found in the following HTML form: [Form 1: "lastName" ].
URLhttp://petclinic:8080/owners/new
MethodPOST
Parameter
Attack
Evidence<form class="form-horizontal" id="add-owner-form" method="post">
Other InfoNo known Anti-CSRF token [anticsrf, CSRFToken, __RequestVerificationToken, csrfmiddlewaretoken, authenticity_token, OWASP_CSRFTOKEN, anoncsrf, csrf_token, _csrf, _csrfSecret, __csrf_magic, CSRF, _token, _csrf_token] was found in the following HTML form: [Form 1: "address" "city" "firstName" "lastName" "telephone" ].
Instances4
Solution -
Phase: Architecture and Design
-
- -
Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
-
- -
For example, use anti-CSRF packages such as the OWASP CSRFGuard.
-
- -
Phase: Implementation
-
- -
Ensure that your application is free of cross-site scripting issues, because most CSRF defenses can be bypassed using attacker-controlled script.
-
- -
Phase: Architecture and Design
-
- -
Generate a unique nonce for each form, place the nonce into the form, and verify the nonce upon receipt of the form. Be sure that the nonce is not predictable (CWE-330).
-
- -
Note that this can be bypassed using XSS.
-
- -
Identify especially dangerous operations. When the user performs a dangerous operation, send a separate confirmation request to ensure that the user intended to perform that operation.
-
- -
Note that this can be bypassed using XSS.
-
- -
Use the ESAPI Session Management control.
-
- -
This control includes a component for CSRF.
-
- -
Do not use the GET method for any request that triggers a state change.
-
- -
Phase: Implementation
-
- -
Check the HTTP Referer header to see if the request originated from an expected page. This could break legitimate functionality, because users or proxies may have disabled sending the Referer for privacy reasons.
- -
Reference - https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html -
- - https://cwe.mitre.org/data/definitions/352.html - -
CWE Id352
WASC Id9
Plugin Id10202
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Medium
Content Security Policy (CSP) Header Not Set
Description -
Content Security Policy (CSP) is an added layer of security that helps to detect and mitigate certain types of attacks, including Cross Site Scripting (XSS) and data injection attacks. These attacks are used for everything from data theft to site defacement or distribution of malware. CSP provides a set of standard HTTP headers that allow website owners to declare approved sources of content that browsers should be allowed to load on that page — covered types are JavaScript, CSS, HTML frames, fonts, images and embeddable objects such as Java applets, ActiveX, audio and video files.
- -
URLhttp://petclinic:8080
MethodGET
Parameter
Attack
Evidence
Other Info
URLhttp://petclinic:8080/
MethodGET
Parameter
Attack
Evidence
Other Info
URLhttp://petclinic:8080/owners/find
MethodGET
Parameter
Attack
Evidence
Other Info
URLhttp://petclinic:8080/owners/new
MethodGET
Parameter
Attack
Evidence
Other Info
URLhttp://petclinic:8080/owners?lastName=ZAP
MethodGET
Parameter
Attack
Evidence
Other Info
URLhttp://petclinic:8080/vets.html
MethodGET
Parameter
Attack
Evidence
Other Info
URLhttp://petclinic:8080/vets.html?page=1
MethodGET
Parameter
Attack
Evidence
Other Info
URLhttp://petclinic:8080/vets.html?page=2
MethodGET
Parameter
Attack
Evidence
Other Info
URLhttp://petclinic:8080/owners/new
MethodPOST
Parameter
Attack
Evidence
Other Info
Instances9
Solution -
Ensure that your web server, application server, load balancer, etc. is configured to set the Content-Security-Policy header.
- -
Reference - https://developer.mozilla.org/en-US/docs/Web/Security/CSP/Introducing_Content_Security_Policy -
- - https://cheatsheetseries.owasp.org/cheatsheets/Content_Security_Policy_Cheat_Sheet.html -
- - https://www.w3.org/TR/CSP/ -
- - https://w3c.github.io/webappsec-csp/ -
- - https://web.dev/articles/csp -
- - https://caniuse.com/#feat=contentsecuritypolicy -
- - https://content-security-policy.com/ - -
CWE Id693
WASC Id15
Plugin Id10038
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Medium
Missing Anti-clickjacking Header
Description -
The response does not include either Content-Security-Policy with 'frame-ancestors' directive or X-Frame-Options to protect against 'ClickJacking' attacks.
- -
URLhttp://petclinic:8080
MethodGET
Parameterx-frame-options
Attack
Evidence
Other Info
URLhttp://petclinic:8080/
MethodGET
Parameterx-frame-options
Attack
Evidence
Other Info
URLhttp://petclinic:8080/owners/find
MethodGET
Parameterx-frame-options
Attack
Evidence
Other Info
URLhttp://petclinic:8080/owners/new
MethodGET
Parameterx-frame-options
Attack
Evidence
Other Info
URLhttp://petclinic:8080/owners?lastName=ZAP
MethodGET
Parameterx-frame-options
Attack
Evidence
Other Info
URLhttp://petclinic:8080/vets.html
MethodGET
Parameterx-frame-options
Attack
Evidence
Other Info
URLhttp://petclinic:8080/vets.html?page=1
MethodGET
Parameterx-frame-options
Attack
Evidence
Other Info
URLhttp://petclinic:8080/vets.html?page=2
MethodGET
Parameterx-frame-options
Attack
Evidence
Other Info
URLhttp://petclinic:8080/owners/new
MethodPOST
Parameterx-frame-options
Attack
Evidence
Other Info
Instances9
Solution -
Modern Web browsers support the Content-Security-Policy and X-Frame-Options HTTP headers. Ensure one of them is set on all web pages returned by your site/app.
-
- -
If you expect the page to be framed only by pages on your server (e.g. it's part of a FRAMESET) then you'll want to use SAMEORIGIN, otherwise if you never expect the page to be framed, you should use DENY. Alternatively consider implementing Content Security Policy's "frame-ancestors" directive.
- -
Reference - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options - -
CWE Id1021
WASC Id15
Plugin Id10020
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Medium
Sub Resource Integrity Attribute Missing
Description -
The integrity attribute is missing on a script or link tag served by an external server. The integrity tag prevents an attacker who have gained access to this server from injecting a malicious content.
- -
URLhttp://petclinic:8080
MethodGET
Parameter
Attack
Evidence<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
Other Info
URLhttp://petclinic:8080
MethodGET
Parameter
Attack
Evidence<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
Other Info
URLhttp://petclinic:8080/
MethodGET
Parameter
Attack
Evidence<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
Other Info
URLhttp://petclinic:8080/
MethodGET
Parameter
Attack
Evidence<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
Other Info
URLhttp://petclinic:8080/owners/find
MethodGET
Parameter
Attack
Evidence<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
Other Info
URLhttp://petclinic:8080/owners/find
MethodGET
Parameter
Attack
Evidence<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
Other Info
URLhttp://petclinic:8080/owners?lastName=ZAP
MethodGET
Parameter
Attack
Evidence<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
Other Info
URLhttp://petclinic:8080/owners?lastName=ZAP
MethodGET
Parameter
Attack
Evidence<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
Other Info
URLhttp://petclinic:8080/vets.html
MethodGET
Parameter
Attack
Evidence<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
Other Info
URLhttp://petclinic:8080/vets.html
MethodGET
Parameter
Attack
Evidence<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
Other Info
Instances10
Solution -
Provide a valid integrity attribute to the tag.
- -
Reference - https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity - -
CWE Id345
WASC Id15
Plugin Id90003
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Low
Application Error Disclosure
Description -
This page contains an error/warning message that may disclose sensitive information like the location of the file that produced the unhandled exception. This information can be used to launch further attacks against the web application. The alert could be a false positive if the error message is found inside a documentation page.
- -
URLhttp://petclinic:8080/oups
MethodGET
Parameter
Attack
EvidenceHTTP/1.1 500
Other Info
Instances1
Solution -
Review the source code of this page. Implement custom error pages. Consider implementing a mechanism to provide a unique error reference/identifier to the client (browser) while logging the details on the server side and not exposing them to the user.
- -
Reference
CWE Id200
WASC Id13
Plugin Id90022
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Low
Cross-Domain JavaScript Source File Inclusion
Description -
The page includes one or more script files from a third-party domain.
- -
URLhttp://petclinic:8080
MethodGET
Parameterhttps://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js
Attack
Evidence<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
Other Info
URLhttp://petclinic:8080
MethodGET
Parameterhttps://oss.maxcdn.com/respond/1.4.2/respond.min.js
Attack
Evidence<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
Other Info
URLhttp://petclinic:8080/
MethodGET
Parameterhttps://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js
Attack
Evidence<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
Other Info
URLhttp://petclinic:8080/
MethodGET
Parameterhttps://oss.maxcdn.com/respond/1.4.2/respond.min.js
Attack
Evidence<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
Other Info
URLhttp://petclinic:8080/owners/find
MethodGET
Parameterhttps://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js
Attack
Evidence<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
Other Info
URLhttp://petclinic:8080/owners/find
MethodGET
Parameterhttps://oss.maxcdn.com/respond/1.4.2/respond.min.js
Attack
Evidence<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
Other Info
URLhttp://petclinic:8080/owners?lastName=ZAP
MethodGET
Parameterhttps://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js
Attack
Evidence<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
Other Info
URLhttp://petclinic:8080/owners?lastName=ZAP
MethodGET
Parameterhttps://oss.maxcdn.com/respond/1.4.2/respond.min.js
Attack
Evidence<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
Other Info
URLhttp://petclinic:8080/vets.html
MethodGET
Parameterhttps://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js
Attack
Evidence<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
Other Info
URLhttp://petclinic:8080/vets.html
MethodGET
Parameterhttps://oss.maxcdn.com/respond/1.4.2/respond.min.js
Attack
Evidence<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
Other Info
URLhttp://petclinic:8080/owners/new
MethodPOST
Parameterhttps://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js
Attack
Evidence<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
Other Info
URLhttp://petclinic:8080/owners/new
MethodPOST
Parameterhttps://oss.maxcdn.com/respond/1.4.2/respond.min.js
Attack
Evidence<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
Other Info
Instances12
Solution -
Ensure JavaScript source files are loaded from only trusted sources, and the sources can't be controlled by end users of the application.
- -
Reference
CWE Id829
WASC Id15
Plugin Id10017
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Low
Information Disclosure - Debug Error Messages
Description -
The response appeared to contain common error messages returned by platforms such as ASP.NET, and Web-servers such as IIS and Apache. You can configure the list of common debug messages.
- -
URLhttp://petclinic:8080/oups
MethodGET
Parameter
Attack
EvidenceInternal Server Error
Other Info
Instances1
Solution -
Disable debugging messages before pushing to production.
- -
Reference
CWE Id200
WASC Id13
Plugin Id10023
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Low
Permissions Policy Header Not Set
Description -
Permissions Policy Header is an added layer of security that helps to restrict from unauthorized access or usage of browser/client features by web resources. This policy ensures the user privacy by limiting or specifying the features of the browsers can be used by the web resources. Permissions Policy provides a set of standard HTTP headers that allow website owners to limit which features of browsers can be used by the page such as camera, microphone, location, full screen etc.
- -
URLhttp://petclinic:8080
MethodGET
Parameter
Attack
Evidence
Other Info
URLhttp://petclinic:8080/
MethodGET
Parameter
Attack
Evidence
Other Info
URLhttp://petclinic:8080/owners/find
MethodGET
Parameter
Attack
Evidence
Other Info
URLhttp://petclinic:8080/owners/new
MethodGET
Parameter
Attack
Evidence
Other Info
URLhttp://petclinic:8080/owners?lastName=ZAP
MethodGET
Parameter
Attack
Evidence
Other Info
URLhttp://petclinic:8080/vets.html
MethodGET
Parameter
Attack
Evidence
Other Info
URLhttp://petclinic:8080/vets.html?page=1
MethodGET
Parameter
Attack
Evidence
Other Info
URLhttp://petclinic:8080/vets.html?page=2
MethodGET
Parameter
Attack
Evidence
Other Info
URLhttp://petclinic:8080/webjars/bootstrap/5.3.3/dist/js/bootstrap.bundle.min.js
MethodGET
Parameter
Attack
Evidence
Other Info
URLhttp://petclinic:8080/owners/new
MethodPOST
Parameter
Attack
Evidence
Other Info
Instances10
Solution -
Ensure that your web server, application server, load balancer, etc. is configured to set the Permissions-Policy header.
- -
Reference - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy -
- - https://developer.chrome.com/blog/feature-policy/ -
- - https://scotthelme.co.uk/a-new-security-header-feature-policy/ -
- - https://w3c.github.io/webappsec-feature-policy/ -
- - https://www.smashingmagazine.com/2018/12/feature-policy/ - -
CWE Id693
WASC Id15
Plugin Id10063
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Low
X-Content-Type-Options Header Missing
Description -
The Anti-MIME-Sniffing header X-Content-Type-Options was not set to 'nosniff'. This allows older versions of Internet Explorer and Chrome to perform MIME-sniffing on the response body, potentially causing the response body to be interpreted and displayed as a content type other than the declared content type. Current (early 2014) and legacy versions of Firefox will use the declared content type (if one is set), rather than performing MIME-sniffing.
- -
URLhttp://petclinic:8080
MethodGET
Parameterx-content-type-options
Attack
Evidence
Other InfoThis issue still applies to error type pages (401, 403, 500, etc.) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type. -At "High" threshold this scan rule will not alert on client or server error responses.
URLhttp://petclinic:8080/
MethodGET
Parameterx-content-type-options
Attack
Evidence
Other InfoThis issue still applies to error type pages (401, 403, 500, etc.) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type. -At "High" threshold this scan rule will not alert on client or server error responses.
URLhttp://petclinic:8080/owners/find
MethodGET
Parameterx-content-type-options
Attack
Evidence
Other InfoThis issue still applies to error type pages (401, 403, 500, etc.) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type. -At "High" threshold this scan rule will not alert on client or server error responses.
URLhttp://petclinic:8080/owners/new
MethodGET
Parameterx-content-type-options
Attack
Evidence
Other InfoThis issue still applies to error type pages (401, 403, 500, etc.) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type. -At "High" threshold this scan rule will not alert on client or server error responses.
URLhttp://petclinic:8080/owners?lastName=ZAP
MethodGET
Parameterx-content-type-options
Attack
Evidence
Other InfoThis issue still applies to error type pages (401, 403, 500, etc.) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type. -At "High" threshold this scan rule will not alert on client or server error responses.
URLhttp://petclinic:8080/resources/css/petclinic.css
MethodGET
Parameterx-content-type-options
Attack
Evidence
Other InfoThis issue still applies to error type pages (401, 403, 500, etc.) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type. -At "High" threshold this scan rule will not alert on client or server error responses.
URLhttp://petclinic:8080/resources/images/favicon.png
MethodGET
Parameterx-content-type-options
Attack
Evidence
Other InfoThis issue still applies to error type pages (401, 403, 500, etc.) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type. -At "High" threshold this scan rule will not alert on client or server error responses.
URLhttp://petclinic:8080/resources/images/pets.png
MethodGET
Parameterx-content-type-options
Attack
Evidence
Other InfoThis issue still applies to error type pages (401, 403, 500, etc.) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type. -At "High" threshold this scan rule will not alert on client or server error responses.
URLhttp://petclinic:8080/resources/images/spring-logo.svg
MethodGET
Parameterx-content-type-options
Attack
Evidence
Other InfoThis issue still applies to error type pages (401, 403, 500, etc.) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type. -At "High" threshold this scan rule will not alert on client or server error responses.
URLhttp://petclinic:8080/vets.html
MethodGET
Parameterx-content-type-options
Attack
Evidence
Other InfoThis issue still applies to error type pages (401, 403, 500, etc.) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type. -At "High" threshold this scan rule will not alert on client or server error responses.
URLhttp://petclinic:8080/webjars/bootstrap/5.3.3/dist/js/bootstrap.bundle.min.js
MethodGET
Parameterx-content-type-options
Attack
Evidence
Other InfoThis issue still applies to error type pages (401, 403, 500, etc.) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type. -At "High" threshold this scan rule will not alert on client or server error responses.
URLhttp://petclinic:8080/webjars/font-awesome/4.7.0/css/font-awesome.min.css
MethodGET
Parameterx-content-type-options
Attack
Evidence
Other InfoThis issue still applies to error type pages (401, 403, 500, etc.) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type. -At "High" threshold this scan rule will not alert on client or server error responses.
Instances12
Solution -
Ensure that the application/web server sets the Content-Type header appropriately, and that it sets the X-Content-Type-Options header to 'nosniff' for all web pages.
-
- -
If possible, ensure that the end user uses a standards-compliant and modern web browser that does not perform MIME-sniffing at all, or that can be directed by the web application/web server to not perform MIME-sniffing.
- -
Reference - https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/compatibility/gg622941(v=vs.85) -
- - https://owasp.org/www-community/Security_Headers - -
CWE Id693
WASC Id15
Plugin Id10021
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Informational
Information Disclosure - Suspicious Comments
Description -
The response appears to contain suspicious comments which may help an attacker. Note: Matches made within script blocks or files are against the entire content not only comments.
- -
URLhttp://petclinic:8080/webjars/bootstrap/5.3.3/dist/js/bootstrap.bundle.min.js
MethodGET
Parameter
Attack
Evidenceselect
Other InfoThe following pattern was used: \bSELECT\b and was detected in the element starting with: "!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?def", see evidence field for the suspicious comment/snippet.
Instances1
Solution -
Remove all comments that return information that may help an attacker and fix any underlying problems they refer to.
- -
Reference
CWE Id200
WASC Id13
Plugin Id10027
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Informational
Non-Storable Content
Description -
The response contents are not storable by caching components such as proxy servers. If the response does not contain sensitive, personal or user-specific information, it may benefit from being stored and cached, to improve performance.
- -
URLhttp://petclinic:8080/oups
MethodGET
Parameter
Attack
Evidence500
Other Info
Instances1
Solution -
The content may be marked as storable by ensuring that the following conditions are satisfied:
-
- -
The request method must be understood by the cache and defined as being cacheable ("GET", "HEAD", and "POST" are currently defined as cacheable)
-
- -
The response status code must be understood by the cache (one of the 1XX, 2XX, 3XX, 4XX, or 5XX response classes are generally understood)
-
- -
The "no-store" cache directive must not appear in the request or response header fields
-
- -
For caching by "shared" caches such as "proxy" caches, the "private" response directive must not appear in the response
-
- -
For caching by "shared" caches such as "proxy" caches, the "Authorization" header field must not appear in the request, unless the response explicitly allows it (using one of the "must-revalidate", "public", or "s-maxage" Cache-Control response directives)
-
- -
In addition to the conditions above, at least one of the following conditions must also be satisfied by the response:
-
- -
It must contain an "Expires" header field
-
- -
It must contain a "max-age" response directive
-
- -
For "shared" caches such as "proxy" caches, it must contain a "s-maxage" response directive
-
- -
It must contain a "Cache Control Extension" that allows it to be cached
-
- -
It must have a status code that is defined as cacheable by default (200, 203, 204, 206, 300, 301, 404, 405, 410, 414, 501).
- -
Reference - https://datatracker.ietf.org/doc/html/rfc7234 -
- - https://datatracker.ietf.org/doc/html/rfc7231 -
- - https://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html - -
CWE Id524
WASC Id13
Plugin Id10049
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Informational
Storable and Cacheable Content
Description -
The response contents are storable by caching components such as proxy servers, and may be retrieved directly from the cache, rather than from the origin server by the caching servers, in response to similar requests from other users. If the response data is sensitive, personal or user-specific, this may result in sensitive information being leaked. In some cases, this may even result in a user gaining complete control of the session of another user, depending on the configuration of the caching components in use in their environment. This is primarily an issue where "shared" caching servers such as "proxy" caches are configured on the local network. This configuration is typically found in corporate or educational environments, for instance.
- -
URLhttp://petclinic:8080
MethodGET
Parameter
Attack
Evidence
Other InfoIn the absence of an explicitly specified caching lifetime directive in the response, a liberal lifetime heuristic of 1 year was assumed. This is permitted by rfc7234.
URLhttp://petclinic:8080/
MethodGET
Parameter
Attack
Evidence
Other InfoIn the absence of an explicitly specified caching lifetime directive in the response, a liberal lifetime heuristic of 1 year was assumed. This is permitted by rfc7234.
URLhttp://petclinic:8080/owners/find
MethodGET
Parameter
Attack
Evidence
Other InfoIn the absence of an explicitly specified caching lifetime directive in the response, a liberal lifetime heuristic of 1 year was assumed. This is permitted by rfc7234.
URLhttp://petclinic:8080/resources/css/petclinic.css
MethodGET
Parameter
Attack
Evidencemax-age=43200
Other Info
URLhttp://petclinic:8080/resources/images/favicon.png
MethodGET
Parameter
Attack
Evidencemax-age=43200
Other Info
URLhttp://petclinic:8080/resources/images/pets.png
MethodGET
Parameter
Attack
Evidencemax-age=43200
Other Info
URLhttp://petclinic:8080/resources/images/spring-logo.svg
MethodGET
Parameter
Attack
Evidencemax-age=43200
Other Info
URLhttp://petclinic:8080/robots.txt
MethodGET
Parameter
Attack
Evidence
Other InfoIn the absence of an explicitly specified caching lifetime directive in the response, a liberal lifetime heuristic of 1 year was assumed. This is permitted by rfc7234.
URLhttp://petclinic:8080/sitemap.xml
MethodGET
Parameter
Attack
Evidence
Other InfoIn the absence of an explicitly specified caching lifetime directive in the response, a liberal lifetime heuristic of 1 year was assumed. This is permitted by rfc7234.
URLhttp://petclinic:8080/webjars/font-awesome/4.7.0/css/font-awesome.min.css
MethodGET
Parameter
Attack
Evidencemax-age=43200
Other Info
Instances10
Solution -
Validate that the response does not contain sensitive, personal or user-specific information. If it does, consider the use of the following HTTP response headers, to limit, or prevent the content being stored and retrieved from the cache by another user:
-
- -
Cache-Control: no-cache, no-store, must-revalidate, private
-
- -
Pragma: no-cache
-
- -
Expires: 0
-
- -
This configuration directs both HTTP 1.0 and HTTP 1.1 compliant caching servers to not store the response, and to not retrieve the response (without validation) from the cache, in response to a similar request.
- -
Reference - https://datatracker.ietf.org/doc/html/rfc7234 -
- - https://datatracker.ietf.org/doc/html/rfc7231 -
- - https://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html - -
CWE Id524
WASC Id13
Plugin Id10049
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Informational
User Controllable HTML Element Attribute (Potential XSS)
Description -
This check looks at user-supplied input in query string parameters and POST data to identify where certain HTML attribute values might be controlled. This provides hot-spot detection for XSS (cross-site scripting) that will require further review by a security analyst to determine exploitability.
- -
URLhttp://petclinic:8080/owners?lastName=ZAP
MethodGET
ParameterlastName
Attack
Evidence
Other InfoUser-controlled HTML attribute values were found. Try injecting special characters to see if XSS might be possible. The page at the following URL: - -http://petclinic:8080/owners?lastName=ZAP - -appears to include user input in: - -a(n) [input] tag [value] attribute - -The user input found was: -lastName=ZAP - -The user-controlled value was: -zap
URLhttp://petclinic:8080/owners/new
MethodPOST
Parameteraddress
Attack
Evidence
Other InfoUser-controlled HTML attribute values were found. Try injecting special characters to see if XSS might be possible. The page at the following URL: - -http://petclinic:8080/owners/new - -appears to include user input in: - -a(n) [input] tag [value] attribute - -The user input found was: -address=688 Zaproxy Ridge - -The user-controlled value was: -688 zaproxy ridge
URLhttp://petclinic:8080/owners/new
MethodPOST
Parametercity
Attack
Evidence
Other InfoUser-controlled HTML attribute values were found. Try injecting special characters to see if XSS might be possible. The page at the following URL: - -http://petclinic:8080/owners/new - -appears to include user input in: - -a(n) [input] tag [value] attribute - -The user input found was: -city=East Romaineburgh - -The user-controlled value was: -east romaineburgh
URLhttp://petclinic:8080/owners/new
MethodPOST
ParameterfirstName
Attack
Evidence
Other InfoUser-controlled HTML attribute values were found. Try injecting special characters to see if XSS might be possible. The page at the following URL: - -http://petclinic:8080/owners/new - -appears to include user input in: - -a(n) [input] tag [value] attribute - -The user input found was: -firstName=ZAP - -The user-controlled value was: -zap
URLhttp://petclinic:8080/owners/new
MethodPOST
ParameterlastName
Attack
Evidence
Other InfoUser-controlled HTML attribute values were found. Try injecting special characters to see if XSS might be possible. The page at the following URL: - -http://petclinic:8080/owners/new - -appears to include user input in: - -a(n) [input] tag [value] attribute - -The user input found was: -lastName=ZAP - -The user-controlled value was: -zap
URLhttp://petclinic:8080/owners/new
MethodPOST
Parametertelephone
Attack
Evidence
Other InfoUser-controlled HTML attribute values were found. Try injecting special characters to see if XSS might be possible. The page at the following URL: - -http://petclinic:8080/owners/new - -appears to include user input in: - -a(n) [input] tag [value] attribute - -The user input found was: -telephone=ZAP - -The user-controlled value was: -zap
Instances6
Solution -
Validate all input and sanitize output it before writing to any HTML attributes.
- -
Reference - https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_Cheat_Sheet.html - -
CWE Id20
WASC Id20
Plugin Id10031
-
- - - - -