Skip to content

Return 'Medium' instead of 'Unavailable' if risk_band is not available

Eugie Limpin requested to merge el-treat-unavailable-risk-score-as-medium into master

What does this MR do and why?

Resolves https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/446.

In the exceptional scenario1 where Arkose Verify API returns a JSON response without a session_risk.risk_band value, we want to treat the new user as medium-risk (required to verify their identity using email and phone number) instead of low-risk (required to verify their identity using email only).

This is achieved in this MR by falling back to returning 'Medium' instead of 'Unavailable' when calling risk_band on an Arkose::VerifyResponse object instantiated using a JSON response without session_risk.risk_band value.


1 This exact scenario happened 47k+ times in February, 29k+ times in January, twice in June then just stopped happening. Root cause is unknown at the moment and is actively being investigated in collaboration with Arkose team.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Eugie Limpin

Merge request reports

Loading