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

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

Commits on Nov 7, 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 7, 2024
    Configuration menu
    Copy the full SHA
    b3cdd04 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 7, 2024
    Configuration menu
    Copy the full SHA
    a539eae 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 7, 2024
    Configuration menu
    Copy the full SHA
    1e8a127 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 7, 2024
    Configuration menu
    Copy the full SHA
    5031dc4 View commit details
    Browse the repository at this point in the history
  5. doc: Document luaxform transform

    Issue: 2290
    jlucovsky committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    760e9ed 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 7, 2024
    Configuration menu
    Copy the full SHA
    b5ec5b3 View commit details
    Browse the repository at this point in the history