Commit Graph
29 Commits
Author SHA1 Message Date
Lauri Ojansivu fd8b51464f Brake password guessing per account without locking the owner out.
The login lockouts count per address and per (account, address), so a
guesser spread over many addresses was never slowed, and a hard per-account
lockout would let a stranger lock the owner out (JamBleed). After five
failures on one account within 15 minutes, from anywhere, the account now
accepts one attempt per slot - 1 s doubling to 30 s - over REST and DDP
alike; an early attempt is refused before the password is looked at, and
addresses the account has signed in from are not slowed. Refusals show as
BruteBleed in Admin Panel -> Problems, naming the account as the target.

LDAPBleed and BruteBleed move to the guarded list.

Thanks to xet7 !
2026-10-02 14:27:59 +03:00
Lauri Ojansivu ad6117cc65 Account for the thirteen Hall of Fame names published on 2026-10-02.
Thanks to xet7 !
2026-10-02 12:04:19 +03:00
Lauri Ojansivu c15f9486d8 Name today's fixes for the Hall of Fame and give two of them their own Problems keys.
TrayBleed (notification tray writes) and CasTokenBleed (a CAS callback from
a browser that did not start the login) get catalog keys of their own; each
new fix's test names its vulnerability. ReadOnlyBleed gets the permissions
test it was recorded without, pinning the six Custom Field handlers and
requiring a write-level decision on every mutating REST route.

Thanks to xet7 !
2026-10-02 11:53:09 +03:00
Lauri Ojansivu a8e836efd3 Fix BypassBleed's rule-loop denial of service: a chain of rules started by rules stops at a depth limit.
BypassBleed (2022) reported, besides the authentication bypass, that two rules
undoing each other - label added: remove it; label removed: add it - recursed
without end: a rule's action writes a card, the write inserts an activity, and
the activity runs the rules again in the same awaited chain. That part was
never fixed. Rule runs started by a rule are now counted in async context, and
a chain deeper than five stops and is reported to Problems as BypassBleed
(detected, medium: usually an honest mistake). Separate activities are not
affected. The test runs the real executeRules with the reported loop;
BypassBleed moves from the recorded gaps to guarded and from pending to keyed;
two tests that load RulesHelper in a vm get the guard as a pass-through.

Thanks to xet7 !
2026-10-02 11:13:18 +03:00
Lauri Ojansivu 1076c08381 Complete InvisibleBleed: every hidden HTML comment is made visible, not only the first.
The fix makes HTML comment markers in rendered card text visible so nothing can
be hidden from readers, but used String.replace with a string pattern, which
replaces only the first occurrence - a second comment stayed hidden, and
DOMPurify then dropped it unseen. Every occurrence is replaced now. The test
applies the real replacement to text with two comments; the negative test fails
on any first-only comment replacement. InvisibleBleed moves from the recorded
gaps to guarded.

Thanks to xet7 !
2026-10-02 11:11:01 +03:00
Lauri Ojansivu 6ba2e3d060 Restore FileNameBleed's server check: an attachment rename cannot store markup.
The original fix refused markup in an attachment's new name on the server.
"Try to fix build errors" (2023-02-21) deleted that check, leaving only the
client's, so a direct renameAttachment call stored names like
<img src=x onerror=...>.png. Every display path escapes names today, so it did
not execute. The server refuses such a name again and records FileNameBleed
(medium), and stores every other name cleaned, as an upload's is. The negative
test fails on any server code that renames a stored file to an unchecked name.

Thanks to xet7 !
2026-10-02 11:10:26 +03:00
Lauri Ojansivu dae1fd68e8 Restore FrameBleed protection: WeKan's pages refuse being framed by other sites again.
With BROWSER_POLICY_ENABLED (the Docker and Snap default) WeKan is meant to be
frameable only by itself and TRUSTED_URL, so another site cannot load it in an
invisible frame and trick a signed-in user into clicking through it
(clickjacking). When browser-policy was removed on 2022-04-08, every line of
server/policy.js was commented out, and since then the app's pages carried no
framing header at all; only file responses did.

