Skip to content

feat: validate redacted runtime evidence aggregate - #144

Merged
Pigbibi merged 1 commit into
mainfrom
codex/qsl-p4-runtime-evidence-contract-fresh-binance-20260804
Aug 4, 2026
Merged

feat: validate redacted runtime evidence aggregate#144
Pigbibi merged 1 commit into
mainfrom
codex/qsl-p4-runtime-evidence-contract-fresh-binance-20260804

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Static-only P4 evidence contract: fail-closed redacted aggregate with RiskEngine, cap, stop/breaker, and reconciliation validation. No runtime, deployment, provider, broker, or credential changes.

Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi
Pigbibi merged commit c4b24a1 into main Aug 4, 2026
1 check passed
@Pigbibi
Pigbibi deleted the codex/qsl-p4-runtime-evidence-contract-fresh-binance-20260804 branch August 4, 2026 03:45

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

ℹ️ 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 runtime_support.py
Comment on lines +27 to +29
"provider_rows",
"secret",
"token",

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 Reject the runtime's tg_token credential field

When an aggregate contains this repository's Telegram credential key tg_token (used by ExecutionRuntime and populated from TG_TOKEN), the recursive scanner compares the entire lowercased key against this set, so it does not match token and validation returns ok: true. This defeats the redacted-evidence guarantee and can allow a live notification credential into accepted evidence; explicitly reject the known key or safely recognize credential-bearing key variants.

Useful? React with 👍 / 👎.

Comment thread runtime_support.py
Comment on lines +43 to +48
def _is_sha256(value: Any) -> bool:
return isinstance(value, str) and bool(re.fullmatch(r"[0-9a-f]{64}", value.strip()))


def _is_git_revision(value: Any) -> bool:
return isinstance(value, str) and bool(re.fullmatch(r"[0-9a-f]{40}", value.strip()))

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 Validate hashes without trimming the supplied value

For artifact and reconciliation hashes—and likewise for source revisions below—calling strip() only for the regex check means values such as " <64 hex characters> " are certified while the untrimmed, noncanonical string remains in the aggregate. Any consumer performing an exact digest or revision comparison on the accepted value will then fail or derive a different identity, so validation should either reject surrounding whitespace or normalize the stored value.

Useful? React with 👍 / 👎.

Comment thread runtime_support.py
Comment on lines +51 to +55
def _is_utc_timestamp(value: Any) -> bool:
if not isinstance(value, str) or not value.endswith("Z"):
return False
try:
datetime.fromisoformat(value.replace("Z", "+00:00"))

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 Require an actual timezone-aware UTC timestamp

When input_timestamp is a date-only value such as 2026-03-13Z, this replacement produces 2026-03-13+00:00, which Python 3.11's datetime.fromisoformat accepts as a naive midnight datetime. The aggregate is therefore marked valid despite lacking both a timestamp and UTC timezone information, weakening the release identity's audit precision; require a datetime component and verify that the parsed value is aware with a zero UTC offset.

Useful? React with 👍 / 👎.

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