ostruct-cli 0.3.0__py3-none-any.whl → 0.4.0__py3-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.
- ostruct/cli/cli.py +84 -118
- ostruct/cli/click_options.py +54 -45
- ostruct/cli/errors.py +63 -170
- ostruct/cli/file_info.py +98 -57
- ostruct/cli/file_list.py +189 -64
- ostruct/cli/file_utils.py +93 -66
- ostruct/cli/path_utils.py +58 -77
- ostruct/cli/security/__init__.py +32 -0
- ostruct/cli/security/allowed_checker.py +47 -0
- ostruct/cli/security/case_manager.py +75 -0
- ostruct/cli/security/errors.py +184 -0
- ostruct/cli/security/normalization.py +161 -0
- ostruct/cli/security/safe_joiner.py +211 -0
- ostruct/cli/security/security_manager.py +353 -0
- ostruct/cli/security/symlink_resolver.py +483 -0
- ostruct/cli/security/types.py +108 -0
- ostruct/cli/security/windows_paths.py +404 -0
- ostruct/cli/template_filters.py +8 -5
- {ostruct_cli-0.3.0.dist-info → ostruct_cli-0.4.0.dist-info}/METADATA +6 -5
- ostruct_cli-0.4.0.dist-info/RECORD +36 -0
- ostruct/cli/security.py +0 -964
- ostruct/cli/security_types.py +0 -46
- ostruct_cli-0.3.0.dist-info/RECORD +0 -28
- {ostruct_cli-0.3.0.dist-info → ostruct_cli-0.4.0.dist-info}/LICENSE +0 -0
- {ostruct_cli-0.3.0.dist-info → ostruct_cli-0.4.0.dist-info}/WHEEL +0 -0
- {ostruct_cli-0.3.0.dist-info → ostruct_cli-0.4.0.dist-info}/entry_points.txt +0 -0
ostruct/cli/security_types.py
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
"""Security type definitions and protocols."""
|
2
|
-
|
3
|
-
from pathlib import Path
|
4
|
-
from typing import List, Protocol
|
5
|
-
|
6
|
-
|
7
|
-
class SecurityManagerProtocol(Protocol):
|
8
|
-
"""Protocol defining the interface for security management."""
|
9
|
-
|
10
|
-
@property
|
11
|
-
def base_dir(self) -> Path:
|
12
|
-
"""Get the base directory."""
|
13
|
-
...
|
14
|
-
|
15
|
-
@property
|
16
|
-
def allowed_dirs(self) -> List[Path]:
|
17
|
-
"""Get the list of allowed directories."""
|
18
|
-
...
|
19
|
-
|
20
|
-
def add_allowed_directory(self, directory: str) -> None:
|
21
|
-
"""Add a directory to the set of allowed directories."""
|
22
|
-
...
|
23
|
-
|
24
|
-
def add_allowed_dirs_from_file(self, file_path: str) -> None:
|
25
|
-
"""Add allowed directories from a file."""
|
26
|
-
...
|
27
|
-
|
28
|
-
def is_path_allowed(self, path: str) -> bool:
|
29
|
-
"""Check if a path is allowed."""
|
30
|
-
...
|
31
|
-
|
32
|
-
def validate_path(self, path: str, purpose: str = "access") -> Path:
|
33
|
-
"""Validate and normalize a path."""
|
34
|
-
...
|
35
|
-
|
36
|
-
def is_allowed_file(self, path: str) -> bool:
|
37
|
-
"""Check if file access is allowed."""
|
38
|
-
...
|
39
|
-
|
40
|
-
def is_allowed_path(self, path_str: str) -> bool:
|
41
|
-
"""Check if string path is allowed."""
|
42
|
-
...
|
43
|
-
|
44
|
-
def resolve_path(self, path: str) -> Path:
|
45
|
-
"""Resolve and validate a path."""
|
46
|
-
...
|
@@ -1,28 +0,0 @@
|
|
1
|
-
ostruct/__init__.py,sha256=X6zo6V7ZNMv731Wi388aTVQngD1410ExGwGx4J6lpyo,187
|
2
|
-
ostruct/cli/__init__.py,sha256=sYHKT6o1kFy1acbXejzAvVm8Cy8U91Yf1l4DlzquHKg,409
|
3
|
-
ostruct/cli/cache_manager.py,sha256=ej3KrRfkKKZ_lEp2JswjbJ5bW2ncsvna9NeJu81cqqs,5192
|
4
|
-
ostruct/cli/cli.py,sha256=SNUz6PYD0KOxXmE5C1GBpmmeE6vVGGN8nss4FoxOO1w,66887
|
5
|
-
ostruct/cli/click_options.py,sha256=HfCmVWp2DjcUdM0epPtyKW3mQHQBCn0BICfTlfaUvSM,7303
|
6
|
-
ostruct/cli/errors.py,sha256=a482qbF4T1Pm7XzhnN_0vgvOLCOzdLPEscyRBacBYTM,14465
|
7
|
-
ostruct/cli/file_info.py,sha256=lNDri3Z3RJK2-IbfjcJejQsdpW1X8r6KzioMHFY6O8Q,12450
|
8
|
-
ostruct/cli/file_list.py,sha256=srrouvhimoklNo69nWjrKyUN-5zTOmtVj_swdBZPBTk,7105
|
9
|
-
ostruct/cli/file_utils.py,sha256=XupWGwIfcQEJiDUNS0uaIuDLh_wSYfb4iFy_-5ql8UY,21190
|
10
|
-
ostruct/cli/path_utils.py,sha256=jhJsvmxsq0_FU5cWwB-JoEymGbvB2JX9Q0a-dUf0s1w,4461
|
11
|
-
ostruct/cli/progress.py,sha256=rj9nVEco5UeZORMbzd7mFJpFGJjbH9KbBFh5oTE5Anw,3415
|
12
|
-
ostruct/cli/security.py,sha256=_XKKYDht0EbY-MFm4Upf4QJRR9noqmHUHoBuRuMv6sw,34849
|
13
|
-
ostruct/cli/security_types.py,sha256=f2udKyzLpHCrf7nMabNmqyZr9k1DC-KJFF4vU4LmDqE,1266
|
14
|
-
ostruct/cli/template_env.py,sha256=S2ZvxuMQMicodSVqUhrw0kOzbNmlpQjSHtWlOwjXCms,1538
|
15
|
-
ostruct/cli/template_extensions.py,sha256=tJN3HGAS2yzGI8Up6STPday8NVL0VV6UCClBrtDKYr0,1623
|
16
|
-
ostruct/cli/template_filters.py,sha256=SNp7PR4ZbuC9BVUlEgwzd6VZYjI0lsobTabLiJe_sZM,19030
|
17
|
-
ostruct/cli/template_io.py,sha256=yUWO-8rZnSdX97DTMSEX8fG9CP1ISsOhm2NZN3Fab9A,8821
|
18
|
-
ostruct/cli/template_rendering.py,sha256=GrQAcKpGe6QEjSVQkOjpegMcor9LzVUikGmmEVgiWCE,12391
|
19
|
-
ostruct/cli/template_schema.py,sha256=ckH4rUZnEgfm_BHS9LnMGr8LtDxRmZ0C6UBVrSp8KTc,19604
|
20
|
-
ostruct/cli/template_utils.py,sha256=QGgewxU_Tgn81J5U-Y4xfi67CkN2dEqXI7PsaNiI9es,7812
|
21
|
-
ostruct/cli/template_validation.py,sha256=q3ACw4TscdekJb3Z3CTYw0YPEYttqjKjm74ap4lWtU4,11737
|
22
|
-
ostruct/cli/utils.py,sha256=1UCl4rHjBWKR5EKugvlVGHiHjO3XXmqvkgeAUSyIPDU,831
|
23
|
-
ostruct/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
24
|
-
ostruct_cli-0.3.0.dist-info/LICENSE,sha256=QUOY6QCYVxAiH8vdrUTDqe3i9hQ5bcNczppDSVpLTjk,1068
|
25
|
-
ostruct_cli-0.3.0.dist-info/METADATA,sha256=ksJC7l-LyFQURgjL_gWvcEaL47LDlVoVxbqEe1o5TzU,5379
|
26
|
-
ostruct_cli-0.3.0.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
27
|
-
ostruct_cli-0.3.0.dist-info/entry_points.txt,sha256=NFq9IuqHVTem0j9zKjV8C1si_zGcP1RL6Wbvt9fUDXw,48
|
28
|
-
ostruct_cli-0.3.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|