fluidattacks_core_serializers 12.0.0__tar.gz → 12.1.0__tar.gz

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.
Files changed (22) hide show
  1. fluidattacks_core_serializers-12.1.0/.envrc +1 -0
  2. fluidattacks_core_serializers-12.1.0/.gitignore +16 -0
  3. {fluidattacks_core_serializers-12.0.0 → fluidattacks_core_serializers-12.1.0}/PKG-INFO +2 -1
  4. {fluidattacks_core_serializers-12.0.0 → fluidattacks_core_serializers-12.1.0}/fluidattacks_core/serializers/snippet.py +23 -1
  5. {fluidattacks_core_serializers-12.0.0 → fluidattacks_core_serializers-12.1.0}/fluidattacks_core/serializers/syntax.py +41 -12
  6. {fluidattacks_core_serializers-12.0.0 → fluidattacks_core_serializers-12.1.0}/import-linter.cfg +1 -10
  7. {fluidattacks_core_serializers-12.0.0 → fluidattacks_core_serializers-12.1.0}/pyproject.toml +3 -1
  8. {fluidattacks_core_serializers-12.0.0 → fluidattacks_core_serializers-12.1.0}/ruff.toml +3 -0
  9. fluidattacks_core_serializers-12.1.0/tests/test_elixir_syntax.py +137 -0
  10. {fluidattacks_core_serializers-12.0.0 → fluidattacks_core_serializers-12.1.0}/uv.lock +20 -2
  11. fluidattacks_core_serializers-12.0.0/.envrc +0 -1
  12. fluidattacks_core_serializers-12.0.0/.gitignore +0 -5
  13. fluidattacks_core_serializers-12.0.0/build/default.nix +0 -19
  14. fluidattacks_core_serializers-12.0.0/build/filter.nix +0 -13
  15. fluidattacks_core_serializers-12.0.0/flake.lock +0 -303
  16. fluidattacks_core_serializers-12.0.0/flake.nix +0 -29
  17. {fluidattacks_core_serializers-12.0.0 → fluidattacks_core_serializers-12.1.0}/fluidattacks_core/serializers/__init__.py +0 -0
  18. {fluidattacks_core_serializers-12.0.0 → fluidattacks_core_serializers-12.1.0}/fluidattacks_core/serializers/py.typed +0 -0
  19. {fluidattacks_core_serializers-12.0.0 → fluidattacks_core_serializers-12.1.0}/mypy.ini +0 -0
  20. {fluidattacks_core_serializers-12.0.0 → fluidattacks_core_serializers-12.1.0}/tests/__init__.py +0 -0
  21. {fluidattacks_core_serializers-12.0.0 → fluidattacks_core_serializers-12.1.0}/tests/test_make_snippet.py +0 -0
  22. {fluidattacks_core_serializers-12.0.0 → fluidattacks_core_serializers-12.1.0}/tests/test_syntax_language_resolution.py +0 -0
@@ -0,0 +1 @@
1
+ use flake ../../..#fluidattacks-core-serializers
@@ -0,0 +1,16 @@
1
+ dist/
2
+ dist-*/
3
+ *.zip
4
+ /utils/terraform-modules/**/.terraform.lock.hcl
5
+ /.cargo-cache
6
+ target/
7
+ .direnv/
8
+ .venv/
9
+ .vscode/settings.json
10
+ .zed/settings.json
11
+ # each package's shell writes its own, beside the package rather than here
12
+ **/.vscode/settings.json
13
+ *.so
14
+ # the publish check builds into its own tree per architecture
15
+ target-*/
16
+ /develops-ci-analytics-output
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: fluidattacks_core_serializers
3
- Version: 12.0.0
3
+ Version: 12.1.0
4
4
  Summary: Fluid Attacks Core Serializers Library
5
5
  Author-email: Development <development@fluidattacks.com>
6
6
  License: MPL-2.0
@@ -14,6 +14,7 @@ Requires-Python: >=3.11
14
14
  Requires-Dist: more-itertools>=10.0.0
15
15
  Requires-Dist: tree-sitter-c-sharp>=0.23.1
16
16
  Requires-Dist: tree-sitter-dart-orchard>=0.3.2
17
+ Requires-Dist: tree-sitter-elixir>=0.3.5
17
18
  Requires-Dist: tree-sitter-go>=0.23.4
18
19
  Requires-Dist: tree-sitter-html>=0.23.2
19
20
  Requires-Dist: tree-sitter-java>=0.23.4
@@ -275,13 +275,35 @@ def _chunked(line: str, chunk_size: int) -> Iterator[str]:
275
275
  yield ""
276
276
 
277
277
 
