Rework the README security note - #207
Merged
Merged
Conversation
…top of the README The name-based subtype resolution risk applied to Newtonsoft.Json too, but only the System.Text.Json section mentioned it, buried at the bottom. Promote it to a dedicated section right after the intro, state the exact trigger (no [KnownSubType]/builder mapping declared), and point the STJ section at it.
Explicit [KnownSubType] mapping is the safe path; document the exact trigger (no mapping declared), the assembly scope and the assignability filter for Newtonsoft.Json and System.Text.Json so the risk is visible in the IDE, not only in the README.
…he STJ section The dedicated top section was too prominent for a documented risk with a real mitigation. Keep a one-line pointer near the intro and move the full analysis back next to the other STJ differences, stressing that name-based resolution only runs when no subtype mapping is declared at all.
Introduce the two packages and the shared API first, tell the reader the examples are valid for both, and defer the engine choice to the STJ section where those engines are actually explained.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #207 +/- ##
=======================================
Coverage 93.20% 93.20%
=======================================
Files 19 19
Lines 1560 1560
Branches 301 301
=======================================
Hits 1454 1454
Misses 50 50
Partials 56 56 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Problem
The name-based resolution security risk was buried deep in the STJ section and only covered one package. A reader scanning the README saw no warning before using name-based resolution with untrusted JSON.
Fix
Tests
Honest note(s)