Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ __pycache__/
dist/
build/
.venv/
.vscode/
.vscode/
.mypy_cache/
.pytest_cache/
.ruff_cache/
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,38 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.7.3] - 2026-03-28

### Fixed

- Add missing Loki auth flags (`--loki-user`, `--loki-password`, `--loki-token`, `--loki-tls-ca`) to README usage signature and flag reference table.
- Declare `py.typed` in `pyproject.toml` `[tool.setuptools.package-data]` so the marker is included in built distributions.

## [0.7.2] - 2026-03-28

### Changed

- Refactor watch mode: extract `_handle_key`, `_draw_header`, `_draw_content` helpers from 271-line nested `_run` function.
- Replace `reconnect_state` dict with `_ReconnectState` dataclass for type-safe reconnection state.
- Replace all Unicode symbols with ASCII equivalents throughout TUI and CLI output.

### Added

- Tests for `_dump_yaml`, `_write_multi_doc_yaml`, `_find_unknown_flows`, `_print_unknown_warnings`, `_print_summary`, `_trunc`, `_print_report`, `_ReconnectState`, and `_handle_key` (39 new tests, 120 total).
- Error-path tests for `_parse_duration` and `_read_flows`.

## [0.7.1] - 2026-03-28

### Fixed

- Use module logger (`LOG.debug`) instead of root `logging.debug` in `_detect_hubble_cmd`.
- Replace `assert` guards in reader threads with early-return checks (assertions are stripped under `python -O`).
- Guard `cursor_flow_idx` when `ordered_keys` is empty in watch select mode.
- Close capture file handle on early exit paths to prevent resource leak.
- Add missing `py.typed` marker file (referenced in CHANGELOG since v0.4.0 but never created).
- Add `types-PyYAML` to dev dependencies so local `mypy` works without manual installs.
- Add `.mypy_cache/`, `.pytest_cache/`, `.ruff_cache/` to `.gitignore`.

## [0.7.0] - 2026-03-27

### Added
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ hubble-audit2policy [-h] [-o OUTPUT_DIR] [-n NAMESPACE]
[--from {file,loki}] [--loki-url URL]
[--loki-query LOGQL] [--since DURATION]
[--until DURATION] [--loki-limit N]
[--loki-user USER] [--loki-password PASSWORD]
[--loki-token TOKEN] [--loki-tls-ca PATH]
[-v] [-V]
[flows_file]
```
Expand All @@ -181,6 +183,10 @@ hubble-audit2policy [-h] [-o OUTPUT_DIR] [-n NAMESPACE]
| `--since DURATION` | How far back to query, e.g. `30m`, `2h`, `1d` (default: `1h`) |
| `--until DURATION` | End of query window as duration before now (default: `0s` = now) |
| `--loki-limit N` | Max entries per Loki request batch (default: `5000`) |
| `--loki-user USER` | Username for Loki HTTP Basic authentication |
| `--loki-password PASSWORD` | Password for Loki HTTP Basic authentication (used with `--loki-user`) |
| `--loki-token TOKEN` | Bearer token for Loki (`Authorization: Bearer ...`) header |
| `--loki-tls-ca PATH` | Path to a PEM CA certificate for verifying the Loki server (self-signed certs) |
| `-v, --verbose` | Enable verbose logging |
| `-V, --version` | Show version and exit |

Expand Down
Loading
Loading