Skip to content

Commit 3a5c86e

Browse files
Fixes from PR feedback
1 parent 068f6f2 commit 3a5c86e

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ describe('rules_schema', () => {
762762
expect(fields).toEqual(expected);
763763
});
764764

765-
test('should return 5 fields for a rule of type "threat_match"', () => {
765+
test('should return 8 fields for a rule of type "threat_match"', () => {
766766
const fields = addThreatMatchFields({ type: 'threat_match' });
767767
expect(fields.length).toEqual(8);
768768
});

x-pack/plugins/security_solution/common/detection_engine/schemas/types/threat_mapping.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe('threat_mapping', () => {
3535
expect(message.schema).toEqual(payload);
3636
});
3737

38-
test('it should NOT validate an extra entry item', () => {
38+
test('it should fail validation with an extra entry item', () => {
3939
const payload: ThreatMappingEntries & Array<{ extra: string }> = [
4040
{
4141
field: 'field.one',
@@ -52,7 +52,7 @@ describe('threat_mapping', () => {
5252
expect(message.schema).toEqual({});
5353
});
5454

55-
test('it should NOT validate a non string', () => {
55+
test('it should fail validation with a non string', () => {
5656
const payload = ([
5757
{
5858
field: 5,
@@ -68,7 +68,7 @@ describe('threat_mapping', () => {
6868
expect(message.schema).toEqual({});
6969
});
7070

71-
test('it should NOT validate a wrong type', () => {
71+
test('it should fail validation with a wrong type', () => {
7272
const payload = ([
7373
{
7474
field: 'field.one',
@@ -109,7 +109,7 @@ describe('threat_mapping', () => {
109109
});
110110
});
111111

112-
test('it should NOT validate an extra key', () => {
112+
test('it should fail validate with an extra key', () => {
113113
const payload: ThreatMapping & Array<{ extra: string }> = [
114114
{
115115
entries: [
@@ -131,7 +131,7 @@ describe('threat_mapping', () => {
131131
expect(message.schema).toEqual({});
132132
});
133133

134-
test('it should NOT validate an extra inner entry', () => {
134+
test('it should fail validate with an extra inner entry', () => {
135135
const payload: ThreatMapping & Array<{ entries: Array<{ extra: string }> }> = [
136136
{
137137
entries: [
@@ -153,7 +153,7 @@ describe('threat_mapping', () => {
153153
expect(message.schema).toEqual({});
154154
});
155155

156-
test('it should NOT validate an extra inner entry with the wrong data type', () => {
156+
test('it should fail validate with an extra inner entry with the wrong data type', () => {
157157
const payload = ([
158158
{
159159
entries: [
@@ -176,7 +176,7 @@ describe('threat_mapping', () => {
176176
expect(message.schema).toEqual({});
177177
});
178178

179-
test('it should not validate concurrent_searches if it is < 0', () => {
179+
test('it should fail validation when concurrent_searches is < 0', () => {
180180
const payload = -1;
181181
const decoded = concurrent_searches.decode(payload);
182182
const checked = exactCheck(payload, decoded);
@@ -187,7 +187,7 @@ describe('threat_mapping', () => {
187187
expect(message.schema).toEqual({});
188188
});
189189

190-
test('it should not validate concurrent_searches if it is 0', () => {
190+
test('it should fail validation when concurrent_searches is 0', () => {
191191
const payload = 0;
192192
const decoded = concurrent_searches.decode(payload);
193193
const checked = exactCheck(payload, decoded);
@@ -198,7 +198,7 @@ describe('threat_mapping', () => {
198198
expect(message.schema).toEqual({});
199199
});
200200

201-
test('it should not validate items_per_search if it is 0', () => {
201+
test('it should fail validation when items_per_search is 0', () => {
202202
const payload = 0;
203203
const decoded = items_per_search.decode(payload);
204204
const checked = exactCheck(payload, decoded);
@@ -209,7 +209,7 @@ describe('threat_mapping', () => {
209209
expect(message.schema).toEqual({});
210210
});
211211

212-
test('it should not validate items_per_search if it < 0', () => {
212+
test('it should fail validation when items_per_search is < 0', () => {
213213
const payload = -1;
214214
const decoded = items_per_search.decode(payload);
215215
const checked = exactCheck(payload, decoded);

x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/create_threat_signals.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,7 @@ export const createThreatSignals = async ({
9090

9191
while (threatList.hits.hits.length !== 0) {
9292
const chunks = chunk(itemsPerSearch, threatList.hits.hits);
93-
logger.debug(
94-
buildRuleMessage(
95-
`${chunks.length} concurrent indicator searches are starting. Each search can have up to ${itemsPerSearch} indicator items per search`
96-
)
97-
);
93+
logger.debug(buildRuleMessage(`${chunks.length} concurrent indicator searches are starting.`));
9894
const concurrentSearchesPerformed = chunks.map<Promise<SearchAfterAndBulkCreateReturnType>>(
9995
(slicedChunk) =>
10096
createThreatSignal({

0 commit comments

Comments
 (0)