Skip to content

feat: credentials-only redaction and open public egress (contract 1.15) - #19

Merged
senamakel merged 1 commit into
mainfrom
security-bus-7328-p3-redact
Oct 15, 2026
Merged

senamakel merged 1 commit into
mainfrom
security-bus-7328-p3-redact

Conversation

@senamakel

Copy link
Copy Markdown
Member

Part of tinyhumansai/openhuman#7328 (phase 3).

Unblocks the host's remaining phase 3 moves.

  • RedactMode::CredentialsOnly: registry, provider token shapes, JWT, PEM, cookie headers and labelled credential-looking values; keeps PII and source-code-looking values (token = get_token()), so the host's tool-result scrub can use the module (the #6954 over-redaction case). Credential rotation is the existing policy Reinit.
  • EgressPolicy.open_public: any http/https destination, address floor and privacy checks unchanged.
  • EgressPolicy.preflight_transports (browser, proxy): verdict-only grants for executors that cannot pin; never for local capabilities. Both fields skipped on the wire when unset.
  • Contract 1.14 -> 1.15, MODULE.md section, tests for every new member (unit, wire, bus dispatch).

Verified locally: fmt, clippy 1.99 -D warnings, workspace tests. The 90% per-file gate runs in CI (local llvm-cov toolchain mismatch).

…s (contract 1.15)

Part of tinyhumansai/openhuman#7328.

Co-authored-by: Medulla <medulla@tinyhumans.ai>
@tinysweeper

tinysweeper Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

Tiny Sweeper reviewed this change across 5 lane(s) and found 1 active actionable finding(s). Detailed lane evidence and any incomplete work are listed below.

State: Changes requested
Priority: critical
Reviewed head: 03562232a340
Updated: 2026-10-15T16:03:12Z

Review snapshot

Change surface Files Review signal Count
Production 8 Active findings 1
Tests 8 Noted findings 0
Documentation 2 Resolved findings 0
Configuration 0 Pending checks/questions 0

Completeness: Complete
Test assessment: No supported feature-to-test mapping was available; this does not mean tests are absent or passed.

Features

None identified with supported citations.

Tests

No supported feature-to-test mapping was produced. Test execution is not inferred.

Findings

  • critical · commits · Remove the committed credential (an AWS access key id) — Rotate the credential first, then remove it from the working tree and purge it from history. Treat it as compromised: it is in the push, whatever happens next. (crates/tinysecurity\-redact/src/lib\_tests\.rs:122)
  • critical · commits · Remove the committed private key (a private key) — Rotate the key, remove it from the working tree, and purge it from history — a force-push alone does not remove it from forks or from anyone who already fetched. (crates/tinysecurity\-redact/src/lib\_tests\.rs:128)
  • critical · commits · Remove the committed credential (an AWS access key id) — Rotate the credential first, then remove it from the working tree and purge it from history. Treat it as compromised: it is in the push, whatever happens next. (crates/tinysecurity\-redact/src/lib\_tests\.rs:134)

Before merge

  • Address Remove the committed credential (an AWS access key id) (crates/tinysecurity\-redact/src/lib\_tests\.rs).
  • Address Remove the committed private key (a private key) (crates/tinysecurity\-redact/src/lib\_tests\.rs).
  • Address Remove the committed credential (an AWS access key id) (crates/tinysecurity\-redact/src/lib\_tests\.rs).

How this fits together

flowchart LR
  n0["as_str"]:::impacted
  n1["config"]:::impacted
  n2["append"]:::impacted
  n3["batch"]:::impacted
  n4["..._sink_and_returns_original_distinct_scope"]:::impacted
  n5["...t_callback_without_changing_trusted_scope"]:::impacted
  n4 -->|calls| n0
  n4 -->|uses| n0
  n4 -->|tests| n0
  n5 -->|uses| n0
  n5 -->|calls| n1
  n5 -->|tests| n1
  n5 -->|calls| n2
  n5 -->|tests| n2
  n5 -->|calls| n3
  n5 -->|tests| n3
  classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
  classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
  classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
  classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Loading
Agent review details

critique

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: Reviewed 18 files; 0 findings. _The code index is behind this pull request (indexed at `e30554299084`), so retrieved context may be out of date._

security

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: Reviewed 16 files; 0 findings. 2 files were not security-reviewed: MODULE.md (prose or tabular data), README.md (prose or tabular data). _The code index is behind this pull request (indexed at `e30554299084`), so retrieved context may be out of date._

tests

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: The change adds `RedactMode::CredentialsOnly`, `EgressPolicy::open_public` and `preflight_transports`, and bumps the contract to 1.15, with real behaviour tests for each (open-public address floor, preflight transport opt-in, registration rejection, wire round-trip/skip, credential redaction and idempotence). The one gap I can name concretely is that `is_compatible` — the function the contract bump actually exercises — is unchanged by this diff and its behaviour at the 1.15 boundary is only asserted, not visible to me, so I could not verify the new 1.14-rejection assertion is real; the rest of the assertions are behavioural and can fail. Nothing else in the diff is a regression or a rule violation. _The code index is behind this pull request (indexed at `e30554299084`), so retrieved context may be out of date._

commits

  • Conclusion: Failure
  • Scope reviewed: all assigned evidence
  • Lane summary: 3 sensitive items entered this pull request's history. (2 observation(s) share another lane's inline comment and are listed here only) _The code index is behind this pull request (indexed at `e30554299084`), so retrieved context may be out of date._
  • Evidence: crates/tinysecurity\-redact/src/lib\_tests\.rs — Remove the committed credential (an AWS access key id)
  • Evidence: crates/tinysecurity\-redact/src/lib\_tests\.rs — Remove the committed private key (a private key)
  • Evidence: crates/tinysecurity\-redact/src/lib\_tests\.rs — Remove the committed credential (an AWS access key id)

