Skip to content

Require aggregate checks in public rulesets - #5

Merged
kiwidream merged 1 commit into
0.1.1-testnet4from
codex/public-ruleset-deltas
Jun 23, 2026
Merged

kiwidream merged 1 commit into
0.1.1-testnet4from
codex/public-ruleset-deltas

Conversation

@kiwidream

@kiwidream kiwidream commented Jun 23, 2026 •

Copy link
Copy Markdown
Member

Summary

  • require Core Checks Gate and Full Validation Gate in the public main and 0.1.x ruleset templates
  • add public CI trust-gate documentation for ci:qbit-trusted and aggregate gate names
  • add the public branch, tag, and ruleset model used during release cutover

Validation

  • jq empty .github/rulesets/main.json .github/rulesets/0.1.x.json .github/rulesets/release-tags-v.json .github/rulesets/upstream-refs.json
  • git diff --check

Notes

The existing in-repo branch/tag creation and bypass rules were already sufficient for the live ruleset deltas. This PR addresses the remaining source-side gap: branch ruleset templates did not yet encode the two aggregate required checks.


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

@kiwidream
kiwidream merged commit e453479 into 0.1.1-testnet4 Jun 23, 2026
@kiwidream
kiwidream deleted the codex/public-ruleset-deltas branch June 25, 2026 14:50
kiwidream added a commit that referenced this pull request Oct 30, 2026
ebd9092b2a Describe the 0.3.1 vendored SPHINCS+ changes in the provenance doc
ae1d70c148 Release qbit-libbitcoinpqc 0.3.1
3f927abdd6 Update crossbeam-epoch to 0.9.20 (RUSTSEC-2026-0204)
fba994d373 Count down secure_zero_local without wrapping len
796f56fdbd Burn released stack once per secret-key call instead of per SHA-2 block (#6)
13f87a7811 Zero SLH-DSA secret-key scratch before keygen/sign return (#5)

Imported from a local clone of upstream release/v0.3.1-prep at
ebd9092b2a, the candidate commit for the upstream v0.3.1 tag. The
tree equals the one contrib/devtools/update-libbitcoinpqc-subtree.sh
produces; it is committed as one squash-merge-shaped commit, the shape
test/lint/libbitcoinpqc-subtree-check.sh reads, because the signing
preview cannot display the tool's whole-tree squash commit.

git-subtree-dir: src/libbitcoinpqc
git-subtree-split: ebd9092b2a0e3f5699a5eb0f6c8be388024736a4

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kiwidream added a commit that referenced this pull request Oct 30, 2026
Point every libbitcoinpqc pin at the v0.3.1 patch release candidate,
upstream release/v0.3.1-prep ebd9092b2a (imported in the previous
commit): the subtree helper default, the subtree check, the nightly
scanner and the fuzz target mapping, plus the docs that name the tag.

v0.3.1 is v0.3.0 plus the secret-key scratch zeroization (#5), the
once-per-call stack burn (#6), the non-wrapping secure_zero_local loop
from #14 and the RUSTSEC-2026-0204 crossbeam-epoch 0.9.20 lockfile fix
that qbit applied downstream on v0.3.0, so the vendored tree now equals
the tagged tree. Drop the inert lockfile exception from the subtree
check and the scanner.

The release bumps the crate to 0.3.1, so also move the
qbit-libbitcoinpqc path-dependency entry in the two contrib/testgen
lockfiles to 0.3.1; otherwise the P2MR oracle job's
cargo fetch --locked refuses the stale lockfiles.

Add pqc_secret_key_calls_scrub_released_stack. It runs keygen, import
validation, signing and HKDF derivation through CPQCKey on a painted
thread stack, then requires that no SK_SEED or SK_PRF copy remains and
that the deepest stack the call wrote starts the zeroed window the
library burns on return. Against v0.3.0 it fails for all four calls.

Refs #260

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kiwidream added a commit that referenced this pull request Nov 2, 2026
1965d0da1e Release qbit-libbitcoinpqc 0.3.2 (#17)
db10f2ed1e Forward-port 0.3.1 release metadata and provenance doc to main (#16)
edcea6cb89 Make the UBSan CI steps pass and require Linux CI on main (#14)
5fdfda2f85 Set allocator_may_return_null in the ASan release smoke (#13)
d3c6a6f0ea Prove requested SHA backend implementations execute (#4)
70008b9362 Report an inconsistent secret key from sign as BAD_KEY and allocation failure as OUT_OF_MEMORY (#10)
d165da6a15 Burn released stack once per secret-key call instead of per SHA-2 block (#6)
85cda2cfa8 Zero SLH-DSA secret-key scratch before keygen/sign return (#5)
f55b86b609 Add minimal GitHub ruleset configs (#2)
d5700dad0b Add trusted CI runner label

Imported from the upstream tag v0.3.2 (signed annotated tag 81709ebe34,
peeled 1965d0da1e, tree 4cb1705), the squash merge of
Qbit-Org/qbit-libbitcoinpqc#17 onto main db10f2ed1e. git merge-tree
from the v0.3.0 tree with qbit's subtree and this tree produces the
same tree, so this is what contrib/devtools/update-libbitcoinpqc-subtree.sh
produces, and qbit's downstream v0.3.0 crossbeam-epoch lockfile patch is
part of the tag. It is committed as one squash-merge-shaped commit, the
shape test/lint/libbitcoinpqc-subtree-check.sh reads, because the
signing preview cannot display the tool's whole-tree squash commit.

git-subtree-dir: src/libbitcoinpqc
git-subtree-split: 1965d0da1eb4d9e196613b8f3a5d0d866a221c53

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kiwidream added a commit that referenced this pull request Nov 2, 2026
Point every libbitcoinpqc pin at the signed v0.3.2 tag (peeled
1965d0da1e, imported in the previous commit): the subtree helper
default, the subtree check, the nightly scanner and the fuzz target
mapping, plus the docs that name the tag.

v0.3.2 is v0.3.0 plus the secret-key scratch zeroization (#5), the
once-per-call stack burn (#6), the non-wrapping secure_zero_local loop
(#14), BAD_KEY for signing with an inconsistent secret key and a new
OUT_OF_MEMORY (-6) code for allocation failures (#10), and the
RUSTSEC-2026-0204 crossbeam-epoch 0.9.20 lockfile fix that qbit applied
downstream on v0.3.0, so the vendored tree now equals the tagged tree.
Drop the inert lockfile exception from the subtree check and the
scanner. qbit's callers treat any nonzero result as a failure and no
qbit test asserts a code that changed, so no caller changes. Keys,
signatures and verification results are unchanged.

The release bumps the crate to 0.3.2, so also move the
qbit-libbitcoinpqc path-dependency entry in the two contrib/testgen
lockfiles to 0.3.2; otherwise the P2MR oracle job's
cargo fetch --locked refuses the stale lockfiles.

Correct the runbook's stack note: the forced RelWithDebInfo C flags
follow CMAKE_C_FLAGS on the compile line, so an -O0 in APPEND_CFLAGS
does not select the unoptimized 288 KiB burn, and every qbit build
burns 16 KiB.

Add pqc_secret_key_calls_scrub_released_stack. It runs keygen, import
validation, signing and HKDF derivation through CPQCKey on a painted
thread stack, then requires that no SK_SEED or SK_PRF copy remains and
that the longest zeroed run below the caller is at least 12 KiB with at
most 64 bytes written below it, so no frame of the call ran below the
burn. The 64 bytes cover the burn's own prologue on i686, where
position-independent code pushes a return address below the array to
load its GOT pointer. The inspection is skipped under TSan, whose
runtime calls run below every instrumented frame, as under ASan,
HWASan, MSan and SafeStack. A 4 KiB burn fails the test.

Refs #260

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kiwidream added a commit that referenced this pull request Nov 2, 2026
* Squashed 'src/libbitcoinpqc/' changes from ac72d1ffa0..1965d0da1e

1965d0da1e Release qbit-libbitcoinpqc 0.3.2 (#17)
db10f2ed1e Forward-port 0.3.1 release metadata and provenance doc to main (#16)
edcea6cb89 Make the UBSan CI steps pass and require Linux CI on main (#14)
5fdfda2f85 Set allocator_may_return_null in the ASan release smoke (#13)
d3c6a6f0ea Prove requested SHA backend implementations execute (#4)
70008b9362 Report an inconsistent secret key from sign as BAD_KEY and allocation failure as OUT_OF_MEMORY (#10)
d165da6a15 Burn released stack once per secret-key call instead of per SHA-2 block (#6)
85cda2cfa8 Zero SLH-DSA secret-key scratch before keygen/sign return (#5)
f55b86b609 Add minimal GitHub ruleset configs (#2)
d5700dad0b Add trusted CI runner label

Imported from the upstream tag v0.3.2 (signed annotated tag 81709ebe34,
peeled 1965d0da1e, tree 4cb1705), the squash merge of
Qbit-Org/qbit-libbitcoinpqc#17 onto main db10f2ed1e. git merge-tree
from the v0.3.0 tree with qbit's subtree and this tree produces the
same tree, so this is what contrib/devtools/update-libbitcoinpqc-subtree.sh
produces, and qbit's downstream v0.3.0 crossbeam-epoch lockfile patch is
part of the tag. It is committed as one squash-merge-shaped commit, the
shape test/lint/libbitcoinpqc-subtree-check.sh reads, because the
signing preview cannot display the tool's whole-tree squash commit.

git-subtree-dir: src/libbitcoinpqc
git-subtree-split: 1965d0da1eb4d9e196613b8f3a5d0d866a221c53

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* subtree: pin libbitcoinpqc v0.3.2 and test the signer stack scrub

Point every libbitcoinpqc pin at the signed v0.3.2 tag (peeled
1965d0da1e, imported in the previous commit): the subtree helper
default, the subtree check, the nightly scanner and the fuzz target
mapping, plus the docs that name the tag.

v0.3.2 is v0.3.0 plus the secret-key scratch zeroization (#5), the
once-per-call stack burn (#6), the non-wrapping secure_zero_local loop
(#14), BAD_KEY for signing with an inconsistent secret key and a new
OUT_OF_MEMORY (-6) code for allocation failures (#10), and the
RUSTSEC-2026-0204 crossbeam-epoch 0.9.20 lockfile fix that qbit applied
downstream on v0.3.0, so the vendored tree now equals the tagged tree.
Drop the inert lockfile exception from the subtree check and the
scanner. qbit's callers treat any nonzero result as a failure and no
qbit test asserts a code that changed, so no caller changes. Keys,
signatures and verification results are unchanged.

The release bumps the crate to 0.3.2, so also move the
qbit-libbitcoinpqc path-dependency entry in the two contrib/testgen
lockfiles to 0.3.2; otherwise the P2MR oracle job's
cargo fetch --locked refuses the stale lockfiles.

Correct the runbook's stack note: the forced RelWithDebInfo C flags
follow CMAKE_C_FLAGS on the compile line, so an -O0 in APPEND_CFLAGS
does not select the unoptimized 288 KiB burn, and every qbit build
burns 16 KiB.

Add pqc_secret_key_calls_scrub_released_stack. It runs keygen, import
validation, signing and HKDF derivation through CPQCKey on a painted
thread stack, then requires that no SK_SEED or SK_PRF copy remains and
that the longest zeroed run below the caller is at least 12 KiB with at
most 64 bytes written below it, so no frame of the call ran below the
burn. The 64 bytes cover the burn's own prologue on i686, where
position-independent code pushes a return address below the array to
load its GOT pointer. The inspection is skipped under TSan, whose
runtime calls run below every instrumented frame, as under ASan,
HWASan, MSan and SafeStack. A 4 KiB burn fails the test.

Refs #260

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* doc: add release notes for #268

Refs #260

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
kiwidream added a commit that referenced this pull request Nov 12, 2026
* Squashed 'src/libbitcoinpqc/' changes from ac72d1ffa0..1965d0da1e

1965d0da1e Release qbit-libbitcoinpqc 0.3.2 (#17)
db10f2ed1e Forward-port 0.3.1 release metadata and provenance doc to main (#16)
edcea6cb89 Make the UBSan CI steps pass and require Linux CI on main (#14)
5fdfda2f85 Set allocator_may_return_null in the ASan release smoke (#13)
d3c6a6f0ea Prove requested SHA backend implementations execute (#4)
70008b9362 Report an inconsistent secret key from sign as BAD_KEY and allocation failure as OUT_OF_MEMORY (#10)
d165da6a15 Burn released stack once per secret-key call instead of per SHA-2 block (#6)
85cda2cfa8 Zero SLH-DSA secret-key scratch before keygen/sign return (#5)
f55b86b609 Add minimal GitHub ruleset configs (#2)
d5700dad0b Add trusted CI runner label

Imported from the upstream tag v0.3.2 (signed annotated tag 81709ebe34,
peeled 1965d0da1e, tree 4cb1705), the squash merge of
Qbit-Org/qbit-libbitcoinpqc#17 onto main db10f2ed1e. git merge-tree
from the v0.3.0 tree with qbit's subtree and this tree produces the
same tree, so this is what contrib/devtools/update-libbitcoinpqc-subtree.sh
produces, and qbit's downstream v0.3.0 crossbeam-epoch lockfile patch is
part of the tag. It is committed as one squash-merge-shaped commit, the
shape test/lint/libbitcoinpqc-subtree-check.sh reads, because the
signing preview cannot display the tool's whole-tree squash commit.


Co-Authored-By: Claude Opus 5.5 <[email protected]>

* subtree: pin libbitcoinpqc v0.3.2 and test the signer stack scrub

Point every libbitcoinpqc pin at the signed v0.3.2 tag (peeled
1965d0da1e, imported in the previous commit): the subtree helper
default, the subtree check, the nightly scanner and the fuzz target
mapping, plus the docs that name the tag.

v0.3.2 is v0.3.0 plus the secret-key scratch zeroization (#5), the
once-per-call stack burn (#6), the non-wrapping secure_zero_local loop
(#14), BAD_KEY for signing with an inconsistent secret key and a new
OUT_OF_MEMORY (-6) code for allocation failures (#10), and the
RUSTSEC-2026-0204 crossbeam-epoch 0.9.20 lockfile fix that qbit applied
downstream on v0.3.0, so the vendored tree now equals the tagged tree.
Drop the inert lockfile exception from the subtree check and the
scanner. qbit's callers treat any nonzero result as a failure and no
qbit test asserts a code that changed, so no caller changes. Keys,
signatures and verification results are unchanged.

The release bumps the crate to 0.3.2, so also move the
qbit-libbitcoinpqc path-dependency entry in the two contrib/testgen
lockfiles to 0.3.2; otherwise the P2MR oracle job's
cargo fetch --locked refuses the stale lockfiles.

Correct the runbook's stack note: the forced RelWithDebInfo C flags
follow CMAKE_C_FLAGS on the compile line, so an -O0 in APPEND_CFLAGS
does not select the unoptimized 288 KiB burn, and every qbit build
burns 16 KiB.

Add pqc_secret_key_calls_scrub_released_stack. It runs keygen, import
validation, signing and HKDF derivation through CPQCKey on a painted
thread stack, then requires that no SK_SEED or SK_PRF copy remains and
that the longest zeroed run below the caller is at least 12 KiB with at
most 64 bytes written below it, so no frame of the call ran below the
burn. The 64 bytes cover the burn's own prologue on i686, where
position-independent code pushes a return address below the array to
load its GOT pointer. The inspection is skipped under TSan, whose
runtime calls run below every instrumented frame, as under ASan,
HWASan, MSan and SafeStack. A 4 KiB burn fails the test.

Refs #260

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* doc: add release notes for #268

Refs #260

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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