Update file check_manifest_coherence_service.rb
What does this MR do and why?
References
Replaces Gitlab::Json.parse with Gitlab::Json.safe_parse in app/services/packages/npm/check_manifest_coherence_service.rb to fix a Gitlab/JsonSafeParse RuboCop violation.
safe_parse adds built-in protections against excessively large JSON payloads and deeply nested JSON structures, improving the security and resilience of the npm manifest coherence check service.
References
- Issue: #586035
- Related tracking issue: #586028 (closed)
Screenshots or screen recordings
Not applicable — no UI changes.
How to set up and validate locally
- Find the changed file: app/services/packages/npm/check_manifest_coherence_service.rb
- Confirm Gitlab::Json.parse has been replaced with Gitlab::Json.safe_parse
- Run the existing tests for this service: bundle exec rspec spec/services/packages/npm/check_manifest_coherence_service_spec.rb
- Verify all tests pass with no regressions
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.