hora-spec-security
Stage 6 of /hora-spec. Give every operation and every screen a stated caller and a stated refusal, name every piece of personal or regulated data, and record why the role-or-endpoint split went the way it did. The one gate with no not-applicable case. Invoked by /hora-spec, or directly.
openreachtech · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add openreachtech/hora-core --skill hora-spec-security技能说明
name: hora-spec-security description: Stage 6 of /hora-spec. Give every operation and every screen a stated caller and a stated refusal, name every piece of personal or regulated data, and record why the role-or-endpoint split went the way it did. The one gate with no not-applicable case. Invoked by /hora-spec, or directly.
hora-spec-security
Stage 6 of /hora-spec. Answer two questions about everything stages 4 and 5 designed: who may reach this, and what happens when somebody else tries.
Read ../hora/references/structure.md and ../hora-spec/references/principles.md first. ../hora-spec/references/stages.md is the authority on this stage's exit condition, and ../hora/references/asking.md on how anything is put to a person.
This stage is never not applicable. A release with no authentication at all still has to say so, and why. An unstated caller is an operation that will be implemented with whatever filter its neighbours had, and nothing in the resulting code says that nobody ever decided.
What this stage reads, and the one distinction that decides everything
This is the stage that reads the auth filters, the role checks and the public-operation allowlists — enough to say, for every operation, who may call it today.
| who may call it today | a fact. Read it and put it up as a check |
| who should be able to call it | a decision nobody has made. Ask it |
Those two are one word apart in English and are not the same claim. "Anyone with a session token can call deleteAccount" is something the code says; the same sentence with should is something no code can say, and on a product that already runs it is usually something nobody ever said either.
That gap is this stage's entire yield on an adopted project. Read the current answer, put it in front of somebody, and watch which ones surprise them — every surprise is an authorization nobody decided, already deployed.
Ask about every operation whose current answer surprises anybody, and about every operation with no filter at all. Use the question tool, batched, with the current setting shown alongside each choice.
State each current setting as what somebody could do with it today, never as the filter's name (../hora/references/asking.md, "What changes for the person").
What this stage decides
who may call each operation, and what happens when somebody else does
who may open each screen
which fields are personal, regulated, or must never be logged
why the release has the endpoints it has, rather than roles, or the reverse
what has to be true before this is exposed to the internet at all
What it must not decide
| Whose it is | |
|---|---|
| a new operation, or a new table | stage 4 |
| a new screen | stage 5 |
| how an auth filter is wired, or how a public operation is allowed through | the package's skills covering the server engine |
| whether the built code has a defect | the package's audit skills, at checkpoint 8. They audit code; this stage writes what that audit checks against |
| a token lifetime, a hashing algorithm, a header | the package's own skills, at checkpoint 6 |
The pass
Walk every operation from stage 4 and every screen from stage 5. No exceptions, no sampling.
for each operation:
who may call it — which actor, in which role, on which endpoint
may they call it for somebody else's data, or only their own
what happens when somebody else calls it — refused how, told what
is it callable before signing in at all
for each screen:
which actor is it for
what does somebody else see — a refusal, a redirect, or nothing at all
for each field:
is it personal, regulated, or secret
who may read it, who may change it
may it appear in a log, an error message, an export, a URL
Under Authority: as-built the walk stays complete but the confirming batches. For those features, "who may call each of these today" goes up one check per endpoint — a table of operations and their current callers, corrected rather than composed — instead of one exchange per operation. The declaration made today's configuration the intended one.
The exception that never batches: anything reachable without authentication. An operation callable before signing in, a screen that renders to nobody-in-particular, an allowlisted public operation — each one is put up alone, by name, whatever the declaration says. "Anyone can call this today" is a fact; "anyone may call this" is a decision, and it is the one decision as-built must not make silently.
Baseline: inventoried reaches nothing in this stage. All it lowers is that a listed feature owes no use cases and no acceptance criteria, and neither block ever answered any of the four questions above. Every operation a listed feature exposes still names its caller and its refusal, and any of its operations reachable without authentication is still put up alone, by name. The refusal goes in the operation's own row rather than in an <!-- acceptance --> block, because a listed section has none.
"Only their own" is the case most often wrong and least often stated. An operation that correctly refuses a member of staff who is not signed in, and happily returns a colleague's month to one who is, passes every test anybody wrote for it.
Ask what a refusal looks like, not only that there is one. "Not found" and "not allowed" leak different things.
The endpoint split gets its reason written down
Stage 4 made the choice; the exit condition here is that the reason exists in writing.
| What was chosen | What has to be written |
|---|---|
| one endpoint, switched on role | that roles are expected to change, and that every operation therefore states its role |
| endpoints of their own | that these are different entities — a different login, a different lifecycle — and that the two authentications are separate |
| endpoints |