Skip to content

Harden TQQQ trusted snapshot package - #221

Closed
Pigbibi wants to merge 1 commit into
mainfrom
codex/qsl-p2-tqqq-final-two-findings-closure-20260730
Closed

Harden TQQQ trusted snapshot package#221
Pigbibi wants to merge 1 commit into
mainfrom
codex/qsl-p2-tqqq-final-two-findings-closure-20260730

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • bound strict JSON bytes before decode/parse
  • lexically normalize snapshot roots before descriptor-safe no-follow open
  • preserve descriptor-backed snapshot verification and adversarial coverage

Validation

  • tests-first predecessor RED: 3 failed, 2 passed
  • focused: 46 passed
  • full: 591 passed, 3 skipped
  • Ruff / Ruff format / compileall / diff and exact-scope checks: passed

Provider-free, size-zero implementation. No dependency, schema, workflow, settings, replay, deploy, or live changes.

Co-Authored-By: Codex <noreply@openai.com>

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

ℹ️ 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 +623 to +629
snapshot_sessions = {
row["session"]
for row in csv.DictReader(
StringIO(
members["prices.csv"].decode("utf-8"),
),
)

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 Bind the session from the verified CSV parse

When prices.csv has more fields per row than its three headers, pandas can treat the leading field as an implicit index, so _verify_snapshot_fd validates the following field as the session while this independent csv.DictReader treats the leading field as row["session"]. A crafted, correctly hashed snapshot can therefore put the receipt session only in that discarded index field and pass this membership check even though the validated price rows contain no such session; derive the sessions from the already-normalized dataframe or reject rows with extra fields.

Useful? React with 👍 / 👎.

Comment on lines +299 to +301
if type(raw_path) is not str or not raw_path:
_invalid("invalid snapshot directory")
return os.path.normpath(raw_path)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve path semantics while rejecting final symlinks

When a snapshot path contains .. after a symlinked ancestor, normpath changes which directory is opened because it collapses the component lexically whereas normal filesystem resolution follows the symlink before applying ... For example, base/link/../snapshot can resolve under the link target but is opened here as base/snapshot, allowing verification to succeed against a directory different from the caller-supplied path that is retained in snapshot_dir; reject ambiguous .. components or strip only the trailing forms needed for the final-symlink check.

Useful? React with 👍 / 👎.

@Pigbibi

Pigbibi commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Fail-closed closure evidence for immutable head f2d813e7edbe15094c62e62f453e9ca150dd5b5d:

  • Required test run 30502391229: SUCCESS.
  • Unique exact-head GitHub Codex App review: PRR_kwDOR_7pX88AAAABHvDQEA.
  • Current unresolved findings: P1 PRRT_kwDOR_7pX86U8edK; P2 PRRT_kwDOR_7pX86U8edN.
  • Head is sealed by the phase contract. No patch, re-review, rerun, thread mutation, merge, reslice, successor, or P3 action is authorized.

Closing unmerged as FAILED_PARKED.

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