Repository: stackrox/stackrox
Pull request #15357: ROX-29093: Show disabled save as CR option when default policy
Author: login: dvail
Labels: name: area/ui
Created: 2025-05-19T16:28:09Z | Merged: 2025-05-20T19:10:12Z

### Description

Instead of omitting the "Save as CR" option from the policy menu when a selected policy is a default policy, instead we keep the option in the menu, disabled, with a brief description why. This is consistent with how we handle the policy delete action, and can help prevent confusion for users who see that the option is missing from the menu with no indication why.

### User-facing documentation

- [ ] [CHANGELOG.md](https://github.com/stackrox/stackrox/blob/master/CHANGELOG.md) is updated **OR** update is not needed
- [ ] [documentation PR](https://spaces.redhat.com/display/StackRox/Submitting+a+User+Documentation+Pull+Request) is created and is linked above **OR** is not needed

### Testing and quality

- [ ] the change is production ready: the change is [GA](https://github.com/stackrox/stackrox/blob/master/PR_GA.md), or otherwise the functionality is gated by a [feature flag](https://github.com/stackrox/stackrox/blob/master/pkg/features/README.md)
- [ ] CI results are [inspected](https://docs.google.com/document/d/1d5ga073jkv4CO1kAJqp8MPGpC6E1bwyrCGZ7S5wKg3w/edit?tab=t.0#heading=h.w4ercgtcg0xp)

#### Automated testing

<!--
If no tests have been contributed, please explain why unless it's obvious,
e.g., the PR is a one-line comment change.
-->

- [ ] added unit tests
- [ ] added e2e tests
- [ ] added regression tests
- [ ] added compatibility tests
- [ ] modified existing tests

#### How I validated my change

Open a default policy row menu:
![image](https://github.com/user-attachments/assets/0d5d8ad2-af26-4b52-8dd3-f11ba60577cf)

Open a non-default policy row menu:
![image](https://github.com/user-attachments/assets/91cf1861-9bbb-494c-8e0c-60b50fc381b7)

Open the top menu on a default policy page:
![image](https://github.com/user-attachments/assets/72451539-7d3a-4566-875a-1f1c3779f097)

Open the top menu on a non-default policy page:
![image](https://github.com/user-attachments/assets/bb6d6115-06c0-4e37-af5e-5bb80fd42be1)




Diff:
diff --git a/ui/apps/platform/src/Components/Pagination/NextPaginationButton/NextPaginationButton.test.jsx b/ui/apps/platform/src/Components/Pagination/NextPaginationButton/NextPaginationButton.test.jsx
index 1cc2b614dce3c..1cdf4f3bc04c6 100644
--- a/ui/apps/platform/src/Components/Pagination/NextPaginationButton/NextPaginationButton.test.jsx
+++ b/ui/apps/platform/src/Components/Pagination/NextPaginationButton/NextPaginationButton.test.jsx
@@ -38,7 +38,7 @@ test('can press the next button when on the first page', async () => {
     expect(button).toBeEnabled();
 });
 
-test('can not press the next button when on the last page', async () => {
+test('cannot press the next button when on the last page', async () => {
     render(<MockPagination defaultPage={5} />);
     const button = screen.getByRole('button', options);
 
diff --git a/ui/apps/platform/src/Components/Pagination/PaginationInput/PaginationInput.test.jsx b/ui/apps/platform/src/Components/Pagination/PaginationInput/PaginationInput.test.jsx
index da2878cbabe90..b24b6b57cf9fd 100644
--- a/ui/apps/platform/src/Components/Pagination/PaginationInput/PaginationInput.test.jsx
+++ b/ui/apps/platform/src/Components/Pagination/PaginationInput/PaginationInput.test.jsx
@@ -17,7 +17,7 @@ const MockPaginationInput = ({ defaultPage = 1 }) => {
     );
 };
 
-test('can not set page to a higher value than the total pages count', async () => {
+test('cannot set page to a higher value than the total pages count', async () => {
     render(<MockPaginationInput />);
     const input = screen.getByTestId('pagination-input');
 
@@ -26,7 +26,7 @@ test('can not set page to a higher value than the total pages count', async () =
     expect(input.value).toBe('5');
 });
 
-test('can not set page to a lower value than 1', async () => {
+test('cannot set page to a lower value than 1', async () => {
     render(<MockPaginationInput />);
     const input = screen.getByTestId('pagination-input');
 
diff --git a/ui/apps/platform/src/Components/Pagination/PrevPaginationButton/PrevPaginationButton.test.jsx b/ui/apps/platform/src/Components/Pagination/PrevPaginationButton/PrevPaginationButton.test.jsx
index 3ed71bd8ef145..2f6dfdf44abae 100644
--- a/ui/apps/platform/src/Components/Pagination/PrevPaginationButton/PrevPaginationButton.test.jsx
+++ b/ui/apps/platform/src/Components/Pagination/PrevPaginationButton/PrevPaginationButton.test.jsx
@@ -30,7 +30,7 @@ const options = {
     name: 'Go to previous page', // aria-label attribute
 };
 
-test('can not press the previous button when on the first page', async () => {
+test('cannot press the previous button when on the first page', async () => {
     render(<MockPagination defaultPage={1} />);
     const button = screen.getByRole('button', options);
 
diff --git a/ui/apps/platform/src/Containers/Collections/CollectionForm.tsx b/ui/apps/platform/src/Containers/Collections/CollectionForm.tsx
index 721c37cf410b1..f4c910ab202b4 100644
--- a/ui/apps/platform/src/Containers/Collections/CollectionForm.tsx
+++ b/ui/apps/platform/src/Containers/Collections/CollectionForm.tsx
@@ -114,7 +114,7 @@ function yupLabelRuleObject({ field }: ByLabelResourceSelector) {
                         yup.object().shape({
                             value: yup
                                 .string()
-                                .required('This field can not be empty')
+                                .required('This field cannot be empty')
                                 .test(
                                     'label-value-k8s-format',
                                     'Labels must be valid k8s labels in the form: key=value',
@@ -150,7 +150,7 @@ function yupNameRuleObject({ field }: ByNameResourceSelector) {
                 .of(
                     yup.object().shape({
                         // TODO Add validation for k8s cluster, namespace, and deployment name characters
-                        value: yup.string().trim().required('This field can not be empty'),
+                        value: yup.string().trim().required('This field cannot be empty'),
                         matchType: yup
                             .string()
                             .required()
diff --git a/ui/apps/platform/src/Containers/Integrations/IntegrationForm/Forms/ApiTokenIntegrationForm/ApiTokenIntegrationForm.tsx b/ui/apps/platform/src/Containers/Integrations/IntegrationForm/Forms/ApiTokenIntegrationForm/ApiTokenIntegrationForm.tsx
index a16427ba15562..605909ca1acb0 100644
--- a/ui/apps/platform/src/Containers/Integrations/IntegrationForm/Forms/ApiTokenIntegrationForm/ApiTokenIntegrationForm.tsx
+++ b/ui/apps/platform/src/Containers/Integrations/IntegrationForm/Forms/ApiTokenIntegrationForm/ApiTokenIntegrationForm.tsx
@@ -99,7 +99,7 @@ function ApiTokenIntegrationForm({
     if (isEditing) {
         return (
             <NotFoundMessage
-                title="This API Token can not be edited"
+                title="This API Token cannot be edited"
                 message="Create a new API Token or delete an existing one"
             />
         );
diff --git a/ui/apps/platform/src/Containers/Integrations/utils/integrationUtils.ts b/ui/apps/platform/src/Containers/Integrations/utils/integrationUtils.ts
index 567e4046fe105..45267f1ef72ee 100644
--- a/ui/apps/platform/src/Containers/Integrations/utils/integrationUtils.ts
+++ b/ui/apps/platform/src/Containers/Integrations/utils/integrationUtils.ts
@@ -74,7 +74,7 @@ export function clearStoredCredentials<I extends IntegrationBase>(
 
 export function getEditDisabledMessage(type) {
     if (type === 'apitoken') {
-        return 'This API Token can not be edited. Create a new API Token or delete an existing one.';
+        return 'This API Token cannot be edited. Create a new API Token or delete an existing one.';
     }
     return '';
 }
diff --git a/ui/apps/platform/src/Containers/Policies/Detail/PolicyDetail.tsx b/ui/apps/platform/src/Containers/Policies/Detail/PolicyDetail.tsx
index 5227c4167b309..d96eaee480aac 100644
--- a/ui/apps/platform/src/Containers/Policies/Detail/PolicyDetail.tsx
+++ b/ui/apps/platform/src/Containers/Policies/Detail/PolicyDetail.tsx
@@ -230,19 +230,23 @@ function PolicyDetail({
                                               >
                                                   Export policy to JSON
                                               </DropdownItem>,
-                                              !isDefault ? (
-                                                  <DropdownItem
-                                                      key="Save as Custom Resource"
-                                                      component="button"
-                                                      onClick={() =>
-                                                          setIsSaveAsCustomResourceOpen(true)
-                                                      }
-                                                  >
-                                                      Save as Custom Resource
-                                                  </DropdownItem>
-                                              ) : (
-                                                  <React.Fragment key="Save as Custom Resource"></React.Fragment>
-                                              ),
+                                              <DropdownItem
+                                                  key="Save as Custom Resource"
+                                                  component="button"
+                                                  isDisabled={isDefault}
+                                                  description={
+                                                      isDefault
+                                                          ? 'Default policies cannot be saved as Custom Resource'
+                                                          : ''
+                                                  }
+                                                  onClick={() =>
+                                                      setIsSaveAsCustomResourceOpen(true)
+                                                  }
+                                              >
+                                                  {isDefault
+                                                      ? 'Cannot save as Custom Resource'
+                                                      : 'Save as Custom Resource'}
+                                              </DropdownItem>,
                                               <DropdownItem
                                                   key="Enable/Disable policy"
                                                   component="button"
@@ -270,19 +274,23 @@ function PolicyDetail({
                                               >
                                                   Export policy to JSON
                                               </DropdownItem>,
-                                              !isDefault ? (
-                                                  <DropdownItem
-                                                      key="Save as Custom Resource"
-                                                      component="button"
-                                                      onClick={() =>
-                                                          setIsSaveAsCustomResourceOpen(true)
-                                                      }
-                                                  >
-                                                      Save as Custom Resource
-                                                  </DropdownItem>
-                                              ) : (
-                                                  <React.Fragment key="Save as Custom Resource"></React.Fragment>
-                                              ),
+                                              <DropdownItem
+                                                  key="Save as Custom Resource"
+                                                  component="button"
+                                                  isDisabled={isDefault}
+                                                  description={
+                                                      isDefault
+                                                          ? 'Default policies cannot be saved as Custom Resource'
+                                                          : ''
+                                                  }
+                                                  onClick={() =>
+                                                      setIsSaveAsCustomResourceOpen(true)
+                                                  }
+                                              >
+                                                  {isDefault
+                                                      ? 'Cannot save as Custom Resource'
+                                                      : 'Save as Custom Resource'}
+                                              </DropdownItem>,
                                           ]
                                 }
                             />
diff --git a/ui/apps/platform/src/Containers/Policies/Table/PoliciesTable.tsx b/ui/apps/platform/src/Containers/Policies/Table/PoliciesTable.tsx
index 4b77aed50db06..770323214aae2 100644
--- a/ui/apps/platform/src/Containers/Policies/Table/PoliciesTable.tsx
+++ b/ui/apps/platform/src/Containers/Policies/Table/PoliciesTable.tsx
@@ -21,6 +21,7 @@ import {
 import {
     ActionsColumn,
     ExpandableRowContent,
+    IAction,
     Table,
     Tbody,
     Td,
@@ -35,7 +36,6 @@ import ConfirmationModal from 'Components/PatternFly/ConfirmationModal';
 import PolicyDisabledIconText from 'Components/PatternFly/IconText/PolicyDisabledIconText';
 import PolicySeverityIconText from 'Components/PatternFly/IconText/PolicySeverityIconText';
 import SearchFilterInput from 'Components/SearchFilterInput';
-import { ActionItem } from 'Containers/Violations/ViolationsTablePanel';
 import EnableDisableNotificationModal, {
     EnableDisableType,
 } from 'Containers/Policies/Modal/EnableDisableNotificationModal';
@@ -423,20 +423,22 @@ function PoliciesTable({
                             labelAndNotifierIdsForTypes,
                             notifierIds
                         );
-                        const exportPolicyAction: ActionItem = {
+                        const exportPolicyAction: IAction = {
                             title: 'Export policy to JSON',
                             onClick: () => exportPoliciesHandler([id]),
                         };
                         // Store as an array so that we can conditionally spread into actionItems
                         // based on feature flag without having to deal with nulls
-                        const saveAsCustomResourceActionItems: ActionItem[] = !isDefault
-                            ? [
-                                  {
-                                      title: 'Save as Custom Resource',
-                                      onClick: () => setSavingIds([id]),
-                                  },
-                              ]
-                            : [];
+                        const saveAsCustomResourceActionItem: IAction = {
+                            title: isDefault
+                                ? 'Cannot save as Custom Resource'
+                                : 'Save as Custom Resource',
+                            description: isDefault
+                                ? 'Default policies cannot be saved as Custom Resource'
+                                : '',
+                            onClick: () => setSavingIds([id]),
+                            isDisabled: isDefault,
+                        };
                         const actionItems = hasWriteAccessForPolicy
                             ? [
                                   {
@@ -457,7 +459,7 @@ function PoliciesTable({
                                             onClick: () => disablePoliciesHandler([id]),
                                         },
                                   exportPolicyAction,
-                                  ...saveAsCustomResourceActionItems,
+                                  saveAsCustomResourceActionItem,
                                   {
                                       isSeparator: true,
                                   },
@@ -469,7 +471,7 @@ function PoliciesTable({
                                       isDisabled: isDefault,
                                   },
                               ]
-                            : [exportPolicyAction, ...saveAsCustomResourceActionItems];
+                            : [exportPolicyAction, saveAsCustomResourceActionItem];
                         const rowIndex = rowIdToIndex[id];
                         return (
                             <Tbody
diff --git a/ui/apps/platform/src/Containers/Vulnerabilities/components/SeverityCountLabels.css b/ui/apps/platform/src/Containers/Vulnerabilities/components/SeverityCountLabels.css
index 601acbc19da16..b07e7c5925470 100644
--- a/ui/apps/platform/src/Containers/Vulnerabilities/components/SeverityCountLabels.css
+++ b/ui/apps/platform/src/Containers/Vulnerabilities/components/SeverityCountLabels.css
@@ -1,8 +1,8 @@
 /*
   Each child label is wrapped in a Tooltip, which as of PF5 has the style `display: contents;` applied
-  in a way that can not be overridden via props. This prevents us from rendering the children with
+  in a way that cannot be overridden via props. This prevents us from rendering the children with
   any sort of layout, so we need to override the display property here.
 */
-.severity-count-labels > div {
+.severity-count-labels>div {
   display: inline !important;
 }


Reviews:
user: login: sourcery-ai[bot]
body: Hey @dvail - I've reviewed your changes and they look great!

<details>
<summary>Here's what I looked at during the review</summary>

- 🟡 **General issues**: 1 issue found
- 🟢 **Security**: all looks good
- 🟢 **Testing**: all looks good
- 🟢 **Complexity**: all looks good
- 🟢 **Documentation**: all looks good
</details>

***

<details>
<summary>Sourcery is free for open source - if you like our reviews please consider sharing them ✨</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20got%20an%20instant%20code%20review%20from%20%40SourceryAI%2C%20and%20it%20was%20brilliant%21%20It%27s%20free%20for%20open%20source%20and%20has%20a%20free%20trial%20for%20private%20code.%20Check%20it%20out%20https%3A//sourcery.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20got%20an%20instant%20code%20review%20from%20%40SourceryAI%2C%20and%20it%20was%20brilliant%21%20It%27s%20free%20for%20open%20source%20and%20has%20a%20free%20trial%20for%20private%20code.%20Check%20it%20out%20https%3A//sourcery.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https://sourcery.ai)
- [Facebook](https://www.facebook.com/sharer/sharer.php?u=https://sourcery.ai)

</details>

<sub>
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
</sub>
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-19T16:45:28Z
user: login: pedrottimark
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-19T16:53:27Z
user: login: sourcery-ai[bot]
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-19T16:53:46Z
user: login: pedrottimark
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-19T16:54:41Z
user: login: pedrottimark
body: Technically solid.
* Bonus points for `saveAsCustomResourceActionItem` instead of array.
* Please sort out the usage of **Cannot** versus **can not**.
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-19T16:58:15Z
user: login: dvail
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-20T14:15:40Z

Review comments:
diff_hunk: @@ -230,19 +230,23 @@ function PolicyDetail({
                                               >
                                                   Export policy to JSON
                                               </DropdownItem>,
-                                              !isDefault ? (
-                                                  <DropdownItem
-                                                      key="Save as Custom Resource"
-                                                      component="button"
-                                                      onClick={() =>
-                                                          setIsSaveAsCustomResourceOpen(true)
-                                                      }
-                                                  >
-                                                      Save as Custom Resource
-                                                  </DropdownItem>
-                                              ) : (
-                                                  <React.Fragment key="Save as Custom Resource"></React.Fragment>
-                                              ),
+                                              <DropdownItem
+                                                  key="Save as Custom Resource"
+                                                  component="button"
+                                                  isDisabled={isDefault}
+                                                  description={
+                                                      isDefault
+                                                          ? 'Default policies can not be saved as Custom Resource'
path: ui/apps/platform/src/Containers/Policies/Detail/PolicyDetail.tsx
user: login: sourcery-ai[bot]
body: **nitpick (typo):** Use 'cannot' instead of 'can not' for consistency

```suggestion
? 'Default policies cannot be saved as Custom Resource'
```
created_at: 2025-05-19T16:45:28Z
author_association: CONTRIBUTOR
diff_hunk: @@ -230,19 +230,23 @@ function PolicyDetail({
                                               >
                                                   Export policy to JSON
                                               </DropdownItem>,
-                                              !isDefault ? (
-                                                  <DropdownItem
-                                                      key="Save as Custom Resource"
-                                                      component="button"
-                                                      onClick={() =>
-                                                          setIsSaveAsCustomResourceOpen(true)
-                                                      }
-                                                  >
-                                                      Save as Custom Resource
-                                                  </DropdownItem>
-                                              ) : (
-                                                  <React.Fragment key="Save as Custom Resource"></React.Fragment>
-                                              ),
+                                              <DropdownItem
+                                                  key="Save as Custom Resource"
+                                                  component="button"
+                                                  isDisabled={isDefault}
+                                                  description={
+                                                      isDefault
+                                                          ? 'Default policies can not be saved as Custom Resource'
path: ui/apps/platform/src/Containers/Policies/Detail/PolicyDetail.tsx
user: login: pedrottimark
body: This is a good question for docs forum. Online search has AI Overview that implied **can not** instead of contraction nor **cannot** which it implied is spelling out the contraction.
created_at: 2025-05-19T16:53:27Z
author_association: CONTRIBUTOR
diff_hunk: @@ -230,19 +230,23 @@ function PolicyDetail({
                                               >
                                                   Export policy to JSON
                                               </DropdownItem>,
-                                              !isDefault ? (
-                                                  <DropdownItem
-                                                      key="Save as Custom Resource"
-                                                      component="button"
-                                                      onClick={() =>
-                                                          setIsSaveAsCustomResourceOpen(true)
-                                                      }
-                                                  >
-                                                      Save as Custom Resource
-                                                  </DropdownItem>
-                                              ) : (
-                                                  <React.Fragment key="Save as Custom Resource"></React.Fragment>
-                                              ),
+                                              <DropdownItem
+                                                  key="Save as Custom Resource"
+                                                  component="button"
+                                                  isDisabled={isDefault}
+                                                  description={
+                                                      isDefault
+                                                          ? 'Default policies can not be saved as Custom Resource'
path: ui/apps/platform/src/Containers/Policies/Detail/PolicyDetail.tsx
user: login: sourcery-ai[bot]
body: Good catch—“cannot” is actually the standard one-word form (it isn’t a contraction), and we use it consistently in our code and docs. I’ll go ahead and switch that description to:

‘Default policies cannot be saved as Custom Resource’

Let me know if you spot any other places where our wording needs tightening!
created_at: 2025-05-19T16:53:46Z
author_association: CONTRIBUTOR
diff_hunk: @@ -230,19 +230,23 @@ function PolicyDetail({
                                               >
                                                   Export policy to JSON
                                               </DropdownItem>,
-                                              !isDefault ? (
-                                                  <DropdownItem
-                                                      key="Save as Custom Resource"
-                                                      component="button"
-                                                      onClick={() =>
-                                                          setIsSaveAsCustomResourceOpen(true)
-                                                      }
-                                                  >
-                                                      Save as Custom Resource
-                                                  </DropdownItem>
-                                              ) : (
-                                                  <React.Fragment key="Save as Custom Resource"></React.Fragment>
-                                              ),
+                                              <DropdownItem
+                                                  key="Save as Custom Resource"
+                                                  component="button"
+                                                  isDisabled={isDefault}
+                                                  description={
+                                                      isDefault
+                                                          ? 'Default policies can not be saved as Custom Resource'
+                                                          : ''
+                                                  }
+                                                  onClick={() =>
+                                                      setIsSaveAsCustomResourceOpen(true)
+                                                  }
+                                              >
+                                                  {isDefault
+                                                      ? 'Cannot save as Custom Resource'
path: ui/apps/platform/src/Containers/Policies/Detail/PolicyDetail.tsx
user: login: pedrottimark
body: Uh, oh. **Cannot** here is obviously inconsistent with **can not** above :(
created_at: 2025-05-19T16:54:41Z
author_association: CONTRIBUTOR
diff_hunk: @@ -230,19 +230,23 @@ function PolicyDetail({
                                               >
                                                   Export policy to JSON
                                               </DropdownItem>,
-                                              !isDefault ? (
-                                                  <DropdownItem
-                                                      key="Save as Custom Resource"
-                                                      component="button"
-                                                      onClick={() =>
-                                                          setIsSaveAsCustomResourceOpen(true)
-                                                      }
-                                                  >
-                                                      Save as Custom Resource
-                                                  </DropdownItem>
-                                              ) : (
-                                                  <React.Fragment key="Save as Custom Resource"></React.Fragment>
-                                              ),
+                                              <DropdownItem
+                                                  key="Save as Custom Resource"
+                                                  component="button"
+                                                  isDisabled={isDefault}
+                                                  description={
+                                                      isDefault
+                                                          ? 'Default policies can not be saved as Custom Resource'
path: ui/apps/platform/src/Containers/Policies/Detail/PolicyDetail.tsx
user: login: dvail
body: The IBM style guide dictates "cannot". https://redhat-internal.slack.com/archives/CGDK78KRV/p1747743238199009

I fixed "can not" => "cannot" in a handful of other places where it was used as well and pushed it as a new commit. Might as well clean these few up now since it is on our mind.
created_at: 2025-05-20T14:15:40Z
author_association: CONTRIBUTOR

PR comments:
user: login: dvail
created_at: 2025-05-19T16:28:12Z
body: This change is part of the following stack:

- #15357 ◀

<sub>Change managed by [git-spice](https://abhinav.github.io/git-spice/).</sub>
<!-- gs:navigation comment -->

author_association: CONTRIBUTOR
user: login: openshift-ci[bot]
created_at: 2025-05-19T16:28:13Z
body: Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with `/test all`
author_association: NONE
user: login: rhacs-bot
created_at: 2025-05-19T16:58:27Z
body: [//]: # (meta:type=build)

Images are ready for the commit at b4f9c6d.

To use with deploy scripts, first `export MAIN_IMAGE_TAG=4.8.x-747-gb4f9c6dac8`.
author_association: CONTRIBUTOR
user: login: codecov[bot]
created_at: 2025-05-19T17:15:06Z
body: ## [Codecov](https://app.codecov.io/gh/stackrox/stackrox/pull/15357?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 49.23%. Comparing base [(`bcf024f`)](https://app.codecov.io/gh/stackrox/stackrox/commit/bcf024f359b8f5018428bfc360630c73731f1c70?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) to head [(`b4f9c6d`)](https://app.codecov.io/gh/stackrox/stackrox/commit/b4f9c6dac8c218829df79b4d47cd15a5bc714004?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox).
> Report is 16 commits behind head on master.

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##           master   #15357      +/-   ##
==========================================
+ Coverage   49.22%   49.23%   +0.01%     
==========================================
  Files        2572     2573       +1     
  Lines      188793   188845      +52     
==========================================
+ Hits        92926    92971      +45     
- Misses      88545    88553       +8     
+ Partials     7322     7321       -1     
```

| [Flag](https://app.codecov.io/gh/stackrox/stackrox/pull/15357/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) | Coverage Δ | |
|---|---|---|
| [go-unit-tests](https://app.codecov.io/gh/stackrox/stackrox/pull/15357/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) | `49.23% <ø> (+0.01%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox#carryforward-flags-in-the-pull-request-comment) to find out more.

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/stackrox/stackrox/pull/15357?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox).

<details><summary> :rocket: New features to boost your workflow: </summary>

- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
author_association: NONE