fluidattacks_core_models 14.3.0__tar.gz → 14.4.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-14.3.0 → fluidattacks_core_models-14.4.0}/.gitignore +4 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/PKG-INFO +1 -1
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/fluidattacks_core/models/scanners/__init__.py +7 -1
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/fluidattacks_core/models/scanners/sspm_config.py +13 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/pyproject.toml +1 -1
- fluidattacks_core_models-14.4.0/tests/test_sspm_config.py +38 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/uv.lock +1 -1
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/.envrc +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/fluidattacks_core/models/__init__.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/fluidattacks_core/models/py.typed +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/fluidattacks_core/models/scanners/apk_config.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/fluidattacks_core/models/scanners/common_config.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/fluidattacks_core/models/scanners/containers_sca_config.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/fluidattacks_core/models/scanners/cspm_config.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/fluidattacks_core/models/scanners/dast_config.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/fluidattacks_core/models/scanners/loader.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/fluidattacks_core/models/scanners/resolves_config.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/fluidattacks_core/models/scanners/sast_config.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/fluidattacks_core/models/scanners/sbom_config.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/fluidattacks_core/models/scanners/sca_config.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/fluidattacks_core/models/scanners/scan_config.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/fluidattacks_core/models/scanners/sniffs_config.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/fluidattacks_core/models/state_machines/__init__.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/fluidattacks_core/models/state_machines/component_orchestrator.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/fluidattacks_core/models/state_machines/root_scanner.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/fluidattacks_core/models/state_machines/types.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/import-linter.cfg +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/mypy.ini +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/ruff.toml +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/tests/__init__.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/tests/test_component_orchestrator.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/tests/test_loader_env.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/tests/test_model_scanner.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/tests/test_root_scanner.py +0 -0
- {fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/tests/test_state_machines.py +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
dist/
|
|
2
2
|
dist-*/
|
|
3
|
+
*.zip
|
|
4
|
+
.tflint.d
|
|
3
5
|
/.cargo-cache
|
|
4
6
|
target/
|
|
5
7
|
.direnv/
|
|
@@ -9,3 +11,5 @@ target/
|
|
|
9
11
|
# each package's shell writes its own, beside the package rather than here
|
|
10
12
|
**/.vscode/settings.json
|
|
11
13
|
*.so
|
|
14
|
+
# the publish check builds into its own tree per architecture
|
|
15
|
+
target-*/
|
|
@@ -33,13 +33,19 @@ from fluidattacks_core.models.scanners.sbom_config import (
|
|
|
33
33
|
from fluidattacks_core.models.scanners.sca_config import ScaConfig
|
|
34
34
|
from fluidattacks_core.models.scanners.scan_config import ScanConfig
|
|
35
35
|
from fluidattacks_core.models.scanners.sniffs_config import SniffsConfig
|
|
36
|
-
from fluidattacks_core.models.scanners.sspm_config import
|
|
36
|
+
from fluidattacks_core.models.scanners.sspm_config import (
|
|
37
|
+
AzureDevopsPat,
|
|
38
|
+
GithubApp,
|
|
39
|
+
GithubPat,
|
|
40
|
+
SspmConfig,
|
|
41
|
+
)
|
|
37
42
|
|
|
38
43
|
__all__ = [
|
|
39
44
|
"ApkConfig",
|
|
40
45
|
"ApkEnvironment",
|
|
41
46
|
"AwsCredentials",
|
|
42
47
|
"AwsRole",
|
|
48
|
+
"AzureDevopsPat",
|
|
43
49
|
"ContainerImageConfig",
|
|
44
50
|
"ContainerScaItem",
|
|
45
51
|
"ContainersScaConfig",
|
|
@@ -29,6 +29,19 @@ class GithubApp(BaseModel):
|
|
|
29
29
|
return resolve_env_var(v, info)
|
|
30
30
|
|
|
31
31
|
|
|
32
|
+
class AzureDevopsPat(BaseModel):
|
|
33
|
+
model_config = {"extra": "forbid"}
|
|
34
|
+
organization: str
|
|
35
|
+
pat_token: str = Field(repr=False)
|
|
36
|
+
environment_id: str | None = None
|
|
37
|
+
|
|
38
|
+
@field_validator("pat_token", mode="before")
|
|
39
|
+
@classmethod
|
|
40
|
+
def _resolve_credentials(cls, v: object, info: LoaderValidationInfo) -> object:
|
|
41
|
+
return resolve_env_var(v, info)
|
|
42
|
+
|
|
43
|
+
|
|
32
44
|
class SspmConfig(BaseModel):
|
|
33
45
|
model_config = {"extra": "forbid"}
|
|
34
46
|
github_credentials: list[GithubPat | GithubApp] = []
|
|
47
|
+
azure_devops_credentials: list[AzureDevopsPat] = []
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
|
|
3
|
+
from fluidattacks_core.models.scanners import AzureDevopsPat, GithubPat, SspmConfig
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def test_azure_devops_credential_resolves_its_token(monkeypatch: pytest.MonkeyPatch) -> None:
|
|
7
|
+
monkeypatch.setenv("AZURE_TOKEN", "resolved-value")
|
|
8
|
+
cfg = SspmConfig.model_validate(
|
|
9
|
+
{
|
|
10
|
+
"azure_devops_credentials": [
|
|
11
|
+
{"organization": "acme", "pat_token": "${AZURE_TOKEN}"},
|
|
12
|
+
],
|
|
13
|
+
},
|
|
14
|
+
context={"resolve_env": True},
|
|
15
|
+
)
|
|
16
|
+
assert cfg.azure_devops_credentials == [
|
|
17
|
+
AzureDevopsPat(organization="acme", pat_token="resolved-value"), # noqa: S106
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def test_azure_devops_and_github_credentials_stay_independent(
|
|
22
|
+
monkeypatch: pytest.MonkeyPatch,
|
|
23
|
+
) -> None:
|
|
24
|
+
monkeypatch.setenv("GH_TOKEN", "gh-value")
|
|
25
|
+
monkeypatch.setenv("AZ_TOKEN", "az-value")
|
|
26
|
+
cfg = SspmConfig.model_validate(
|
|
27
|
+
{
|
|
28
|
+
"github_credentials": [{"organization": "gh-org", "pat_token": "${GH_TOKEN}"}],
|
|
29
|
+
"azure_devops_credentials": [{"organization": "az-org", "pat_token": "${AZ_TOKEN}"}],
|
|
30
|
+
},
|
|
31
|
+
context={"resolve_env": True},
|
|
32
|
+
)
|
|
33
|
+
assert cfg.github_credentials == [
|
|
34
|
+
GithubPat(organization="gh-org", pat_token="gh-value"), # noqa: S106
|
|
35
|
+
]
|
|
36
|
+
assert cfg.azure_devops_credentials == [
|
|
37
|
+
AzureDevopsPat(organization="az-org", pat_token="az-value"), # noqa: S106
|
|
38
|
+
]
|
|
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-14.3.0 → fluidattacks_core_models-14.4.0}/tests/test_loader_env.py
RENAMED
|
File without changes
|
{fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/tests/test_model_scanner.py
RENAMED
|
File without changes
|
{fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/tests/test_root_scanner.py
RENAMED
|
File without changes
|
{fluidattacks_core_models-14.3.0 → fluidattacks_core_models-14.4.0}/tests/test_state_machines.py
RENAMED
|
File without changes
|