Fix health endpoint scanner availability checks#13
Conversation
|
@sasidaran-99 Tests fail. |
|
Hi @ionfwsrijan will look into this and will update |
|
Hey @Trishanthsai! The core logic looks good.
return {
"ok": True,
"status": status,
"scanners": scanners,
}...or confirm nothing in the frontend depends on it and document the shape change in the PR description. 2 Frontend piece is missing — the issue spec included a warning banner in the UI when Fix these and this is good to merge! |
|
Hi @ionfwsrijan, I've restored the For the frontend warning banner when the health status is Thanks! |
|
@Trishanthsai That LGMT as well. You may raise a followup issue. Also pls resolve the merge conflicts with the main |
|
Hi @ionfwsrijan, I've resolved the merge conflicts with main. The PR now shows no conflicts with the base branch. It looks like the remaining workflow is awaiting maintainer approval. Could you please approve/re-run it when you get a chance? Also, I'll raise a follow-up issue for the frontend degraded-status warning banner as discussed. Thanks! |
Linked issue
Closes #9
What this PR does
Updated the
/healthendpoint to check whethersemgrep,osv-scanner, andgitleaksare available on the system. The endpoint now returns the availability of each scanner and reports the status asdegradedwhen one or more scanners are missing.Type of change
ML tier (if applicable)
Changes
Backend
shutil.which()/healthresponsedegradedstatus when any scanner is unavailableTesting
How did you test this?
Ran the backend locally and verified the
/healthendpoint response in the browser. Confirmed that scanner availability is reported correctly and the status changes todegradedwhen scanners are not installed.Checklist
console.erroror unhandled Python exceptions introducedAnything reviewers should focus on
Health status logic and scanner availability checks.