278
+ def _elixir_function_identifier(arguments: Node) -> Node | None:
279
+ head = arguments.named_child(0)
280
+ while head is not None:
281
+ if head.type != "binary_operator":
282
+ identifier = head.child_by_field_name("target") or head
283
+ if (head.type, identifier.text) == ("call", b"unquote"):
284
+ return None
285
+ return (
286
+ identifier
287
+ if identifier.type == "identifier"
288
+ else identifier.child_by_field_name("operator")
289
+ )
290
+ operator = head.child_by_field_name("operator")
291
+ if operator is None or operator.text != b"when":
292
+ return operator
293
+ head = head.child_by_field_name("left")
294
+ return None
295
+
296
+
278
297
  def find_function_name(func_nodes: list[Node], language: str) -> tuple[Node, str] | None:
279
298
  for node in func_nodes:
280
299
  if (field_name := TREE_SITTER_FUNCTION_IDENTIFIER.get(language, {}).get(node.type)) and (
281
300
  (children := node.child_by_field_name(field_name))
282
301
  or (children := next((x for x in node.children if x.type == field_name), None))
283
302
  ):
284
- return children, node.type
303
+ if language == "elixir":
304
+ children = _elixir_function_identifier(children)
305
+ if children is not None:
306
+ return children, node.type
285
307
  return None
286
308
 
287
309
 
