Skip to content

Commit

Permalink
Merge pull request #22 from polarityio/develop
Browse files Browse the repository at this point in the history
Fix asset searches so not all assets are returned, add warning on invalid incident fields
  • Loading branch information
sarus authored Sep 28, 2024
2 parents c203a52 + 7c4407d commit d48ae3d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ module.exports = {
key: 'incidentQueryFields',
name: 'Incident Query Fields',
description:
'A comma separated list of fields to search when querying for Incidents. Incident searches are done for IPs, domains, CVEs, annotated entities and any added custom types. NOTE: If a field is not in this list, it will not be searched for Incident Queries.',
'A comma separated list of fields to search when querying for Incidents. Incident searches are done for IPs, domains, CVEs, annotated entities and any added custom types. IMPORTANT -- ServiceNow does not return an error if invalid fields are provided and will instead return all records.',
default: 'short_description, description, work_notes',
type: 'text',
userCanEdit: false,
Expand Down
2 changes: 1 addition & 1 deletion config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
{
"key": "incidentQueryFields",
"name": "Incident Query Fields",
"description": "A comma separated list of fields to search when querying for Incidents. Incident searches are done for IPs, domains, CVEs, annotated entities and any added custom types. NOTE: If a field is not in this list, it will not be searched for Incident Queries.",
"description": "A comma separated list of fields to search when querying for Incidents. Incident searches are done for IPs, domains, CVEs, annotated entities and any added custom types. IMPORTANT -- ServiceNow does not return an error if invalid fields are provided and will instead return all records.",
"default": "short_description, description, work_notes",
"type": "text",
"userCanEdit": false,
Expand Down
2 changes: 1 addition & 1 deletion src/querying/queryAssets.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const queryAssets = async (entity, options, requestWithDefaults, Logger) => {
get('assetTableFields'),
split(','),
map((field) => `${trim(field)}CONTAINS${entity.value}`),
join('^OR')
join('^NQ')
)(options);

const requestOptions = {
Expand Down

0 comments on commit d48ae3d

Please sign in to comment.