Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Solution][Timeline] Fix value for process.hash.sha256 draggable #72142

Merged
Show file tree
Hide file tree
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 @@ -11,6 +11,7 @@ import { BrowserFields } from '../../../../../../common/containers/source';
import { mockBrowserFields } from '../../../../../../common/containers/source/mock';
import '../../../../../../common/mock/match_media';
import { mockTimelineData, TestProviders } from '../../../../../../common/mock';
import { mockEndgameCreationEvent } from '../../../../../../common/mock/mock_endgame_ecs_data';
import { SystemGenericFileDetails, SystemGenericFileLine } from './generic_file_details';
import { useMountAppended } from '../../../../../../common/utils/use_mount_appended';

Expand Down Expand Up @@ -61,6 +62,23 @@ describe('SystemGenericFileDetails', () => {
'Evan@zeek-london[generic-text-123](6278)with resultfailureSource128.199.212.120'
);
});

test('it passes string value for processHashSha256', () => {
const wrapper = mount(
<TestProviders>
<SystemGenericFileDetails
contextId="[contextid-123]"
text="[generic-text-123]"
browserFields={mockBrowserFields}
data={mockEndgameCreationEvent}
timelineId="test"
/>
</TestProviders>
);
expect(wrapper.find('SystemGenericFileLine').prop('processHashSha256')).toEqual(
'd4c97ed46046893141652e2ec0056a698f6445109949d7fcabbce331146889ee'
);
});
});

describe('#SystemGenericFileLine', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export const SystemGenericFileDetails = React.memo<GenericDetailsProps>(
const packageVersion: string | null | undefined = get('system.audit.package.version[0]', data);
const processHashMd5: string | null | undefined = get('process.hash.md5[0]', data);
const processHashSha1: string | null | undefined = get('process.hash.sha1[0]', data);
const processHashSha256: string | null | undefined = get('process.hash.sha256', data);
const processHashSha256: string | null | undefined = get('process.hash.sha256[0]', data);
const processPid: number | null | undefined = get('process.pid[0]', data);
const processPpid: number | null | undefined = get('process.ppid[0]', data);
const processName: string | null | undefined = get('process.name[0]', data);
Expand Down