@@ -38,6 +38,8 @@ TREE_SITTER_SUPPORTED_IMPERATIVE_LANGUAGES = {
38
38
  ".cs": "csharp",
39
39
  ".cshtml": "razor",
40
40
  ".dart": "dart",
41
+ ".ex": "elixir",
42
+ ".exs": "elixir",
41
43
  ".go": "go",
42
44
  ".java": "java",
43
45
  ".js": "javascript",
@@ -87,6 +89,7 @@ TREE_SITTER_IMPORTS_DECLARATIONS_MAP: dict[str, tuple[str, ...]] = {
87
89
  }
88
90
 
89
91
  TREE_SITTER_FUNCTION_DECLARATION_MAP: dict[str, tuple[str, ...]] = {
92
+ "elixir": ("call",),
90
93
  "csharp": (
91
94
  "constructor_declaration",
92
95
  "conversion_operator_declaration",
@@ -188,6 +191,9 @@ TREE_SITTER_FUNCTION_DECLARATION_MAP: dict[str, tuple[str, ...]] = {
188
191
  }
189
192
 
190
193
  TREE_SITTER_FUNCTION_IDENTIFIER = {
194
+ "elixir": {
195
+ "call": "arguments",
196
+ },
191
197
  "python": {
192
198
  "function_definition": "name",
193
199
  },
@@ -254,6 +260,13 @@ TREE_SITTER_REQUIRES_SEQUENCE = {
254
260
  "dart": ("function_signature", "function_body"),
255
261
  }
256
262
 
263
+ _TREE_SITTER_DECLARATION_TARGETS = {
264
+ "elixir": {
265
+ # Elixir represents definitions, modules and ordinary invocations as calls.
266
+ "call": (b"def", b"defp", b"defmacro", b"defmacrop"),
267
+ },
268
+ }
269
+
257
270
 
258
271
  class InvalidFileType(Exception): # noqa: N818
259
272
  """Exception to control file type."""
@@ -327,18 +340,40 @@ def parse_content_tree_sitter(
327
340
  return parser.parse(content)
328
341
 
329
342
 
343
+ def _matches_declaration(language: str, node: Node) -> bool:
344
+ targets = _TREE_SITTER_DECLARATION_TARGETS.get(language, {}).get(node.type)
345
+ if targets is None:
346
+ return True
347
+ target = node.child_by_field_name("target")
348
+ if target is not None and target.type == "dot":
349
+ module = target.child_by_field_name("left")
350
+ target = (
351
+ target.child_by_field_name("right")
352
+ if module is not None
353
+ and b"".join((module.text or b"").split()) in (b"Kernel", b"Elixir.Kernel")
354
+ else None
355
+ )
356
+ return target is not None and target.type == "identifier" and target.text in targets
357
+
358
+
330
359
  def query_nodes_by_language(
331
360
  language: str,
332
- tree: Tree,
361
+ tree: Tree | Node,
333
362
  queries_map: dict[str, tuple[str, ...]],
334
363
  ) -> dict[str, list[Node]]:
335
364
  try:
336
365
  language_parser = get_language_for_tree(language)
337
366
  except OSError as exc:
338
367
  raise InvalidFileType from exc
339
- query = "\n".join(f"({item}) @{item}" for item in queries_map.get(language, []))
368
+ node_types = queries_map.get(language, ())
369
+ query = "\n".join(f"({item}) @{item}" for item in node_types)
340
370
  query_cursor = QueryCursor(tree_sitter.Query(language_parser, query))
341
- return query_cursor.captures(tree.root_node)
371
+ return {
372
+ kind: [node for node in nodes if _matches_declaration(language, node)]
373
+ for kind, nodes in query_cursor.captures(
374
+ tree.root_node if isinstance(tree, Tree) else tree
375
+ ).items()
376
+ }
342
377
 
343
378
 
344
379
  def query_function_by_name(
@@ -362,10 +397,7 @@ def find_function_expression_by_query(
362
397
  original_node: Node,
363
398
  desired_line: int,
364
399
  ) -> Node | None:
365
- language_parser = get_language_for_tree(language)
366
- target_nodes: tuple[str, ...] = TREE_SITTER_FUNCTION_DECLARATION_MAP.get(language, ())
367
- query = "([" + (" ".join(f"({item})" for item in target_nodes)) + "] @target )"
368
- result = QueryCursor(tree_sitter.Query(language_parser, query)).captures(original_node)
400
+ result = query_nodes_by_language(language, original_node, TREE_SITTER_FUNCTION_DECLARATION_MAP)
369
401
 
370
402
  nodes = [node for _, nodes in result.items() for node in nodes]
371
403
  candidates = [
@@ -394,7 +426,7 @@ def find_function_expression(original_node: Node | None, language: str) -> Node
394
426
  node = original_node
395
427
  while node:
396
428
  for node_name in target_nodes:
397
- if node_name == node.type:
429
+ if node_name == node.type and _matches_declaration(language, node):
398
430
  return node
399
431
  node = node.parent
400
432
 
@@ -466,10 +498,7 @@ def _process_hierarchical_candidates(
466
498
  List of nodes ordered from most specific to most general
467
499
 
468
500
  """
469
- language_parser = get_language_for_tree(language)
470
- target_nodes: tuple[str, ...] = TREE_SITTER_FUNCTION_DECLARATION_MAP.get(language, ())
471
- query = "([" + (" ".join(f"({item})" for item in target_nodes)) + "] @target )"
472
- result = QueryCursor(tree_sitter.Query(language_parser, query)).captures(root_node)
501
+ result = query_nodes_by_language(language, root_node, TREE_SITTER_FUNCTION_DECLARATION_MAP)
473
502
 
474
503
  nodes = [node for _, nodes in result.items() for node in nodes]
475
504
  return [
@@ -1,16 +1,7 @@
1
1
  [importlinter]
2
- root_package = fluidattacks_core
2
+ root_package = fluidattacks_core.serializers
3
3
  include_external_packages = True
4
4
 
5
- [importlinter:contract:portion]
6
- name = Single Portion
7
- type = layers
8
- containers =
9
- fluidattacks_core
10
- exhaustive = true
11
- layers =
12
- serializers
13
-
14
5
  [importlinter:contract:dag]
15
6
  name = Direct Acyclic Graph
16
7
  type = layers
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fluidattacks_core_serializers"
3
- version = "12.0.0"
3
+ version = "12.1.0"
4
4
  description = "Fluid Attacks Core Serializers Library"
5
5
  authors = [{ name = "Development", email = "development@fluidattacks.com" }]
6
6
  license = { text = "MPL-2.0" }
@@ -17,6 +17,7 @@ dependencies = [
17
17
  "more-itertools>=10.0.0",
18
18
  "tree-sitter-c-sharp>=0.23.1",
19
19
  "tree-sitter-dart-orchard>=0.3.2",
20
+ "tree-sitter-elixir>=0.3.5",
20
21
  "tree-sitter-go>=0.23.4",
21
22
  "tree-sitter-html>=0.23.2",
22
23
  "tree-sitter-java>=0.23.4",
@@ -48,6 +49,7 @@ known_first_party = ["fluidattacks_core"]
48
49
  DEP002 = [
49
50
  "tree-sitter-c-sharp",
50
51
  "tree-sitter-dart-orchard",
52
+ "tree-sitter-elixir",
51
53
  "tree-sitter-go",
52
54
  "tree-sitter-html",
53
55
  "tree-sitter-java",
@@ -35,6 +35,9 @@ indent-style = "space"
35
35
  skip-magic-trailing-comma = false
36
36
  line-ending = "lf"
37
37
 
38
+ [lint.isort]
39
+ known-first-party = ["fluidattacks_core"]
40
+
38
41
  [lint.mccabe]
39
42
  max-complexity = 8
40
43
 
@@ -0,0 +1,137 @@
1
+ import pytest
2
+
3
+ from fluidattacks_core.serializers.snippet import Function, extract_function
4
+ from fluidattacks_core.serializers.syntax import (
5
+ TREE_SITTER_FUNCTION_DECLARATION_MAP,
6
+ extract_hierarchical_nodes,
7
+ find_function_expression,
8
+ get_language_from_path,
9
+ parse_content_tree_sitter,
10
+ query_nodes_by_language,
11
+ )
12
+
13
+
14
+ @pytest.mark.parametrize("path", ["lib/decoder.ex", "scripts/decoder.exs"])
15
+ def test_elixir_file_parses(path: str) -> None:
16
+ language = get_language_from_path(path)
17
+ assert language == "elixir"
18
+ tree = parse_content_tree_sitter(b"IO.puts(:hello)", language)
19
+ assert not tree.root_node.has_error
20
+
21
+
22
+ @pytest.mark.parametrize("definition", ["def", "defp", "defmacro", "defmacrop"])
23
+ @pytest.mark.parametrize(
24
+ "body",
25
+ [
26
+ "decode(data) do\n if is_binary(data) do\n :erlang.binary_to_term(data)"
27
+ "\n end\n end",
28
+ "decode(data) when is_binary(data), do: :erlang.binary_to_term(data)",
29
+ ],
30
+ )
31
+ def test_elixir_extracts_complete_definition(definition: str, body: str) -> None:
32
+ expected = f" {definition} {body}"
33
+ source = f"defmodule Decoder do\n{expected}\n def other(data), do: data\nend"
34
+ line = next(
35
+ index for index, text in enumerate(source.splitlines(), 1) if "binary_to_term" in text
36
+ )
37
+
38
+ snippet = extract_function(source, line, language="elixir")
39
+
40
+ assert snippet is not None
41
+ assert snippet.content == expected
42
+ assert snippet.start_point == (1, 0)
43
+ assert snippet.end_point is not None
44
+ assert snippet.end_point[0] == len(expected.splitlines())
45
+ assert snippet.function == Function(
46
+ name="decode", node_type="call", field_identifier_name="identifier"
47
+ )
48
+
49
+
50
+ def test_elixir_ignores_calls_outside_definitions() -> None:
51
+ source = b"defmodule Decoder do\n IO.puts(:hello)\n def decode(data), do: data\nend"
52
+ tree = parse_content_tree_sitter(source, "elixir")
53
+
54
+ captures = query_nodes_by_language("elixir", tree, TREE_SITTER_FUNCTION_DECLARATION_MAP)
55
+
56
+ assert list(captures) == ["call"]
57
+ assert [node.text for node in captures["call"]] == [b"def decode(data), do: data"]
58
+ assert extract_function(source.decode(), 2, language="elixir") is None
59
+ assert extract_hierarchical_nodes(source, 2, "elixir") == []
60
+ assert find_function_expression(tree.root_node.named_children[0], "elixir") is None
61
+
62
+
63
+ def test_elixir_hierarchy_keeps_definition_around_nested_call() -> None:
64
+ source = (
65
+ b"defmodule Decoder do\n def decode(data) do\n :erlang.binary_to_term(data)\n end\nend"
66
+ )
67
+
68
+ nodes = extract_hierarchical_nodes(source, 3, "elixir")
69
+
70
+ assert [node.text for node in nodes] == [
71
+ b"def decode(data) do\n :erlang.binary_to_term(data)\n end",
72
+ ]
73
+ inner_calls = query_nodes_by_language("elixir", nodes[0], {"elixir": ("dot",)})
74
+ assert find_function_expression(inner_calls["dot"][0], "elixir") == nodes[0]
75
+
76
+
77
+ @pytest.mark.parametrize(
78
+ ("target", "is_definition"),
79
+ [
80
+ ("Kernel.def", True),
81
+ ("Elixir.Kernel.def", True),
82
+ ("Elixir .\n Kernel.def", True),
83
+ ("Other.def", False),
84
+ ("Kernel.inspect", False),
85
+ ],
86
+ )
87
+ def test_elixir_qualified_definition_boundary(target: str, *, is_definition: bool) -> None:
88
+ expected = f" {target} decode(data) do\n :erlang.binary_to_term(data)\n end"
89
+ source = f"defmodule Decoder do\n{expected}\nend"
90
+ vulnerable_line = source.splitlines().index(" :erlang.binary_to_term(data)") + 1
91
+ tree = parse_content_tree_sitter(source.encode(), "elixir")
92
+ inner_node = tree.root_node.descendant_for_point_range(
93
+ (vulnerable_line - 1, 4), (vulnerable_line - 1, 5)
94
+ )
95
+
96
+ snippet = extract_function(source, vulnerable_line, language="elixir")
97
+ hierarchy = extract_hierarchical_nodes(source.encode(), vulnerable_line, "elixir")
98
+ ancestor = find_function_expression(inner_node, "elixir")
99
+
100
+ if is_definition:
101
+ assert snippet is not None
102
+ assert snippet.content == expected
103
+ assert snippet.function == Function(
104
+ name="decode", node_type="call", field_identifier_name="identifier"
105
+ )
106
+ assert [node.text for node in hierarchy] == [expected.lstrip().encode()]
107
+ assert ancestor is not None
108
+ assert ancestor.text == expected.lstrip().encode()
109
+ else:
110
+ assert snippet is None
111
+ assert hierarchy == []
112
+ assert ancestor is None
113
+
114
+
115
+ @pytest.mark.parametrize(
116
+ ("head", "name"),
117
+ [
118
+ ("decode", "decode"),
119
+ ("decode when true", "decode"),
120
+ ("left + right", "+"),
121
+ ("-value", "-"),
122
+ ("unquote", "unquote"),
123
+ ("unquote(name)", None),
124
+ ("unquote(name)(data)", None),
125
+ ],
126
+ )
127
+ def test_elixir_head_identifier(head: str, name: str | None) -> None:
128
+ snippet = extract_function(
129
+ f"defmodule Decoder do\n def {head}, do: :ok\nend", 2, language="elixir"
130
+ )
131
+
132
+ assert snippet is not None
133
+ if name is None:
134
+ assert snippet.function is None
135
+ else:
136
+ assert snippet.function is not None
137
+ assert snippet.function.name == name
@@ -1,5 +1,5 @@
1
1
  version = 1
2
- revision = 3
2
+ revision = 5
3
3
  requires-python = ">=3.11"
4
4
 
5
5
  [options]
@@ -178,13 +178,14 @@ wheels = [
178
178
 
179
179
  [[package]]
180
180
  name = "fluidattacks-core-serializers"
181
- version = "12.0.0"
181
+ version = "12.1.0"
182
182
  source = { editable = "." }
183
183
  dependencies = [
184
184
  { name = "more-itertools" },
185
185
  { name = "tree-sitter" },
186
186
  { name = "tree-sitter-c-sharp" },
187
187
  { name = "tree-sitter-dart-orchard" },
188
+ { name = "tree-sitter-elixir" },
188
189
  { name = "tree-sitter-go" },
189
190
  { name = "tree-sitter-html" },
190
191
  { name = "tree-sitter-java" },
@@ -214,6 +215,7 @@ requires-dist = [
214
215
  { name = "tree-sitter", specifier = ">=0.25.2" },
215
216
  { name = "tree-sitter-c-sharp", specifier = ">=0.23.1" },
216
217
  { name = "tree-sitter-dart-orchard", specifier = ">=0.3.2" },
218
+ { name = "tree-sitter-elixir", specifier = ">=0.3.5" },
217
219
  { name = "tree-sitter-go", specifier = ">=0.23.4" },
218
220
  { name = "tree-sitter-html", specifier = ">=0.23.2" },
219
221
  { name = "tree-sitter-java", specifier = ">=0.23.4" },
@@ -778,6 +780,22 @@ version = "0.3.2"
778
780
  source = { registry = "https://pypi.org/simple" }
779
781
  sdist = { url = "https://files.pythonhosted.org/packages/14/43/cc963608a3a62d4cbc99647f6cec4e49944612b6673ef208d8a1e252cf51/tree_sitter_dart_orchard-0.3.2.tar.gz", hash = "sha256:99b6e7ce0e41b3dec95c6985dded2a967e2c9ccd7085cff4d4b743c75b50db40", size = 253313, upload-time = "2025-11-17T15:53:26.69Z" }
780
782
 
783
+ [[package]]
784
+ name = "tree-sitter-elixir"
785
+ version = "0.3.5"
786
+ source = { registry = "https://pypi.org/simple" }
787
+ sdist = { url = "https://files.pythonhosted.org/packages/e8/83/0501ee426bcd40cf5f765ce66ff2e7136d438ff4e65aeb08991f9826d4e5/tree_sitter_elixir-0.3.5.tar.gz", hash = "sha256:ead089393b1ce732304e6b6fb0bc0ab79e3295663d697be025bd49f0f367b74d", size = 445087, upload-time = "2026-03-02T13:31:09.378Z" }
788
+ wheels = [
789
+ { url = "https://files.pythonhosted.org/packages/2f/29/c2c2b028c49f3c08270dd01ee72a9e735d59c59499d0b7ed09f45157f6b8/tree_sitter_elixir-0.3.5-cp39-abi3-macosx_10_9_x86_64.whl", hash = "sha256:514078a2f68d27da9a1e6b6e9601b8456faba6260ecfa252e898a848c4f8584d", size = 163335, upload-time = "2026-03-02T13:31:00.053Z" },
790
+ { url = "https://files.pythonhosted.org/packages/7e/d7/f0ad3de0b359a8a1f694268855bb34134c88774fa2276cb33413163c0403/tree_sitter_elixir-0.3.5-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:015f537731af690cfa238b0fb76a8af4f0d1a2c54a38563f159926d2967ce650", size = 174644, upload-time = "2026-03-02T13:31:01.198Z" },
791
+ { url = "https://files.pythonhosted.org/packages/31/35/78c94e164542ad08098b83cb7e046261f3ab2edade96e29727dd209bfa35/tree_sitter_elixir-0.3.5-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:ebfe3491a3d00ac50b12a3bfcabb1c564f3809ed8a095099fe87f49d6b3987e6", size = 182857, upload-time = "2026-03-02T13:31:02.512Z" },
792
+ { url = "https://files.pythonhosted.org/packages/3c/50/69ed38e335d1228f6eb1c12707269fefb349710aaf0b6d4a730ea88b95c2/tree_sitter_elixir-0.3.5-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d1159057f914d4468fc53cb9d7e8369f8a7826e1d07765bb53fbf391e6058863", size = 184199, upload-time = "2026-03-02T13:31:03.512Z" },
793
+ { url = "https://files.pythonhosted.org/packages/82/8a/8233648868bf2432cb7ab85ffc4ac4b2b1cf4addf75d6a62bacd2dba6f73/tree_sitter_elixir-0.3.5-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:d6187b4d592bfb31760799ac6ddbb5a2457ba0a612de43d77bcbcd5f00cc49bf", size = 183571, upload-time = "2026-03-02T13:31:04.728Z" },
794
+ { url = "https://files.pythonhosted.org/packages/b4/4a/f78454d228835a619db173f816090ab0c86f865987e2504280ced7fdbd5c/tree_sitter_elixir-0.3.5-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b5d5d8aa077ff244d24406b1fb5a17c03a2919c5183c51ca35654870d08b239b", size = 182618, upload-time = "2026-03-02T13:31:06.018Z" },
795
+ { url = "https://files.pythonhosted.org/packages/c6/a5/634b505a4c349becc753c1faef5350f32ca027297c16a45fb0942967db2a/tree_sitter_elixir-0.3.5-cp39-abi3-win_amd64.whl", hash = "sha256:c0b5df229405d42ba5c94254d92e414b1f200be8422561d243ae5b3558e84f76", size = 167219, upload-time = "2026-03-02T13:31:07.071Z" },
796
+ { url = "https://files.pythonhosted.org/packages/77/f2/711baae88f98e3a30efee9383fbcb603a3188c20941643c71d3d3b936d66/tree_sitter_elixir-0.3.5-cp39-abi3-win_arm64.whl", hash = "sha256:fee42b90962e1e131cc31720f3038410291b2196ed231e00c1721597fc0567df", size = 164003, upload-time = "2026-03-02T13:31:08.013Z" },
797
+ ]
798
+
781
799
  [[package]]
782
800
  name = "tree-sitter-go"
783
801
  version = "0.25.0"
@@ -1 +0,0 @@
1
- use_flake ".#python311.devShell"
@@ -1,5 +0,0 @@
1
- target/
2
- .direnv/
3
- .venv/
4
- .vscode/settings.json
5
- .zed/settings.json
@@ -1,19 +0,0 @@
1
- { src, workspace_root }:
2
- {
3
- inherit src workspace_root;
4
- root_path = "develops/fluidattacks-core/python/serializers";
5
- module_name = "fluidattacks_core";
6
- pypi_token = {
7
- method = "oidc";
8
- };
9
- override = {
10
- checks = {
11
- basedpyright = false;
12
- };
13
- configs = {
14
- import_linter = ../import-linter.cfg;
15
- mypy = ../mypy.ini;
16
- ruff = ../ruff.toml;
17
- };
18
- };
19
- }
@@ -1,13 +0,0 @@
1
- path_filter: src:
2
- path_filter {
3
- root = src;
4
- include = [
5
- "fluidattacks_core"
6
- "tests"
7
- "import-linter.cfg"
8
- "mypy.ini"
9
- "pyproject.toml"
10
- "ruff.toml"
11
- "uv.lock"
12
- ];
13
- }
@@ -1,303 +0,0 @@
1
- {
2
- "nodes": {
3
- "flake-parts": {
4
- "inputs": {
5
- "nixpkgs-lib": "nixpkgs-lib"
6
- },
7
- "locked": {
8
- "lastModified": 1762810396,
9
- "narHash": "sha256-dxFVgQPG+R72dkhXTtqUm7KpxElw3u6E+YlQ2WaDgt8=",
10
- "owner": "hercules-ci",
11
- "repo": "flake-parts",
12
- "rev": "0bdadb1b265fb4143a75bd1ec7d8c915898a9923",
13
- "type": "github"
14
- },
15
- "original": {
16
- "owner": "hercules-ci",
17
- "repo": "flake-parts",
18
- "type": "github"
19
- }
20
- },
21
- "nix_filter": {
22
- "locked": {
23
- "lastModified": 1757882181,
24
- "narHash": "sha256-+cCxYIh2UNalTz364p+QYmWHs0P+6wDhiWR4jDIKQIU=",
25
- "owner": "numtide",
26
- "repo": "nix-filter",
27
- "rev": "59c44d1909c72441144b93cf0f054be7fe764de5",
28
- "type": "github"
29
- },
30
- "original": {
31
- "owner": "numtide",
32
- "repo": "nix-filter",
33
- "type": "github"
34
- }
35
- },
36
- "nixpkgs": {
37
- "locked": {
38
- "lastModified": 1758690382,
39
- "narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=",
40
- "owner": "nixos",
41
- "repo": "nixpkgs",
42
- "rev": "e643668fd71b949c53f8626614b21ff71a07379d",
43
- "type": "github"
44
- },
45
- "original": {
46
- "owner": "nixos",
47
- "ref": "nixos-unstable",
48
- "repo": "nixpkgs",
49
- "type": "github"
50
- }
51
- },
52
- "nixpkgs-lib": {
53
- "locked": {
54
- "lastModified": 1761765539,
55
- "narHash": "sha256-b0yj6kfvO8ApcSE+QmA6mUfu8IYG6/uU28OFn4PaC8M=",
56
- "owner": "nix-community",
57
- "repo": "nixpkgs.lib",
58
- "rev": "719359f4562934ae99f5443f20aa06c2ffff91fc",
59
- "type": "github"
60
- },
61
- "original": {
62
- "owner": "nix-community",
63
- "repo": "nixpkgs.lib",
64
- "type": "github"
65
- }
66
- },
67
- "nixpkgs_2": {
68
- "locked": {
69
- "lastModified": 1758690382,
70
- "narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=",
71
- "owner": "nixos",
72
- "repo": "nixpkgs",
73
- "rev": "e643668fd71b949c53f8626614b21ff71a07379d",
74
- "type": "github"
75
- },
76
- "original": {
77
- "owner": "nixos",
78
- "ref": "nixos-unstable",
79
- "repo": "nixpkgs",
80
- "type": "github"
81
- }
82
- },
83
- "nixpkgs_3": {
84
- "locked": {
85
- "lastModified": 1761373498,
86
- "narHash": "sha256-Q/uhWNvd7V7k1H1ZPMy/vkx3F8C13ZcdrKjO7Jv7v0c=",
87
- "owner": "nixos",
88
- "repo": "nixpkgs",
89
- "rev": "6a08e6bb4e46ff7fcbb53d409b253f6bad8a28ce",
90
- "type": "github"
91
- },
92
- "original": {
93
- "owner": "nixos",
94
- "ref": "nixos-unstable",
95
- "repo": "nixpkgs",
96
- "type": "github"
97
- }
98
- },
99
- "nixpkgs_flake": {
100
- "locked": {
101
- "lastModified": 1778253243,
102
- "narHash": "sha256-KkH2QvU6iRLDTGGEwH5jnMqHWj4zMTuHxi1S1zdr01w=",
103
- "owner": "nixos",
104
- "repo": "nixpkgs",
105
- "rev": "4fcda7103530b23c5ca44286344912082aad4220",
106
- "type": "github"
107
- },
108
- "original": {
109
- "owner": "nixos",
110
- "repo": "nixpkgs",
111
- "type": "github"
112
- }
113
- },
114
- "pyproject-build-systems": {
115
- "inputs": {
116
- "nixpkgs": "nixpkgs",
117
- "pyproject-nix": "pyproject-nix",
118
- "uv2nix": "uv2nix"
119
- },
120
- "locked": {
121
- "lastModified": 1761781027,
122
- "narHash": "sha256-YDvxPAm2WnxrznRqWwHLjryBGG5Ey1ATEJXrON+TWt8=",
123
- "owner": "pyproject-nix",
124
- "repo": "build-system-pkgs",
125
- "rev": "795a980d25301e5133eca37adae37283ec3c8e66",
126
- "type": "github"
127
- },
128
- "original": {
129
- "owner": "pyproject-nix",
130
- "repo": "build-system-pkgs",
131
- "type": "github"
132
- }
133
- },
134
- "pyproject-nix": {
135
- "inputs": {
136
- "nixpkgs": [
137
- "python_builder",
138
- "pyproject-build-systems",
139
- "nixpkgs"
140
- ]
141
- },
142
- "locked": {
143
- "lastModified": 1758265079,
144
- "narHash": "sha256-amLaLNwKSZPShQHzfgmc/9o76dU8xzN0743dWgvYlr8=",
145
- "owner": "nix-community",
146
- "repo": "pyproject.nix",
147
- "rev": "02e9418fd4af638447dca4b17b1280da95527fc9",
148
- "type": "github"
149
- },
150
- "original": {
151
- "owner": "nix-community",
152
- "repo": "pyproject.nix",
153
- "type": "github"
154
- }
155
- },
156
- "pyproject-nix_2": {
157
- "inputs": {
158
- "nixpkgs": "nixpkgs_2"
159
- },
160
- "locked": {
161
- "lastModified": 1762427963,
162
- "narHash": "sha256-CkPlAbIQ87wmjy5qHibfzk4DmMGBNqFer+lLfXjpP5M=",
163
- "owner": "pyproject-nix",
164
- "repo": "pyproject.nix",
165
- "rev": "4540ea004e04fcd12dd2738d51383d10f956f7b9",
166
- "type": "github"
167
- },
168
- "original": {
169
- "owner": "pyproject-nix",
170
- "repo": "pyproject.nix",
171
- "type": "github"
172
- }
173
- },
174
- "pyproject-nix_3": {
175
- "inputs": {
176
- "nixpkgs": [
177
- "python_builder",
178
- "uv2nix",
179
- "nixpkgs"
180
- ]
181
- },
182
- "locked": {
183
- "lastModified": 1760402624,
184
- "narHash": "sha256-jF6UKLs2uGc2rtved8Vrt58oTWjTQoAssuYs/0578Z4=",
185
- "owner": "pyproject-nix",
186
- "repo": "pyproject.nix",
187
- "rev": "84c4ea102127c77058ea1ed7be7300261fafc7d2",
188
- "type": "github"
189
- },
190
- "original": {
191
- "owner": "pyproject-nix",
192
- "repo": "pyproject.nix",
193
- "type": "github"
194
- }
195
- },
196
- "python_builder": {
197
- "inputs": {
198
- "nix_filter": "nix_filter",
199
- "nixpkgs_flake": "nixpkgs_flake",
200
- "pyproject-build-systems": "pyproject-build-systems",
201
- "pyproject-nix": "pyproject-nix_2",
202
- "shell-helpers": "shell-helpers",
203
- "uv2nix": "uv2nix_2"
204
- },
205
- "locked": {
206
- "dir": "common/utils/python-builder",
207
- "lastModified": 1787078362,
208
- "narHash": "sha256-HYL7Rn6SuNjYxkt/PwFLksZjsauCiY+ENbOWryLsIlw=",
209
- "ref": "refs/heads/trunk",
210
- "rev": "09fd25a13309eb5e3b5b2a061bb340df3ae5d281",
211
- "shallow": true,
212
- "type": "git",
213
- "url": "ssh://git@gitlab.com/fluidattacks/universe"
214
- },
215
- "original": {
216
- "dir": "common/utils/python-builder",
217
- "rev": "09fd25a13309eb5e3b5b2a061bb340df3ae5d281",
218
- "shallow": true,
219
- "type": "git",
220
- "url": "ssh://git@gitlab.com/fluidattacks/universe"
221
- }
222
- },
223
- "root": {
224
- "inputs": {
225
- "python_builder": "python_builder"
226
- }
227
- },
228
- "shell-helpers": {
229
- "inputs": {
230
- "flake-parts": "flake-parts",
231
- "nixpkgs": [
232
- "python_builder",
233
- "nixpkgs_flake"
234
- ]
235
- },
236
- "locked": {
237
- "dir": "common/utils/shell-helpers",
238
- "lastModified": 1762806066,
239
- "narHash": "sha256-Wz99Fl7SpPU1NkTHJ36XOo6DjOEAMXCw3ThRABOS2Hs=",
240
- "ref": "refs/heads/trunk",
241
- "rev": "d73cfdc7ae9e7f547e22a4481d4c2ccce38b26a8",
242
- "shallow": true,
243
- "type": "git",
244
- "url": "ssh://git@gitlab.com/fluidattacks/universe"
245
- },
246
- "original": {
247
- "dir": "common/utils/shell-helpers",
248
- "rev": "d73cfdc7ae9e7f547e22a4481d4c2ccce38b26a8",
249
- "shallow": true,
250
- "type": "git",
251
- "url": "ssh://git@gitlab.com/fluidattacks/universe"
252
- }
253
- },
254
- "uv2nix": {
255
- "inputs": {
256
- "nixpkgs": [
257
- "python_builder",
258
- "pyproject-build-systems",
259
- "nixpkgs"
260
- ],
261
- "pyproject-nix": [
262
- "python_builder",
263
- "pyproject-build-systems",
264
- "pyproject-nix"
265
- ]
266
- },
267
- "locked": {
268
- "lastModified": 1758933732,
269
- "narHash": "sha256-HAmm1GBS1myZCFuog0DC2ZLaynvZtiUI2Crmo+cdQI0=",
270
- "owner": "pyproject-nix",
271
- "repo": "uv2nix",
272
- "rev": "273ce18f913d8559e0d04f820d724308966d7c4d",
273
- "type": "github"
274
- },
275
- "original": {
276
- "owner": "pyproject-nix",
277
- "repo": "uv2nix",
278
- "type": "github"
279
- }
280
- },
281
- "uv2nix_2": {
282
- "inputs": {
283
- "nixpkgs": "nixpkgs_3",
284
- "pyproject-nix": "pyproject-nix_3"
285
- },
286
- "locked": {
287
- "lastModified": 1761872265,
288
- "narHash": "sha256-i25GRgp2vUOebY70L3NTAgkd+Pr1hnn5xM3qHxH0ONU=",
289
- "owner": "pyproject-nix",
290
- "repo": "uv2nix",
291
- "rev": "74dfb62871be152ad3673b143b0cc56105a4f3c5",
292
- "type": "github"
293
- },
294
- "original": {
295
- "owner": "pyproject-nix",
296
- "repo": "uv2nix",
297
- "type": "github"
298
- }
299
- }
300
- },
301
- "root": "root",
302
- "version": 7
303
- }
@@ -1,29 +0,0 @@
1
- {
2
- description = "Fluid Attacks Core serializers package.";
3
-
4
- inputs = {
5
- python_builder = {
6
- url = "git+ssh://git@gitlab.com/fluidattacks/universe?shallow=1&rev=09fd25a13309eb5e3b5b2a061bb340df3ae5d281&dir=common/utils/python-builder";
7
- };
8
- };
9
-
10
- outputs =
11
- { self, ... }@inputs:
12
- let
13
- build_args =
14
- {
15
- system,
16
- python_version,
17
- nixpkgs,
18
- builders,
19
- scripts,
20
- }:
21
- import ./build {
22
- src = import ./build/filter.nix nixpkgs.nix-filter self;
23
- workspace_root = ./.;
24
- };
25
- in
26
- {
27
- packages = inputs.python_builder.outputs.build build_args;
28
- };
29
- }