Skip to content

Contain unsafe paths and validate the native lifecycle slice - #246

Merged
hyperpolymath merged 10 commits into
mainfrom
fix/critical-proof-remediation-20261116
Nov 25, 2026
Merged

hyperpolymath merged 10 commits into
mainfrom
fix/critical-proof-remediation-20261116

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

This change closes critical fail-open behavior in JWT authentication, SQL literal evidence, entropy/nonce handling, password and webhook checks, and establishes the scoped native lifecycle demonstration ABI-LC-D1. Lifecycle policy stays in Idris2; the Zig adapter calls real RefC code through the public pinned compiler SDK. Integration preserves main's actual Idris header kernel and its capability ledger.

Validation: production lifecycle proofs and two forged-proof refusals; 1,033 runtime assertions; fresh RefC static/shared libraries; 17 full and 9 standalone Zig tests; actual C/Rust callers, four-thread concurrency and generated-reply corruption refusal. The repaired symbol checker passes 16 shared/static fixtures plus hidden-export refusal. The first failed archive-check attempt is retained. Both real ledgers match, explicitly recording 150 owed header declarations. The hosted header corpus, integrated native harness and critical security proof suite have also passed on the repaired source; all final-head CI checks passed before merge, including native run45577206501 at9721ce59.

Signed implementation: 8da3131d19ef2304c9a5fccc3a8f31fcfa492d7c. Signed receipt carrier: 4ac09e36c6b710099b4ceadb26066a83d949dd8f. Receipt: verification/receipts/lifecycle-20261125/engineering.json, SHA-256 653e399024a61d3d990cc31f1e25f052ffbe9ce26b5c84d51f9c80b642992643. Mathesis PR124 registers this as an ungraded engineering demonstration. Earlier receipts retain their historical source scope.

Limits: no whole-repository or complete ABI proof. Compiler/runtime correctness, pointer validity, Zig/RefC correspondence, marshaling, ownership, all concurrency interleavings and other platforms remain explicit obligations. Rust wrapper verification with Creusot/Pearlite and complementary Verus remains open. The capability ledger does not replace the complete Rustler release gate. Full 315-module package build and all 29 property-test modules passed in hosted integration CI. The final native run additionally passed the restored two nonce tests, three build-rejection controls, and a relocated C consumer without SDK runtime dependencies or RPATH. The superseded local 2 GiB job was never launched.

Conflicts are resolved. Sonar's quality gate is green. Merged normally after all checks passed; GitHub verified signed squash e902fa9.

@gitnotebooks

gitnotebooks Bot commented Nov 25, 2026

Copy link
Copy Markdown

Review these changes at https://app.gitnotebooks.com/hyperpolymath/proven/pull/246

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 147 files, which is 47 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

Check out review usage here.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: cc714c0d-c9e9-437a-9b13-fa7f9a0f006b
Commits

Reviewing files that changed from the base of the PR and between 1657cdd and 9721ce5.

