Template for a good false-positive report, formatted with Markdown:
- versions used SonarQube Server: LTS 8.9 Community
- minimal code sample to reproduce (with analysis parameter, and potential instructions to compile).
- Setup Sonar CE instance, service URL: http://10.96.1.1:9000
- Setup Nginx proxy:
#### NGINX Conf #####
upstream sonar_servers {
server 10.96.1.1:9000;
}
server {
listen 80;
listen 443 ssl;
server_name mycom.com.net;
ssl_certificate ../ssl/xxx.pem;
ssl_certificate_key ../ssl/xxx.key;
access_log logs/sonar_access.log;
error_log logs/sonar_error.log;
location / {
proxy_pass http://sonar_servers;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto https;
}
}
- Config Server base URL as https://mycom.com
- Setup gitlab application by following 8.9 document instruction
when accessing https://mycom.com, below http issue:
Request URL: https://mycom.com/oauth2/callback/gitlab?code=ac6b6eb197b91e40dcc4d3cea30f26e3bc29d52e9068d97057a998de8abc53a6&state=linq87mpstorb164e4kviu7mff
Request Method: GET
Status Code: 302
Remote Address: 121.201.35.8:443
Referrer Policy: strict-origin-when-cross-origin
GET /oauth2/callback/gitlab?code=ac6b6eb197b91e40dcc4d3cea30f26e3bc29d52e9068d97057a998de8abc53a6&state=linq87mpstorb164e4kviu7mff HTTP/1.1
Host: sonar.xuebangsoft.net
Connection: keep-alive
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
sec-ch-ua: " Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"
sec-ch-ua-mobile: ?0
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,zh-TW;q=0.7
Cookie: gr_user_id=d5b5a1cb-dc3b-4ff0-8e09-c9a1c531a081; XSRF-TOKEN=m2dvfr2lbp90s9u337qo0ms2h7; JWT-SESSION=eyJhbGciOiJIUzI1NiJ9.eyJsYXN0UmVmcmVzaFRpbWUiOjE2MjI2MzE3NTg0NjAsInhzcmZUb2tlbiI6Im0yZHZmcjJsYnA5MHM5dTMzN3FvMG1zMmg3IiwianRpIjoiQVhuTVk3cDY5Nk5iaTRqaTQyOVYiLCJzdWIiOiJhZG1pbiIsImlhdCI6MTYyMjYzMTc1OCwiZXhwIjoxNjIyODkwOTU4fQ.goWTFL3z2Y5MuCj4YZMORYEFi8pf3SHZVoRFjJYpRe4; OAUTHSTATE=244f9e91ffba85d4ac71745b3533ad5d46ec73b1712296f7eecb564097251253
```
```
HTTP/1.1 302
Server: Tengine/2.3.0
Date: Wed, 02 Jun 2021 11:03:11 GMT
Content-Length: 0
Connection: keep-alive
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Set-Cookie: XSRF-TOKEN=lia2iql9a510p480dsrj9mbqcd; Max-Age=259200; Expires=Sat, 05-Jun-2021 11:03:11 GMT; Path=/; Secure
Set-Cookie: JWT-SESSION=eyJhbGciOiJIUzI1NiJ9.eyJsYXN0UmVmcmVzaFRpbWUiOjE2MjI2MzE3OTE4NDgsInhzcmZUb2tlbiI6ImxpYTJpcWw5YTUxMHA0ODBkc3JqOW1icWNkIiwianRpIjoiQVhuTVpEem45Nk5iaTRqaTQyOVgiLCJzdWIiOiJBWG5MckFuMlc0WXFLYTY1QzdlNCIsImlhdCI6MTYyMjYzMTc5MSwiZXhwIjoxNjIyODkwOTkxfQ.gtJKJMq-HF81wYOEZzUvJhLjh6q5BAy703Veeh2fhuM; Max-Age=259200; Expires=Sat, 05-Jun-2021 11:03:11 GMT; Path=/; Secure; HttpOnly
Set-Cookie: AUTH-PARAMS=; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly
Location: http://mycom.com/
```