From 197e87409705a2bbd66af82b4ef2438f5e9a3872 Mon Sep 17 00:00:00 2001 From: "rizzstack-coordinator[bot]" <362099543+rizzstack-coordinator[bot]@users.noreply.github.com> Date: Fri, 27 Nov 2026 20:29:28 +0000 Subject: [PATCH 1/2] lease(app-identity): land the re-cut contract and its lease Owner re-approved the re-freeze (approved: 1db50f73) after the RED fixture was re-cut for scanner safety; source_rev d808275. --- ...077a0c40a686329796dc48a8a93054b1e1de6.json | 128 ++++++++++++++++++ .rizzstack/leases/app-identity.json | 38 ++++++ 2 files changed, 166 insertions(+) create mode 100644 .rizzstack/contracts/1db50f734a5ff3c068ad69b4e61077a0c40a686329796dc48a8a93054b1e1de6.json create mode 100644 .rizzstack/leases/app-identity.json diff --git a/.rizzstack/contracts/1db50f734a5ff3c068ad69b4e61077a0c40a686329796dc48a8a93054b1e1de6.json b/.rizzstack/contracts/1db50f734a5ff3c068ad69b4e61077a0c40a686329796dc48a8a93054b1e1de6.json new file mode 100644 index 0000000..c9a6e45 --- /dev/null +++ b/.rizzstack/contracts/1db50f734a5ff3c068ad69b4e61077a0c40a686329796dc48a8a93054b1e1de6.json @@ -0,0 +1,128 @@ +{ + "acceptance_criteria": [ + { + "id": "AC-001", + "statement": "build_claims sets iss to the app id, iat 60 s back and exp 540 s ahead.", + "tests": [ + "tests/test_app_auth.py::test_claims_are_short_lived_and_issued_for_the_app" + ], + "verification": "test" + }, + { + "id": "AC-002", + "statement": "A cached installation token is reused within its lifetime and re-minted after expiry.", + "tests": [ + "tests/test_app_auth.py::test_installation_token_is_cached_until_just_before_expiry" + ], + "verification": "test" + }, + { + "id": "AC-003", + "statement": "A private key with mode 0644 is refused with app_key_permissions.", + "tests": [ + "tests/test_app_auth.py::test_group_readable_key_is_refused" + ], + "verification": "test" + }, + { + "id": "AC-004", + "statement": "token_for returns the token without key material and refuses an unconfigured app with app_not_configured.", + "tests": [ + "tests/test_app_auth.py::test_token_for_reads_the_configured_app_without_leaking_the_key" + ], + "verification": "test" + }, + { + "id": "AC-005", + "statement": "The reviewer key path is accepted at 0600 and refused at 0640.", + "tests": [ + "tests/test_app_auth.py::test_reviewer_key_is_only_readable_by_the_poster_user" + ], + "verification": "test" + } + ], + "authorization": { + "human_gates": [ + "merge", + "tag", + "release", + "deploy", + "publish" + ], + "not_authorized": [ + "merge", + "tag", + "release", + "deploy", + "publish", + "restart", + "force-push", + "branch deletion", + "edit approved tests" + ] + }, + "contract_version": "acdd/1", + "evidence_required": [ + "red", + "green", + "review" + ], + "id": "app-identity", + "interfaces": [], + "outcome": { + "observable_behavior": [ + "claims are short-lived and issued for the app", + "tokens are cached and refreshed", + "an insecurely permissioned key is refused" + ], + "summary": "Mint coordinator installation tokens from the app private key (short-lived JWT, cached until just before expiry), refuse a key readable by group/other, never return key material, and expose the reviewer key path only to the configured poster user." + }, + "review": { + "approved_at": "2026-11-27T20:21:34Z", + "approved_by": "Kyle (owner) typed: approved 52b1c62c4b25 ... on 2026-11-27 (app-identity source_rev re-cut for scanner safety; new hash pending)", + "contract_sha256": "1db50f734a5ff3c068ad69b4e61077a0c40a686329796dc48a8a93054b1e1de6", + "status": "approved", + "test_collection": { + "collected": 5, + "manifest_sha256": "59705c404ea5fefd44ef476b48da082a8748c8209adb85e4a70c10958cbafa34", + "source_rev": "d808275ae5249d59052d8f1aa47115706ba60eec" + } + }, + "risk": { + "blast_radius": "the coordinator's GitHub identity and the reviewer app's signing key", + "reasons": [ + "this code holds the keys that post reviews and push branches" + ], + "tier": "high" + }, + "scope": { + "assigned_files": [ + "bundlebees_plugin/app_auth.py", + "bundlebees_plugin/settings.py", + "plugin.yaml" + ], + "prohibited": [ + "tests/test_app_auth.py", + "CHANGELOG.md", + ".rizzstack/**" + ], + "read_only": [ + "bundlebees_plugin/cli.py" + ], + "test_files": [ + "tests/test_app_auth.py" + ] + }, + "source_rev": "d808275ae5249d59052d8f1aa47115706ba60eec", + "tdd": { + "applicable": true + }, + "title": "GitHub App installation tokens and reviewer key isolation", + "verification": { + "commands": [ + "env -u PYTHONPATH python3 -m pytest -q -p no:cacheprovider tests/test_app_auth.py" + ], + "independent": true, + "integration": false + } +} diff --git a/.rizzstack/leases/app-identity.json b/.rizzstack/leases/app-identity.json new file mode 100644 index 0000000..7597f13 --- /dev/null +++ b/.rizzstack/leases/app-identity.json @@ -0,0 +1,38 @@ +{ + "branch": "feat/app-identity", + "contract_id": "app-identity", + "contract_sha256": "1db50f734a5ff3c068ad69b4e61077a0c40a686329796dc48a8a93054b1e1de6", + "derived_from": { + "approved_at": "2026-11-27T20:21:34Z", + "approved_by": "Kyle (owner) typed: approved 52b1c62c4b25 ... on 2026-11-27 (app-identity source_rev re-cut for scanner safety; new hash pending)", + "contract": ".rizzstack/contracts/1db50f734a5ff3c068ad69b4e61077a0c40a686329796dc48a8a93054b1e1de6.json" + }, + "id": "app-identity", + "lease_version": "rizzstack.lease/1", + "review": { + "approved_at": "2026-11-27T20:21:34Z", + "approved_by": "Kyle (owner) typed: approved 52b1c62c4b25 ... on 2026-11-27 (app-identity source_rev re-cut for scanner safety; new hash pending)", + "note": "contract_sha256 names the approved frozen contract; scope and source_rev are its verbatim scope", + "status": "frozen" + }, + "scope": { + "assigned_files": [ + "bundlebees_plugin/app_auth.py", + "bundlebees_plugin/settings.py", + "plugin.yaml" + ], + "prohibited": [ + "tests/test_app_auth.py", + "CHANGELOG.md", + ".rizzstack/**" + ], + "read_only": [ + "bundlebees_plugin/cli.py" + ], + "test_files": [ + "tests/test_app_auth.py" + ] + }, + "slice": "app-identity", + "source_rev": "d808275ae5249d59052d8f1aa47115706ba60eec" +} From 54f023936586a6ee9ff3bd67c259f8e8261f8431 Mon Sep 17 00:00:00 2001 From: "rizzstack-coordinator[bot]" <362099543+rizzstack-coordinator[bot]@users.noreply.github.com> Date: Fri, 27 Nov 2026 20:34:50 +0000 Subject: [PATCH 2/2] lease(app-identity): stamp Kyle's typed approval for 1db50f73 The review block now names the line the owner actually typed for this hash; the contract content (and therefore the hash) is unchanged. --- ...068ad69b4e61077a0c40a686329796dc48a8a93054b1e1de6.json | 6 +++--- .rizzstack/leases/app-identity.json | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.rizzstack/contracts/1db50f734a5ff3c068ad69b4e61077a0c40a686329796dc48a8a93054b1e1de6.json b/.rizzstack/contracts/1db50f734a5ff3c068ad69b4e61077a0c40a686329796dc48a8a93054b1e1de6.json index c9a6e45..7f1d035 100644 --- a/.rizzstack/contracts/1db50f734a5ff3c068ad69b4e61077a0c40a686329796dc48a8a93054b1e1de6.json +++ b/.rizzstack/contracts/1db50f734a5ff3c068ad69b4e61077a0c40a686329796dc48a8a93054b1e1de6.json @@ -78,13 +78,13 @@ "summary": "Mint coordinator installation tokens from the app private key (short-lived JWT, cached until just before expiry), refuse a key readable by group/other, never return key material, and expose the reviewer key path only to the configured poster user." }, "review": { - "approved_at": "2026-11-27T20:21:34Z", - "approved_by": "Kyle (owner) typed: approved 52b1c62c4b25 ... on 2026-11-27 (app-identity source_rev re-cut for scanner safety; new hash pending)", + "approved_at": "2026-11-27T20:34:43Z", + "approved_by": "Kyle (owner) typed: approved: 1db50f73 (app-identity re-freeze: source_rev + RED fixture only), 2026-11-27", "contract_sha256": "1db50f734a5ff3c068ad69b4e61077a0c40a686329796dc48a8a93054b1e1de6", "status": "approved", "test_collection": { "collected": 5, - "manifest_sha256": "59705c404ea5fefd44ef476b48da082a8748c8209adb85e4a70c10958cbafa34", + "manifest_sha256": "3ec7ce5c9a93ff440153f4124e2b1189ce420dcf45755ad010c759184682079b", "source_rev": "d808275ae5249d59052d8f1aa47115706ba60eec" } }, diff --git a/.rizzstack/leases/app-identity.json b/.rizzstack/leases/app-identity.json index 7597f13..2df9e74 100644 --- a/.rizzstack/leases/app-identity.json +++ b/.rizzstack/leases/app-identity.json @@ -3,15 +3,15 @@ "contract_id": "app-identity", "contract_sha256": "1db50f734a5ff3c068ad69b4e61077a0c40a686329796dc48a8a93054b1e1de6", "derived_from": { - "approved_at": "2026-11-27T20:21:34Z", - "approved_by": "Kyle (owner) typed: approved 52b1c62c4b25 ... on 2026-11-27 (app-identity source_rev re-cut for scanner safety; new hash pending)", + "approved_at": "2026-11-27T20:34:43Z", + "approved_by": "Kyle (owner) typed: approved: 1db50f73 (app-identity re-freeze: source_rev + RED fixture only), 2026-11-27", "contract": ".rizzstack/contracts/1db50f734a5ff3c068ad69b4e61077a0c40a686329796dc48a8a93054b1e1de6.json" }, "id": "app-identity", "lease_version": "rizzstack.lease/1", "review": { - "approved_at": "2026-11-27T20:21:34Z", - "approved_by": "Kyle (owner) typed: approved 52b1c62c4b25 ... on 2026-11-27 (app-identity source_rev re-cut for scanner safety; new hash pending)", + "approved_at": "2026-11-27T20:34:43Z", + "approved_by": "Kyle (owner) typed: approved: 1db50f73 (app-identity re-freeze: source_rev + RED fixture only), 2026-11-27", "note": "contract_sha256 names the approved frozen contract; scope and source_rev are its verbatim scope", "status": "frozen" },