audit-labs/audit-tools

A collection of scripts, queries, and other goodies you can use in an audit. audit automation compliance evidence scripts

Commit 9d7e984fcb

9d7e984fcba4d3fa57586ead36836221a170c3af

parent: 4ef310785b

Unsigned

cmc <hello@cleberg.net> · 2026-07-29 05:15 UTC

feat: add Azure and Azure DevOps as coming-soon TUI placeholders

Show Azure (cloud, AWS counterpart) and Azure DevOps (source platform, GitHub
counterpart) as disabled "coming soon" entries in the platform menu. Make the
Platform runner fields optional so a placeholder needs only key/label/enabled.
Add a test asserting both are present and disabled.

Layout: unified · split

tui/README.md +3 −3
@@ -4,9 +4,9 @@ A terminal UI that walks you through running an audit. It presents a platform
4menu, collects connection details and check selection, then runs the existing 4menu, collects connection details and check selection, then runs the existing
5collectors with live progress. 5collectors with live progress.
6 6
7GitHub, GitLab, and AWS are supported. Adding a platform is a matter of writing 7GitHub, GitLab, and AWS are supported. Azure and Azure DevOps are stubbed in the
8a runner and a `Platform` descriptor in `tui/platforms.py` — the screens are 8menu as *coming soon*. Adding a platform is a matter of writing a runner and a
9platform-agnostic. 9`Platform` descriptor in `tui/platforms.py` — the screens are platform-agnostic.
10 10
11| Pick a platform | Choose checks | Watch it run | 11| Pick a platform | Choose checks | Watch it run |
12|---|---|---| 12|---|---|---|
tui/platforms.py +16 −9
@@ -31,14 +31,15 @@ class Field:
31class Platform: 31class Platform:
32 key: str 32 key: str
33 label: str 33 label: str
34 subject: Callable[ 34 # The fields below drive the audit flow. A disabled ("coming soon")
35 [dict], str 35 # placeholder platform needs only key/label/enabled, so they default to
36 ] # (settings) -> audit subject shown on the run screen 36 # empty and are never used while enabled is False.
37 fields: list[Field] 37 subject: Callable[[dict], str] | None = None # (settings) -> run-screen subject
38 checks: list[Check] 38 fields: list[Field] = field(default_factory=list)
39 default_selection: list[str] 39 checks: list[Check] = field(default_factory=list)
40 output_dir: Callable[[dict], str] # (settings) -> path 40 default_selection: list[str] = field(default_factory=list)
41 run: Callable[..., object] # (settings, output_dir, selected_keys, on_event) 41 output_dir: Callable[[dict], str] | None = None # (settings) -> path
42 run: Callable[..., object] | None = None # (settings, out, keys, on_event)
42 enabled: bool = True 43 enabled: bool = True
43 note: str = field(default="") 44 note: str = field(default="")
44 45
@@ -183,7 +184,13 @@ AWS = Platform(
183 run=_aws_run, 184 run=_aws_run,
184) 185)
185 186
186PLATFORMS = [GITHUB, GITLAB, AWS] 187# Coming soon — placeholders shown as disabled entries in the menu. Azure is the
188# cloud counterpart to AWS; Azure DevOps is the source-platform counterpart to
189# GitHub/GitLab.
190AZURE = Platform(key="azure", label="Azure", enabled=False)
191AZURE_DEVOPS = Platform(key="azure_devops", label="Azure DevOps", enabled=False)
192
193PLATFORMS = [GITHUB, GITLAB, AWS, AZURE, AZURE_DEVOPS]
187 194
188 195
189def prefill(f: Field) -> str: 196def prefill(f: Field) -> str:
tui/tests/test_app.py +13
@@ -165,3 +165,16 @@ def test_aws_navigation(monkeypatch):
165 assert app.screen.query_one("#menu", Button).disabled is False 165 assert app.screen.query_one("#menu", Button).disabled is False
166 166
167 _run(scenario()) 167 _run(scenario())
168
169
170def test_azure_platforms_coming_soon():
171 async def scenario():
172 app = AuditApp()
173 async with app.run_test(size=(120, 40)) as pilot:
174 await pilot.pause()
175 for key in ("azure", "azure_devops"):
176 btn = app.screen.query_one(f"#{key}", Button)
177 assert btn.disabled is True
178 assert "coming soon" in str(btn.label).lower()
179
180 _run(scenario())