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

transform: luaxform transform script #11940

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Commits on Oct 11, 2024

  1. transforms: Make ctx available

    This commit makes the detection engine thread context available for
    transforms to use. The Lua transform requires this value.
    
    Issue: 2290
    jlucovsky committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    a9e6261 View commit details
    Browse the repository at this point in the history
  2. hash: Provide detection engine context to free fn

    Issue: 2290
    
    This commit extends the hash table logic with an alternate free function
    that provides the detection engine context.
    
    Users that wish to use the next functionality must use the
    HashListTableInitWithCtx function when initializing the hash table.
    Using this interface will result in the hash table "free with context"
    function (new) being used instead.
    jlucovsky committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    c6f4106 View commit details
    Browse the repository at this point in the history
  3. detect/engine: Prevent double-free of keyword hash

    Issue: 2290
    
    Defer freeing the keyword hash table until the engine context has
    been freed. This eliminates a double-free from occurring.
    
    For the unittests ONLY, clear the keyword_hash to prevent a double
    free attempt.
    jlucovsky committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    c4b9781 View commit details
    Browse the repository at this point in the history
  4. transform: Add luaxform files

    Issue: 2290
    
    This commit adds the source files for the new transform -- luaxform.
    jlucovsky committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    a9f377c View commit details
    Browse the repository at this point in the history
  5. doc: Document luaxform transform

    Issue: 2290
    jlucovsky committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    7b55d3c View commit details
    Browse the repository at this point in the history
  6. detect/transform: Refactor setup/apply pattern

    git grep -A 1 -w InspectionBufferSetup shows numbers cases of the pattern:
        - InspectionBufferSetup
        - InspectionBufferApplyTransforms
    
    Refactor the implementations of those functions into
    InspectionBufferSetupAndApplyTransforms to reduce function call count.
    
    Issuer: 2290
    jlucovsky committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    4298554 View commit details
    Browse the repository at this point in the history