description

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: The change adds `RedactMode::CredentialsOnly`, `EgressPolicy.open_public` and `EgressPolicy.preflight_transports`, bumps the contract to 1.15, and adds unit/wire/dispatch tests for each new member; the description matches the diff accurately. I found no defect I can anchor to the diff: the credential-gated assignment path is exercised by the accompanying tests, registration rejects the unsound combinations the docs list, and the address floor is still applied to literals and to every resolved candidate for both open-public and preflight-transport requests. _The code index is behind this pull request (indexed at `e30554299084`), so retrieved context may be out of date._
Evidence and run details
  • Models: ladder/vectors-oai3, deepseek-v4.1-flash
  • Spend: $0.009960
  • Tokens: 1793506 input · 58497 output · 345088 cached · 775 embedding
Head State Pass summary
03562232a340 changes requested 1 active finding(s), 0 resolved finding(s) (at 2026-10-15T16:03:12Z)

tinysweeper 0.1.2

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T16:01:29.231956Z 0356223 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 633a63ca-81f0-4ad1-8d3c-fc919de05b0a
📥 Commits

Reviewing files that changed from the base of the PR and between a874983 and 0356223.

📒 Files selected for processing: 18
  • MODULE.md
  • README.md
  • crates/tinysecurity-bus/src/egress.rs
  • crates/tinysecurity-bus/src/lib.rs
  • crates/tinysecurity-bus/src/redact.rs
  • crates/tinysecurity-bus/tests/egress_wire.rs
  • crates/tinysecurity-bus/tests/scoped_wire.rs
  • crates/tinysecurity-bus/tests/wire.rs
  • crates/tinysecurity-egress/src/guard_corpus_tests.rs
  • crates/tinysecurity-egress/src/open_public_tests.rs
  • crates/tinysecurity-egress/src/registry.rs
  • crates/tinysecurity-egress/src/registry_tests.rs
  • crates/tinysecurity-module/examples/audit_native_contract.rs
  • crates/tinysecurity-module/examples/verify_module.rs
  • crates/tinysecurity-module/src/adapter_tests.rs
  • crates/tinysecurity-redact/src/lib.rs
  • crates/tinysecurity-redact/src/lib_tests.rs
  • crates/tinysecurity-redact/src/patterns.rs
+-------------------------------------------------------------------------------------------------------+
| Make it easy to reuse. If it's easy to reuse, people will. Create an environment that supports reuse. |
+-------------------------------------------------------------------------------------------------------+
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@senamakel
senamakel merged commit 3d440ee into main Oct 15, 2026
14 of 18 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 03562232a3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +274 to +278
|| (request.local_capability.is_none()
&& self
.policy
.preflight_transports
.contains(&request.transport))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep browser and proxy egress denied without a pinning seam

When a policy opts into Browser or Proxy, this condition grants the request after the module's DNS lookup even though those executors resolve the hostname again and need not use the vetted sockets. An attacker who changes DNS after preflight can therefore direct the protected request to a private or metadata address. The checked accepted specification explicitly requires an enforcing proxy or denial for transports that cannot pin (docs/specs/security-module.md:133-140), and the implementation plan repeats that requirement (docs/plans/security-module.md:143-145); permitting the risk here contradicts those current invariants rather than providing protected egress.

AGENTS.md reference: AGENTS.md:L162-L166

Useful? React with 👍 / 👎.

Comment on lines +255 to +256
if value.len() < 8 || value.chars().any(char::is_whitespace) {
return false;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Redact bearer credentials inside quoted header values

For common JSON-shaped output such as {"Authorization":"Bearer opaque-token-123"}, the optional bearer scheme is not captured in label because it is inside the quotes, while value contains whitespace and is rejected here as non-secret. The entire credential is consequently returned unchanged, despite the contract in MODULE.md:343-350 specifically promising to remove Authorization: Bearer ... values from free-form tool output. Recognize bearer/basic schemes inside quoted values rather than treating all whitespace-containing values as source code.

AGENTS.md reference: AGENTS.md:L162-L163

Useful? React with 👍 / 👎.

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: 1 lane(s) blocking, worst finding is critical.

Fix or reply to the findings below and push. The next review clears this automatically once they are gone — you should not need to dismiss anything by hand.

             $0.0100 · 1,793,506 in / 58,497 out · 345,088 cached (19%) · ladder/vectors-oai3, deepseek-v4.1-flash · 775 embedded
critique:    $0.0010 · 889,139 in   / 11,726 out · 168,704 cached (19%) · deepseek-v4.1-flash
security:    $0.0086 · 737,005 in   / 42,867 out · 162,944 cached (22%) · deepseek-v4.1-flash
tests:       $0.0001 · 91,363 in    / 890 out    · 6,912 cached (8%)    · deepseek-v4.1-flash
description: $0.0001 · 62,755 in    / 826 out    · 6,528 cached (10%)   · deepseek-v4.1-flash

assert!(out.contains("[REDACTED]"), "{secret} -> {out}");
for leaked in [
"abcdefghijklmnop1234",
"AKIAIOSFODNN7EXAMPLE",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

priority critical commits confident

Remove the committed credential (an AWS access key id)

Rotate the credential first, then remove it from the working tree and purge it from history. Treat it as compromised: it is in the push, whatever happens next.

Matched: AKIA… <redacted, 20 chars>

[RULE] aws-access-key-id ·

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant