Why skeld is built this way
Most defects in a web service are familiar: a handler trusts a field nothing validated, an error page prints a database message, a log line stores a password. Each can be prevented route by route, by someone who remembers to. skeld moves the prevention into the framework, where it applies to every route without being asked for.
| Decision | What it means | What it prevents |
|---|---|---|
| One contract is the source of every type | You declare a route once. The handler's types, the request validator, the response serializer and the typed client are all derived from that declaration, so they cannot disagree. | A handler reading a field nothing checked, a response carrying a field nobody declared, and a client and a server with different ideas of the same shape. |
| Schemas are compiled once, at startup | The validator and serializer are generated when the server starts, from your declaration alone. Nothing a client sends is ever compiled or evaluated. | Code injection through request data, and compile work that a client can trigger with each request. |
| Request data stays plain data | A body is parsed as JSON into the shape the route declares. An undeclared field is refused, and so is a key that would alter JavaScript's built-in objects. | Mass assignment, prototype pollution and unsafe deserialisation. |
| Every limit is written out | A text field, a list or a map does not compile without a maximum size or a written reason, and body size, nesting, headers, connections and timeouts all have stated defaults. | Memory and CPU that grow with whatever a client sends. |
| One error shape that carries nothing internal | Every error response is { status, code, message, details? }, and an unexpected failure is always the same fixed 500. |
Stack traces, SQL text and file paths in responses. |
| Logging knows what is secret or personal | A field declared secret or personal is written as [secret] or [personal] when it is logged with its schema. |
Passwords, tokens and personal data in log stores, which more people can often read than can read the database. |
| No third-party code in the packages | @skeld/core has no dependencies, and the other three packages need only core. No package runs a script when it is installed. |
A compromised dependency of a dependency arriving with the framework. |
These controls cost availability, on purpose: a contract with a mistake in it does not start, a malformed request gets an error and no handler, and a response that breaks its own declaration becomes a 500.
What stays with you
Some of a service's security cannot come from a framework.
| Yours | Why |
|---|---|
| Access rules | Validation shows that a request is well formed, not that the caller may make it. @skeld/auth enforces the rules you write. |
| Encryption in transit | skeld serves plain HTTP. Put a TLS terminator in front of it. |
| The code you run | Your code, plugins and dependencies run with the full privileges of the process. skeld does not sandbox them. |
Who owns what lists this for every requirement.
How this was assessed
| Method | How it is applied |
|---|---|
| STRIDE threat model | At every place untrusted input enters the four packages, the maintainers ask the six STRIDE questions. Each threat is recorded with the control that answers it and how that control was shown to work. |
| OWASP ASVS 5.0.0 | Each requirement of the standard gets one answer: skeld does it by default, skeld provides the means, it is yours, or it does not apply. |