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
44menu, collects connection details and check selection, then runs the existing
55collectors with live progress.
66
7GitHub, GitLab, and AWS are supported. Adding a platform is a matter of writing
8a runner and a `Platform` descriptor in `tui/platforms.py` — the screens are
9platform-agnostic.
7GitHub, GitLab, and AWS are supported. Azure and Azure DevOps are stubbed in the
8menu as *coming soon*. Adding a platform is a matter of writing a runner and a
9`Platform` descriptor in `tui/platforms.py` — the screens are platform-agnostic.
1010
1111| Pick a platform | Choose checks | Watch it run |
1212|---|---|---|
tui/platforms.py +16 −9
@@ -31,14 +31,15 @@ class Field:
3131class Platform:
3232 key: str
3333 label: str
34 subject: Callable[
35 [dict], str
36 ] # (settings) -> audit subject shown on the run screen
37 fields: list[Field]
38 checks: list[Check]
39 default_selection: list[str]
40 output_dir: Callable[[dict], str] # (settings) -> path
41 run: Callable[..., object] # (settings, output_dir, selected_keys, on_event)
34 # The fields below drive the audit flow. A disabled ("coming soon")
35 # placeholder platform needs only key/label/enabled, so they default to
36 # empty and are never used while enabled is False.
37 subject: Callable[[dict], str] | None = None # (settings) -> run-screen subject
38 fields: list[Field] = field(default_factory=list)
39 checks: list[Check] = field(default_factory=list)
40 default_selection: list[str] = field(default_factory=list)
41 output_dir: Callable[[dict], str] | None = None # (settings) -> path
42 run: Callable[..., object] | None = None # (settings, out, keys, on_event)
4243 enabled: bool = True
4344 note: str = field(default="")
4445
@@ -183,7 +184,13 @@ AWS = Platform(
183184 run=_aws_run,
184185)
185186
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]
187194
188195
189196def prefill(f: Field) -> str:
tui/tests/test_app.py +13
@@ -165,3 +165,16 @@ def test_aws_navigation(monkeypatch):
165165 assert app.screen.query_one("#menu", Button).disabled is False
166166
167167 _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())