Repository navigation
Decode escaped values in STIX point indicators - #1161
Closed
sylvesterkaczmarek wants to merge 1 commit into
Closed
sylvesterkaczmarek wants to merge 1 commit into
sylvesterkaczmarek wants to merge 1 commit into
Conversation
Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
Collaborator
|
During some of the work that I did yesterday as a result of some investigation after your other intel PRs resolve and supercede this PR. I am closing this PR without merging as a result, but I'm going to retain your test file. Thanks! |
Merged
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
Fixes #1158.
Remove exactly the outer STIX string delimiters and decode the defined apostrophe/backslash escape pairs. This preserves actual indicator values rather than retaining escape syntax or stripping a quoted trailing apostrophe.
Ordinary literals, Unicode, literal backslash-n/backslash-x text and existing pattern restrictions remain unchanged. No general Python escape decoder is used.
Testing
python -m pytest -q zeek/tests/test_stix_literal_values.py28 focused tests passed; 26 fail on unchanged source. Tests exercise STIX 2.0 and 2.1 parsing, public mapping, positive OR alternatives and serialized bundles through the Zeek-row printer.
107 tests also passed in an isolated combined check with the final changes and regression suites from #1140, #1142 and #1144. Only this literal-decoding fix and its tests are in this PR.
No live feed, Zeek process or production indicator was used. Two pre-existing
defaultNowlint findings in the untouched base source remain outside this diff; #1142 addresses them. No new scoped lint findings were introduced. Full Malcolm deployment testing was not run.New-test formatting, syntax checks and
git diff --checkpass. No dependency, workflow or version changes.Thanks for taking a look.