Files ignored due to path filters: 57

  • bindings/c/include/proven-abi.tsv is excluded by !**/*.tsv
  • docs/remediation/proof-worklist-20261115.csv is excluded by !**/*.csv
  • verification/receipts/lifecycle-20261124/lifecycle-corruption-run.an5xXqxZ/build.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/lifecycle-corruption-run.an5xXqxZ/fail-closed.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/lifecycle-corruption-run.an5xXqxZ/rejected.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/lifecycle-corruption-run.an5xXqxZ/restored-control.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/lifecycle-corruption-run.an5xXqxZ/stage.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/lifecycle-corruption-run.an5xXqxZ/uncorrupted-control.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/lifecycle-negative-controls-run.bzdq81XY/ForgedLifecycle.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/lifecycle-negative-controls-run.bzdq81XY/MalformedLifecycle.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/lifecycle-negative-controls-run.bzdq81XY/positive.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/lifecycle-negative-controls-run.bzdq81XY/stage.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/lifecycle-refc-executable-run.wko3qwog/compile.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/lifecycle-refc-executable-run.wko3qwog/runtime-arguments.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/lifecycle-refc-executable-run.wko3qwog/runtime-default.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/lifecycle-refc-executable-run.wko3qwog/stage.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/native-consumers-run.P3oerCBZ/c-shared.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/native-consumers-run.P3oerCBZ/stage.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/native-consumers-run.xR6LkYcm/c-shared.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/native-consumers-run.xR6LkYcm/c-static.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/native-consumers-run.xR6LkYcm/rust-consumer.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/native-consumers-run.xR6LkYcm/stage.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/package-one-gib-run.bSwtpv5U/package.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/refc-library-exports-run.P2ztAg1w/build-refc.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/refc-library-exports-run.P2ztAg1w/inputs-recheck.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/refc-library-exports-run.P2ztAg1w/package-smoke.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/refc-library-exports-run.P2ztAg1w/stage.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/zig-lifecycle-tests-run.Hr8f4VbY/full-tests.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/zig-lifecycle-tests-run.Hr8f4VbY/stage.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/zig-lifecycle-tests-run.Hr8f4VbY/standalone-build.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/zig-lifecycle-tests-run.Hr8f4VbY/standalone-tests.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/zig-lifecycle-tests-run.Hr8f4VbY/unavailable.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/zig-static-shared-run.d1hfVYlB/build-inputs-recheck.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/zig-static-shared-run.d1hfVYlB/current-generation-recheck.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/zig-static-shared-run.d1hfVYlB/prior-boundary-recheck.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/zig-static-shared-run.d1hfVYlB/prior-generated-recheck.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/zig-static-shared-run.d1hfVYlB/prior-inputs-recheck.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/zig-static-shared-run.d1hfVYlB/stage.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/zig-static-shared-run.d1hfVYlB/toolchain-recheck.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261124/zig-static-shared-run.d1hfVYlB/zig-build.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261125/native/ForgedLifecycle.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261125/native/MalformedLifecycle.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261125/native/backend-failure.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261125/native/c-shared.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261125/native/c-static.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261125/native/c-unavailable.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261125/native/corrupted-result.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261125/native/idris-runtime.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261125/native/proofs.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261125/native/refc-build.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261125/native/run.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261125/native/rust-consumer.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261125/native/toolchains.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261125/native/zig-build.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261125/native/zig-tests.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261125/prior-failure/stage.log is excluded by !**/*.log
  • verification/receipts/lifecycle-20261125/stage.log is excluded by !**/*.log
