Skip to content

Fail when FIPS mode is enabled

Fabien Catteau requested to merge fail-if-fips-mode into main

What does this MR do?

Fail when FIPS mode is enabled

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab/-/issues/366816

Testing

One-shot test via gitlab-org/security-products/tests/js-npm!13595 (closed)

The LS job that emulates the FIPS mode fails as expected. See https://gitlab.com/gitlab-org/security-products/tests/js-npm/-/jobs/2680441729#L27

FIPS mode not supported
Uploading artifacts for failed job
00:00
Uploading artifacts...
WARNING: gl-license-scanning-report.json: no matching files. Ensure that the artifact path is relative to the working directory 
ERROR: No files to upload                          
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 1

Excerpt of the CI config:

license_scanning:
  stage: test
  variables:
    LICENSE_FINDER_COMMIT_SHA: "672b4d18bb50995d241c1925c352dbdc3ca75eca"
  image:
    name: registry.gitlab.com/gitlab-org/security-products/analyzers/license-finder:$LICENSE_FINDER_COMMIT_SHA

license_scanning-fips:
  extends: license_scanning
  variables:
    CI_GITLAB_FIPS_MODE: "true"

See https://gitlab.com/gitlab-org/security-products/tests/js-npm/-/pipelines/580487605

Screenshot_2022-07-05_at_16.09.12

Does this MR meet the acceptance criteria?

Edited by Fabien Catteau

Merge request reports