Every response now gets Content-Security-Policy: frame-ancestors 'self' plus
the TRUSTED_URL origins, and X-Frame-Options: SAMEORIGIN when no trusted origin
is set; a malformed TRUSTED_URL never widens it, and Sandstorm, which always
frames WeKan, and a disabled policy send nothing. build.sh and build.bat run
the test server with the default policy. FrameBleed moves from the recorded
gaps to guarded, with unit, negative and browser tests. A framed load cannot be
told from a normal one, so there is nothing to record in Problems.

Thanks to xet7 !
2026-10-02 10:46:06 +03:00
Lauri Ojansivu 9d323f2aaf Stop disabling legitimate users: Problems records only attempts, or never block, where ordinary use reaches them.
A blocked record of high or critical severity that names a userId disables
that account. Records on paths ordinary users reach therefore took accounts
away from legitimate users:
- authz.card-member, when a client wrote back assignees still listing a removed
  member - now recorded only for ids that were never on the board;
- History restore after the user was demoted - no longer recorded, as the
  HistoryScopeBleed deliberate omission already says;
- export by an assigned-only member, who reaches the export menus - recorded
  only when the caller cannot see the board;
- a large legitimate import hitting a size limit - recorded at medium (cycles
  and non-plain objects stay high), and the record can no longer throw;
