mantiumai / chirps

Discover sensitive/confidential information stored in a vector database
GNU General Public License v3.0
57 stars 7 forks source link

implement APIEndpointAsset ping functionality #203

Closed alex-nork closed 10 months ago

alex-nork commented 10 months ago

The purpose of this PR is to make the APIEndpointAsset's ping button work. It'll work by making a request using the information provided by the user when creating the asset, and we'll return True if the response status code is 200, False otherwise.

I noticed that this asset's edit button was disabled even when I had no scans running. We were disabling the button if there was a scan associated with the asset and that scan was not in 'Completed' state. We have more terminal states than just 'Completed', so I've updated the query to filter on those other states as well.

In addition to the tests added in this PR, I've manually confirmed that the ping button now works.