3397 Commits

Author SHA1 Message Date
Ervin Hegedus
546ec8fe9a
Added PR #3217 2024-08-08 17:56:14 +02:00
Ervin Hegedus
13cce62b0b
Added PR #3212 2024-08-08 17:52:14 +02:00
Ervin Hegedus
5403b3d01c
Update CHANGES; added newest PR's 2024-08-07 14:40:56 +02:00
Ervin Hegedus
80dd45703b
Update CHANGES - added PR 3210 2024-08-06 17:37:52 +02:00
Ervin Hegedus
ff303c761f
Add newest changes 2024-08-06 15:43:39 +02:00
Ervin Hegedus
2048730012
Update CHANGES 2024-08-05 09:32:40 +02:00
Ervin Hegedus
5fa470189b
Add PR's to CHANGES 2024-08-03 16:23:26 +02:00
Ervin Hegedus
b6d218f72d
Merge pull request #3116 from gberkes/v3/remove_this_conditional_structure
Deleted redundant code in 'ModSecurity::serverLog(...)'.
2024-08-02 16:33:07 +02:00
Ervin Hegedus
97c3d15f31
Merge pull request #3203 from airween/v3/sethostname
feat(api) new function: set hostname
2024-08-02 09:44:13 +02:00
Ervin Hegedus
c7efeb6d06
Merge branch 'owasp-modsecurity:v3/master' into v3/sethostname 2024-08-01 22:35:44 +02:00
Ervin Hegedus
a14cdc4ff5
Merge pull request #3182 from airween/v3/readmeupdate
Update README.md: use submodule and use benchmark tool
2024-07-31 16:41:55 +02:00
Ervin Hegedus
4b38435a6e
Merge pull request #3117 from airween/v3/eualrangebyfind
fix: Changed 'equal_range()' + loop by 'find()' in resolveFirst() methods
2024-07-31 15:46:54 +02:00
Ervin Hegedus
6449310831
Fix typos 2024-07-31 14:23:52 +02:00
Ervin Hegedus
937fc5ae59
Provide a function to set 'hostname' field in log 2024-07-29 22:07:26 +02:00
Ervin Hegedus
adba86e2bd
Merge pull request #3185 from eduar-hte/git-describe
Simplify checkout of submodules in GitHub workflows (with support for git describe)
2024-07-25 18:10:52 +02:00
Ervin Hegedus
de8646e383
Merge pull request #3189 from bitbehz/fix/typo-build-win32-dockerfile
Fixing typo in Dockerfile
2024-07-25 18:08:08 +02:00
Behzad Eslami Tehrani
4fce2e3c1d Fixing typo in Dockerfile
Fixing typo in environment variable SRC_DIR.
SCR_DIR -> SRC_DIR
2024-07-22 10:09:27 +03:30
Eduardo Arias
f4d35383e9 fixed typo 2024-07-17 23:22:09 +00:00
Eduardo Arias
5fe777aeb8 simplify submodules checkout (but fetch tags for git describe to work) 2024-07-17 23:19:10 +00:00
Ervin Hegedus
3dda900ee9
Merge pull request #3164 from eduar-hte/variable-origin
Improve performance of VariableOrigin instances
2024-07-17 23:08:30 +02:00
Eduardo Arias
eb62cac7fa Add script to download OWASP CRS v4 to run benchmark
- Simplified clone & checkout of CRS repository
- Removed no longer maintained OWASP Core Ruleset v2
2024-07-17 00:49:27 +00:00
Eduardo Arias
6faf6d7ec0 Removed unnecessary usage of heap-allocated VariableValue (m_var)
- Removed unused methods
2024-07-17 00:49:27 +00:00
Eduardo Arias
dc0a06fc70 Improve performance of VariableOrigin instances
- The previous approach would create a std::unique_ptr and store it in
  a std::list in VariableValue (Origins)
- The new approach now stores Origins in a std::vector and constructs
  VariableOrigin elements in-place on insertion.
- Instead of having two heap-allocations for every added VariableOrigin
  instance, this performs only one.
- If multiple origins are added, std::vector's growth strategy may even
  prevent a heap-allocation. There's a cost on growing the size of the
  vector, because a copy of current elements will be necessary.
  - Introduced reserveOrigin method to notify that multiple insertions
    will be made, so that we can use std::vector's reserve and do a
    single allocation (and copy of previous elements), and then just
    initialize the new elements in-place.
2024-07-17 00:49:27 +00:00
Ervin Hegedus
8d06e4c47b
Typo fixes 2024-07-12 18:09:33 +02:00
Ervin Hegedus
baa7e694f9
Typo fixes 2024-07-12 11:28:52 +02:00
Ervin Hegedus
714e531134
Content improve 2024-07-12 09:15:19 +02:00
Ervin Hegedus
30ddc32c6f
Update README.md: use submodule and use benchmark tool 2024-07-11 22:07:16 +02:00
Ervin Hegedus
7c174e95fa
Merge pull request #3161 from eduar-hte/others-update
Update libinjection & Mbed TLS
2024-07-10 16:35:40 +02:00
Eduardo Arias
a3f40ef03c Replace Mbed TLS source code in repository with a submodule
- Updated to latest Mbed TLS version (v3.6.0)
2024-05-31 00:41:10 +00:00
Eduardo Arias
7732b5e8f3 Update libinjection to version v3.9.2-92-gb9fcaaf 2024-05-31 00:41:10 +00:00
Ervin Hegedus
dc8af8f23d
Merge pull request #3160 from fzipi/v3/add-pull-request-template
chore: add PR template (v3)
2024-05-30 15:36:53 +02:00
Felipe Zipitria
98c672ddb4
chore: add PR template
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
2024-05-30 09:51:06 -03:00
Ervin Hegedus
2fd45f870b
Merge pull request #3146 from eduar-hte/seclang-scanner-nounistd
Update to seclang-scanner changes introduced by Windows support
2024-05-23 14:56:26 +02:00
Ervin Hegedus
37776fd262
Merge pull request #3144 from eduar-hte/gh-workflow-updates
GitHub build & quality assurance workflow updates
2024-05-23 14:53:09 +02:00
Eduardo Arias
d9255d85ca Updated GH Unix build configurations
- Added support to build 32-bit versions of libModSecurity on Linux
- Added support to build libModSecurity using clang on Linux (both
  64-bit and 32-bit versions)