Files selected for processing: 147

  • .clusterfuzzlite/build.sh
  • .github/workflows/ffi-full-integration.yml
  • .github/workflows/idris2-ci.yml
  • .gitleaksignore
  • .gitmodules
  • README.adoc
  • ROADMAP.adoc
  • bindings/c/include/proven.h
  • docs/adr/2026-11-25-lifecycle-integration.adoc
  • docs/ffi/NATIVE-NIF-ABI-CONTRACT.adoc
  • docs/remediation/2026-11-16-jwt-sql.md
  • docs/remediation/2026-11-16-native-abi-draft.md
  • docs/remediation/2026-11-16-native-nonce.md
  • docs/remediation/2026-11-16-plan.md
  • docs/remediation/2026-11-16-validation.md
  • docs/status/LIFECYCLE-PROOF-STATUS.adoc
  • ffi/zig/build.zig
  • ffi/zig/build_standalone.zig
  • ffi/zig/src/core.zig
  • ffi/zig/src/lifecycle_refc.zig
  • ffi/zig/src/lifecycle_unavailable.zig
  • nextgen-languages/language-bridges
  • proven-ffi.ipkg
  • proven.ipkg
  • scripts/build-refc.sh
  • scripts/check-abi-ledger.sh
  • scripts/check-native-nif-exports.sh
  • scripts/test-abi-ledger.sh
  • scripts/test-critical-remediation.sh
  • scripts/test-native-lifecycle.sh
  • scripts/test-remediation-bridge.sh
  • src/Proven/ABI/Lifecycle.idr
  • src/Proven/ECHIDNA/Kernel.idr
  • src/Proven/ECHIDNA/Soundness.idr
  • src/Proven/ECHIDNA/Validator.idr
  • src/Proven/FFI/Main.idr
  • src/Proven/FFI/SafeJWT.idr
  • src/Proven/FFI/SafeWebhook.idr
  • src/Proven/SafeCrypto/Proofs.idr
  • src/Proven/SafeCrypto/Random.idr
  • src/Proven/SafeCrypto/RandomContainment.idr
  • src/Proven/SafeJWT.idr
  • src/Proven/SafeJWT/Containment.idr
  • src/Proven/SafeJWT/Proofs.idr
  • src/Proven/SafeJWT/Types.idr
  • src/Proven/SafeJWT/Validate.idr
  • src/Proven/SafePassword/Comparison.idr
  • src/Proven/SafePassword/Hash.idr
  • src/Proven/SafeSQL.idr
  • src/Proven/SafeSQL/Literal.idr
  • src/Proven/SafeSQL/Params.idr
  • src/Proven/SafeSQL/Proofs.idr
  • src/Proven/SafeSQL/Types.idr
  • src/Proven/SafeString/Escape.idr
  • src/Proven/SafeString/Proofs.idr
  • src/Proven/SafeWebhook.idr
  • tests/check-native-nif-exports.sh
  • tests/check-refc-staging.sh
  • tests/properties/SafeJWTProps.idr
  • tests/properties/SafeSQLProps.idr
  • tests/properties/SafeStringProps.idr
  • tests/remediation/BeforeJWTSQL.idr
  • tests/remediation/BeforeNonce.idr
  • tests/remediation/EntropyFailureProbe.idr
  • tests/remediation/JWTSQLCases.idr
  • tests/remediation/JWTSQLMain.idr
  • tests/remediation/JWTSQLProofRegressions.idr
  • tests/remediation/LifecycleMain.idr
  • tests/remediation/LifecycleProofRegressions.idr
  • tests/remediation/Main.idr
  • tests/remediation/NativeNonceFixture.idr
  • tests/remediation/ProofRegressions.idr
  • tests/remediation/RandomMain.idr
  • tests/remediation/RandomProofRegressions.idr
  • tests/remediation/native_lifecycle.c
  • tests/remediation/native_lifecycle.rs
  • tests/remediation/native_nonce.zig
  • tests/remediation/negative/CounterOverflow.idr
  • tests/remediation/negative/FalseGoal.idr
  • tests/remediation/negative/ForgedEntropy.idr
  • tests/remediation/negative/ForgedJWT.idr
  • tests/remediation/negative/ForgedLifecycle.idr
  • tests/remediation/negative/ForgedWebhook.idr
  • tests/remediation/negative/LoneSQLQuote.idr
  • tests/remediation/negative/MalformedLifecycle.idr
  • tests/remediation/negative/RawSQLParameter.idr
  • tests/remediation/sqlite-literals.jl
  • verification/receipts/lifecycle-20261124/evidence.sha256
  • verification/receipts/lifecycle-20261124/lifecycle-corruption-run.an5xXqxZ/corrupted-artifacts.sha256
  • verification/receipts/lifecycle-20261124/lifecycle-corruption-run.an5xXqxZ/generated.sha256
  • verification/receipts/lifecycle-20261124/lifecycle-corruption-run.an5xXqxZ/mutation.diff
  • verification/receipts/lifecycle-20261124/lifecycle-negative-controls-run.bzdq81XY/compiler-version.txt
  • verification/receipts/lifecycle-20261124/lifecycle-negative-controls-run.bzdq81XY/inputs.sha256
  • verification/receipts/lifecycle-20261124/lifecycle-refc-executable-run.wko3qwog/artifact.sha256
  • verification/receipts/lifecycle-20261124/lifecycle-refc-executable-run.wko3qwog/cc-version.txt
  • verification/receipts/lifecycle-20261124/lifecycle-refc-executable-run.wko3qwog/idris-version.txt
  • verification/receipts/lifecycle-20261124/lifecycle-refc-executable-run.wko3qwog/inputs.sha256
  • verification/receipts/lifecycle-20261124/native-consumers-run.P3oerCBZ/cc-version.txt
  • verification/receipts/lifecycle-20261124/native-consumers-run.P3oerCBZ/inputs.sha256
  • verification/receipts/lifecycle-20261124/native-consumers-run.P3oerCBZ/rustc-version.txt
  • verification/receipts/lifecycle-20261124/native-consumers-run.xR6LkYcm/cc-version.txt
  • verification/receipts/lifecycle-20261124/native-consumers-run.xR6LkYcm/consumers.sha256
  • verification/receipts/lifecycle-20261124/native-consumers-run.xR6LkYcm/inputs.sha256
  • verification/receipts/lifecycle-20261124/native-consumers-run.xR6LkYcm/rustc-version.txt
  • verification/receipts/lifecycle-20261124/package-one-gib-run.bSwtpv5U/compiler-version.txt
  • verification/receipts/lifecycle-20261124/package-one-gib-run.bSwtpv5U/inputs.sha256
  • verification/receipts/lifecycle-20261124/package-one-gib-run.bSwtpv5U/parent.txt
  • verification/receipts/lifecycle-20261124/receipt.json
  • verification/receipts/lifecycle-20261124/refc-library-exports-run.P2ztAg1w/artifact.sha256
  • verification/receipts/lifecycle-20261124/refc-library-exports-run.P2ztAg1w/boundary.sha256
  • verification/receipts/lifecycle-20261124/refc-library-exports-run.P2ztAg1w/cc-version.txt
  • verification/receipts/lifecycle-20261124/refc-library-exports-run.P2ztAg1w/generated.sha256
  • verification/receipts/lifecycle-20261124/refc-library-exports-run.P2ztAg1w/idris-version.txt
  • verification/receipts/lifecycle-20261124/refc-library-exports-run.P2ztAg1w/inputs.sha256
  • verification/receipts/lifecycle-20261124/source-inputs.sha256
  • verification/receipts/lifecycle-20261124/zig-lifecycle-tests-run.Hr8f4VbY/artifacts.sha256
  • verification/receipts/lifecycle-20261124/zig-lifecycle-tests-run.Hr8f4VbY/inputs.sha256
  • verification/receipts/lifecycle-20261124/zig-lifecycle-tests-run.Hr8f4VbY/test-executables.sha256
  • verification/receipts/lifecycle-20261124/zig-static-shared-run.d1hfVYlB/artifacts.sha256
  • verification/receipts/lifecycle-20261124/zig-static-shared-run.d1hfVYlB/build-command.txt
  • verification/receipts/lifecycle-20261124/zig-static-shared-run.d1hfVYlB/build-inputs.sha256
  • verification/receipts/lifecycle-20261124/zig-static-shared-run.d1hfVYlB/current-generation-inputs.sha256
  • verification/receipts/lifecycle-20261124/zig-static-shared-run.d1hfVYlB/generated-input.sha256
  • verification/receipts/lifecycle-20261124/zig-static-shared-run.d1hfVYlB/toolchain-inputs.sha256
  • verification/receipts/lifecycle-20261124/zig-static-shared-run.d1hfVYlB/zig-version.txt
  • verification/receipts/lifecycle-20261125/driver-inputs.sha256
  • verification/receipts/lifecycle-20261125/driver.sh
  • verification/receipts/lifecycle-20261125/engineering.json
  • verification/receipts/lifecycle-20261125/evidence.sha256
  • verification/receipts/lifecycle-20261125/ledger-libproven.a/exported.txt
  • verification/receipts/lifecycle-20261125/ledger-libproven.a/identity.sha256
  • verification/receipts/lifecycle-20261125/ledger-libproven.a/library.txt
  • verification/receipts/lifecycle-20261125/ledger-libproven.a/owed.txt
  • verification/receipts/lifecycle-20261125/ledger-libproven.a/result.txt
  • verification/receipts/lifecycle-20261125/ledger-libproven.a/summary.txt
  • verification/receipts/lifecycle-20261125/ledger-libproven.a/undeclared.txt
  • verification/receipts/lifecycle-20261125/ledger-libproven.so/exported.txt
  • verification/receipts/lifecycle-20261125/ledger-libproven.so/identity.sha256
  • verification/receipts/lifecycle-20261125/ledger-libproven.so/library.txt
  • verification/receipts/lifecycle-20261125/ledger-libproven.so/owed.txt
  • verification/receipts/lifecycle-20261125/ledger-libproven.so/result.txt
  • verification/receipts/lifecycle-20261125/ledger-libproven.so/summary.txt
  • verification/receipts/lifecycle-20261125/ledger-libproven.so/undeclared.txt
  • verification/receipts/lifecycle-20261125/native/artifacts.sha256
  • verification/receipts/lifecycle-20261125/native/sdk-inputs.sha256
  • verification/receipts/lifecycle-20261125/receipt.json
  • verification/receipts/lifecycle-20261125/source-inputs.sha256

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

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Preserve the actual Idris header path and capability ledger, use the public compiler SDK for lifecycle marshaling, and correct the workflow permission scope and regression harness complexity. Prior receipts remain bound to their original source; fresh integrated proof/native checks are pending.
Comment thread ffi/zig/src/lifecycle_refc.zig Fixed
Comment thread ffi/zig/src/lifecycle_refc.zig Fixed
@hyperpolymath
hyperpolymath marked this pull request as ready for review November 25, 2026 07:52
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T08:35:21.248893Z 9721ce5 New commits
🔒 Security Review ✅ Completed 2026-11-25T08:39:30.580418Z 9721ce5 New commits
ℹ️ 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: 4ac09e36c6

ℹ️ 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 scripts/test-remediation-bridge.sh Resolved
Comment thread scripts/test-remediation-bridge.sh Resolved
Comment thread ffi/zig/build.zig Resolved
@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit e902fa9 into main Nov 25, 2026
91 checks passed
@hyperpolymath
hyperpolymath deleted the fix/critical-proof-remediation-20261116 branch November 25, 2026 08:46
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.

3 participants