Skip to content

Commit a77afb9

Browse files
authored
[EDR Workflows][FF Cleanup] Remove responseActionUploadEnabled feature flag (#236914)
Removes the `responseActionUploadEnabled` feature flag (enabled in v8.9). The upload response action is now always available without feature flag gating.
1 parent 03a3540 commit a77afb9

File tree

7 files changed

+43
-61
lines changed

7 files changed

+43
-61
lines changed

x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ export const allowedExperimentalValues = Object.freeze({
4242
*/
4343
socTrendsEnabled: false,
4444

45-
/**
46-
* Enables the `upload` endpoint response action (v8.9)
47-
*/
48-
responseActionUploadEnabled: true,
49-
5045
/**
5146
* Enables Automated Endpoint Process actions
5247
*/

x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/upload_action.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ describe.skip('When using `upload` response action', () => {
6868
user = userEvent.setup({ advanceTimers: jest.advanceTimersByTime });
6969
const mockedContext = createAppRootMockRenderer();
7070

71-
mockedContext.setExperimentalFlag({ responseActionUploadEnabled: true });
7271
apiMocks = responseActionsHttpMocks(mockedContext.coreStart.http);
7372
endpointPrivileges = { ...getEndpointAuthzInitialStateMock(), loading: false };
7473
endpointCapabilities = [...ENDPOINT_CAPABILITIES];

x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_responder/lib/console_commands_definition.ts

Lines changed: 41 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ export const getEndpointConsoleCommands = ({
184184
}: GetEndpointConsoleCommandsOptions): CommandDefinition[] => {
185185
const featureFlags = ExperimentalFeaturesService.get();
186186
const {
187-
responseActionUploadEnabled: isUploadEnabled,
188187
crowdstrikeRunScriptEnabled,
189188
microsoftDefenderEndpointRunScriptEnabled,
190189
microsoftDefenderEndpointCancelEnabled,
@@ -484,51 +483,48 @@ export const getEndpointConsoleCommands = ({
484483
];
485484

486485
// `upload` command
487-
// planned for 8.9
488-
if (isUploadEnabled) {
489-
consoleCommands.push({
490-
name: 'upload',
491-
about: getCommandAboutInfo({
492-
aboutInfo: CONSOLE_COMMANDS.upload.about,
493-
isSupported: doesEndpointSupportCommand('upload'),
494-
}),
495-
RenderComponent: UploadActionResult,
496-
meta: commandMeta,
497-
exampleUsage: 'upload --file --overwrite --comment "script to fix registry"',
498-
exampleInstruction: ENTER_OR_ADD_COMMENT_ARG_INSTRUCTION,
499-
validate: capabilitiesAndPrivilegesValidator(agentType),
500-
mustHaveArgs: true,
501-
args: {
502-
file: {
503-
required: true,
504-
allowMultiples: false,
505-
about: CONSOLE_COMMANDS.upload.args.file.about,
506-
mustHaveValue: 'truthy',
507-
SelectorComponent: ArgumentFileSelector,
508-
},
509-
overwrite: {
510-
required: false,
511-
allowMultiples: false,
512-
about: CONSOLE_COMMANDS.upload.args.overwrite.about,
513-
mustHaveValue: false,
514-
},
515-
comment: {
516-
required: false,
517-
allowMultiples: false,
518-
mustHaveValue: 'non-empty-string',
519-
about: COMMENT_ARG_ABOUT,
520-
},
486+
consoleCommands.push({
487+
name: 'upload',
488+
about: getCommandAboutInfo({
489+
aboutInfo: CONSOLE_COMMANDS.upload.about,
490+
isSupported: doesEndpointSupportCommand('upload'),
491+
}),
492+
RenderComponent: UploadActionResult,
493+
meta: commandMeta,
494+
exampleUsage: 'upload --file --overwrite --comment "script to fix registry"',
495+
exampleInstruction: ENTER_OR_ADD_COMMENT_ARG_INSTRUCTION,
496+
validate: capabilitiesAndPrivilegesValidator(agentType),
497+
mustHaveArgs: true,
498+
args: {
499+
file: {
500+
required: true,
501+
allowMultiples: false,
502+
about: CONSOLE_COMMANDS.upload.args.file.about,
503+
mustHaveValue: 'truthy',
504+
SelectorComponent: ArgumentFileSelector,
521505
},
522-
helpGroupLabel: HELP_GROUPS.responseActions.label,
523-
helpGroupPosition: HELP_GROUPS.responseActions.position,
524-
helpCommandPosition: 7,
525-
helpDisabled: !doesEndpointSupportCommand('upload'),
526-
helpHidden: !getRbacControl({
527-
commandName: 'upload',
528-
privileges: endpointPrivileges,
529-
}),
530-
});
531-
}
506+
overwrite: {
507+
required: false,
508+
allowMultiples: false,
509+
about: CONSOLE_COMMANDS.upload.args.overwrite.about,
510+
mustHaveValue: false,
511+
},
512+
comment: {
513+
required: false,
514+
allowMultiples: false,
515+
mustHaveValue: 'non-empty-string',
516+
about: COMMENT_ARG_ABOUT,
517+
},
518+
},
519+
helpGroupLabel: HELP_GROUPS.responseActions.label,
520+
helpGroupPosition: HELP_GROUPS.responseActions.position,
521+
helpCommandPosition: 7,
522+
helpDisabled: !doesEndpointSupportCommand('upload'),
523+
helpHidden: !getRbacControl({
524+
commandName: 'upload',
525+
privileges: endpointPrivileges,
526+
}),
527+
});
532528

533529
if (microsoftDefenderEndpointCancelEnabled) {
534530
const isSupported = canCancelForCurrentContext();

x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_responder/lib/integration_tests/console_commands_definition.test.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ describe('When displaying Endpoint Response Actions', () => {
4444

4545
describe('for agent type endpoint', () => {
4646
beforeEach(() => {
47-
(ExperimentalFeaturesService.get as jest.Mock).mockReturnValue({
48-
responseActionUploadEnabled: true,
49-
});
47+
(ExperimentalFeaturesService.get as jest.Mock).mockReturnValue({});
5048
commands = getEndpointConsoleCommands({
5149
agentType: 'endpoint',
5250
endpointAgentId: '123',

x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/hooks.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,6 @@ export const useActionsLogFilter = ({
339339
: RESPONSE_ACTION_API_COMMANDS_NAMES.filter((commandName) => {
340340
const featureFlags = ExperimentalFeaturesService.get();
341341

342-
// upload - v8.9
343-
if (commandName === 'upload' && !featureFlags.responseActionUploadEnabled) {
344-
return false;
345-
}
346-
347342
if (
348343
commandName === 'runscript' &&
349344
!featureFlags.microsoftDefenderEndpointRunScriptEnabled &&

x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_response_actions_list/integration_tests/response_actions_log.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1525,7 +1525,6 @@ describe('Response actions history', () => {
15251525

15261526
beforeEach(() => {
15271527
featureFlags = {
1528-
responseActionUploadEnabled: true,
15291528
crowdstrikeRunScriptEnabled: true,
15301529
microsoftDefenderEndpointCancelEnabled: true,
15311530
};

x-pack/solutions/security/plugins/security_solution/server/config.mock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import type { ConfigType } from './config';
1313
import { duration } from 'moment';
1414

1515
export const createMockConfig = (): ConfigType => {
16-
const enableExperimental: Array<keyof ExperimentalFeatures> = ['responseActionUploadEnabled'];
16+
const enableExperimental: Array<keyof ExperimentalFeatures> = [];
1717

1818
return {
1919
[SIGNALS_INDEX_KEY]: DEFAULT_SIGNALS_INDEX,

0 commit comments

Comments
 (0)