- Fixed macOS dependencies to include yajl, not only because it is
  a required dependency, but because tests were not being run on
  macOS builds without it.
- Added build 'without libxml' to Linux & macOS configurations.
- Added build 'without ssdeep' to Linux configurations (already in macOS
  configuration)
- Added build 'with lmdb' to Linux & macOS configurations, replacing the
  existing one 'without lmdb' because by default LMDB is disabled if not
  explicitly turn on in configure.
- Removed 'without yajl' build because it's a required 3rd party
  dependency.
- Added bison & flex dependencies to enable parser generation.
2024-05-23 01:53:47 +00:00
Eduardo Arias
5a543d9c0b Updated .gitignore to ignore files generated in builds
- build/win32/* files from Windows builds, other files from Unix builds
2024-05-23 01:38:15 +00:00
Eduardo Arias
9e44964dc7 Use SRC_DIR argument 2024-05-19 21:12:34 +00:00
Eduardo Arias
fbaf052a0a Update Windows build information after PR #3132 2024-05-19 21:10:25 +00:00
Eduardo Arias
d0108efbc3 Update actions/checkout version to avoid deprecation warnings on GH workflow 2024-05-19 18:56:36 +00:00
Eduardo Arias
636cf43d5e Separate workflow to run check-static (cppcheck) build step 2024-05-19 18:56:36 +00:00
Eduardo Arias
7267c1dc21 Added support to run regression tests without libxml2
- Annotated regression tests that depend on libxml2 support
- Added Windows build without libxml2
2024-05-19 18:55:34 +00:00
Eduardo Arias
2c488386c4 Add options nounistd & never-interactive to seclang-scanner.ll
- The parser is not used interactively so we can avoid including
  unistd.h, which is not available on Windows MSVC C++ compiler.
- The #ifdef WIN32 introduced in PR #3132 would probably be overwritten
  when the parser is updated.
2024-05-19 16:38:03 +00:00
Ervin Hegedus
124a434439
Merge pull request #3141 from rkrishn7/v3/master
Add link to Rust bindings in README
2024-05-15 15:22:15 +02:00
Ervin Hegedus
71a786b1e5
Merge pull request #3132 from eduar-hte/windows-port
Add support to build libModSecurity v3 on Windows
2024-05-15 15:00:16 +02:00
Eduardo Arias
1b2de5a5d3 Add support to turn 3rd party dependencies off
- By default, all the 3rd party dependencies are enabled.
- A dependency can be turned off by adding the "-DWITHOUT_xxx=ON" to
  the call of vcbuild.bat
- List of 3rd party dependencies and associated option to turn them off:
  - LMDB: WITHOUT_LMDB
  - LUA: WITHOUT_LUA
  - LibXML2: WITHOUT_LIBXML2
  - MaxMind: WITHOUT_MAXMIND
  - cURL: WITHOUT_CURL
2024-05-14 21:53:52 +00:00
Eduardo Arias
6bf78f2560 Added GitHub workflow to build libModSecurity on Windows. 2024-05-13 13:37:24 -07:00
Eduardo Arias
e6e2989bd5 Configure test fixture using CTest for Windows build
- Added new test/test_suite.in with list of regression and unit tests
  previously in Makefile.am, to be shared between Unix and Windows
  builds.
- Updated regression.cc & unit.cc to return the number of failed tests
  to indicate to CTest that the test failed. Similarly, a crash or
  unhandled exception terminates the process with a non-zero exit code.
  - This change doesn't affect running the tests with autotest in Unix
    builds because this processes test output from custom-test-driver &
    test-suite.sh, and ignores the exit code of the test runner.
- Removed comment in test/test-cases/regression-offset-variable.json as
  this is not supported by JSON and prevents strict parsers to read and
  process the file.
- Minor change in regression.cc's clearAuditLog to replace std::ifstream
  with std::ofstream as the mode to open the flag applies to an output
  stream.
- Minor change in unit.cc to simplify code that deletes tests.
- Minor changes to test/custom-test-driver to correct usage information.
2024-05-13 10:22:12 -07:00
Rohan Krishnaswamy
4b8c3679b9
Add link to Rust bindings in README (#1) 2024-05-12 18:49:02 -07:00
Eduardo Arias
a8e132f3a1 Replaced the use of "new" in find_resource
- Addresses SonarCloud issue cpp:S5025 (Memory should not be managed manually)
- This function was not changed for the Windows port, but a similar
change to the one suggested was done in expandEnv in the same file.
- The first stream is not destructed at the exact same point it was in
the previous code (but rather when the second stream replaces it on
assignment to the same variable). An arbitrary scope could have been
introduced to destruct the object at the same place, but it doesn't
seem to be necessary and would make the code a bit strange.
2024-05-10 02:28:13 +00:00
Eduardo Arias
b69405a372 Use default keyword to implement constructor/destructor
- Addresses SonarCloud cpp:S3490 issue (Special member function should
not be defined unless a non standard behavior is required)
2024-05-10 02:28:13 +00:00