- ssrf.attachment (a Trello board's link to an internal host), ssrf.redirect (an
  identity provider's avatar) and authz.upload-path (a cached older client) -
  still recorded, but blocksAccount: false;
- a REST client writing back a card with the parent it already had - only a
  changed parent is checked. That PUT now also answers 404 for a card that is
  not on the named board and list instead of acting on the id alone.

tests/problemsFalseBlocks.test.cjs drives the blocking decision and the real
assignee filter, and pins each condition; four tests that pinned the old calls
follow them. MegaBleed moves to guarded (its Translation sibling test).

Thanks to xet7 !
2026-10-02 10:44:08 +03:00
Lauri Ojansivu 1ef200aea1 Guard BFLABleed and ExcelBleed tree-wide: every async access check is awaited.
Both were an async access check called without await, whose Promise never
stops the handler: 48 REST endpoints (BFLABleed) and the Excel export route
(ExcelBleed). The test reads which Authentication checks are async and fails on
any call to one, or to an exporter's canExport(), that is not awaited or
returned anywhere in the server tree. All 124 checks and every canExport()
call are awaited today. Both move from the recorded gaps to guarded.

Thanks to Fredrik Dietrichson and xet7 !
2026-10-02 10:24:37 +03:00
Lauri Ojansivu d914ca02c6 Count RelayBleed and EmailBleed in the security coverage lists, matching names in any case.
EmailBleed (2021, SMTP password readable in the Admin Panel) is published as
Emailbleed, which the case-sensitive Hall of Fame match skipped, and a comment
had called it an unpublished alias. Both coverage tests now match in any case,
EmailBleed is guarded by tests/adminMailSettings.test.cjs (passwords are never
published), and it is a deliberate Problems omission. RelayBleed is guarded by
tests/relayBleed.test.cjs.

Thanks to Georg Krause and xet7 !
2026-10-02 10:22:17 +03:00
Lauri Ojansivu dfed923c4e Count CacheBleed and SyncBleed in the published security regression list.
Thanks to alham-rizvi and xet7 !
2026-10-02 09:47:06 +03:00
Lauri Ojansivu 2172f19d88 Fix SyncBleed: send List Sync requests through the SSRF guard and keep responses out of errors.
GHSA-5q84-p3vr-f3xv: a board member with write access chooses the List Sync
server URL for Gitea, Forgejo, GitLab and Jira. It was fetched with the
platform fetch(), so it reached 127.0.0.1, private networks and the cloud
metadata address, and up to 200 bytes of a failed response were copied into
the error the preview returns and lastSyncError stores. An open and a closed
internal port also answered differently.

Every request now goes through fetchSafe: internal addresses refused, DNS
pinned, redirects refused, response size and time bounded. An error carries the
origin and HTTP status only, a non-JSON answer says so without quoting it, and
a guard refusal is one message that does not name what a host resolved to.
Saving Sync settings refuses an internal address too, so none is stored. Both
refusals are recorded as SyncBleed in Admin Panel -> Problems.

A self-hosted tracker on the server's network is allowed only by the
administrator, with LIST_SYNC_ALLOWED_PRIVATE_HOSTS (exact hosts); the test
server allows 127.0.0.1 for the List Sync specs' mock tracker. The browser test
found that an IPv6 literal such as [::1] kept its brackets and was looked up as
a name at save time; the shared validator now checks it as an address.

tests/syncBleed.test.cjs reproduces the report on the real fetcher for every
provider, and fails on a platform fetch() to anything but a fixed or
administrator-allowed host, or a response body copied into an error, anywhere
in the server tree. list-sync-source.e2e.js saves and previews internal
addresses in the browser and checks no request reaches the mock tracker.
securityRegressionCoverage lists CacheBleed and SyncBleed with their tests.

Thanks to alham-rizvi and xet7 !
2026-10-02 09:46:00 +03:00
Lauri Ojansivu 3151f8a815 Fix ReplyBleed: attribute email replies to the recipient the address was sent to.
The reply-by-email token signed only the card, so every recipient of a
card's notification held the same Reply-To address, and the webhook took the
comment author from the reply's From address - a field the sender controls.
Anyone holding one card's reply address could comment on it as any user
(GHSA-mc7c-cv99-64h7, CWE-346).

Validation also found that server/routes/inboundEmail.js was never imported
by server/imports.js, so released versions did not register
/api/inbound-email: the documented feature did not work and the flaw could
not be reached. The endpoint is registered now, together with the fix.

The reply address is now reply+<cardId>.<userId>.<expiry>.<mac>: an
HMAC-SHA256 over the card, the recipient and the last valid day
(INBOUND_EMAIL_REPLY_DAYS, default 30). The author is that recipient; the
From address must be one of the recipient's own addresses; the recipient must
be enabled and still allowed to comment on the card, including the
assigned-only restriction. INBOUND_EMAIL_WEBHOOK_SECRET, when set, must be
presented by the provider (X-WeKan-Inbound-Secret header or ?secret=) and is
compared in constant time. The old card-only token is refused.

A forged token, a spoofed sender and a wrong provider secret are recorded as
ReplyBleed in Admin Panel -> Problems; expired and pre-fix tokens and lost
access are refused quietly, since real users replying to old mail reach them.

Tests: token round trip, per-recipient addresses, tampering, expiry and
legacy tokens; the author decision reproducing the advisory's attack; a
tree-wide negative that no code picks an author from a From address; and a
full-app HTTP test against /api/inbound-email.

Thanks to alex131125 and xet7 !
2026-09-30 10:52:45 +03:00
Lauri Ojansivu 2a7f7b2b46 Record CopyIdentityBleed and register security regression coverage 2026-09-29 00:07:18 +03:00
Lauri Ojansivu c3caf87a13 Enforce disabled account status and revoke existing sessions.
Fix InactiveBleed across REST, attachment and export authentication, header login, LDAP token issuance and People account controls. Apply administrator-created account flags before insertion and guard token creation atomically.

Thanks to esbrito81 and xet7 !
2026-09-26 01:27:36 +03:00
Lauri Ojansivu 55c6b48c16 Repair full-test regressions and align local release preparation
Follow moved documentation and component-owned templates, preserve reviewed translations, update date-format guards and account for AuthTraceBleed coverage. Recognize the backup containment guard and select the release npm version locally.

Exercise invitations with a separate member and an open sidebar, match the multiline swimlane composer, and wait for an interactable sign-in field before keyboard navigation.

Verified all 1216 Node suites, targeted checks in three browsers and nine real backup/restore integration checks.

Thanks to xet7 !
2026-09-25 01:42:55 +03:00
Lauri Ojansivu c4c6e34ec4 Repair node regressions and align security problem names 2026-09-15 10:35:31 +03:00
Lauri Ojansivu e6a894f5fc Give the 4 Attachments/Avatars advisories their own Hall of Fame names.
The upload path-traversal guard was logging under the pre-existing
PathBleed key (a different, already-published advisory,
GHSA-4mxf-m8pq-xc9p about avatar versions.path and board export) - it
now has its own UploadPathBleed key, so the two incidents are not
conflated on the public Hall of Fame page or in Admin Panel / Problems.
The two High advisories (missing Avatars.protected, unauthenticated
serveLegacyAvatar) now also log a blocked attempt, under new
authz.avatar-protected/PortraitBleed and
authz.legacy-avatar/RelicAvatarBleed keys, matching the site entries
added at .tools/wekan.fi.

tests/securityRegressionCoverage.test.cjs's inventory and
tests/attachmentAvatarSecurityAdvisories.test.cjs are updated so all four
names (WipeBleed, UploadPathBleed, PortraitBleed, RelicAvatarBleed) are
recognized as GUARDED, matching the published Hall of Fame count.
2026-09-09 18:15:10 +03:00
Lauri Ojansivu e54b123c10 Validate XLSX sheet colors before CSS serialization
Thanks to rbbjinioeq and xet7 !
2026-09-05 23:51:02 +03:00
Lauri Ojansivu 90158d5012 Audit security coverage and recovery failures 2026-09-05 23:51:02 +03:00
Lauri Ojansivu e5831f16b1 Fix consistency checks from newest test run 2026-09-05 13:55:54 +03:00
Lauri Ojansivu b5a36bd3af Make hostname examples exact in translation coverage
Replace dynamic regular expressions for the Marathi tenant hostname examples with literal containment checks, so dots cannot act as wildcards. Add positive, negative, and repository-wide HostnameBleed coverage for CodeQL alerts #435 and #436, and record why this test-only finding has no runtime Problems event.\n\nThanks to GitHub CodeQL code scanning and xet7 !
2026-08-27 18:24:40 +03:00
Lauri Ojansivu 18bcbdd0d4 Bind search pagination sessions to their users
Require both pagination publications to authenticate the subscriber and load only a search session owned by that same user. Record attributable logged-out probes as SessionBleed without letting logging affect the denial.

Thanks to crypto-nidh and xet7 !
2026-08-27 10:19:56 +03:00
Lauri Ojansivu 3f69df3170 Require authentication before importing boards.
Reject anonymous importBoard and importScoped DDP calls before argument parsing, feature checks, parsers or direct database writers can run. Carry the authenticated method user explicitly into scoped imports and add source-level plus logged-out browser regression coverage for ImportBleed.

Thanks to Char0n1507 and xet7 !
2026-08-23 18:56:39 +03:00
Lauri Ojansivu ed4b8cd648 RouteBleed: remove incomplete route-pattern escaping.
CodeQL alert #434 found that boardExportScope escaped only forward slashes before interpolating an export path into a RegExp. Replace the pattern with an exact route-literal inclusion check, so there is nothing to escape and metacharacters cannot change the match.

Add positive and negative cases with backslashes and regex metacharacters, reject the reported partial-escape shape across tracked JavaScript, and remove a second partial dynamic pattern from release bundle coverage. This was test-only code with no runtime request path, so there is no attributable attempt for Admin Panel Problems.

Thanks to GitHub CodeQL code scanning and xet7 !
2026-08-17 14:50:07 +03:00
Lauri Ojansivu 3d08c65bb2 Admin Panel Problems: one summary row per problem, with who tried and how often.
A guard on a path an attacker controls fires as fast as they can send. One
document per event meant the database grew with the attack, the Problems page
became a scroll of near-identical lines, and the one event that mattered was
buried under ten thousand that did not. The admin's question is never "list
every attempt" - it is what is happening, how much, since when, and who.

So each problem is ONE row that accumulates:

  count            how many times this problem has happened
  firstAt … at     the window it happened in
  actors           who, each with their own count:
                     username1 25, 100.100.100.100 30
  username/ip      the most recent occurrence

WHAT MAKES TWO EVENTS THE SAME PROBLEM is the whole design. Identity is the KIND
of thing that happened - stream, bleed, category, action, source, severity, CWE,
and the database stream's own type/db/kind. The actor is NOT part of it: a
username or an address in the key gives a row per attacker per attempt, which is
the cost being removed.

A USERNAME AND AN ADDRESS ARE TALLIED SEPARATELY, not as a pair. They answer
different questions - which account, and where from - and an unauthenticated
attempt has an address and no name. Pairing them would split one attacker across
a line per address and answer neither.

THE TALLY IS CAPPED at 50 actors, with the rest counted in actorsOverflow.
Otherwise an attacker rotating addresses grows the row with the attack and
reintroduces the same bug one level down - and "and 9,412 others" is itself the
signal that the source is spread rather than single. The cap needs to know
whether an actor is new to the row, so the row's actor keys are cached per
process: reading it on every attempt would double the database work of the thing
being made cheap, and under attack the same few actors repeat.

All three loggers share the fold (server/lib/eventLogFold.js) - a slow query in
a loop and a test failing on every run repeat just as a guard under attack does.
Still fire-and-forget and still unable to throw into the caller.

EXISTING PER-EVENT ROWS ARE FOLDED IN PLACE at startup, in batches, in JS so it
behaves the same on FerretDB as on MongoDB, and idempotently - a row with firstAt
is already a summary. Nothing is lost that the summary does not carry: counts are
summed, the earliest becomes firstAt, the latest becomes at, and the latest
occurrence's actor and detail are what the row keeps.

AND A COVERAGE CHECK, as asked: tests/hallOfFameProblemsCoverage.test.cjs
requires every hall-of-fame vulnerability to be keyed, deliberate (with the
reason, as HashBleed is), or pending. 30 of 66 are keyed; the other 35 predate
the rule and are listed as pending rather than judged here, because deciding
whether a given fix has anything to detect means reading that fix and claiming
otherwise would be worse than the gap. The pending list may shrink and may never
grow, so a NEW vulnerability without a key fails.

It found one real fault immediately: the catalog said OidcBleed and the site says
OIDCBleed, so attempts were grouping under a name nobody could look up.

Thanks to xet7 !
2026-08-16 14:57:18 +03:00
Lauri Ojansivu eb47e04657 Tests: ask whether a fixed mistake is anywhere ELSE, and close two gaps it found.
Every entry in https://wekan.fi/hall-of-fame/ has a suite pinning the place it was
found. None of them could answer the other half of the question: is the same
MISTAKE somewhere else - in WeKan, or in the FerretDB fork WeKan ships as its
default database? A per-site regression test knows one file, and the next
occurrence is written months later by somebody who never read the advisory.

tests/fixedVulnerabilityClasses.test.cjs asks it as a CLASS, over the whole tree
and over .tools/FerretDB when the clone is there (and saying it skipped those
checks when it is not, rather than passing quietly):

  ZipBleed      an archive entry naming its own destination path, without a
                containment check - and only for real archive readers, since a
                readdir entry name is one component and can escape nothing
  WhereBleed    a client-supplied selector carrying operators that execute
                JavaScript
  TransitBleed  rejectUnauthorized: false, NODE_TLS_REJECT_UNAUTHORIZED, and Go's
                InsecureSkipVerify in the FerretDB fork
  SourceBleed   eval() / new Function() on the server
  MimeBleed     an SVG served inline by a route that neither sanitizes it nor
                forces a download
  RandomBleed   a secret from Math.random(), and random bytes folded onto an
                alphabet with a bare % - CWE-1204 modulo bias

Comments and string literals are stripped before matching, or the advisory notes
explaining a fix would trip the check enforcing it. Allowed occurrences are listed
with the reason they are allowed. Each check was confirmed to FAIL on the mistake
by writing one into the tree and watching it fire; both probes were removed.

It found one straight away. models/lib/mongoSelectorSafety.js rejected `$where`
and nothing else - but `$where` stopped being the only way a FIND filter runs
JavaScript in MongoDB 4.4, which takes an aggregation expression inside a find
filter, and `$expr: { $function: { body, args, lang } }` there runs a JavaScript
body through the same client-supplied selector. `$accumulator` is the same again.
Both are rejected now, the helper is named for what it tests (hasServerSideJs,
with hasWhere as the alias every caller and the advisory use), and a cyclic
selector cannot spin it - an infinite recursion inside a security check is a
denial of service of its own. tests/mongoSelectorSafety.test.cjs gains those,
plus the negatives that keep it usable: a field literally called `function`, and
`$expr` doing ordinary comparison, are both fine.

randombleed moves from RECORDED to GUARDED in tests/securityRegressionCoverage.
test.cjs, and its gap count from 25 to 24: the rejection sampling CWE-1204 was
about is now held everywhere rather than in one file.

And one release entry had shipped with no test at all - the only one since v10.80
that is not a translation update. tests/databaseProblemsFixes.test.cjs covers it:
the default-swimlane self-heal calling the synchronous upsert Meteor 3 removed
(and the getter that starts the async one without awaiting it, which must handle
its own rejection or a self-heal failure takes the process with it), List.move()
inserting a list with no title and getting an error from the error formatter
rather than from the validator, and the two classifier rules that stop either
reading as "unknown / unclassified" in Admin Panel / Problems - on every database
WeKan runs on, and without swallowing an ordinary network error.

Coverage checked, not assumed: all 60 published vulnerabilities are named by a
suite, and every one of those suites carries negative assertions as well as
positive ones. New suites need no registration - build.sh's test run calls
tests/run-node-suites.cjs, which DISCOVERS every tests/*.test.cjs - so all three
files here are in the "Run WeKan's own tests" options already.

Verified by running the new suites and the whole node suite (380 suites, 0 failed).

Thanks to xet7 !
2026-08-12 15:06:45 +03:00
Lauri Ojansivu d577f07700 Canary tokens: who tried to override permissions, and from where.
The security event log said what a guard DID - a request blocked, a filename
sanitized - which answers "is WeKan defending itself" and not the question an
admin asks next: who did that, and from where. It also could not tell a browser
that got confused from somebody working through the Hall of Fame one entry at a
time.

A CANARY is a tripwire at a point that only a permission-override attempt
reaches. Ordinary use never gets there - the code path runs when a request asks
for something the rules forbid - so a trip is not noise, and it is worth an
admin's attention with the actor attached. Design:
docs/Security/Remediation/WeKan.md §12.

Three properties, each enforced by a test:

SILENT. Tripping one changes NOTHING the caller can observe. tripCanary()
always returns false and tripCanaryDeny() always returns true, so a call site
reads as the refusal it replaces:

    if (forbidden) return false;                          // before
    if (forbidden) return tripCanary('card.vote-field', { userId });

The return value is decided before any reporting is attempted and the reporting
is wrapped, so a canary can never throw into, delay or disturb the request it
watches. The REST handler re-throws the ORIGINAL error object. This is not
politeness: a canary that announces itself is a map of which paths are watched,
and a probe would simply avoid them.

BOUNDED. A canary sits where an attacker can loop, so one row per attempt would
be a denial of service they get for free. models/lib/canaryTokens.js - pure, no
Meteor, no clock of its own - records the first trip of a (canary, actor) pair
at once, COUNTS the rest of the window, flushes one summary carrying the total
when the window closes, and stops writing after 60 summaries for a pair that
never gives up. The tracked-pair map is capped at 5000 and evicts the LEAST
RECENTLY seen, so a long-running attacker is not pushed out by a passing one and
a botnet varying its address cannot grow it. Idle pairs are swept on a timer. A
thousand attempts in a minute cost ONE row, and a suppressed trip costs one map
lookup. The username lookup is cached and capped, and neither it nor the insert
is awaited on the caller's path.

ATTRIBUTED. Every event carries userId, username, ip and count. The username is
denormalised at write time on purpose: it is what the account was CALLED when it
tried, so a rename does not rewrite history and a deletion does not erase it.
The address uses the same spoofing-safe resolver as the login throttle -
X-Forwarded-For only as far as HTTP_FORWARDED_COUNT says to trust it - or an
attacker could write a colleague's address into the security log by sending a
header. `detail` says what was attempted in the words of the feature, never the
payload.

Seventeen canaries are wired at the permission checks that refuse the attempts
behind BoardBleed, ParentBleed, ChecklistBleed, PathBleed and CommentBleed, plus
the direct vote/poker field writes and a stored path that points outside the
storage root. All server-side: no Playwright, no browser, nothing to install.

Admin Panel / Problems / Security gains Username, IP address and Attempts
columns, and both new columns are searchable - the thing an admin does with one
security event is pivot on it.

tests/canaryTokens.test.cjs (25 checks) drives the limiter through bursts, an
endless probe, eviction order and junk input; tests/canaryCoverage.test.cjs (18)
pins every canary to its call site and asserts none of them changes what the
caller gets back.

Thanks to xet7 !
2026-08-09 03:29:20 +03:00
Lauri Ojansivu a4a9c03b1f Security tests: say which vulnerability you guard, and check the list.
"Are the security tests enough to prevent what is in the Hall of Fame" was
unanswerable. WeKan publishes 58 named vulnerabilities at
https://wekan.fi/hall-of-fame/ ; some suites name the one they belong to, most
did not, and the Hall of Fame lives in a different repository that CI never
checks out. Answering it meant reading 58 pages against 300 suites by hand,
which means it was never answered - and a regression test that quietly stops
existing is worth nothing, the failure mode tests/testsAreRegistered.test.cjs
already caught once when two *bleed suites drifted out of the mocha index.

So the list lives in the repository that has the tests, and
tests/securityRegressionCoverage.test.cjs keeps the two in step. Every published
vulnerability is either GUARDED - named by a suite that still exists - or
RECORDED, a gap with a written reason, which is the CHANGELOG's "TODO Later"
pattern applied to tests. The gap count is pinned, so a vulnerability cannot be
published with neither a test nor a note; a gap that turns out to be guarded
after all fails too, so coverage is never understated; and a file that merely
REGISTERS suites is not accepted as coverage, or the guard would pass itself.

Getting there meant naming vulnerabilities in the suites that already guarded
them, which is most of what this commit is:

- tests/securityMeifukun.test.cjs guards eight reports and named one. Its
  sections are RedirectBleed, SourceBleed, LiveBleed, CasBleed, OidcBleed,
  MetricsBleed, ImpersonateBleed and InviteBleed - seven vulnerabilities that
  looked untested and were not.
- tests/noIdentityReplacement.test.cjs guards IdentityBleed and PatternBleed,
  the same CodeQL finding twice.
- ExportBleed, CrashBleed, MimeBleed and the four LockoutBleed suites now say so.
- tests/crossBoardParentCardLeak.test.cjs also guards BoardBleed's cross-board
  move deny, and now checks it on Lists and Swimlanes too, not only Cards.

The count that comes out of it: 29 of 58 published vulnerabilities have a named
regression test, and 29 are recorded gaps - mostly older fixes from before WeKan
tested its security fixes at all. They are not known to be unprotected; they are
known to be unchecked, which is a different and more honest statement, and each
one now says what it would take to close it.

Thanks to xet7 !
2026-08-09 02:55:13 +03:00