dev → main: v0.2.0 release promotion - #17
Open
gnanirahulnutakki wants to merge 840 commits into
Open
Conversation
gnanirahulnutakki
added a commit
that referenced
this pull request
May 26, 2026
…o/sigs.k8s.io/controller-runtime-0.24.0 deps(go)(deps): bump sigs.k8s.io/controller-runtime from 0.23.3 to 0.24.0 in /go
This was referenced Jun 23, 2026
This was referenced Jun 29, 2026
Python's str.strip() does not strip zero-width spaces (U+200B–U+200F), word joiner (U+2060), or BOM (U+FEFF). A command argument containing only these invisible characters would pass the existing blank-command check and reach subprocess.Popen, producing a confusing 'No such file or directory' error instead of a structured validation failure. Add _INVISIBLE_OR_WS_RE regex check alongside the existing .strip() guard in all three command-validation sites (run_governed, run_governed_cli, run_under_hub). Not exploitable (shell=False prevents injection), but the validation was weaker than intended. Signed-off-by: Gnani Rahul <89947795+gnanirahulnutakki@users.noreply.github.com>
cmd_run was the only command handler that did not call _path_arg_invalid_failure(args), so empty/whitespace --output values passed through unchecked. This caused CWD pollution (file named from whitespace) and late errors after the child process had already run. The fix adds the same pre-execution path validation used by 18 other command handlers.
CI runners don't have the local /tmp/ardur-dx-probe path. sys.executable resolves to whatever Python pytest is running under, making the subprocess-based tests portable.
Post-landing docs scan found the ardur run section documented --output behavior but not the newly-added empty/whitespace rejection. Added a paragraph matching the established pattern for --mission and --home.
Untracked POST_LANDING_SCAN.md was accidentally written under site/content/source/ by a scan subagent, causing sync_source_docs.py to generate _index.md counting 126 pages instead of 125. CI cloned without the stray file and reported the generated mirror as stale. Regenerated from clean working tree.
When --output write fails, ardur run now emits structured JSON when --json is set (error/error_code/condition/message/detail/next_steps), matching the pattern already used by issue, verify, and all other sibling commands with --output. Previously the error was a terse 'ardur run --output: <code>' stderr string with no JSON structure. Without --json, the non-JSON path now includes remediation guidance. 3 regression tests: JSON-mode structured error, non-JSON next_steps, stdout preservation.
…licyEnforcementError with --json When ardur run --json hit a ValueError from inside run_governed (e.g. invalid --resource-scope, unknown --via mode), NotImplementedError (platform-unsupported), or KernelPolicyEnforcementError (--enforce without kernel support), it always printed a human-readable stderr line even with --json set. This was inconsistent with the FileNotFoundError and PermissionError handlers that already emitted structured JSON when --json was set. All three exception handlers now check args.json and emit structured JSON (ok/error/error_code/condition/message/detail/next_steps) to stderr when --json is set, preserving the human-readable path without --json for backward compatibility. 6 new tests verify: - ValueError + --json: structured JSON with all fields - ValueError without --json: human-readable preserved - No local path leaks in JSON response - NotImplementedError + --json: structured JSON - NotImplementedError without --json: human-readable preserved - next_steps determinism
…code, protect claude-code These five personal/diagnostic commands produced JSON output and supported --redact-paths but lacked --output, making them the only JSON-producing commands without file-writing support. Every other report command (verify, posture, preflight, telemetry, evidence correlate, run, adapter reports) already had --output. The new flag uses the same _handle_output_and_redact() helper as all other commands: atomic owner-only writer, sha256 digest confirmation, --redact-paths integration, and preserves failure exit codes when writing to file. 14 new tests cover all five commands with file output, redact-paths combination, failure exit-code preservation, and --output-without---json consistency.
…#417 CodeQL #416: unused 'pytest' import in test_run_governed_value_error_json.py CodeQL #417: unused 'written' local variable in test_personal_output_flag.py Behavior-preserving cleanup. 20/20 focused tests PASS.
…vidence correlate, telemetry export DX probe found that verify, evidence correlate, and telemetry export all returned "message": "ValueError" (raw Python class name) when the user passed a non-P-256 public key via --receipt-public-key. Root cause: _load_p256_public_key raises ValueError with intentional safe messages (e.g. "receipt public key must be an ES256 P-256 key"), but _safe_exception_message sanitizes generic ValueError to the class name only. Fix: separate key-loading errors into their own try/except at each call site, mapping them to receipt_public_key_invalid with the actual message preserved via str(exc). Also wrap serialization.load_pem_public_key to catch the cryptography library's raw ValueError and re-raise with a safe message. 7 new tests. 3236/3236 full suite PASS. check-local quick all green.
Both cmd_start and the hub start path caught TLSConfigurationError / HubTLSConfigurationError but discarded the actual domain error message, substituting a fixed generic string. This was inconsistent with the recently-landed receipt public key error preservation (26d502c) and run error preservation (17ee173). The _start_tls_material_failure_response and _hub_tls_material_failure_response helpers now accept an optional detail parameter. When the exception carries a domain message (e.g. 'TLS configuration is unavailable; verify the certificate and key'), that message is preserved in the JSON detail field. When no detail is passed, the existing generic fallback text is used. 2 new tests verify the domain message appears in the JSON response for both start and hub TLS failures.
… fields verify, evidence correlate, and telemetry export produced legacy minimal error responses (error + message only) for domain exceptions, while the rest of the CLI had rich structured responses with error_code, condition, detail, and next_steps. This closes that DX inconsistency. All three error handlers now emit error_code, condition, detail, and code-specific next_steps matching the pattern used by every other CLI command. The existing error and message fields are preserved for backward compatibility.
…ages
_load_p256_public_key and _load_transparency_public_key did not wrap the
file open() call, so a PermissionError (or other OSError) from the OS
carried the full local filesystem path in str(exc):
[Errno 13] Permission denied: '/var/folders/.../tmpXXXX.pem'
This leaked into the JSON output of 'verify', 'evidence correlate', and
'telemetry export' via the receipt_public_key_invalid handler that uses
str(exc). The handler correctly used _safe_exception_message for the
broader exception block but the dedicated key-loading catch used str(exc)
directly.
Fix: wrap the open() call in both functions to re-raise PermissionError
and OSError with a safe, label-specific message that contains no path.
This preserves the informative ValueError messages for invalid PEM,
wrong key type, and size violations while blocking the path leak.
Regression tests cover all three commands (verify, evidence correlate,
telemetry export) with a no-permission key file.
Signed-off-by: Gnani Rahul <89947795+gnanirahulnutakki@users.noreply.github.com>
Address CodeQL py/empty-except alert #418 by documenting the intentional best-effort chmod restoration in the test cleanup helper. Signed-off-by: Gnani Rahul <89947795+gnanirahulnutakki@users.noreply.github.com>
RuntimeEvidenceError carries safe hardcoded user-facing messages (e.g. "runtime evidence input is empty", "runtime evidence line 5 is malformed JSON at column 10") with no filesystem paths or Python internals. Previously _safe_exception_message did not whitelist RuntimeEvidenceError, so these messages were silently replaced with just the class name "RuntimeEvidenceError" in JSON error responses from 'ardur evidence correlate'. This was the last remaining CLI error-handling inconsistency. Added RuntimeEvidenceError to the _safe_exception_message whitelist, following the same pattern as OfflineVerificationError, TelemetryExportError, TransparencyError, and KeyDirectoryError.
The latency-gate evaluate command was the last JSON-producing CLI command without --output and --redact-paths. Every other report command (issue, verify, evidence correlate, telemetry export, anchor, attest, posture scan/report, preflight tool-server, claude-code-report, gemini-cli-report, codex-app-server-report, doctor, status, setup, run) already had both flags. The --output flag atomically writes the gate decision JSON to an owner-only file with sha256 digest, using the same _handle_output_and_redact helper as all other commands. The --redact-paths flag replaces local absolute paths with stable placeholders for safe CI artifact sharing. Verdict-based exit codes (pass=0, fail=1, inconclusive=2) are preserved even when writing to --output. 11 new tests cover file writing, exit code preservation, path redaction, warning behavior, and write failure handling.
…or_code, and next_steps _handle_output_and_redact is the shared helper used by 9+ CLI commands (issue, anchor, attest, setup, status, doctor, uninstall, protect-claude-code, doctor-claude-code, latency-gate-evaluate) to write JSON reports to --output files. When the write failed, it produced a minimal error response (ok, error, detail) while every other CLI command that catches its own output-write ValueError returns the full structured contract (condition, error_code, message, detail, next_steps). This enriches the helper's failure response to match the standard contract, making --output error handling consistent across all commands. The command name is rendered with hyphens (protect_claude_code → protect-claude-code) in next_steps command hints.
…via shared helper Extract _output_write_error_response helper and migrate the 5 inline verify handlers, 3 adapter report handlers (claude-code-report, gemini-cli-report, codex-app-server-report), and _handle_output_and_redact to use it. Completes full structured-error parity: every --output write failure now returns the same enriched shape (condition, error_code, message, detail, next_steps). The 3 report handlers also had an extra 'condition' key inside next_steps[] items that is not present in the canonical shape — removed by the shared helper. Net: +42/-65 in cli.py (dedup).
…sed import Document the attestation-specific failure-path error codes introduced in b431bea for 'verify --attestation-token'. The CLI reference described the attestation-token mode at a high level but omitted the error codes (invalid_attestation_token, attestation_public_key_missing, attestation_public_key_invalid) and the passport-token analogues. Also remove an unused 'import os' from test_protocol_output_redact.py that triggered the last remaining CodeQL py/unused-import alert. Regenerated Hugo source mirror via sync_source_docs.py.
… codes - cmd_start/cmd_hub: non-EADDRINUSE OSError now produces structured JSON (start_oserror/hub_oserror) with error_code, condition, detail, and next_steps instead of a bare traceback - cmd_uninstall: returns exit code 1 when response ok is False - cmd_personal_firewall_demo: returns exit code 1 when result ok is False - Updated test_port_in_use_traceback.py to match new structured-JSON behavior (was testing bare re-raise) - 9 new focused tests, 3300/3300 full suite pass
…nd test_output_write_parity Closes CodeQL alerts #419, #420, #421, #422, #423 (py/unused-import and py/import-and-import-from in test files).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Promotes the current
devbranch tomainas the human-gatedv0.2.0release candidate. At the current head,devis 524 commits ahead ofmain;mainis an ancestor ofdev, with zero reverse-only commits, so this remains a forward-only promotion.The existing immutable
v0.1.0tag remains at00c8d7eb88b0cc98cc8f65f8bfcca94491db5b9a. It will not be moved or rewritten. PR #245 prepared package, runtime, proxy, lock, and OCI documentation metadata at0.2.0. A freshv0.2.0tag and GitHub Release remain deferred to #147 after this promotion.Current release scope
This release does not claim universal kernel enforcement for unknown or uncooperative agents. Remaining unknown-agent attach and independent-corpus work stay explicitly tracked.
Current evidence — 2026-07-12
dev/ PR head:eb63d22361c45621df7c04884ee978b9bf0195c3.origin/mainatce7ac316320b7b37ad03bf21a045c95126e45becis an ancestor oforigin/dev; 524 forward commits and zero reverse-only commits.devSHA verification: all 17 workflows successful, including Python 3.10/3.13, Go, CodeQL, package/wheel smoke, OCI, docs/links/formats/secrets, Linux governance benchmark, BPF generation, KVM kernel smoke, seccomp smoke, and strictardur run --enforceseccomp E2E.proxy.golang.orgHTTP/2 reset during module download; failed-job attempt 2 passed on the unchanged SHA.v0.1.0tag is unchanged; nov0.2.0tag or GitHub Release exists.Promotion gates
devcontains prepared0.2.0release metadata.mainancestry is clean and forward-only.CHANGELOG.md[0.2.0]section on the actual release date and adds the matching-version validation before final approval.devupdate.mainchecks are green.v0.2.0tag and GitHub Release at the promotedmainSHA.Approval boundary
Branch protection requires one human approving review. Automated work must not supply or bypass that approval. Stale reviews are dismissed when
devadvances, so approval must apply to the final head after #272 is stamped on the real release date. Current headeb63d22361c45621df7c04884ee978b9bf0195c3has zero approvals.Related: #140, #147, #189, #191, #272, #79.