Skip to content

Lua evaluator - take 1#1113

Merged
wupeka merged 10 commits into
devfrom
wupeka/lua-evaluator
Sep 3, 2025
Merged

Lua evaluator - take 1#1113
wupeka merged 10 commits into
devfrom
wupeka/lua-evaluator

Conversation

@wupeka

@wupeka wupeka commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

Description

Basic implementation of LUA evaluator for ComplianceEngine

Checklist

  • I have read the contribution guidelines.
  • I added unit-tests to validate my changes. All unit tests are passing.
  • I have merged the latest dev branch prior to this PR submission.
  • I ran pre-commit on my changes prior to this PR submission.
  • I submitted this PR against the dev branch.

@wupeka wupeka force-pushed the wupeka/lua-evaluator branch from a99fd29 to c7256c8 Compare August 26, 2025 11:37
@github-actions

github-actions Bot commented Aug 26, 2025

Copy link
Copy Markdown

Test Results

    18 files     912 suites   15m 17s ⏱️
   922 tests    922 ✅ 0 💤 0 ❌
16 497 runs  16 497 ✅ 0 💤 0 ❌

Results for commit 6ef3e5d.

♻️ This comment has been updated with latest results.

Comment thread src/modules/complianceengine/src/lib/LuaEvaluator.cpp Outdated
Comment thread src/modules/complianceengine/src/lib/LuaEvaluator.cpp Outdated
Comment thread src/modules/complianceengine/src/lib/LuaEvaluator.cpp
Comment thread src/modules/complianceengine/src/lib/LuaEvaluator.cpp Outdated
Comment thread src/modules/complianceengine/src/lib/LuaEvaluator.h

@robertwoj-microsoft robertwoj-microsoft left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general this looks awesome :) I was thinking whether we could do some additional features. For example exposing iterators (PasswdIterator, ShellsIterator, UsersIterator, etc), so that we could offload some straightforward functionality to Lua instead of needing to reimplement this in C++ for single rules (see this, this or that).

@wupeka wupeka force-pushed the wupeka/lua-evaluator branch 3 times, most recently from 83fbebf to bb5f2f3 Compare August 29, 2025 08:12
@wupeka wupeka requested a review from simonjaeger August 29, 2025 14:49
@wupeka wupeka marked this pull request as ready for review August 29, 2025 14:49
@wupeka wupeka requested a review from a team as a code owner August 29, 2025 14:49
@wupeka wupeka force-pushed the wupeka/lua-evaluator branch from e8f1466 to ab98c20 Compare August 29, 2025 15:01
Comment thread src/modules/complianceengine/src/lib/LuaEvaluator.cpp Outdated
Comment thread src/modules/complianceengine/src/lib/LuaEvaluator.h
Comment thread src/modules/complianceengine/tests/LuaEvaluatorTest.cpp Outdated
Comment thread src/modules/complianceengine/tests/LuaEvaluatorTest.cpp Outdated

@robertwoj-microsoft robertwoj-microsoft left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please a module test to verify whether the evaluator class picks it up properly.

Comment thread src/modules/complianceengine/tests/LuaEvaluatorTest.cpp
Comment thread .github/workflows/ci.yml
Comment thread src/modules/complianceengine/src/lib/Evaluator.cpp Outdated
Comment thread src/modules/complianceengine/src/lib/payload.schema.json
Comment thread src/modules/complianceengine/src/lib/LuaEvaluator.cpp
Comment thread src/vcpkg.json
Comment thread .vscode/settings.json
Comment thread src/modules/complianceengine/src/lib/LuaEvaluator.cpp
Comment thread src/modules/complianceengine/src/lib/LuaEvaluator.cpp

@simonjaeger simonjaeger left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wupeka wupeka force-pushed the wupeka/lua-evaluator branch 2 times, most recently from e2e516a to 718d899 Compare September 3, 2025 11:42
- More verbose logging
@wupeka wupeka force-pushed the wupeka/lua-evaluator branch from 718d899 to 6ef3e5d Compare September 3, 2025 11:46
@wupeka wupeka merged commit 839dd4b into dev Sep 3, 2025
55 checks passed
MariusNi pushed a commit that referenced this pull request Oct 14, 2025
* Lua evaluator - take 1
* Ignore git version in vcpkg, needed for rhel7 et consortes.
MariusNi pushed a commit that referenced this pull request Oct 14, 2025
* Lua evaluator - take 1
* Ignore git version in vcpkg, needed for rhel7 et consortes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants