Repository navigation
test(security): regression pass over the OpenAPI, visibility and key surface (#868) - #1221
Merged
Merged
Conversation
Contributor
|
The marketing preview was removed because this PR is closed or merged. |
13 tasks done
One derived guard over openapi.public.json: no /v1/internal/ path, no operation whose bearer role is operator, and no column of any entity whose visibility is not public, read from the catalog rather than listed. Floors (more than 50 paths, at least 3 non-public columns checked) keep it from passing vacuously. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e wire (#868) bff-authz-gate: the real #866 key routes with their guard renamed away are reported (GET and POST, DELETE), and pass as written. Removing 'openapi' from UNAUTHENTICATED_DIRS was observed failing the coverage test. wire_serialization: no Json(json!(<ident>)) in lib.rs product code, the shape that serializes a whole struct (internal columns included). Test modules are stripped by brace matching, and the detector is itself asserted against positive and negative samples. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
athvin
force-pushed
the
issue/868-epic-security-pass
branch
from
November 25, 2026 09:49
ad7624a to
5c19762
Compare
athvin
marked this pull request as ready for review
November 25, 2026 09:49
athvin
temporarily deployed
to
marketing-preview
November 25, 2026 09:57 — with
GitHub Actions
Inactive
13 of 18 tasks
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #868
What
The OpenAPI epic's adversarial close (#857). Every claim it makes about what a client cannot see is now a test in the named harness, and each test was observed failing for the right reason before it landed.
Why
A guard whose precondition always holds is decoration (the
securityskill's harness-first rule).Proof
make check: 1,168 passed, 0 failed.er-server --testsagainst Postgres: 399 passed. Per bullet, with the mutation that proves each one:openapi.rs,the_public_document_exposes_no_internal_surface). It derives everything from the entity catalog rather than a hand-kept list, with floors of more than 50 paths and at least 3 non-public columns. Three mutations, each failing the test:operator operation get /v1/audit is in the public document.internal path /v1/internal/attempts/{attempt_id} is in the public document.key_hashinto the publicApiKeyschema:ApiKey.key_hash (Internal) is in the public document.V19_public_secretsmust fail andV19_internal_secretsmust pass. Disabling the exact-name arm of the rule (let secret = false && matches!(…)) failsfixtures::every_fixture_matches_its_expectationonV19_public_secrets.pg_auth.rs, from Self-service API keys: org-admin minting with a role ceiling, list endpoint, show-once UI #866, re-run here and passing). Covers: cross-org mint 404, steward and viewer 403,operator422, plaintext shown once, and a list with no hash and no plaintext. Mutation, recorded on feat(api): self-service API keys — admin minting with a role ceiling, list, show-once UI (#866) #1216: putting backoperator_onlyon mint fails it.bff-authz-gate.test.ts).openapifromUNAUTHENTICATED_DIRSfailsleaves no api directory unruled and unexempted(expected [ 'openapi' ] to deeply equal []), and the gate script fails too.tests/wire_serialization.rs). NoJson(json!(<ident>))inlib.rsproduct code: the shape that serializes a whole struct, internal columns included. Test modules are stripped by brace matching, and the detector is asserted against positive and negative samples.Risk & rollback
Tests only, with no product code changed. Rollback:
git revert <merge-sha>.Post-merge ledger
Closed by: agent · session
Claude Code:d1e3b2dc-3174-4091-9c30-c08fc4820306onMac· 2026-11-25T10:08:37Zmainis green with this change on it: mergeb3c93d76. The push runsrust45590360302,frontend45590360283,infra,devcontainerandmarketing previewall succeeded.imagesbuilt: run 45590360329, er-api and er-web both succeeded.deployconverged: run 45590853981 (DEPLOY_SHA: b3c93d76) succeeded. Process proof: the live colour in dev (ci/web-api-blue-8556996f79-nk7jw) and prod (app/web-api-green-548b54d5f7-2ptdw), both created at 10:01:37Z, logged"er-server listening"at 10:01:41Z.deployis green.driftandkindwere already red on schedule before feat(api): typed response structs, batch 3 — reviews+merges (#1193) #1202. This PR only adds tests, so it cannot move either.Specific to this change
Context — plan, discoveries, measurements, files
Plan
Discoveries
Serialization review (a written finding, as the ticket allows).
lib.rshas 70Json(json!(sites. All are object literals with their keys spelled out.json!(<entity>)uses are in test modules, comparing an entity against its*Wireform.json!(env_map)and its kin are internal values written to Postgres, never responses.Findings: zero open. No real vulnerability was found. The one production defect found during this work, the deploy-digest pagination bug, was not a security issue. It was filed as #1223 and fixed in #1224.
Measurements
Files
rust/crates/er-server/src/openapi.rs,rust/crates/er-server/tests/{wire_serialization.rs,main.rs},frontend/tests/unit/bff-authz-gate.test.ts