fluidattacks_core_models 12.0.0__tar.gz → 13.0.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.
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/PKG-INFO +1 -1
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/fluidattacks_core/models/state_machines/root_scanner.py +1 -2
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/pyproject.toml +1 -1
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/tests/test_root_scanner.py +2 -38
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/uv.lock +1 -1
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/.envrc +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/.gitignore +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/build/default.nix +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/build/filter.nix +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/flake.lock +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/flake.nix +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/fluidattacks_core/models/__init__.py +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/fluidattacks_core/models/py.typed +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/fluidattacks_core/models/scanners/__init__.py +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/fluidattacks_core/models/scanners/apk_config.py +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/fluidattacks_core/models/scanners/common_config.py +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/fluidattacks_core/models/scanners/containers_sca_config.py +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/fluidattacks_core/models/scanners/cspm_config.py +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/fluidattacks_core/models/scanners/dast_config.py +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/fluidattacks_core/models/scanners/loader.py +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/fluidattacks_core/models/scanners/sast_config.py +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/fluidattacks_core/models/scanners/sbom_config.py +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/fluidattacks_core/models/scanners/sca_config.py +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/fluidattacks_core/models/scanners/scan_config.py +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/fluidattacks_core/models/scanners/sniffs_config.py +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/fluidattacks_core/models/state_machines/__init__.py +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/fluidattacks_core/models/state_machines/types.py +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/import-linter.cfg +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/mypy.ini +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/ruff.toml +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/tests/__init__.py +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/tests/test_loader_env.py +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/tests/test_model_scanner.py +0 -0
- {fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/tests/test_state_machines.py +0 -0
|
@@ -45,8 +45,7 @@ class ContextualizesScanOptions(PerRootScanOptions):
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
class TracesScanOptions(PerRootScanOptions):
|
|
48
|
-
|
|
49
|
-
commit: Annotated[str, StringConstraints(pattern=r"^[0-9a-f]{40}$")]
|
|
48
|
+
pass
|
|
50
49
|
|
|
51
50
|
|
|
52
51
|
TOptions = TypeVar("TOptions", bound=PerRootScanOptions)
|
{fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/tests/test_root_scanner.py
RENAMED
|
@@ -15,8 +15,6 @@ from fluidattacks_core.models.state_machines.root_scanner import (
|
|
|
15
15
|
TracesScanOptions,
|
|
16
16
|
)
|
|
17
17
|
|
|
18
|
-
_SHA = "0f1e2d3c4b5a69788796a5b4c3d2e1f00f1e2d3c"
|
|
19
|
-
|
|
20
18
|
|
|
21
19
|
class _DastScanOptions(PerRootScanOptions):
|
|
22
20
|
network_name: str
|
|
@@ -277,8 +275,6 @@ def _traces_options(**overrides: str) -> TracesScanOptions:
|
|
|
277
275
|
"group_name": "acme",
|
|
278
276
|
"root_nickname": "nickname",
|
|
279
277
|
"user_email": "test@fluidattacks.com",
|
|
280
|
-
"root_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
|
|
281
|
-
"commit": _SHA,
|
|
282
278
|
}
|
|
283
279
|
arguments.update(overrides)
|
|
284
280
|
return TracesScanOptions(**arguments)
|
|
@@ -295,36 +291,12 @@ def _traces_input(options: TracesScanOptions | None = None) -> TracesScanInput:
|
|
|
295
291
|
)
|
|
296
292
|
|
|
297
293
|
|
|
298
|
-
def
|
|
294
|
+
def test_traces_scan_options_are_exactly_the_shared_per_root_fields() -> None:
|
|
299
295
|
options = _traces_options()
|
|
300
|
-
assert set(options.model_dump()) ==
|
|
301
|
-
"commit",
|
|
302
|
-
"config_id",
|
|
303
|
-
"group_name",
|
|
304
|
-
"root_id",
|
|
305
|
-
"root_nickname",
|
|
306
|
-
"user_email",
|
|
307
|
-
}
|
|
296
|
+
assert set(options.model_dump()) == set(PerRootScanOptions.model_fields)
|
|
308
297
|
assert TracesScanOptions.model_validate_json(options.model_dump_json()) == options
|
|
309
298
|
|
|
310
299
|
|
|
311
|
-
def test_traces_scan_options_reject_a_root_id_that_would_escape_its_prefix() -> None:
|
|
312
|
-
for value in ("..", "a/b", "-h", ".", "a..b", "", "_internal"):
|
|
313
|
-
with pytest.raises(ValidationError):
|
|
314
|
-
_traces_options(root_id=value)
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
def test_traces_scan_options_reject_a_commit_that_is_not_a_full_lowercase_sha() -> None:
|
|
318
|
-
for value in ("", _SHA[:39], f"{_SHA}0", _SHA.upper(), _SHA.replace("0", "g"), f"{_SHA}\n"):
|
|
319
|
-
with pytest.raises(ValidationError):
|
|
320
|
-
_traces_options(commit=value)
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
def test_traces_scan_options_accept_the_commits_the_mirror_reports() -> None:
|
|
324
|
-
for value in (_SHA, "0" * 40, "f" * 40):
|
|
325
|
-
assert _traces_options(commit=value).commit == value
|
|
326
|
-
|
|
327
|
-
|
|
328
300
|
def test_traces_scan_input_keeps_the_seven_wire_keys_the_machine_reads() -> None:
|
|
329
301
|
dumped = _traces_input().to_wire()
|
|
330
302
|
assert set(dumped) == {
|
|
@@ -336,11 +308,3 @@ def test_traces_scan_input_keeps_the_seven_wire_keys_the_machine_reads() -> None
|
|
|
336
308
|
"rootNickname",
|
|
337
309
|
"scannerName",
|
|
338
310
|
}
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
def test_traces_scan_input_carries_root_id_and_commit_only_in_execution_options() -> None:
|
|
342
|
-
options = _traces_options()
|
|
343
|
-
dumped = _traces_input(options).to_wire()
|
|
344
|
-
blob = dumped["executionOptions"]
|
|
345
|
-
assert isinstance(blob, str)
|
|
346
|
-
assert json.loads(blob) == options.model_dump()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/tests/test_loader_env.py
RENAMED
|
File without changes
|
{fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/tests/test_model_scanner.py
RENAMED
|
File without changes
|
{fluidattacks_core_models-12.0.0 → fluidattacks_core_models-13.0.0}/tests/test_state_machines.py
RENAMED
|
File without changes
|