audit-labs/audit-tools

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

Commit 707d120a78

707d120a7812a50c79d8adeceabf8774a33978d5

parent: 673c7a2847

Unsigned

cmc <hello@cleberg.net> · 2026-10-29 20:17 UTC

Installable package with procedure library as data files (!2)

- `pyproject.toml`: packages `tui`, `applications.*`, `sampling`, `sampling.sampling_tool`; commands `audit-sample` and `audit-tui`; the SQL/OS procedure library and `sampling/examples` as data files under `<prefix>/share/audit-tools/`.
- `sampling/__init__.py` so `sampling.sampling_tool` is a regular package.
- Package names stay top-level (`tui`, `applications`, `sampling`) to keep existing imports and tests unchanged; moving them under one `audit_tools` namespace would avoid name clashes in site-packages but rewrites every import.
- Needed by audit-workbench roadmap 2.0 (run from a wheel with no sibling checkout).
- Tests: 45 passed before and after (`tui/tests/test_app.py` needs `textual`, not installed here). Wheel contents checked.

Layout: unified · split

CHANGELOG.md +8
@@ -4,6 +4,14 @@ All notable changes to this project are documented here. The format is based on
4[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres 4[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres
5to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 5to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6 6
7## [Unreleased]
8
9### Added
10
11- Installable package: `pip install audit-tools` installs `tui`, `applications`,
12 and `sampling` as packages, the `audit-sample` and `audit-tui` commands, and the
13 SQL/OS procedure library and sampling examples under `<prefix>/share/audit-tools/`.
14
7## [1.0.0] - 2026-08-07 15## [1.0.0] - 2026-08-07
8 16
9First tagged release. Prior work was untagged; this marks the collection as stable 17First tagged release. Prior work was untagged; this marks the collection as stable
pyproject.toml +24 −3
@@ -39,8 +39,29 @@ dev = ["audit-tools[all]", "pytest", "ruff"]
39Homepage = "https://audit-labs.dev" 39Homepage = "https://audit-labs.dev"
40Repository = "https://github.com/audit-labs/audit-tools" 40Repository = "https://github.com/audit-labs/audit-tools"
41 41
42# This repo is a runnable script collection, not an importable library. Declare 42[project.scripts]
43# no modules so `pip install .` provisions dependencies (via extras) without 43audit-sample = "sampling.sampling_tool.cli:main"
44# trying to package the top-level scripts. 44audit-tui = "tui.app:main"
45
46# The Python collectors, the TUI, and the sampling tool install as packages. The
47# SQL and OS procedure library and the sampling examples are data files under
48# <prefix>/share/audit-tools/, so tools that read them (audit-workbench) work
49# from an installed wheel without a checkout.
45[tool.setuptools] 50[tool.setuptools]
46py-modules = [] 51py-modules = []
52
53[tool.setuptools.packages.find]
54include = ["tui", "applications", "applications.*", "sampling", "sampling.sampling_tool"]
55
56[tool.setuptools.data-files]
57"share/audit-tools/databases/mongo" = ["databases/mongo/*"]
58"share/audit-tools/databases/mysql" = ["databases/mysql/*"]
59"share/audit-tools/databases/oracle" = ["databases/oracle/*"]
60"share/audit-tools/databases/postgres" = ["databases/postgres/*"]
61"share/audit-tools/databases/snowflake" = ["databases/snowflake/*"]
62"share/audit-tools/databases/sql" = ["databases/sql/*.*"]
63"share/audit-tools/databases/sql/passwords" = ["databases/sql/passwords/*"]
64"share/audit-tools/os/linux" = ["os/linux/*.*"]
65"share/audit-tools/os/linux/report" = ["os/linux/report/*"]
66"share/audit-tools/os/windows" = ["os/windows/*"]
67"share/audit-tools/sampling/examples" = ["sampling/examples/*"]
sampling/__init__.py added +1
@@ -0,0 +1 @@
1"""Audit sampling tool (`audit-sample`)."""