Audit credential redaction removal and simplification

This commit is contained in:
2026-11-15 23:28:14 +00:00
parent a68a951f25
commit 747a66999f
3 changed files with 389 additions and 67 deletions

View File

@@ -7,8 +7,8 @@ through a PromptKit adapter. The CLI publishes the corrected transcript and
ordinary reports, with separate opt-in debug artifacts.
[Package map](../../internal/overview.md) · [Pipeline](../../internal/pipeline.md)
The 11 source audits contain 103 numbered findings. This catalog consolidates them
into 62 entries. Priority reflects potential impact, exposure, and the strength of
The 12 source audits contain 110 numbered findings. This catalog consolidates them
into 65 entries. Priority reflects potential impact, exposure, and the strength of
the reported evidence. A source can appear under several entries when it covers
distinct issues. Each link leads to the original finding and its supporting
evidence.
@@ -18,6 +18,9 @@ the maintainer-approved taxonomy and separates ready remediation from technical
investigation and pending policy decisions. Consult it before planning changes;
source-audit recommendations are evidence and proposals, not authorization.
The three WONTFIX scopes recorded here remain controlling.
The focused [redaction-removal audit](14-redaction.md) applies resolved D1:
the earlier redaction remedies below are superseded, and #63–65 add distinct
cleanup work. Entry numbers and existing anchors are retained for traceability.
## Data protection and run integrity
@@ -45,17 +48,24 @@ built-in transport.
### 3. Protect credentials inside nested debug responses
Outer artifact redaction can leave credentials in a nested structured response.
Verify the decoded content of retained artifacts and define safe retention for
content that cannot be decoded.
**Superseded by D1.** The original observation tested the withdrawn redaction
requirement. Remove Audita's substitution package and use direct artifact
serialization; retain useful responses, including malformed content. Retire
masking-only tests and documentation while preserving evidence-fidelity and
write-failure coverage. Credential discovery and repair/CLI consumers are covered
by #63–65; no nested sanitizer or response-omission policy is selected.
[Security §4](07-security.md#4-raw-structured-debug-responses-can-retain-an-encoded-credential) ·
[Testing §8](08-testing.md#8-debug-redaction-assertions-mostly-inspect-the-outer-serialization)
[Testing §8](08-testing.md#8-debug-redaction-assertions-mostly-inspect-the-outer-serialization) ·
[Redaction removal §2](14-redaction.md#2-replace-sanitizing-serialization-with-direct-encoding) ·
[Redaction removal §7](14-redaction.md#7-retire-obsolete-assertions-and-documentation-without-losing-coverage)
### 4. Make debug artifact permissions private by default
Opt-in debug capture can expose transcript and model artifacts under a shared
parent. Use a per-user default and private creation modes, and document the trust
assumptions for explicitly shared destinations.
**Prior remedy withdrawn under D1.** Operators own artifact access and sharing;
hostile local filesystem access is outside the selected threat model. The focused
audit found ordinary creation and filename handling to retain, not a redundant
private-root mechanism. Leave current locations and modes unchanged in this
cleanup. Any future default change needs an independent justification.
[Security §1](07-security.md#1-debug-capture-uses-a-shared-path-and-can-expose-private-artifacts)
### 5. Define the trust boundary for discovered configuration
@@ -104,9 +114,11 @@ ownership if shared destinations are supported.
### 9. Preserve the ordinary YAML schema during redaction
A credential value can match a required key or fixed enum and alter an otherwise
successful report. Redact data-bearing fields while preserving required keys and
values.
[Correctness §9](01-correctness.md#9-credential-redaction-can-change-the-ordinary-yaml-schema)
successful report. Under resolved D1, remove the post-serialization redactor and
serialize the typed report directly. Keep schema/scalar fidelity coverage; do
not build a more selective sanitizer.
[Correctness §9](01-correctness.md#9-credential-redaction-can-change-the-ordinary-yaml-schema) ·
[Redaction removal §2](14-redaction.md#2-replace-sanitizing-serialization-with-direct-encoding)
### 10. Reject contradictory validation decisions
@@ -234,8 +246,9 @@ cancellation under distinct live budgets.
Invalid processing selections and malformed inspection configuration can return
the runtime exit status. A genuinely infeasible chunk target can also be reported
as an internal defect. Preserve the distinction between readiness, chunking, and
runtime failures and assert exact statuses in CLI tests. In the inspection tests,
use a fixture that actually exercises redaction if asserting credential masking.
runtime failures and assert exact statuses in CLI tests. Preserve native
inspection behavior; retired application-wide masking expectations are not an
additional acceptance criterion.
[Error handling §5](06-error-handling.md#5-invalid-processing-selections-use-the-runtime-failure-exit-status) ·
[Error handling §6](06-error-handling.md#6-an-infeasible-chunk-target-is-recorded-as-an-internal-processing-failure) ·
[Testing §2](08-testing.md#2-inspection-failure-tests-accept-the-wrong-exit-classification)
@@ -243,9 +256,11 @@ use a fixture that actually exercises redaction if asserting credential masking.
### 25. Identify missing required credentials in safe diagnostics
The process path reduces a known missing credential requirement to a generic setup
failure. Surface the configured requirement safely and preserve the underlying
typed cause.
[Error handling §3](06-error-handling.md#3-missing-required-credentials-produce-a-generic-setup-message)
failure. Surface actionable native setup detail and preserve the underlying
typed cause and failure classification. D1 removes the blanket restriction on
cause presentation; ordinary compact report projections remain useful.
[Error handling §3](06-error-handling.md#3-missing-required-credentials-produce-a-generic-setup-message) ·
[Redaction removal §6](14-redaction.md#6-simplify-cli-presentation-while-retaining-typed-failure-ownership)
### 26. Render input and output paths as plain Markdown text
@@ -292,7 +307,10 @@ Verify actual contention and cancellation in tests.
Whole-file reads, a generic JSON tree, retained source bytes, and full output
buffers amplify memory before and after model work. Reduce live copies and
consider explicit limits for integrations handling uploads.
write the acquired source bytes directly to its debug snapshot instead of
reconstructing them for redaction. Keep parsed/normalized views separate.
Input-size limits remain a separate D4 decision.
[Redaction removal §3](14-redaction.md#3-save-the-acquired-source-snapshot-without-reconstructing-it) ·
[Resources §4](05-resources.md#4-whole-transcript-copies-amplify-memory-at-input-and-publication) ·
[Security §7](07-security.md#7-untrusted-input-size-and-blocking-io-can-exhaust-subprocess-workers)
@@ -388,11 +406,14 @@ and reports, and expose debug setup through its own API.
### 43. Inject one interaction diagnostics contract
Proposal, validation, and repair duplicate path types and writer wiring. Supply a
diagnostic sink from the adapter boundary, with role-specific payloads, lazy
redaction inputs, and nonfatal write warnings.
diagnostic sink from the adapter boundary, with role-specific payloads and
nonfatal write warnings. Remove secret-provider assertions, lazy discovery
closures, combined-role secret lists, and preflight/writer credential arguments.
Keep artifact association and optional write-error reporting.
[Complexity §4](03-complexity.md#4-separate-validation-batch-assessment-from-the-diagnostic-writer) ·
[Equivalence §5](10-equivalence.md#5-give-optional-interaction-artifacts-one-writer-contract) ·
[Boundaries §6](11-boundaries.md#6-inject-interaction-diagnostics-at-the-adapter-boundary)
[Boundaries §6](11-boundaries.md#6-inject-interaction-diagnostics-at-the-adapter-boundary) ·
[Redaction removal §4](14-redaction.md#4-remove-secret-plumbing-from-writer-and-preflight-contracts)
### 44. Simplify structured-call completion and remove obsolete record fields
@@ -522,14 +543,17 @@ domain cases and meaningful merge, text, and category assertions.
Assert decoded IDs and evidence associations and use smaller fixtures for
duplicate reporting and debug combinations. Keep a full scenario for attribution
through repair and later failure.
[Testing §13](08-testing.md#13-narrow-integration-assertions-to-their-distinct-contracts)
through repair and later failure. Remove masking expectations without discarding
the independent artifact and outcome assertions mixed into those fixtures.
[Testing §13](08-testing.md#13-narrow-integration-assertions-to-their-distinct-contracts) ·
[Redaction removal §7](14-redaction.md#7-retire-obsolete-assertions-and-documentation-without-losing-coverage)
### 61. Remove abandoned test support and unused fixture inputs
The orphan test-support package, unused CLI and runner helpers, and legacy
glossary fixture input have no current callers. Preserve compile-time interface
fixtures and active behavior assertions.
[Redaction removal §7](14-redaction.md#7-retire-obsolete-assertions-and-documentation-without-losing-coverage) ·
[Dead code §9](12-deadcode.md#9-clean-up-abandoned-test-support) ·
[Testing §13](08-testing.md#13-narrow-integration-assertions-to-their-distinct-contracts)
@@ -538,3 +562,31 @@ fixtures and active behavior assertions.
The uncalled merge predicate and standalone JSON and file-write helpers duplicate
or bypass the live normalization, schema, and output paths.
[Dead code §7](12-deadcode.md#7-remove-orphaned-normalization-and-file-helpers)
## Additional cleanup after resolved D1
### 63. Remove redaction-only credential discovery and tracking
Audita enumerates captured profiles/backends, reads credential environment values,
caches names, and tracks prepared role names under a mutex solely for substitution.
Remove that state and the secret-source methods after updating their consumers.
Preserve PromptKit authentication, prepared evidence, execution synchronization,
and native inspection behavior.
[Redaction removal §1](14-redaction.md#1-remove-credential-discovery-and-tracking-used-only-for-substitution)
### 64. Preserve validator explanations in repair feedback
Repair rewrites validator explanations using both roles' credential values even
with debug off. Remove this transformation and use domain feedback directly.
Retain proposal association, unavailable-assessment semantics, and the existing
bounded repair/revalidation behavior.
[Redaction removal §5](14-redaction.md#5-stop-rewriting-validator-explanations-sent-to-repair)
### 65. Remove credential substitution from CLI presentation
Preparation and completion paths scrub warnings, errors, and announced paths;
completion discovers credentials even with reports/debug disabled. Use direct
CommandKit presentation, remove obsolete arguments, and retain typed causes,
reporting modes, exit status, and required-output failure handling. Coordinate
with #25 for setup detail still hidden by the separate failure wrapper.
[Redaction removal §6](14-redaction.md#6-simplify-cli-presentation-while-retaining-typed-failure-ownership)