test: add reusable hostile-input harness - #184
Draft
estivate wants to merge 7 commits into
Draft
Conversation
Provide deterministic hostile objects, invalid JSON graphs, Unicode cases, and endpoint inputs for trust-boundary tests. Co-Authored-By: OpenAI Codex <noreply@openai.com>
Refactor configuration trust-boundary tests onto deterministic hostile cases while preserving the merged URL and Unicode contracts. Co-Authored-By: OpenAI Codex <noreply@openai.com>
Exercise each forged Pydantic error callback directly before configuration boundaries assert that the callback remains untouched. Co-Authored-By: OpenAI Codex <noreply@openai.com>
Retain the recovered-marker regression probe and prove constructed-model and serializer tripwires execute when called directly. Co-Authored-By: OpenAI Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying infrahub-sync with
|
| Latest commit: |
93a82b9
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://fc577df6.infrahub-sync.pages.dev |
| Branch Preview URL: | https://test-hostile-input-harness-v.infrahub-sync.pages.dev |
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.
Summary
Several configuration tests created their own versions of unusual or unsafe input data. This made the tests repetitive and harder to maintain.
This PR adds one shared test helper and updates the existing configuration tests to use it. The tests confirm that invalid input is rejected safely, does not run code hidden in the input, and does not expose input values in error messages.
No application code changes.
Before and after
Before:
After:
Validation
uv sync: passeduv run invoke format: passeduv run invoke lint: passed; four inheritedtywarnings outside this diffsync-reviewerpreflight: passed after restoring existing Unicode assertions, binding every callback to its case tripwire, and pinning every attack payloadgit diff --check: passedUser-visible changes
None. This PR changes tests only.