Loading
Show an error when the API fuzzing configuration fails to load
Why
The API fuzzing configuration page logged five browser console errors in ee/spec/features/user_sees_active_nav_items_spec.rb, which !256639 (merged) had to allowlist. The spec stubs the scan profiles YAML with an empty 200 response. That exposed two defects:
AppSec::Fuzzing::API::CiConfiguration#scan_profilesraisedGitlab::Config::Loader::FormatErroron YAML that is not a hash, so theapiFuzzingCiConfigurationGraphQL field returned 500.- The page rendered
ConfigurationFormwith an undefined configuration when the query failed. Under Vue 2 the form threw indata()(reading 'scanModes',reading 'value',targetUrlnot defined). Under Vue 3 it threw in the component update.
What
ee/app/models/app_sec/fuzzing/api/ci_configuration.rb: invalid YAML is treated like a failed request and yields no profiles.ee/app/assets/javascripts/security_configuration/api_fuzzing/components/app.vue: on a query error, or when the field isnullbecause the user lacksread_security_resource, the page shows an error alert instead of the form.
How to verify
bin/rspec ee/spec/models/app_sec/fuzzing/api/ci_configuration_spec.rbyarn jest ee/spec/frontend/security_configuration/api_fuzzing/components/app_spec.js- With the console check of !256639 (merged) and its five entries for
ee/spec/features/user_sees_active_nav_items_spec.rbremoved,bin/rspec ee/spec/features/user_sees_active_nav_items_spec.rb:14passes with no console output. Verified locally on 2026-09-22.
Screenshots
Taken from commit bbd9d285 with a temporary feature spec. Success path: the profiles YAML returns two profiles and the form renders as before. Error path: scan_profiles raises, the query returns an error, and the page shows an alert where the form was.
| Success path (unchanged) | Error path (new) |
|---|---|
![]() |
![]() |
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.
References
- Allowlist that carries the five entries this removes: !256639 (merged)
- Split out of !257064 (merged) at the author's request
- Reveal runs that produced the data: !255199 (closed), pipelines https://gitlab.com/gitlab-org/gitlab/-/pipelines/2867469601 and https://gitlab.com/gitlab-org/gitlab/-/pipelines/2872215632
- Catalogue of the original console errors: #628901
Edited by Miguel Rincon

