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 #12141

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

Commits on Nov 21, 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 Nov 21, 2024
    Configuration menu
    Copy the full SHA
    5d87ef1 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 Nov 21, 2024
    Configuration menu
    Copy the full SHA
    72d8207 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 Nov 21, 2024
    Configuration menu
    Copy the full SHA
    a843a76 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 Nov 21, 2024
    Configuration menu
    Copy the full SHA
    f0d92b5 View commit details
    Browse the repository at this point in the history
  5. doc: Document luaxform transform

    Issue: 2290
    jlucovsky committed Nov 21, 2024
    Configuration menu
    Copy the full SHA
    aa061ac 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 Nov 21, 2024
    Configuration menu
    Copy the full SHA
    bb0cb7b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4eaffd9 View commit details
    Browse the repository at this point in the history