Skip to content
Changes

Reference

anypointoauth2 · Oct 24, 2026

What this change means

How responses are judged changed. Changes how the detector verifies or what it treats as the credential.

Field changes
FieldBeforeAfter
Expected statusesBefore: 200 (StatusOK, StatusUnprocessableEntity) → verified; 401 (StatusUnauthorized) → not verified; other (default) → error or unknownAfter: 200 (StatusOK) → verified; 401 (StatusUnauthorized, StatusUnprocessableEntity) → not verified; other (default) → error or unknown
pkg/detectors/anypointoauth2/anypointoauth2.go+2−3View file
@@ -115,10 +115,9 @@ func verifyMatch(ctx context.Context, client *http.Client, id, secret string) (b
115115 }()
116116
117117 switch res.StatusCode {
118removed: // The endpoint responds with status 200 for valid Organization credentials and 422 for Client credentials.
119removed: case http.StatusOK, http.StatusUnprocessableEntity:
118added: case http.StatusOK:
120119 return true, nil
121removed: case http.StatusUnauthorized:
120added: case http.StatusUnauthorized, http.StatusUnprocessableEntity:
122121 return false, nil
123122 default:
124123 return false, fmt.Errorf("unexpected status code: %d", res.StatusCode)