SonarQube API for Hotspots - sonarqube

I am trying to call the SonarQube API hotspot and am getting a 404 status code. I've followed the internal web api and generated this request to get the hotspot key. This would allow me to generate another request to get the hotspots for a particular project.
<baseurl>/api/hotspots/search?hotspots&component=projectKey
Any thoughts?

Related

API server block request from GuzzleHttp

I have 2 servers which are API server and Client server ....
Both server using Google Cloud server and I use Laravel framework to develop my system...
So, currently the problem is, it return 403 error when calling API (to API server) using GuzzleHttp (from Client Server).....
But after I change the user agent to curl/7.65.3, suddenly it is working fine...
But I want to know why??? Is there any other solution without changing the user-agent???
Thanks
What is your use method? If GET you can refer to:
GET Requests That Include a Body
If a viewer GET request includes a body, CloudFront returns an HTTP status code 403 (Forbidden) to the viewer.
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorCustomOrigin.html

SonarLint - Failed to update the following projects

This is similar to thread "SonarLint - Invalid binding message in intellij".
However, following the solution leads to another problem, which is stated in the title, or from below with following full message:
Failed to update the following projects: Please check if the server bindings are updated and the module key is correct: [module_name]
By the way, module name is correct because it is selected from the "Project" dropdown values, which are retrieved remotely.
Any clue(s)?
EDIT:
Right before the failure, log states that there is GET 401 due to configuration of SiteMinder agent along with NTLM, or simply due to unsuccessful credential redirect.
Just to answer my own question, this may happen if there is proxy issues. I was able to see Get 401 in the logs during the binding.
Here's the conversation I had with SonarQube team: https://community.sonarsource.com/t/sonarlint-failed-to-update-the-following-projects/38471
Furthermore, if you experience this within the Corporate/Enterprise, reach out to DevOps team to acquire different endpoint. Enterprise configuration usually involves two endpoints:
Endpoint for SSO
Endpoint that handles/redirects API call
For SonarQube plugin to appropriately handle this, it will require endpoint that handles API.

How to check Global HTTP batch endpoint is called

I received an email saying that JSON-RPC and Global HTTP Batch serving endpoints being discontinued, and that my project on Google Cloud Platform is calling Global HTTP Batch endpoint.
When I check the API dashboard of the project, however, "Google Cloud Storage JSON API" shows no usage for the last 30 days.
Does that mean the project no longer calls this endpoint?
If not (= if there is still a chance that we call this endpoint), how can I see whether a change that I will make to eliminate the call does actually eliminate the call?
If you are using a client from Google to make your request you are no longer calling the Global HTTP Batch endpoint as they have been updated to use the new API specific Batch endpoint.
You can still use the dev tools from your browser to check the request url from your app.

Add custom headers to SonarQube webhook

SonarQube supports webhooks which makes configured API call to an external server after analysis of a project. It also allows custom values to be added in the payload with the pattern sonar.analysis.*.
Is it possible to add custom headers(For example Authentication header) in the API request made to the external server.
For the time being it's not possible.
Next version of SonarQube may be able to send authentication headers to the external server : https://jira.sonarsource.com/browse/SONAR-9919
My bad, the issue referenced is just for extracting the credentials from the URL.

How to do correlation on dynamic parameter that are occuring in request and not in response in JMETER?

I am developing a mobile script using jMeter. i.e trying to record and replay mobile web applications using JMeter 2.9 and firefox 43.0.4
I am able to record the application. But it throws an error during replay, as some dynamic parameter is passed with the post data as below:
POST data:
skin=&skinLoaderChecksum=&isAjaxRequest=true&**x=****0.7379947959390617**
When I checked the same flow in Load Runner, the same failure occurs on the same URL again.
In Load Runner:
HTTP Status-Code=500 (Internal Server Error) and {"errorCode":"UNEXPECTED_ERROR","errorMsg":"FWLSE0009W: User identity is null. Check your application''s authentication requirements. These settings must match to the deployed application [project mobile]"}
In JMeter:
Response headers:HTTP/1.1 401 Unauthorized in Sampler Result and in response data: /-secure- {"challenges":{"wl_antiXSRFRealm":{"WL-Instance-Id":"geqcaecehouktkfn0rfqmmdu6"}}}/
Is anyone able to help with this?
Responses will be highly appreciated :-).
I don't have Worklight server to play with now hence I can provide you only generic information. You need to properly simulate mobile application authentication flow, actually this dynamic parameter can be fetched from the previous response.
Reference links:
How to do Worklight Server performance testing
How to Load Test CSRF-Protected Web Sites

Resources