synapse 2.216.0__py311-none-any.whl → 2.217.0__py311-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of synapse might be problematic. Click here for more details.
- synapse/lib/stormtypes.py +6 -0
- synapse/lib/version.py +2 -2
- synapse/models/inet.py +17 -3
- synapse/models/orgs.py +4 -2
- synapse/tests/test_model_inet.py +21 -0
- {synapse-2.216.0.dist-info → synapse-2.217.0.dist-info}/METADATA +1 -1
- {synapse-2.216.0.dist-info → synapse-2.217.0.dist-info}/RECORD +10 -10
- {synapse-2.216.0.dist-info → synapse-2.217.0.dist-info}/WHEEL +0 -0
- {synapse-2.216.0.dist-info → synapse-2.217.0.dist-info}/licenses/LICENSE +0 -0
- {synapse-2.216.0.dist-info → synapse-2.217.0.dist-info}/top_level.txt +0 -0
synapse/lib/stormtypes.py
CHANGED
|
@@ -3653,6 +3653,12 @@ class LibFeed(Lib):
|
|
|
3653
3653
|
{'name': 'data', 'type': 'prim', 'desc': 'Data to send to the ingest function.', },
|
|
3654
3654
|
),
|
|
3655
3655
|
'returns': {'type': 'null', }}},
|
|
3656
|
+
{'name': 'fromAxon', 'desc': 'Load a syn.nodes formatted export from axon.',
|
|
3657
|
+
'type': {'type': 'function', '_funcname': '_fromAxon',
|
|
3658
|
+
'args': (
|
|
3659
|
+
{'name': 'sha256', 'type': 'str', 'desc': 'The sha256 of the file stored in the axon.', },
|
|
3660
|
+
),
|
|
3661
|
+
'returns': {'type': 'int', 'desc': 'The number of nodes loaded.', }}},
|
|
3656
3662
|
)
|
|
3657
3663
|
_storm_lib_path = ('feed',)
|
|
3658
3664
|
|
synapse/lib/version.py
CHANGED
|
@@ -223,6 +223,6 @@ def reqVersion(valu, reqver,
|
|
|
223
223
|
##############################################################################
|
|
224
224
|
# The following are touched during the release process by bumpversion.
|
|
225
225
|
# Do not modify these directly.
|
|
226
|
-
version = (2,
|
|
226
|
+
version = (2, 217, 0)
|
|
227
227
|
verstring = '.'.join([str(x) for x in version])
|
|
228
|
-
commit = '
|
|
228
|
+
commit = 'fa725ddc1b27901036592ea24d075fbe121349fa'
|
synapse/models/inet.py
CHANGED
|
@@ -108,6 +108,10 @@ def getAddrScope(ipv6):
|
|
|
108
108
|
|
|
109
109
|
class Addr(s_types.Str):
|
|
110
110
|
|
|
111
|
+
protos = ('tcp', 'udp', 'icmp', 'host', 'gre')
|
|
112
|
+
# TODO: this should include icmp and host but requires a migration
|
|
113
|
+
noports = ('gre',)
|
|
114
|
+
|
|
111
115
|
def postTypeInit(self):
|
|
112
116
|
s_types.Str.postTypeInit(self)
|
|
113
117
|
self.setNormFunc(str, self._normPyStr)
|
|
@@ -140,9 +144,11 @@ class Addr(s_types.Str):
|
|
|
140
144
|
if len(parts) == 2:
|
|
141
145
|
proto, valu = parts
|
|
142
146
|
|
|
143
|
-
if proto not in
|
|
144
|
-
|
|
145
|
-
|
|
147
|
+
if proto not in self.protos:
|
|
148
|
+
protostr = ','.join(self.protos)
|
|
149
|
+
mesg = f'inet:addr protocol must be one of: {protostr}'
|
|
150
|
+
raise s_exc.BadTypeValu(mesg=mesg, valu=orig, name=self.name)
|
|
151
|
+
|
|
146
152
|
subs['proto'] = proto
|
|
147
153
|
|
|
148
154
|
valu = valu.strip().strip('/')
|
|
@@ -181,6 +187,10 @@ class Addr(s_types.Str):
|
|
|
181
187
|
subs['port'] = port
|
|
182
188
|
portstr = f':{port}'
|
|
183
189
|
|
|
190
|
+
if port and proto in self.noports:
|
|
191
|
+
mesg = f'Protocol {proto} does not allow specifying ports.'
|
|
192
|
+
raise s_exc.BadTypeValu(mesg=mesg, valu=orig)
|
|
193
|
+
|
|
184
194
|
return f'{proto}://[{ipv6}]{portstr}', {'subs': subs}
|
|
185
195
|
|
|
186
196
|
mesg = f'Invalid IPv6 w/port ({orig})'
|
|
@@ -196,6 +206,10 @@ class Addr(s_types.Str):
|
|
|
196
206
|
if port:
|
|
197
207
|
subs['port'] = port
|
|
198
208
|
|
|
209
|
+
if port and proto in self.noports:
|
|
210
|
+
mesg = f'Protocol {proto} does not allow specifying ports.'
|
|
211
|
+
raise s_exc.BadTypeValu(mesg=mesg, valu=orig)
|
|
212
|
+
|
|
199
213
|
ipv4 = self.modl.type('inet:ipv4').norm(valu)[0]
|
|
200
214
|
ipv4_repr = self.modl.type('inet:ipv4').repr(ipv4)
|
|
201
215
|
subs['ipv4'] = ipv4
|
synapse/models/orgs.py
CHANGED
|
@@ -292,11 +292,13 @@ class OuModule(s_module.CoreModule):
|
|
|
292
292
|
'doc': 'An organization enacting a document.'}),
|
|
293
293
|
|
|
294
294
|
('ou:requirement:type:taxonomy', ('taxonomy', {}), {
|
|
295
|
+
'deprecated': True,
|
|
295
296
|
'interfaces': ('meta:taxonomy',),
|
|
296
|
-
'doc': '
|
|
297
|
+
'doc': 'Deprecated. Please use doc:requirement and ou:enacted.'}),
|
|
297
298
|
|
|
298
299
|
('ou:requirement', ('guid', {}), {
|
|
299
|
-
'
|
|
300
|
+
'deprecated': True,
|
|
301
|
+
'doc': 'Deprecated. Please use doc:requirement and ou:enacted.'}),
|
|
300
302
|
|
|
301
303
|
),
|
|
302
304
|
'edges': (
|
synapse/tests/test_model_inet.py
CHANGED
|
@@ -1363,6 +1363,27 @@ class InetModelTest(s_t_utils.SynTest):
|
|
|
1363
1363
|
for p, v in props.items():
|
|
1364
1364
|
self.eq(node.get(p), v)
|
|
1365
1365
|
|
|
1366
|
+
nodes = await core.nodes('[ inet:server=gre://::1 ]')
|
|
1367
|
+
self.eq(nodes[0].get('proto'), 'gre')
|
|
1368
|
+
|
|
1369
|
+
nodes = await core.nodes('[ inet:server=gre://1.2.3.4 ]')
|
|
1370
|
+
self.eq(nodes[0].get('proto'), 'gre')
|
|
1371
|
+
|
|
1372
|
+
with self.raises(s_exc.BadTypeValu) as ctx:
|
|
1373
|
+
await core.nodes('[ inet:server=gre://1.2.3.4:99 ]')
|
|
1374
|
+
|
|
1375
|
+
self.eq(ctx.exception.get('mesg'), 'Protocol gre does not allow specifying ports.')
|
|
1376
|
+
|
|
1377
|
+
with self.raises(s_exc.BadTypeValu) as ctx:
|
|
1378
|
+
await core.nodes('[ inet:server="gre://[::1]:99" ]')
|
|
1379
|
+
|
|
1380
|
+
self.eq(ctx.exception.get('mesg'), 'Protocol gre does not allow specifying ports.')
|
|
1381
|
+
|
|
1382
|
+
with self.raises(s_exc.BadTypeValu) as ctx:
|
|
1383
|
+
await core.nodes('[ inet:server=newp://1.2.3.4:99 ]')
|
|
1384
|
+
|
|
1385
|
+
self.eq(ctx.exception.get('mesg'), 'inet:addr protocol must be one of: tcp,udp,icmp,host,gre')
|
|
1386
|
+
|
|
1366
1387
|
async def test_servfile(self):
|
|
1367
1388
|
async with self.getTestCore() as core:
|
|
1368
1389
|
valu = ('tcp://127.0.0.1:4040', 64 * 'f')
|
|
@@ -147,7 +147,7 @@ synapse/lib/storm_format.py,sha256=9cE8WNPYTcqgRakIqkmIQzOr16Hqbj_sM1QabHug3i0,4
|
|
|
147
147
|
synapse/lib/stormctrl.py,sha256=3UC2LOHClC17JwYNuo8NeyntuAvIXphjenXEzVP33mY,2523
|
|
148
148
|
synapse/lib/stormhttp.py,sha256=3BdaZM6wC3iuYc4ryxtroyTdGhGhei40EoKiH4qSwIE,28877
|
|
149
149
|
synapse/lib/stormsvc.py,sha256=FURIsQUVNJmY8Z5TmhTF1O__DGXPiVg5pUiOoPM8r3g,7573
|
|
150
|
-
synapse/lib/stormtypes.py,sha256=
|
|
150
|
+
synapse/lib/stormtypes.py,sha256=ua9kSTannw-pEtPku2TTPxlbLm5jpTWipy499QU7p2M,402978
|
|
151
151
|
synapse/lib/stormwhois.py,sha256=w7N2oCyMljNvi_sRt_bZb5BJwWwYkVGcRd7H_0oHY8Q,2554
|
|
152
152
|
synapse/lib/structlog.py,sha256=v5MK5jtJIRSF-E4y4fQuzEVKmbocu8ByFLDTY8Ybjpk,1336
|
|
153
153
|
synapse/lib/task.py,sha256=LVVM7Yr0VPUihIH6N_CrMHm3GHZR3bu-dw05SkG8zFE,6267
|
|
@@ -158,7 +158,7 @@ synapse/lib/time.py,sha256=bk_1F6_MDuCWJ1ToPJ-XHkeTWVw5b4SE7cCixBqVxXo,9435
|
|
|
158
158
|
synapse/lib/trigger.py,sha256=mnfkoBHB88JfqPoxb5oflvAaBKZpNvYdxP247YS53fE,20697
|
|
159
159
|
synapse/lib/types.py,sha256=0ILS8netSELraSJu1YfPyQf3P-bVbevYkVzSC-WigsU,70917
|
|
160
160
|
synapse/lib/urlhelp.py,sha256=ljhnF91z9ihyOLdZZ6OoQYCN1WYjOj1imukD45xiKU0,3320
|
|
161
|
-
synapse/lib/version.py,sha256=
|
|
161
|
+
synapse/lib/version.py,sha256=st9zKLbnexW26dQh7BZgWR50f30Dn8u5dRmga6sXKqY,7162
|
|
162
162
|
synapse/lib/view.py,sha256=9PZTDSkw002hiCF2gYIBMSUB3uRSht5UJBgFUxnh-D4,62989
|
|
163
163
|
synapse/lib/crypto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
164
164
|
synapse/lib/crypto/coin.py,sha256=_dhlkzIrHT8BvHdJOWK7PDThz3sK3dDRnWAUqjRpZJc,4910
|
|
@@ -239,13 +239,13 @@ synapse/models/entity.py,sha256=loHKByGwv2xyz6cYWWUpwk12mxWNzC06BKgDgWfX6ek,1617
|
|
|
239
239
|
synapse/models/files.py,sha256=4nA0LGK2gKEjErzTnFfIX7kxNn8c_C7xWAfiwWFz5zY,34396
|
|
240
240
|
synapse/models/geopol.py,sha256=1DGxLJ60QlnSIe3WxxViYQ3KFSwm89vvGc534bbSNBo,11304
|
|
241
241
|
synapse/models/geospace.py,sha256=Ix54xGdGRZNqLI0r6r9OA1t6vqB3XM1lkoy86Vjt5XA,21155
|
|
242
|
-
synapse/models/inet.py,sha256=
|
|
242
|
+
synapse/models/inet.py,sha256=IZp-32QuHfi7u4MDrP7K-0gGQ5xNVTvDesbT_Y0J_kM,181666
|
|
243
243
|
synapse/models/infotech.py,sha256=IfxcD3Ap9W4jrBGkI55kej6UOdnTE2ZL3dH4R9f3MbI,155406
|
|
244
244
|
synapse/models/language.py,sha256=hBVVIf5kc_FSIV7HZhWnberoc9ssxuqeff4fqC9iz4o,3640
|
|
245
245
|
synapse/models/material.py,sha256=UvmnBEkbhBbdbnvWtTlgGJAJlKDrx9E-YSQ3K49ws5M,5405
|
|
246
246
|
synapse/models/math.py,sha256=5zDLSwGbOcWI6T5-KspPL20sR8Bcs59pnRK2nEELzss,1775
|
|
247
247
|
synapse/models/media.py,sha256=wdXNzLrHb4YYRZ3NlGombNwZsphwfH20oZQQ9ICq7ZQ,3604
|
|
248
|
-
synapse/models/orgs.py,sha256=
|
|
248
|
+
synapse/models/orgs.py,sha256=mip4C0vIy56zkyCLpCTF7U4IJH1snQq-UV533llOlOE,71623
|
|
249
249
|
synapse/models/person.py,sha256=HiZy_zT0Q1AoeXbpogEJWuJe436bOo_Ai4kkmA9c2ZU,28568
|
|
250
250
|
synapse/models/planning.py,sha256=vmrY4d3WRxizrNU1YBe36NGZTuuu4lhGS8KI5lCZ5yQ,7302
|
|
251
251
|
synapse/models/proj.py,sha256=vl-2uZouiWSey8t4lTNA4BxUKhX94rqm3SuLrodQUP8,9904
|
|
@@ -408,7 +408,7 @@ synapse/tests/test_model_geospace.py,sha256=8ATsx662mrcKzurMpQGbshnQPYOWqO7wxOWp
|
|
|
408
408
|
synapse/tests/test_model_gov_cn.py,sha256=FnfKNM_wnvmScLm4cYFSQXZ21kVaTPPDusiCD79awBA,675
|
|
409
409
|
synapse/tests/test_model_gov_intl.py,sha256=mHYK056C2R0aDH-5-TnUxtH0ZlKnEOoSd9ODIMasmow,780
|
|
410
410
|
synapse/tests/test_model_gov_us.py,sha256=kvZ9DudBrbKtZmqGm8X-b_IOw4oJ7XZMnvTgiDkzsrY,1525
|
|
411
|
-
synapse/tests/test_model_inet.py,sha256=
|
|
411
|
+
synapse/tests/test_model_inet.py,sha256=svw0v3_yYNpRppQGhLNwWCiHohtgvJMX8CECuqIhuMg,160698
|
|
412
412
|
synapse/tests/test_model_infotech.py,sha256=LQciaMSvpRKtViYAMwErSHBcH_kZY-m74sckzefiz7I,115428
|
|
413
413
|
synapse/tests/test_model_language.py,sha256=49stF1B8_EwWJB67Xa5VXCG563Zfbr6S85iKN9Iom48,3046
|
|
414
414
|
synapse/tests/test_model_material.py,sha256=Hkd8BJh6FdQE0RuFMV2NO6fGqw9kOCb5AeIuTYtwCEM,2723
|
|
@@ -642,8 +642,8 @@ synapse/vendor/xrpl/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
|
642
642
|
synapse/vendor/xrpl/tests/test_codec.py,sha256=Zwq6A5uZUK_FWDL3BA932c5b-rL3hnC6efobWHSLC4o,6651
|
|
643
643
|
synapse/vendor/xrpl/tests/test_main.py,sha256=kZQwWk7I6HrP-PMvLdsUUN4POvWD9I-iXDHOwdeF090,4299
|
|
644
644
|
synapse/vendor/xrpl/tests/test_main_test_cases.py,sha256=vTlUM4hJD2Hd2wCIdd9rfsvcMZZZQmNHWdCTTFeGz2Y,4221
|
|
645
|
-
synapse-2.
|
|
646
|
-
synapse-2.
|
|
647
|
-
synapse-2.
|
|
648
|
-
synapse-2.
|
|
649
|
-
synapse-2.
|
|
645
|
+
synapse-2.217.0.dist-info/licenses/LICENSE,sha256=xllut76FgcGL5zbIRvuRc7aezPbvlMUTWJPsVr2Sugg,11358
|
|
646
|
+
synapse-2.217.0.dist-info/METADATA,sha256=Xa4oN8Jda1jQFPXGDBADn_IAbs-zbdNKD7yg4c0ZCQk,4623
|
|
647
|
+
synapse-2.217.0.dist-info/WHEEL,sha256=cRWFNt_CJSuf6BnJKAdKunDXUJxjAbWvbt_kstDCs1I,93
|
|
648
|
+
synapse-2.217.0.dist-info/top_level.txt,sha256=v_1YsqjmoSCzCKs7oIhzTNmWtSYoORiBMv1TJkOhx8A,8
|
|
649
|
+
synapse-2.217.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|