Skip to content

Latest commit

 

History

History
82 lines (62 loc) · 4.24 KB

SECURITY.md

File metadata and controls

82 lines (62 loc) · 4.24 KB

Security policy

Tupik exists to make APIs harder to get wrong, so security reports get priority over feature work.

Supported versions

Tupik 1.2.0 is published on npm. All @tupik/* packages and create-tupik share one version, so a version number means the same thing for every package. Security fixes land in the latest 1.x release; upgrade within the major to get them. Versions before 1.0 are not patched.

Version Supported
1.x (latest minor) yes
0.x no
unreleased main best effort

Reporting a vulnerability

Report privately through GitHub Security Advisories: github.com/CodeHamper/tupikjs/security/advisories/new.

Please do not open a public issue, pull request or discussion for a vulnerability. Include:

  • the affected package and version (or commit);
  • a minimal app or request that reproduces the problem;
  • what an attacker gains (data read, access bypassed, crash, ...);
  • any fix you have in mind.

What to expect

Tupik is maintained by a small team, so these are targets, not guarantees:

Step Target
Acknowledge the report 5 business days
First assessment (confirmed or not, severity) 10 business days
Fix released for a critical or high severity issue 30 days
Fix released for a medium or low severity issue 90 days

We coordinate the disclosure date with you, publish a GitHub advisory with a CVE when it applies, and credit you unless you prefer otherwise. If a deadline slips, we tell you why and when to expect the fix.

Scope

In scope:

  • every package in packages/ (@tupik/* and create-tupik) and the projects create-tupik generates;
  • a secure default that does not hold (see below), or a documented guarantee that can be bypassed;
  • tupik audit, tupik fuzz or tupik-lint missing a case they document as covered;
  • the Agent Skill (skills/tupik) or a documentation example that teaches an insecure pattern.

Out of scope:

  • bugs in your own handlers that Tupik does not claim to catch (for example a query scoped by the wrong id);
  • options that turn a protection off on purpose (response: 'off', allowMissingSecretInDev, secure: false);
  • vulnerabilities in third-party dependencies or runtimes (please report them upstream; tell us if Tupik makes them reachable);
  • denial of service that needs traffic volume rather than a flaw (use rateLimit, bodyLimit and timeout);
  • the content of the tupik.org site, except code examples.

What Tupik guarantees by default

These hold without configuration. A case where one does not hold is a vulnerability.

  • Access: a route without access does not compile and register throws; nothing is public by omission. access.owner answers 404 to a principal that does not own the record, before the handler runs.
  • Input: declared body, query, params and headers are validated before the handler; failures answer 400 without internal messages. A validator that throws becomes a generic 500. JSON bodies above 1 MiB get 413.
  • Output: with a response schema, fields it does not declare are cut; fields classified secret are removed from every response in every mode.
  • Errors: unexpected exceptions answer a generic 500; stack traces and messages are not sent unless exposeErrors is set.
  • Node driver: a Host header that could change the routed path is rejected with 400.
  • Middleware: rateLimit refuses to start without a trusted client key (trust or keyGenerator); jwt requires exp and a secret of at least 32 bytes; csrf binds its token to the session and uses a __Host- cookie; cors throws on '*' with credentials; cookies are Secure, HttpOnly and SameSite=Lax; sessions and API keys are stored only as hashes; webhook signatures are compared in constant time; captcha fails closed; tenant cannot be created without verify.
  • Logs and traces: the loggers redact credentials and cookies at any depth and mask IP addresses; traces respect the route's data classes.
  • Environment: @tupik/env refuses to start with a missing or invalid variable and never prints secret values.
  • Supply chain: @tupik/core has zero runtime dependencies and no node:* imports.