Skip to content

F2 — Verify discovered descriptor security before token trust - #103

Closed
LogicDuke wants to merge 5 commits into
feature/d062-post-start-control-channelfrom
repair/pr84-f2-descriptor-acl
Closed

LogicDuke wants to merge 5 commits into
feature/d062-post-start-control-channelfrom
repair/pr84-f2-descriptor-acl

Conversation

@LogicDuke

Copy link
Copy Markdown
Owner

Parent: #84

Finding:

  • F2
  • CURRENT
  • P1
  • parent review thread: PRRT_kwDOTzqfcs6huUPE

Problem:

Descriptor discovery could read and trust a pre-existing candidate descriptor's
token and pipe without first verifying the descriptor's current security
metadata.

A legacy attacker-readable descriptor could therefore leak its token. An
attacker possessing that token could serve the corresponding named pipe and
return a correctly authenticated APPLIED response, allowing the official CLI to
exit 0 without a genuine AgentBridge runtime applying the Autoflow action.

Protected invariant:

CLI EXIT 0 => APPLIED by a genuine runtime identified through a CURRENTLY
verified descriptor.

Repair:

  • security-verifies each discovered descriptor candidate before reading it
  • rejects invalid-security candidates before token decoding or pipe probing
  • reuses the existing verifyDescriptorAcl security truth source
  • fails closed for foreign owner, unprotected/null DACL, foreign/inherited
    principals, unreadable descriptor identity, and symlink/reparse identity
  • preserves one-valid-live => FOUND
  • preserves multiple-valid-live => AMBIGUOUS
  • preserves UNKNOWN fail-closed behavior
  • preserves stale ABSENT cleanup behavior

Attack validation:

Before repair:
attacker-readable legacy descriptor + leaked token + attacker-controlled pipe
=> authenticated APPLIED
=> CLI exit 0

After repair:
same descriptor rejected before read/token/probe
=> attacker pipe not contacted
=> NO_VERIFIED_CANDIDATES
=> CLI exit 1

Validated commit:

300e437

Parent SHA:

b33a698

Patch fingerprint:

SHA256:
221387D08E2EE0C2951C65A11680041BA559CAF40DB4338F0C7F7E86B8152110

Patch bytes:
32701

Validation:

  • focused F2 tests: PASS
  • control-store.test.ts: 139 passed
  • control-integration.test.ts: 20 passed
  • tests/control: 382 passed / 1 skipped
  • launch-lifecycle: 86 passed / 1 skipped
  • owner-helper.win: 22 passed
  • full suite forks-single: 2278 passed / 1 skipped
  • full suite default pool: 2278 passed / 1 skipped
  • typecheck: PASS
  • lint: PASS
  • build: PASS
  • git diff --check: PASS

Fresh independent validator verdict:

VALIDATED_UNCOMMITTED_PR84_F2_DESCRIPTOR_ACL_REPAIR

Scope:

This PR repairs F2 only.

It does NOT repair the separate CURRENT F1 ancestor-depth finding in
enumeratePathComponents(), and F1 remains unresolved.

Authority:

No new Git/GitHub/provider/repository mutation authority.
No additional control command.
No generic WorkflowEvent submission.
No generic apply(event).
No CLOSE_REQUESTED production source.
No shell execution.

This PR is intentionally Draft and is a validation child stacked directly under
PR #84.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0119FgmJ3gjmkHK57Fdv9p4K
@LogicDuke
LogicDuke marked this pull request as ready for review September 12, 2026 09:58
@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 662b6872-4b47-4450-81c0-370c700bbc2a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 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-09-12T20:38:54.675654Z 4ba406c Draft marked ready
ℹ️ 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.

@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: 300e437b03

ℹ️ 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 thread src/control/control-store.ts Outdated
@LogicDuke
LogicDuke marked this pull request as draft September 12, 2026 10:03
Discovery opened a candidate twice: once for the security gate and again by
pathname to read its token, so a writer holding a retained handle could pass
the ACL check and then swap the bytes. Hold one exclusive handle
(UV_FS_O_EXLOCK, share mode 0 on win32) across the gate and the read so both
refer to the same file object; a candidate that cannot be held is unverified.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PouvNPAFGjBvios1SoimzP
@LogicDuke
LogicDuke marked this pull request as ready for review September 12, 2026 12:38

@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: 66e01a7172

ℹ️ 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 thread src/control/control-store.ts
@LogicDuke
LogicDuke marked this pull request as draft September 12, 2026 13:19
A descriptor's CURRENT owner and DACL prove nothing about its history: a file
that was once attacker-readable can be repaired (WRITE_DAC) into a snapshot
byte-identical to a creator-born one, with its already-leaked token intact, so
the security gate alone cannot establish trusted origin.

Give every anchor ONE reserved secret file — a name no runtime ever mints and
no candidate ever carries — created through the existing provenanced creator
(CREATE_NEW, born protected) and never rotated, replaced, swept, or deleted.
Each descriptor carries proof = HMAC-SHA256(secret, runtime id || token).
Discovery reads the secret FIRST, through the same gate and held-handle path
as a candidate, and trusts a candidate only when its proof verifies; an
absent, unverified, or malformed secret fails closed before any candidate's
token is read. A legacy descriptor has no proof and cannot acquire one.

Stale cleanup is not narrowed: the sweep still parses unbound descriptors, so
a dead legacy file whose pipe is ABSENT remains removable.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011emfPPGduRoynL9zWtxcMP
@LogicDuke
LogicDuke marked this pull request as ready for review September 12, 2026 15:39

@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: 8247562622

ℹ️ 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 thread src/control/control-store.ts Outdated
Comment thread src/control/control-store.ts Outdated
@LogicDuke
LogicDuke marked this pull request as draft September 12, 2026 15:47
@LogicDuke
LogicDuke marked this pull request as ready for review September 12, 2026 19:33

@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: c31b08d442

ℹ️ 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 thread src/control/control-store.ts
@LogicDuke
LogicDuke marked this pull request as draft September 12, 2026 19:44
@LogicDuke
LogicDuke marked this pull request as ready for review September 12, 2026 20:36

@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: 4ba406c663

ℹ️ 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 thread src/control/control-store.ts
@LogicDuke
LogicDuke marked this pull request as draft September 12, 2026 20:52

Copy link
Copy Markdown
Owner Author

PR #103 retirement adjudication complete after D062 landed on main via merged PR #84 (merge commit 726b2c8b4f1e6a42ff2e5b5192af35299e49cd11). All six review threads have been adjudicated and resolved. Five findings are FIXED/SUPERSEDED by the merged live pipe-server attestation + Ed25519 mechanism and descriptor-v4 architecture. The remaining malformed/legacy descriptor cleanup item is CURRENT / P3 / NON-BLOCKING and is already carried in AGENTBRIDGE_DEFERRED_FINDINGS_REGISTER. This PR is superseded and will not be merged or repaired further.

@LogicDuke LogicDuke closed this Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant