Skip to content

Decode escaped values in STIX point indicators - #1161

Closed
sylvesterkaczmarek wants to merge 1 commit into
cisagov:sylvesterkaczmarek-mergesfrom
sylvesterkaczmarek:fix/stix-point-literal-unescaping-20261006
Closed

sylvesterkaczmarek wants to merge 1 commit into
cisagov:sylvesterkaczmarek-mergesfrom
sylvesterkaczmarek:fix/stix-point-literal-unescaping-20261006

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor

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.py

28 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 defaultNow lint 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 --check pass. No dependency, workflow or version changes.

Thanks for taking a look.

Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
@mmguero mmguero self-assigned this Oct 6, 2026
@mmguero mmguero added the intel Related to integration with threat intel feeds label Oct 6, 2026
@mmguero mmguero added this to Malcolm Oct 6, 2026
@mmguero mmguero added this to the v26.10.0 milestone Oct 6, 2026
@mmguero
mmguero changed the base branch from main to sylvesterkaczmarek-merges October 7, 2026 14:47
@mmguero

mmguero commented Oct 7, 2026

Copy link
Copy Markdown
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!

@mmguero mmguero closed this Oct 7, 2026
@mmguero mmguero mentioned this pull request Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

intel Related to integration with threat intel feeds

Projects

Status: Declined

Development

Successfully merging this pull request may close these issues.

Escaped STIX string literals become incorrect point indicator values

2 participants