Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ describe('CrowdstrikeActionsClient class', () => {
> = {}
) => responseActionsClientMock.createIsolateOptions({ ...overrides, agent_type: 'crowdstrike' });

const createCrowdstrikeRunscrtiptOptions = (
const createCrowdstrikeRunscriptOptions = (
overrides: Omit<
Parameters<typeof responseActionsClientMock.createIsolateOptions>[0],
Parameters<typeof responseActionsClientMock.createRunScriptOptions>[0],
'agent_type'
> = {}
) =>
Expand Down Expand Up @@ -501,9 +501,9 @@ describe('CrowdstrikeActionsClient class', () => {
describe('#runscript()', () => {
it('should send action to Crowdstrike', async () => {
await crowdstrikeActionsClient.runscript(
createCrowdstrikeRunscrtiptOptions({
createCrowdstrikeRunscriptOptions({
actionId: '123-456-789',
endpoint_ids: ['1-2-3-cs-agent'],
endpoint_ids: ['1-2-3'],
comment: 'test runscript comment',
parameters: {
raw: 'echo "Hello World"',
Expand All @@ -516,7 +516,7 @@ describe('CrowdstrikeActionsClient class', () => {
subAction: SUB_ACTION.EXECUTE_ADMIN_RTR,
subActionParams: {
command: 'runscript --Raw=```echo "Hello World"```',
endpoint_ids: ['1-2-3-cs-agent'],
endpoint_ids: ['1-2-3'],
actionParameters: {
comment:
'Action triggered from Elastic Security by user [foo] for action [runscript (action id: 123-456-789)]: test runscript comment',
Expand Down Expand Up @@ -637,9 +637,9 @@ describe('CrowdstrikeActionsClient class', () => {
(connectorActionsMock.execute as jest.Mock).mockResolvedValueOnce(actionResponse);

await crowdstrikeActionsClient.runscript(
createCrowdstrikeRunscrtiptOptions({
createCrowdstrikeRunscriptOptions({
actionId: '123-abc-678',
endpoint_ids: ['1-2-3-cs-agent'],
endpoint_ids: ['1-2-3'],
comment: 'test runscript comment',
parameters: {
raw: 'echo "Hello World"',
Expand All @@ -666,7 +666,7 @@ describe('CrowdstrikeActionsClient class', () => {
data: {
combined: {
resources: {
'1-2-3-cs-agent': {
'1-2-3': {
stdout: '',
stderr: '',
errors: [
Expand All @@ -683,9 +683,9 @@ describe('CrowdstrikeActionsClient class', () => {
(connectorActionsMock.execute as jest.Mock).mockResolvedValueOnce(actionResponse);

await crowdstrikeActionsClient.runscript(
createCrowdstrikeRunscrtiptOptions({
createCrowdstrikeRunscriptOptions({
actionId: '456-pqr-789',
endpoint_ids: ['1-2-3-cs-agent'],
endpoint_ids: ['1-2-3'],
parameters: {
raw: 'echo "Hello World"',
},
Expand Down