Repository navigation
Conversation
All 8 examples (basic_event.rs and 7 siblings) read MISP_SSL_VERIFY to control TLS certificate verification, but tests/integration_tests.rs (tests/integration_tests.rs:15,34) and CI (.github/workflows/ci.yml:290) both use MISP_VERIFYCERT. A user who copies the documented MISP_VERIFYCERT=false from the test/CI instructions into an example run gets no error and no warning - the examples silently ignore it, fall back to their `unwrap_or(true)`, and TLS verification stays on. Renamed the env var read in all 8 examples from MISP_SSL_VERIFY to MISP_VERIFYCERT (comparison logic unchanged) and updated TESTING.md, which previously documented the two names as intentionally different. Added tests/examples_env_var.rs, a regression test that scans the example sources and fails if MISP_SSL_VERIFY reappears or MISP_VERIFYCERT is missing; it fails on the pre-fix sources and passes after. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JoSButbVaWEtGMXwTx73BZ
elhoim
marked this pull request as draft
September 3, 2026 05:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BLUF — Eight examples read
MISP_SSL_VERIFYwhile tests and CI useMISP_VERIFYCERT.examples/basic_event.rsand seven siblings readMISP_SSL_VERIFY, whiletests/integration_tests.rsand.github/workflows/ci.ymluseMISP_VERIFYCERT, so copying the documented env vars silently no-ops and leaves verification on.TESTING.md, which documented the split as intentional, and addstests/examples_env_var.rsguarding against the old name.ubuntu-22.04runner with no php8.3mod_php, plus a publish-worker race intest_event_crud_lifecycle), fixed in PR fix: [ci] Run integration tests on ubuntu-24.04 to match php8.3 #53 and unrelated to this PR.Finding
examples read MISP_SSL_VERIFY while tests and CI use MISP_VERIFYCERT
Affects basic_event.rs and 6 sibling examples. Copying the documented env vars from the test header silently no-ops and leaves verification on.
Change
Confirmed all 8 examples (basic_event.rs and 7 siblings) read env var MISP_SSL_VERIFY while tests/integration_tests.rs and CI both use MISP_VERIFYCERT. Renamed the env var in all 8 examples to MISP_VERIFYCERT (comparison logic left unchanged), updated TESTING.md which previously documented the two names as an intentional split, and added a regression test that scans the example sources and fails if the old name reappears or the new name is missing.
Upstream evidence
Not applicable — this is a pure client-side env-var naming defect, not a MISP wire-protocol issue, so no MISP controller/PyMISP citation is relevant. In-repo evidence: tests/integration_tests.rs:15,34 and .github/workflows/ci.yml:290 use MISP_VERIFYCERT; before the fix, examples/basic_event.rs:18 and 6 siblings (examples/feed_operations.rs:16, examples/galaxy_operations.rs:21, examples/manage_tags.rs:20, examples/search_attributes.rs:20, examples/sharing_groups.rs:16, examples/sightings.rs:21, examples/user_management.rs:16) used MISP_SSL_VERIFY.
Verified against MISP core
843b6744and PyMISPe7debb4f.Tests
examples_use_misp_verifycert_env_var (tests/examples_env_var.rs) - scans all example .rs files for MISP_URL usage, asserts none contain MISP_SSL_VERIFY and all contain MISP_VERIFYCERT; fails against the pre-fix examples, passes afterVerified locally:
cargo fmt --check,cargo clippy --all-targets --all-features -- -D warnings,cargo test --all-features --lib,--test integration_tests --no-run, andcargo check --examples, each in an isolated target directory.🤖 Generated with Claude Code