Skip to content

[Bug] Raw envelopes reach disk before redaction runs, with no file mode set #71

Open

Description

@rocklambros

Found by a six-perspective adversarial review of #60.

packages/guardian/src/envelope-log-sink.ts:10-19 states the design plainly: "no field stripping, no redaction, no reordering." server.ts:517 writes the request to .acs/envelopes.jsonl on parse, before dispatch() and before any policy evaluation. ToolCallRequestPayload.raw_command and ToolCallResultPayload.outputs carry the shell commands and tool output that hold credentials.

The sharp part is an asymmetry in the test suite. Dozens of assertions cover redaction on the model-facing path, in hosts/opencode/test/result-gate.test.ts and apply-opencode-output.test.ts. There are none on the envelope-log or audit-sink path. A reader who sees the first set concludes secrets are handled.

Neither audit-sink.ts nor envelope-log-sink.ts passes a mode to mkdirSync or appendFileSync, so files land at the process umask, typically world-readable.

.acs/ is gitignored, which closes the accidental-commit path. That is not the same as the file being safe at rest.

Activity

  1. added
    type:bugSomething isn't working
    scope:in-focusFeeds the ninety-day committed outcome. Maintainers only
    workstream:sdkOwning workstream. Maintainers only
    on Sep 10, 2026
  2. moved this to Needs triage in ACS Project Trackeron Sep 10, 2026
  3. rocklambros commented on Oct 12, 2026

    @rocklambros
    CollaboratorAuthor

    A third file joins the two listed here. #244 adds an OTLP trace file (ACS_OTEL_FILE) that holds decision reasoning, tool names, capabilities, and provenance source_id values, which can be URLs or file paths. Raw tool arguments are not exported. I've asked #244 to create that file with mode 0600 and its directory with 0700, so it should not need fixing here. Please include it when checking this issue's acceptance criteria. Its sample collector config is also moving debug to verbosity: basic, so it doesn't print every attribute to stdout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:P1Maintainers onlyscope:in-focusFeeds the ninety-day committed outcome. Maintainers onlystatus:acceptedIn the backlog. Maintainers onlytype:bugSomething isn't workingworkstream:sdkOwning workstream. Maintainers only

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions