Skip to content

Commit b860c7d

Browse files
authored
Merge branch 'master' into depr-coremods
2 parents 1b0c411 + 8089469 commit b860c7d

37 files changed

+436
-115
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 2.203.0
2+
current_version = 2.205.0
33
commit = True
44
tag = True
55
tag_message =

.circleci/config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,12 @@ commands:
103103
key: v5-docvenv-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ checksum "pyproject.toml" }}-{{ checksum "/tmp/python.version" }}
104104

105105
- run:
106-
name: executing docs jupyter notebooks
106+
name: executing docs test / build
107107
command: |
108108
. venv/bin/activate
109109
./scripts/doctests.py
110+
cd docs
111+
make html
110112
111113
test_steps_python:
112114
description: "Python test steps"

CHANGELOG.rst

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,55 @@
66
Synapse Changelog
77
*****************
88

9+
v2.205.0 - 2025-03-28
10+
=====================
11+
12+
Model Changes
13+
-------------
14+
- Added a ``uses`` light edge between ``it:prod:soft`` and ``risk:vuln`` forms.
15+
(`#4198 <https://github.com/vertexproject/synapse/pull/4198>`_)
16+
- Added a ``targets`` light edge between ``risk:compromise`` and
17+
``ou:industry`` forms.
18+
(`#4198 <https://github.com/vertexproject/synapse/pull/4198>`_)
19+
- See :ref:`userguide_model_v2_205_0` for more detailed model changes.
20+
21+
v2.204.1 - 2025-03-25
22+
=====================
23+
24+
Bugfixes
25+
--------
26+
- Fixed a regression in the Storm ``parallel`` command where variables
27+
containing certain heavy Storm object types were not passed into the parallel
28+
runtimes.
29+
(`#4197 <https://github.com/vertexproject/synapse/pull/4197>`_)
30+
31+
v2.204.0 - 2025-03-21
32+
=====================
33+
34+
Model Changes
35+
-------------
36+
- See :ref:`userguide_model_v2_204_0` for more detailed model changes.
37+
38+
Bugfixes
39+
--------
40+
- Fixed an issue where locked users could still access HTTP endpoints with an
41+
existing session cookie. User lock status now invalidates existing sessions
42+
across all authenticated endpoints.
43+
(`#4180 <https://github.com/vertexproject/synapse/pull/4180>`_)
44+
- Fixed an issue in Storm where the ``(`` and ``$`` control characters were
45+
allowed in unquoted strings.
46+
(`#4187 <https://github.com/vertexproject/synapse/pull/4187>`_)
47+
- Fixed a regression where the Storm ``not`` operator was incorrectly
48+
whitespace sensitive.
49+
(`#4187 <https://github.com/vertexproject/synapse/pull/4187>`_)
50+
- Fixed an issue with URL sanitizing where incorrect data was being removed
51+
from the URL string.
52+
(`#4190 <https://github.com/vertexproject/synapse/pull/4190>`_)
53+
- Fixed an issue with the Storm ``parallel`` command where variables
54+
initialized within a parallel runtime were not properly isolated to that
55+
specific runtime.
56+
(`#4194 <https://github.com/vertexproject/synapse/pull/4194>`_)
57+
958
v2.203.0 - 2025-03-14
1059
=====================
1160

docs/conf.py

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,28 @@
1313
# documentation root, use os.path.abspath to make it absolute, like shown here.
1414
#
1515
import os
16+
import re
1617
import sys
1718
import datetime
1819
sys.path.insert(0, os.path.abspath('..'))
1920

2021
import synapse
2122

23+
# -- Warning Filter Configuration --------------------------------------------
24+
25+
# List of warning patterns to ignore
26+
WARNINGS_IGNORE = [
27+
r'Detected \d+ deprecated properties unlocked and not in use',
28+
r'Sysctl values different than expected',
29+
r'The form edge:refs is deprecated or using a deprecated type',
30+
r'The form edge:has is deprecated or using a deprecated type',
31+
r'The property media:news:author is deprecated or using a deprecated type', # storm_ref_automation Cron Example
32+
]
33+
34+
# List of warning patterns to convert to errors
35+
WARNINGS_ERROR = [
36+
r'.* is deprecated or using a deprecated type',
37+
]
2238

2339
# -- Project information -----------------------------------------------------
2440

@@ -265,6 +281,20 @@ def convert_rstorm(_):
265281
synpd = os.path.split(synbd)[0] # split off the synapse module directory
266282
env = {**os.environ, 'SYN_LOG_LEVEL': 'DEBUG'}
267283

284+
def check_output_for_warnings(output):
285+
for line in output.splitlines():
286+
if '[WARNING]' in line:
287+
msg = line.split('[WARNING]', 1)[1].strip()
288+
for pattern in WARNINGS_IGNORE:
289+
if re.search(pattern, msg):
290+
break
291+
else:
292+
for pattern in WARNINGS_ERROR:
293+
if re.search(pattern, msg):
294+
raise RuntimeError(f"Warning converted to error: {msg}")
295+
else: # Unhandled warnings
296+
raise RuntimeError(f"Unhandled warning found: {msg}")
297+
268298
cwd = os.getcwd()
269299
for fdir, dirs, fns in os.walk(cwd):
270300
for fn in fns:
@@ -278,8 +308,18 @@ def convert_rstorm(_):
278308
tick = s_common.now()
279309

280310
args = ['python', '-m', 'synapse.tools.rstorm', '--save', ofile, sfile]
281-
r = subprocess.run(args, cwd=synpd, env=env)
282-
assert r.returncode == 0, f'Failed to convert {sfile}'
311+
result = subprocess.run(args, cwd=synpd, env=env, capture_output=True, text=True)
312+
313+
if result.stdout:
314+
print(result.stdout, end='')
315+
check_output_for_warnings(result.stdout)
316+
317+
if result.stderr:
318+
print(result.stderr, end='')
319+
check_output_for_warnings(result.stderr)
320+
321+
if result.returncode != 0:
322+
raise RuntimeError(f'Failed to convert {sfile}: {result.stderr}')
283323

284324
tock = s_common.now()
285325
took = (tock - tick) / 1000
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
3+
.. _userguide_model_v2_204_0:
4+
5+
######################
6+
v2.204.0 Model Updates
7+
######################
8+
9+
The following model updates were made during the ``v2.204.0`` Synapse release.
10+
11+
**************
12+
New Properties
13+
**************
14+
15+
``ps:contact``
16+
The form had the following property added to it:
17+
18+
``id``
19+
A type or source specific unique ID for the contact.
20+
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
2+
3+
.. _userguide_model_v2_205_0:
4+
5+
######################
6+
v2.205.0 Model Updates
7+
######################
8+
9+
The following model updates were made during the ``v2.205.0`` Synapse release.
10+
11+
*********
12+
New Forms
13+
*********
14+
15+
``tel:phone:type:taxonomy``
16+
A taxonomy of phone number types.
17+
18+
19+
20+
**************
21+
New Properties
22+
**************
23+
24+
``econ:acct:balance``
25+
The form had the following property added to it:
26+
27+
``instrument``
28+
The financial instrument holding the balance.
29+
30+
31+
``tel:phone``
32+
The form had the following property added to it:
33+
34+
``type``
35+
The type of phone number.
36+
37+
38+
39+
***********
40+
Light Edges
41+
***********
42+
43+
``targets``
44+
When used with a ``risk:compromise`` and an ``ou:industry`` node, the edge
45+
indicates the compromise was assessed to be based on the victim's role in
46+
the industry.
47+
48+
49+
``uses``
50+
When used with an ``it:prod:soft`` and a ``risk:vuln`` node, the edge
51+
indicates the software uses the vulnerability.
52+
53+
54+
55+
*********************
56+
Deprecated Properties
57+
*********************
58+
59+
``econ:acct:balance``
60+
The form had the following properties deprecated:
61+
62+
63+
``crypto:address``
64+
Deprecated. Please use ``:instrument``.
65+
66+
67+
``pay:card``
68+
Deprecated. Please use ``:instrument``.
69+

docs/synapse/userguides/storm_adv_vars.rstorm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -342,16 +342,16 @@ You can assign an explicit, unchanging value to a variable.
342342

343343
*Example:*
344344

345-
- Tag ``file:bytes`` nodes that have a number of AV signature hits higher than a given threshold for review:
345+
- Tag ``file:bytes`` nodes that have a number of AV scanner results higher than a given threshold for review:
346346

347-
.. storm-pre:: [file:bytes=sha256:0000746c55336cd8d34885545f9347d96607d0391fbd3e76dae7f2b3447775b4 it:av:filehit=(sha256:0000746c55336cd8d34885545f9347d96607d0391fbd3e76dae7f2b3447775b4, (0bfef0179bf358f3fe7bad67fa529c77, trojan.gen.2)) it:av:filehit=(sha256:0000746c55336cd8d34885545f9347d96607d0391fbd3e76dae7f2b3447775b4, (325cd5a01724fa0c63907eac044f4961, trojan.agent/gen-onlinegames)) it:av:filehit=(sha256:0000746c55336cd8d34885545f9347d96607d0391fbd3e76dae7f2b3447775b4, (ac8d9645c6cdf123683a73a02e231052, w32/imestartup.a.gen!eldorado))]
348-
.. storm-pre:: [file:bytes=sha256:00007694135237ec8dc5234007043814608f239befdfc8a61b992e4d09e0cf3f it:av:filehit=(sha256:00007694135237ec8dc5234007043814608f239befdfc8a61b992e4d09e0cf3f, (be9793d772d23269ab0c165af819e74a, troj_gen.r002c0gkj17)) it:av:filehit=(sha256:00007694135237ec8dc5234007043814608f239befdfc8a61b992e4d09e0cf3f, (eef2ccb70945fb28a45c7f14f2a0f11d, malicious.1b8fb7)) it:av:filehit=(sha256:00007694135237ec8dc5234007043814608f239befdfc8a61b992e4d09e0cf3f, (ce4e34d2f9207095aa7351986bbad357, trojan-ddos.win32.stormattack.c)) it:av:filehit=(sha256:00007694135237ec8dc5234007043814608f239befdfc8a61b992e4d09e0cf3f, (ed344310e3203ec4348c4ee549a3b188, "trojan ( 00073eb11 )")) it:av:filehit=(sha256:00007694135237ec8dc5234007043814608f239befdfc8a61b992e4d09e0cf3f, (f5b5daeda10e487fccc07463d9df6b47, tool.stormattack.win32.10)) it:av:filehit=(sha256:00007694135237ec8dc5234007043814608f239befdfc8a61b992e4d09e0cf3f, (a0f25a5ba637d5c8e7c42911c4336085, trojan/w32.agent.61440.eii))]
349-
.. storm-cli:: $threshold=5 file:bytes +{ -> it:av:filehit } >= $threshold [ +#review ]
347+
.. storm-pre:: [file:bytes=sha256:0000746c55336cd8d34885545f9347d96607d0391fbd3e76dae7f2b3447775b4 (it:av:scan:result=(sha256:0000746c55336cd8d34885545f9347d96607d0391fbd3e76dae7f2b3447775b4, trojan.gen.2) :signame="trojan.gen.2" :target:file="sha256:0000746c55336cd8d34885545f9347d96607d0391fbd3e76dae7f2b3447775b4") (it:av:scan:result=(sha256:0000746c55336cd8d34885545f9347d96607d0391fbd3e76dae7f2b3447775b4, trojan.agent/gen-onlinegames) :signame="trojan.agent/gen-onlinegames" :target:file="sha256:0000746c55336cd8d34885545f9347d96607d0391fbd3e76dae7f2b3447775b4") (it:av:scan:result=(sha256:0000746c55336cd8d34885545f9347d96607d0391fbd3e76dae7f2b3447775b4, w32/imestartup.a.gen!eldorado) :signame="w32/imestartup.a.gen!eldorado" :target:file="sha256:0000746c55336cd8d34885545f9347d96607d0391fbd3e76dae7f2b3447775b4")]
348+
.. storm-pre:: [file:bytes=sha256:00007694135237ec8dc5234007043814608f239befdfc8a61b992e4d09e0cf3f (it:av:scan:result=(sha256:00007694135237ec8dc5234007043814608f239befdfc8a61b992e4d09e0cf3f, troj_gen.r002c0gkj17) :signame="" :target:file="sha256:00007694135237ec8dc5234007043814608f239befdfc8a61b992e4d09e0cf3f") (it:av:scan:result=(sha256:00007694135237ec8dc5234007043814608f239befdfc8a61b992e4d09e0cf3f, malicious.1b8fb7) :signame="malicious.1b8fb7" :target:file="sha256:00007694135237ec8dc5234007043814608f239befdfc8a61b992e4d09e0cf3f") (it:av:scan:result=(sha256:00007694135237ec8dc5234007043814608f239befdfc8a61b992e4d09e0cf3f, trojan-ddos.win32.stormattack.c) :signame="trojan-ddos.win32.stormattack.c" :target:file="sha256:00007694135237ec8dc5234007043814608f239befdfc8a61b992e4d09e0cf3f") (it:av:scan:result=(sha256:00007694135237ec8dc5234007043814608f239befdfc8a61b992e4d09e0cf3f, "trojan ( 00073eb11 )") :signame="trojan ( 00073eb11 )" :target:file="sha256:00007694135237ec8dc5234007043814608f239befdfc8a61b992e4d09e0cf3f") (it:av:scan:result=(sha256:00007694135237ec8dc5234007043814608f239befdfc8a61b992e4d09e0cf3f, tool.stormattack.win32.10) :signame="tool.stormattack.win32.10" :target:file="sha256:00007694135237ec8dc5234007043814608f239befdfc8a61b992e4d09e0cf3f") (it:av:scan:result=(sha256:00007694135237ec8dc5234007043814608f239befdfc8a61b992e4d09e0cf3f, trojan/w32.agent.61440.eii) :signame="trojan/w32.agent.61440.eii" :target:file="sha256:00007694135237ec8dc5234007043814608f239befdfc8a61b992e4d09e0cf3f")]
349+
.. storm-cli:: $threshold=5 file:bytes +{ -> it:av:scan:result } >= $threshold [ +#review ]
350350

351351
.. TIP::
352352

353-
The example above uses a subquery filter (:ref:`filter-subquery`) to pivot to the ``it:av:filehit`` nodes
354-
associated with the ``file:bytes`` node, and compares the number of AV hits to the value of the ``$threshold``
353+
The example above uses a subquery filter (:ref:`filter-subquery`) to pivot to the ``it:av:scan:result`` nodes
354+
associated with the ``file:bytes`` node, and compares the number of AV results to the value of the ``$threshold``
355355
variable.
356356

357357

docs/synapse/userguides/storm_ref_data_mod.rstorm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,16 +409,16 @@ a more "human friendly" method.
409409

410410
*Use a subquery to assign an organization's (ou:org) guid as the secondary property of a ps:contact node:*
411411

412-
.. storm-pre:: [ ou:org=0fa690c06970d2d2ae74e43a18f46c2a :alias=usgovdoj :url=https://www.justice.gov/ :name="U.S. Department of Justice" ]
412+
.. storm-pre:: [ ou:org=0fa690c06970d2d2ae74e43a18f46c2a :names=(usgovdoj,) :url=https://www.justice.gov/ :name="U.S. Department of Justice" ]
413413
.. storm-pre:: [ ps:contact=d41d8cd98f00b204e9800998ecf8427e :orgname="U.S. Department of Justice" :address="950 Pennsylvania Avenue NW, Washington, DC, 20530-0001" :phone="+1 202-514-2000" :loc="us.dc.washington" ]
414-
.. storm-cli:: ps:contact:orgname="U.S. Department of Justice" [ :org={ ou:org:alias=usgovdoj } ]
414+
.. storm-cli:: ps:contact:orgname="U.S. Department of Justice" [ :org={ ou:org:names*[=usgovdoj] } ]
415415

416-
In the example above, the subquery ``ou:org:alias=usgovdoj`` is used to lift the organization node with that ``:alias``
416+
In the example above, the subquery ``ou:org:names*[=usgovdoj]`` is used to lift the organization node with that ``:names``
417417
property value and assign the ``ou:org`` node's guid value to the ``:org`` property of the ``ps:contact`` node.
418418

419419
*Use a subquery to assign one or more industries (ou:industry) to an organization (ou:org):*
420420

421-
.. storm-pre:: [ ou:org=2848b564bf1e68563e3fea4ce27299f3 :alias=apple :name=apple :names=(apple, "apple, inc.") :phone="+1 408-996-1010" :loc=us.ca.cupertino]
421+
.. storm-pre:: [ ou:org=2848b564bf1e68563e3fea4ce27299f3 :name=apple :names=(apple, "apple, inc.") :phone="+1 408-996-1010" :loc=us.ca.cupertino]
422422
.. storm-pre:: [ps:contact="*" :orgname="Apple" :address="1 Apple Park Way, Cupertino, CA 95014" :phone="+1 202-514-2000" :loc="us.ca.cupertino"]
423423
.. storm-pre:: [ ou:industry="*" :name="Computers and Electronics" ]
424424
.. storm-pre:: [ ou:industry="*" :name="Telecommunications" ]

0 commit comments

Comments
 (0)