[PR #391] [MERGED] Add nested json output for protectionscan #536

Closed
opened 2026-01-29 21:11:06 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/SabreTools/BinaryObjectScanner/pull/391
Author: @HeroponRikiBestest
Created: 11/8/2025
Status: Merged
Merged: 11/10/2025
Merged by: @mnadareski

Base: masterHead: nested-json-attempt-2


📝 Commits (10+)

  • 8468341 Attempt nested for real this time
  • bb98653 forgot to include handling the base path
  • d025150 Reverted unnecesssary changes
  • ff39bad Remove unneeded net6.0 gating
  • d2cb73f Add comments
  • a931232 Finish comments
  • 5a46e17 Might as well safeguard if no protections are returned.
  • f176f2e Use object instead of dynamic
  • cc1503e Remove weird empty string root node handling
  • 502fbac remove uneeded ref

📊 Changes

1 file changed (+107 additions, -2 deletions)

View changed files

📝 ProtectionScan/Features/MainFeature.cs (+107 -2)

📄 Description

There is one thing I'd like your advice on, if you have any. I thought i was having encoding issues, as the plus sign was turning into \u002B, but it turns out this specific character is supposed to be treated this way.

https://github.com/dotnet/runtime/issues/35281

Should I

  • Replace the plus sign in any protections with a different character
  • Do a regex replace for \u002B with + on the output
  • Try and use one of the UnsafeRelaxedJsonEscaping options

I'm not sure what's best, since apparently

If you have a JSON string "\\u002B", this search-and-replace will result in the JSON string "\+", which corrupts the JSON payload.

So, doing some kind of workaround doesn't seem ideal.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/SabreTools/BinaryObjectScanner/pull/391 **Author:** [@HeroponRikiBestest](https://github.com/HeroponRikiBestest) **Created:** 11/8/2025 **Status:** ✅ Merged **Merged:** 11/10/2025 **Merged by:** [@mnadareski](https://github.com/mnadareski) **Base:** `master` ← **Head:** `nested-json-attempt-2` --- ### 📝 Commits (10+) - [`8468341`](https://github.com/SabreTools/BinaryObjectScanner/commit/84683416b55c9d234ca51033dc9facf1f8dc673f) Attempt nested for real this time - [`bb98653`](https://github.com/SabreTools/BinaryObjectScanner/commit/bb986531e8d3911c767fc2852a1186844e72d545) forgot to include handling the base path - [`d025150`](https://github.com/SabreTools/BinaryObjectScanner/commit/d025150fa9960a5c4b4db189997a01d9462480f7) Reverted unnecesssary changes - [`ff39bad`](https://github.com/SabreTools/BinaryObjectScanner/commit/ff39badbd077e30acbfa9be19bff29ffcdad37dc) Remove unneeded net6.0 gating - [`d2cb73f`](https://github.com/SabreTools/BinaryObjectScanner/commit/d2cb73f99210c1f490e314376163753c64f69574) Add comments - [`a931232`](https://github.com/SabreTools/BinaryObjectScanner/commit/a9312326b5ea22a59b305441092b74ea2c7d4005) Finish comments - [`5a46e17`](https://github.com/SabreTools/BinaryObjectScanner/commit/5a46e1761bc43b831c1a0d86272d08d8ff3f8e4f) Might as well safeguard if no protections are returned. - [`f176f2e`](https://github.com/SabreTools/BinaryObjectScanner/commit/f176f2e2e0a0ae9fcb53f6a88ef48c8d60fc830c) Use object instead of dynamic - [`cc1503e`](https://github.com/SabreTools/BinaryObjectScanner/commit/cc1503e8184a5bc8670ce512ad2980cca408ecc7) Remove weird empty string root node handling - [`502fbac`](https://github.com/SabreTools/BinaryObjectScanner/commit/502fbac071e876e9e0c88e7b3be0f7f8b84d98a3) remove uneeded ref ### 📊 Changes **1 file changed** (+107 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `ProtectionScan/Features/MainFeature.cs` (+107 -2) </details> ### 📄 Description There is one thing I'd like your advice on, if you have any. I thought i was having encoding issues, as the plus sign was turning into `\u002B`, but it turns out this specific character is supposed to be treated this way. https://github.com/dotnet/runtime/issues/35281 Should I - Replace the plus sign in any protections with a different character - Do a regex replace for `\u002B` with `+` on the output - Try and use one of the UnsafeRelaxedJsonEscaping options I'm not sure what's best, since apparently ``` If you have a JSON string "\\u002B", this search-and-replace will result in the JSON string "\+", which corrupts the JSON payload. ``` So, doing some kind of workaround doesn't seem ideal. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 21:11:06 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SabreTools/BinaryObjectScanner#536