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][Detections] Adds Nested CTI row renderer #96275

Merged
merged 33 commits into from
Apr 16, 2021

Commits on Apr 13, 2021

  1. Configuration menu
    Copy the full SHA
    20dd329 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6a1a613 View commit details
    Browse the repository at this point in the history
  3. Test and implement CTI row renderer

    The display details are not yet implemented, but those will be fleshed
    out in the ThreatMatchRow component.
    rylnd committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    9b12c87 View commit details
    Browse the repository at this point in the history
  4. Pass full fields data to our row renderers

    This data is not used by any existing row renderers and so this commit
    is mostly just plumbing that data through.
    
    This is necessary, however, for our new threat match row renderer as it
    requires nested fields, which cannot be retrieved through the mechanism
    that retrieves the existing row renderer data. However, these nested
    fields are available, if requested, through this other data structure,
    hence this plumbing.
    
    For now to minimize changes I'm marking this as an optional field;
    however in reality a value will always be present.
    rylnd committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    e373e78 View commit details
    Browse the repository at this point in the history
  5. Rewrite existing row renderer in terms of flattened data

    Updates logic, tests and mocks accordingly.
    rylnd committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    f42ba60 View commit details
    Browse the repository at this point in the history
  6. Moving logic into discrete files

    * helpers
    * explicit fields file, which will hopefully be part of the renderer API
      at some point
    * parent component to split data into "rows" as defined by our renderer
    * row component for stateless presentation of a single match
    rylnd committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    10a53f8 View commit details
    Browse the repository at this point in the history
  7. Register threat match row rendere

    Adds tentative copy, example row, and accompanying mock data.
    rylnd committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    9d7afd0 View commit details
    Browse the repository at this point in the history
  8. WIP: Rendering draggable fields but hit the data loss issue with nest…

    …ed fields being flattened
    rylnd committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    adf7067 View commit details
    Browse the repository at this point in the history
  9. WIP: implementing row renderer against new data format

    I haven't yet deleted the old (new?) unused path yet. Cleanup to come.
    rylnd committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    6fc1d90 View commit details
    Browse the repository at this point in the history
  10. Updating based on new data

    * Rewrites isInstance logic for new data as helper, hasThreatMatchValue
    * Updating types and tests
      * Adds to the previously empty ThreatEcs
    rylnd committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    c2eb905 View commit details
    Browse the repository at this point in the history
  11. Revert "Pass full fields data to our row renderers"

    This reverts commit 19c93ee.
    
    We ended up extending the existing data (albeit from the fields
    response!).
    rylnd committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    b20b71b View commit details
    Browse the repository at this point in the history
  12. Fix draggables

    * adds contextId and eventId to pass to draggable
    * We don't have a order-independent key for each individual
      ThreatMatchRow, due to matched.id not being mapped/returned in the
      fields response
    * Fixes up a few things related to using the new data format
    rylnd committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    39f1880 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    3477d27 View commit details
    Browse the repository at this point in the history
  14. Fix example data for CTI row renderer

    * Adds missing Threat ECS types
    rylnd committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    0a6f6fd View commit details
    Browse the repository at this point in the history
  15. Move CTI field constants to common folder

    In order to use these in both the row renderer and the server request,
    we need to move them to common/
    rylnd committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    f6f887c View commit details
    Browse the repository at this point in the history
  16. Remove redundant CTI fields from client request

    These are currently hardcoded on the backend of the events/all query
    (via TIMELINE_EVENTS_FIELDS); declaring them on both ends is arguably
    confusing, and we're going with YAGNI for now.
    rylnd committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    72b5b3f View commit details
    Browse the repository at this point in the history
  17. Add missing graphQL type

    This was causing type errors as this enum exists both here and in
    common/, and I had only updated one of them.
    rylnd committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    f95f8e3 View commit details
    Browse the repository at this point in the history
  18. Updates tests

    One is still failing due to an outdated test subject, but I expect this
    to change after an upcoming meeting so leaving it for now.
    rylnd committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    838e548 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2021

  1. Configuration menu
    Copy the full SHA
    73a3d1d View commit details
    Browse the repository at this point in the history
  2. Split ThreatMatchRow into subcomponents

    One for displaying match details, and another for indicator details
    
    The indicator details will be sparse, so there's going to be some
    conditional rendering in there.
    rylnd committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    90f6004 View commit details
    Browse the repository at this point in the history
  3. Make CTI row renderer look nice

    * Adds translations for copy
    * Fixes most of our layout woes with more flexbox!
    * Conditional rendering of indicator details based on data
    * tests
    rylnd committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    d625b2c View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2021

  1. Make indicator reference field an external link

    Leverages the existing FormattedFieldValue component, with one minor
    tweak to add this field to the URL allowlist.
    rylnd committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    d14f795 View commit details
    Browse the repository at this point in the history
  2. Back to consistent horizontal spacing, here

    The draggable badges are a little odd in that their full box isn't
    indicated until hover, making the visual weight a little off.
    rylnd committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    5fbcf64 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d7cce75 View commit details
    Browse the repository at this point in the history
  4. Fix tests broken due to addition of a new row renderer

    These tests are all implicitly testing the list of row renderers.
    rylnd committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    5a04c28 View commit details
    Browse the repository at this point in the history
  5. Full-width hr

    At certain container widths, a half-width hr is not sufficient.
    rylnd committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    d8bf839 View commit details
    Browse the repository at this point in the history
  6. More descriptive constant

    Obviates the need for the accompanying comments.
    rylnd committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    2f7433f View commit details
    Browse the repository at this point in the history
  7. More realistic data

    Also ensures less traffic to urlhaus ;)
    rylnd committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    d49d692 View commit details
    Browse the repository at this point in the history
  8. Remove useless comment

    rylnd committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    542052b View commit details
    Browse the repository at this point in the history
  9. Add threat_match row renderer type to GQL client

    Gennin' beanz
    rylnd committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    9295afc View commit details
    Browse the repository at this point in the history
  10. Ensure contextId is unique for each CTI subrow

    We need to add the row index to our contextId to ensure that our
    draggables work correctly for multiple rows, since each row will
    necessarily have the same eventId and timelineId.
    rylnd committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    b115dfe View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    8f667c7 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    37d737b View commit details
    Browse the repository at this point in the history