Enable On Demand DAST Scans in FIPS Mode
Given the transition to Browser based DAST and the fact that the Browser Based DAST scanner is FIPS compliant, we can start offering on-demand Scans when GitLab is running in FIPS mode.
Since Browser Based On Demand Scans will be available through the feature flag dast_ods_browser_based_scanner
, On Demand Scans when GitLab is running in FIPS mode will also be enabled when the feature flag is enabled.
Proposal
- Users should be able to navigate to the On Demand Scans page directly
/on_demand_scans#/all
for a particular project - Users should be able to trigger an On Demand Scan using the GitLab API
- Users should see the menu item "On-Demand Scans" under "Security and Compliance"
- Modify the On Demand DAST Scan template to use the FIPS image
- Modify the DAST Runner Validation Template to use the FIPS image
Implementation Plan
Basic Predicate: If GitLab is running in FIPS mode, On Demand Scans feature should be available.
-
ee/app/controllers/projects/on_demand_scans_controller.rb
- Modify thecheck_fips_mode
action to return 200 if GitLab is running in FIPS mode and the feature flag is enabled -
ee/lib/ee/gitlab/security/scan_configuration.rb
- Modify theon_demand_available
to return true whentype == :dast
. If GitLab is running in FIPS mode, then true must be returned only when the feature flag is enabled. -
ee/lib/ee/sidebars/projects/menus/security_compliance_menu.rb
- Modify theon_demand_scans_menu_item
. If GitLab is running in FIPS mode and the feature flag is enabled, then the On Demand Scans menu item should be shown. -
ee/app/policies/ee/project_policy.rb
- Modify theon_demand_scans_enabled
condition. If GitLab is running in FIPS mode, then true must be returned only when the feature flag is enabled. - Modify the On Demand DAST Scan template to use the FIPS image when GitLab is running in FIPS Mode and the Feature Flag is enabled.
- Modify the DAST Runner Validation Template to use the FIPS image
Verification and Success Criteria:
If GitLab is running in FIPS mode and the feature flag on_demand_scans_enabled
is enabled:
-
Users should be able to see the menu item appear in their project menu.
-
Users should be able to trigger an On Demand Scan using the GitLab API (`Mutation.dastOnDemandScanCreate`).
-
Direct access to the On Demand Scans page is allowed.
-
The DAST card on the Security Configuration page shows the "Available on demand" badge.
Previous Work
- Remove available on-demand badge from ODS when ... (!131137 - merged)
- Disable On Demand DAST Scans in FIPS mode (!130744 - merged)
- https://gitlab.com/gitlab-org/gitlab/-/issues/409061+
Related Epic: &11429 (closed)