Skip to content

Add runtime regex notification checks#14

Open
Da7-Tech wants to merge 1 commit into
codingo:mainfrom
Da7-Tech:bounty-2-runtime-regex-checks
Open

Add runtime regex notification checks#14
Da7-Tech wants to merge 1 commit into
codingo:mainfrom
Da7-Tech:bounty-2-runtime-regex-checks

Conversation

@Da7-Tech
Copy link
Copy Markdown

Fixes #2.

Summary

  • Adds --checks / --check-config for runtime JSON-configured regex notification checks.
  • Accepts either a top-level JSON array or an object with checks: [].
  • Supports field, regex, alert/message, and optional ignore_case / case_insensitive.
  • Supports domain fields, DNS fields (type, info, rdata, ttl), HTTP metadata (http_code, code_string, content_length), and response body.
  • Runs body checks in memory during probing and does not write response bodies to the JSON output.
  • Wires checks through both HTTP execution paths: deferred HTTP probing and DNS-then-HTTP probing.
  • Documents the config format in the README.

Verification

  • git diff --check
  • c++ -std=c++17 -O0 -I dooked/include -I dooked/json/single_include -I dooked/spdlog/include -c dooked/source/utils/regex_checks.cpp -o /tmp/regex_checks.o
  • c++ -std=c++17 -O0 -I dooked/include -I dooked/json/single_include -I dooked/spdlog/include -c dooked/source/utils/io_utils.cpp -o /tmp/io_utils.o
  • Standalone smoke test compiled and ran load_regex_checks, run_result_checks, and run_body_checks, producing matches for domain, DNS type, HTTP code, and body checks.

I could not run the repository's full CMake build locally because this machine does not have cmake or Boost headers installed. I initialized the repo submodules and verified the new check parser/runner path separately.

AI assistance disclosure: prepared with Codex and manually reviewed before submission.

If accepted for the listed $200 USD bounty, PayPal payout can be sent to: aa.631@hotmail.com

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.

Regular Expression Checks

1 participant