Skip to content

Commit c8930b7

Browse files
Fix value for process.hash.sha256 draggable (#72142) (#72230)
1 parent 50aa757 commit c8930b7

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_file_details.test.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { BrowserFields } from '../../../../../../common/containers/source';
1111
import { mockBrowserFields } from '../../../../../../common/containers/source/mock';
1212
import '../../../../../../common/mock/match_media';
1313
import { mockTimelineData, TestProviders } from '../../../../../../common/mock';
14+
import { mockEndgameCreationEvent } from '../../../../../../common/mock/mock_endgame_ecs_data';
1415
import { SystemGenericFileDetails, SystemGenericFileLine } from './generic_file_details';
1516
import { useMountAppended } from '../../../../../../common/utils/use_mount_appended';
1617

@@ -61,6 +62,23 @@ describe('SystemGenericFileDetails', () => {
6162
'Evan@zeek-london[generic-text-123](6278)with resultfailureSource128.199.212.120'
6263
);
6364
});
65+
66+
test('it passes string value for processHashSha256', () => {
67+
const wrapper = mount(
68+
<TestProviders>
69+
<SystemGenericFileDetails
70+
contextId="[contextid-123]"
71+
text="[generic-text-123]"
72+
browserFields={mockBrowserFields}
73+
data={mockEndgameCreationEvent}
74+
timelineId="test"
75+
/>
76+
</TestProviders>
77+
);
78+
expect(wrapper.find('SystemGenericFileLine').prop('processHashSha256')).toEqual(
79+
'd4c97ed46046893141652e2ec0056a698f6445109949d7fcabbce331146889ee'
80+
);
81+
});
6482
});
6583

6684
describe('#SystemGenericFileLine', () => {

x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_file_details.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ export const SystemGenericFileDetails = React.memo<GenericDetailsProps>(
240240
const packageVersion: string | null | undefined = get('system.audit.package.version[0]', data);
241241
const processHashMd5: string | null | undefined = get('process.hash.md5[0]', data);
242242
const processHashSha1: string | null | undefined = get('process.hash.sha1[0]', data);
243-
const processHashSha256: string | null | undefined = get('process.hash.sha256', data);
243+
const processHashSha256: string | null | undefined = get('process.hash.sha256[0]', data);
244244
const processPid: number | null | undefined = get('process.pid[0]', data);
245245
const processPpid: number | null | undefined = get('process.ppid[0]', data);
246246
const processName: string | null | undefined = get('process.name[0]', data);

0 commit comments

Comments
 (0)