-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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][ENDPOINT] Trusted Apps - fix error for duplicate fields to correctly mention the field at fault #79853
[SECURITY_SOLUTION][ENDPOINT] Trusted Apps - fix error for duplicate fields to correctly mention the field at fault #79853
Conversation
Pinging @elastic/endpoint-management (Team:Endpoint Management) |
Pinging @elastic/endpoint-app-team (Feature:Endpoint) |
const entryFieldLabels: { [k in TrustedApp['entries'][0]['field']]: string } = { | ||
'process.hash.*': 'Hash', | ||
'process.executable.caseless': 'Path', | ||
'process.code_signature': 'Signer', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, its already part of the Type (TrustedApp
), thus its coming up as required in this object (typescript error). I did not want to exclude it out of the type here in order to keep the type simpler.
No tests or test update? |
@nnamdifrankie The test currently for the Schema do not validate the actual error message text - only that the schema That being said, this particular validation is custom - meaning that its not coming out of the Schema library, but rather our of our own custom validator - so I guess that pattern detailed above can be broken. I will add one (or two) now. Thanks |
Thanks. |
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
…fields to correctly mention the field at fault (elastic#79853) * Fix error for duplicate fields to correctly mention the field at fault * Add new tests to duplicate field validation
…fields to correctly mention the field at fault (elastic#79853) * Fix error for duplicate fields to correctly mention the field at fault * Add new tests to duplicate field validation
Summary
Fixes Trusted Apps API validation for duplicate fields always reporting that
Hash
was at fault even whenPath
might have been the value entered more than once in the UIDuplicate Path's:
Duplicate Hashes: