Skip to content

Releases

Mimicway 0.5.3

Choose a tag to compare

@github-actions github-actions released this 29 Nov 18:59

Added

  • Observation in automatic mode, turned on through the API (POST …/observe with {"mode": "automatic"}) by someone who may create a service in the service's group: in the responses the observed service relays, each address that a service in proxy mode of its group reaches is replaced by that service's address in Mimicway, so that the application comes through Mimicway for the next step of a chain while the directory is still the real one. Only a body that observation already holds is rewritten, within its bounds; a body compressed, not text, not UTF-8, partial, signed or holding more than 1,000 addresses goes as it came, a response rewritten is marked not to be stored, and each call kept says what the relay replaced or why it left the body. Automatic mode returns to manual mode when whoever turned it on loses the right to create a service in the group. Manual mode, the default, still changes nothing. The choice and its bounds are written in decision 4.
  • A compact view of the list of services, chosen beside the search and kept by the browser like the theme: one line per service (its name, whether it is mocked, the mock switch, "Configure"), so that a group of fifteen services holds in one screen at 1280×800. The name is a disclosure button that unfolds the service's full card and folds it back, by mouse or keyboard. A folded card holds no availability check, which stays a click on an unfolded card; the search reads what a folded line does not show. The services unfolded are kept while the page stays open, in memory only. The detailed view, with a full card per service, stays the default.
  • The services a directory names are created in one go from the observation panel: under "Backends named in the responses", "Create the services in one go" lists one proxy service per line, its name and target editable, with a box to leave a line out and one to observe the new services at once. For an origin whose responses name several addresses (a directory giving one address per service on one host), it offers one service per address, named after the last segment of its path and aimed at that address, or one for the origin. Each line is sent like the service form and goes through its checks (name, a name already taken, PROXY_ALLOWED_TARGETS); a refused line says why and stops none of the others. The suggestions are then read again, and their rules send the application to the new services.

Changed

  • The request log and the Kafka message log fit their window at every width down to 320 CSS pixels (WCAG 1.4.10): each entry is one line that wraps on a narrow screen, where a table wider than its window had to be scrolled sideways to reach the details button of each row. A long path, topic or target is cut on its line and whole in the details, and the details button stays in view. Every other screen is checked at 1280, 768 and 320 pixels, in both themes, by an end-to-end test that refuses a page or a box that scrolls sideways.
  • The filters of the request log and of the Kafka message log are kept while the page stays open: leaving a log and coming back no longer resets them. They live in memory only, never in the browser's storage (a path filter can hold an identifier), and a reload forgets them. A service kept in the filter stays in its list after its calls have left the log, so that the filter can still be seen and changed.

Fixed

  • A fixed value of the response builders that holds a line break is sent as it is when a transformation is chosen for it, and the field says why, as for a value holding a quote: written as the quoted text of an expression, it came back from the builder as the expression's text, its transformation lost.
  • A suggested rule no longer sends the application to a service of a group whose code starts with api (Mimicway takes /apizz/… for its own interface), nor to a service whose target holds a query, a fragment, credentials or spaces around it: the relay appends the rest of a call to such a target as written, and reached something else than the address the backend named.
  • A suggested rule no longer rewrites an address with a . or .. segment (http://backend/ws/../x) to a service of Mimicway: a client resolves such a segment before sending, and resolved the rewritten address the same way, which then reached no service, or another one. Such an address keeps its real form, like any address no service reaches.
  • A request to a proxy service's own address, with nothing after its name, reaches the service's target exactly as written: a slash was added at its end (/ws/Orders was relayed to /ws/Orders/), which an endpoint that answers at one address only, such as a SOAP service, could refuse. A target that ends with a slash keeps it, and a request with a slash after the service's name still sends it. A backend that only answers at its address followed by a slash (/app/) is reached through the service's address followed by a slash, as it is directly. A suggested rule is sent to a service only when the service reaches the very address the rule writes: a service aimed at /ws/ no longer stands for /ws.
  • The name offered for a proxy service in front of a backend whose host starts with api (api.example, apis.internal) is accepted by the service form: it was api-backend, which the form refused, since a name that starts with api would share its address with Mimicway's own interface. It is now backend-api.
  • The service form refuses, as the server does and before a round trip, the reserved name runtime-config.json and any name that starts with api (its address would be taken for Mimicway's interface); both are checked against the server's own lists by a test.
  • The buttons of the Kafka message log wrap under its title on a narrow screen: at 320 pixels, in French and with a wide system font, they pushed the page sideways.

Security

  • url moves to 2.5.9, past RUSTSEC-2026-0592 (a stack overflow that stops the process when it reads the origin of nested blob: addresses). Mimicway reads the origin of the addresses it finds in observed responses, which start with http:// or https://, and of API_BASE_URL: no way to reach the flaw from traffic is known, and this release removes the doubt.
  • The exception for picomatch (GHSA-fc5q-39xc-vjpf) is gone: the advisory was withdrawn on 2026-11-18, and neither audit reports it any more. The interface's packages are audited without any exception.

Mimicway 0.5.2

Choose a tag to compare

@github-actions github-actions released this 18 Nov 00:06

Added

  • The interface shows the version of Mimicway that answers, at the foot of the page once signed in: what to quote when reporting a problem. The server tells it on a new route, GET /api/version, which needs a token when authentication is on, like every route but the four open ones: GET /api/health, read by probes without a token, still does not name the version. The interface asks when it loads its data (start, sign-in, import), never before sign-in, and shows nothing in front of a server that does not tell.

Security

  • libz-sys, brought by the Kafka client, moves to 1.1.33, past RUSTSEC-2026-0544: the zlib it bundles (1.3.1.2 to 1.3.2) wrote past a buffer in gzprintf() after a non-blocking gzwrite() stalled. Only a binary built with the messaging-kafka feature holds it, and the Kafka client compresses messages, it writes no gzip file; the released binaries and the image are built without the feature. The lock file changes on that package alone.
  • The audit of the interface's packages takes dated exceptions, the ones of osv-scanner. picomatch, which vite, vitest and tinyglobby bring to build and test the interface, has an advisory on every release and no fixed one (GHSA-fc5q-39xc-vjpf: a pattern such as +(*) takes exponential time to match): npm audit, which knows no exception, failed the supply-chain job for good, and would have hidden any other advisory behind this one. The built interface holds none of picomatch, and the only patterns these tools give it are the project's own, written in its configuration. CI now runs scripts/npm-audit.mjs, which reads the report of npm audit for every package, development tools included, and fails from a high advisory on, as before, but for the advisories frontend/osv-scanner.toml ignores: one list for both tools, each entry with its reason and its ignoreUntil at most six months ahead, after which the advisory fails both again. picomatch is the only entry, until 2026-12-17. The script asks npm for every kind of package and for the registry on its command line, whatever the environment or an .npmrc says: under NODE_ENV=production or offline=true, npm audit alone gave an empty report and passed. A report that cannot be read whole, a high advisory without an identifier, a package said more severe than every advisory it leads to, and an exception listed twice or without a real date are refused. scripts/check-workflows.mjs wants the script alone in its step, on one line, with its directory and nothing else (no option, no || true, no block, no continue-on-error), and still refuses a weaker npm audit; scripts/check-exception-dates.mjs refuses an [[IgnoredVulns]] header it would have skipped (indented, or followed by a comment), whose date went unchecked.

Mimicway 0.5.1

Choose a tag to compare

@github-actions github-actions released this 17 Nov 08:15

Added

  • Template pipes and script functions that write a value inside a document, whatever the value: xml_text (text of an XML element), xml_attr (attribute value, tab and line breaks as references), cdata (inside a CDATA section, ]]> split in two sections), the three writing U+FFFD for a character XML 1.0 forbids, json_string (inside a JSON string, control characters included) and json_value (out of any string: a text that is exactly a JSON number, true, false or null as it is, any other as a JSON string).
  • The calls of an observed service can be read one by one, failed relays included. The observation panel lists the calls kept, the most recent first, and opens one in place: its request (method, path, query, headers, body) and the backend's response, or why no response came (target refused by PROXY_ALLOWED_TARGETS, backend unreachable, no answer in time, response cut off), in plain words. A relay that fails is now kept with its request, where observation kept nothing and the request log only a line: in a list of its own, bounded across all observed services by TRAFFIC_OBSERVATION_MAX_FAILED_CALLS (new setting, 100 by default), so that a backend that stays down never pushes a good sample out, and never read by suggestions (a 502 written by Mimicway is not an answer of the backend). A call can be copied as a curl command, which sends it again through Mimicway, and its request body downloaded as kept; a body cut at TRAFFIC_OBSERVATION_MAX_BODY_SIZE is shown as cut, with its real size, and a body that was not UTF-8 is said not to be the original byte for byte. Nothing refreshes by itself. New routes: GET …/{name}/observed-calls and GET …/{name}/observed-calls/{id}, with and without a group, under the same right as the suggestions.
  • Suggested responses that repeat what the request sent. When the responses of a route or of a SOAP operation differ only where they repeat values of their own request (path, query, header, field of an XML or JSON body, several at once), one rule without condition is suggested, whose response reads each value from the request ({{xpath.…}}, {{body./…}}, each escaped for where it stands in the document, whatever value comes: text of an element, attribute, CDATA section, JSON string; out of any JSON string, where a whole value stands, json_value when every value observed was a number, true, false or null, so that {"id":7} for /orders/7 and "active":true for ?active=true are still one rule, as in 0.5.0), where one rule per value seen answered a request never seen with the values of another. When the request holds a repeated element and the response a block per item, the rule comes with a script that reads the items and writes one block per item, each value escaped for where it stands (out of a JSON string, the JSON value of the request itself), and the response reads {{script.items}}. Such a rule is suggested only if Mimicway itself, rendering it for every observed request, gives back every observed response byte for byte; text from the traffic stays literal, in the response or in string literals of the script. GET …/suggestions gains repeats, list (with max_items, the most items its script writes, also said in the panel) and script on each rule; echo stays filled when the response repeats exactly one field. The panel names the repeated fields and the list, and "Use this suggestion" passes the script to the form.
  • GET …/suggestions keeps Unconditional, Echo and Conditional exactly as in 0.5.0, where a rule said everything with condition and echo, and gives a new outcome, Rules, to every suggestion that says more (an operation, calls set aside, a rule of several conditions or of any_of, a response that repeats several values or a list with its script), its rules read by conditions, response and script. A client written for 0.5.0, which read condition: null as "no condition", ignores that outcome instead of creating rules without their conditions.
  • Suggestions for SOAP services and for the fields of a request body. A route whose calls each name one SOAP operation (the element its Body holds) gets one suggestion per operation, each of its rules carrying the condition Envelope/Body/<operation> exists, where the operations of one address were answered "no field explains the responses"; observation keeps the calls of each operation apart (32 operations per path at most, the least recently called giving its place to a new one), as it does for each path, so that one busy operation no longer pushes the calls of the others out of the 8 an endpoint keeps. The texts of the elements of an XML body, read as XPath conditions read them (CDATA sections included, namespace prefixes ignored, the first element of a path), and the strings, numbers and booleans of a JSON body at any depth (as JSON pointers), are tried like the other fields of the request, where only the top-level fields of a JSON object were. Reading a body costs its length, whatever its shape, and is bounded: 64 fields, 16 levels, 256 bytes per path and per value. A request body cut at TRAFFIC_OBSERVATION_MAX_BODY_SIZE gives no field, and the suggestion says how many were cut; so does a request body in another encoding than UTF-8 (ISO-8859-1), whose bytes, which the rules read, are not the text observation keeps (non_utf8_request_bodies). The request's Content-Length header is no longer a field that tells answers apart: the length of a body is not a decision of the backend, and it explained the server error a longer body got. GET …/suggestions gains operation, truncated_request_bodies and non_utf8_request_bodies on each suggestion; the panel names the operation of a suggestion and the bodies cut.
  • PROXY_ALLOWED_TARGETS: the hosts, subdomains, addresses and ranges the proxies may connect to. Each relay (a service in proxy mode, an observed service, a rule whose action is proxy) and each availability check connects only to addresses the list admits, judged after DNS resolution on the addresses really connected, so that a name resolving elsewhere, or an address in another spelling (2130706433, [::ffff:127.0.0.1]), stays outside; a refused relay answers 502 with the reason. Saving refuses a new or changed target outside the list. Link-local addresses and the cloud metadata endpoints are admitted only by an entry of their own, never by a broad range. Unset, nothing changes (decision 3).

Changed

  • Suggestions from observed traffic explain more answers. A response reached by several values of a field, such as a service directory giving the same address for two names of one service, gets one rule that accepts any of them (an any_of condition per value), where nothing was suggested. Among the fields that explain the responses, the one with the fewest values is kept, so that an identifier changing at every call never wins over the name that decides; a field explains the responses only when each of its values was seen twice at least, always with the same response, since an identifier unique to each call fits any sample; a path parameter, a query parameter or a field at the top of a JSON object still may with values seen once when each response has its own value, as in 0.5.0. Calls answered with a 5xx status that no field explains are set aside when enough calls remain, and more of them than of errors, and the suggestion says how many were left out and with which status: five identical answers and one 500 now give the rule of the five, where the error hid it. GET …/suggestions gains conditions on each rule (all its conditions, all_of and any_of) and left_out on each suggestion (status, count); condition stays, set when a rule has exactly one condition. The panel says the values a rule accepts and the calls left out, and "Use this suggestion" fills the rule form with every condition.
  • CI also changes the JSON functions of scripts (src/engine/script_json.rs: parse_json, to_json) and the relay to a real backend (src/engine/proxy.rs) one mutation at a time. Of their 89 mutations, 9 went unseen, none a defect: the time of a reachability check, the read timeout setting, the caller's address kept by an observed relay, and the x-forwarded-* headers, which the relay's judge takes from the same function as the relay. serde_json's own reading now judges generated documents and every prefix of some of them, both what parse_json gives and what to_json writes back, and the limits of a parsed document are judged at their last item, entry and byte, wherever in the document they fall. A check of floats that serde_json already makes and a branch that no error reaches are removed. A relay that never connects now fails the test of what it sends after 30 seconds instead of hanging it.
  • CI also changes the detection of rules that another rule hides (src/engine/shadowing.rs, the conflict warning of the rule form) one mutation at a time. Of its 55 mutations, 3 went unseen, all in cases the drawn pairs of rules rarely reach: every pair of rules with one condition, out of every operator, every rule with two conditions against those, and every pair of sub-paths, odd ones included ({x, x}, {}), is now judged against the matcher itself. A regular expression without special characters is read as a plain text only when it compiles, as the matcher does: one too large to compile, never matched, could make the warning call a rule hidden behind a rule that never answers (such a rule cannot be saved). Two checks that changed no result are removed: the length of a {parameter} segment, and two different Eq values of one field, which the test of each condition against the value already refuses.
  • CI also changes the date pipes of templates (src/engine/template_dates.rs: epoch_ms, epoch_seconds, epoch_minutes, date("pattern")) one mutation at a time. Of ...
Read more

Mimicway 0.5.0

Choose a tag to compare

@github-actions github-actions released this 11 Nov 04:51

Added

  • Responses sent as server-sent events (text/event-stream): a rule can answer with a list of events instead of a body, each with its data (a template, like a body, one data: line per line), an optional event: name and a delay before it. The stream ends after its last event, or is cut at a chosen event: the connection is then dropped without the end of the response, and the client gets a transport error. The rule form edits the list in its new Event stream format, and a cut from a list of where it may happen. The request log records the stream once and fills its entry as it goes: the events sent, with their data, and whether the stream is open, ended, cut or left by its client. Bounds, checked when the rule is saved: 1,000 events, 60 seconds before one, 10 minutes in all; a stream holds at most 1 MiB of rendered events, and at most MAX_OPEN_STREAMS streams are open at once (new setting, 256 by default; the next one gets 503). In the configuration, the events are response.events (events, cut_at). A Kafka message never gets the answer of such a rule.

  • Templates in response headers: a header value with {{ is rendered like a body, with the same variables and transformations, so that one rule answers Location: http://{{header.host}}/jenkins/queue/item/{{path.job}}-{{seq}}/ with the host the client called, the job of its path and a counter that grows with each call. A value without {{ is sent as written, as before; header names are never rendered. A value whose result cannot be a header (a line break taken from the request) is left out of the response with a warning in the server log. The rule tester shows the response headers rendered for the captured request (response_headers in the request and the answer of POST /api/rule-test; {{seq}} gives 0 there). The header values of a rule suggested from observed traffic are written so that they render back to what the backend sent: a {{ there never becomes a template.

  • Help on templates in the response builders. The transformation field of a value lists every pipe with its label, inserts a working example (first(3) rather than first(N), which renders an empty text), shows what a single pipe does to that example, and warns about an unknown pipe or a number argument that is not one. A fixed value takes a pipe too, written as {{"value" | pipe}}. A fixed value is free text with suggestions: {{ lists the values of the request and the fake data kinds, | the pipes, and a line under the field names an expression that would render empty or not as meant. The pipes, examples and warnings come from one catalogue that the engine renders in a test.

  • Colors in the script editor: keywords, function and method calls, texts, numbers and comments each have their own color, in both themes, with the text contrast of the rest of the interface. Only the look changes: typing, selecting, the completion and what is saved are those of the plain text field, and in forced colors the field shows its text as before.

Changed

  • Breaking: parse_xml_items reads its path from the root element, as XPath conditions do, and returns the items at that path, and only them. A path that starts below the root or skips a level now gives an empty array, without an error, where it used to find items: "article" or "articles/article" in a SOAP envelope; write the whole path, Envelope/Body/GetOrderTotalsRequest/articles/article, as the documentation always did (how to upgrade). The old reading was wrong for paths written in full too: a sibling written before the items in their parent (<count> before the <product> elements of <products>) made it return none; a parent of the path found in an unrelated branch, or closed before the rest of the path began, made it return items from elsewhere in the body; and a self-closing item or field (<product/>, <qty/>) was skipped, so a list could come back shorter than it was. A judge now generates documents and paths and compares the items with those a walk of the document's tree finds.
  • CI measures how the cost of Mimicway grows with its input (scripts/scale-test.mjs, job "Scale test"): each family of inputs (the rules of a service for one request, the services of a configuration, a series of requests, the conflict search of a rule being saved, loading and saving a configuration, suggestions from observed calls, the values a script returns, the calls recorded while a service is observed, with and without room for their endpoints) runs at n, 2n and 4n under Callgrind, which counts instructions rather than time (a count repeats within 0.01 %), and the job fails when a count grows from n to 4n faster than the growth written next to its family (linear for all of them today), with one tolerance. Requests go through the real router, middleware included. Only the growth is judged: a slower but still linear cost is measured once, in the change made for speed, and no baseline or timed benchmark is kept (decision 2). valgrind is needed to run it; the workloads compile with the scale-probe feature only, never into the binary.
  • CI changes the code of rule matching, of response templates and of the functions of rule scripts (src/engine/matcher.rs, src/engine/template.rs, src/engine/script.rs) one mutation at a time with cargo-mutants (a && made ||, a match arm deleted) and fails when the tests still pass on one: on each push and pull request for the lines it changes, and every week for the whole files when src/ changed, split into four jobs that each fit in the six hours of a GitHub job (scripts/mutants-gate.sh). The tests of a mutation get 2 GiB of memory at most: one that makes them allocate without end (an index of url_decode that stops moving forward fills 6 GB in 19 seconds) is stopped within seconds and counts as caught, where it used to fill the runner's memory and stop the whole job. An equivalent mutation, one that cannot change any result, is excluded in .cargo/mutants.toml with its reason next to the tests. The first run left five changes that no test saw, now covered: the rule tester's hint for a header or form field condition whose key is in another part of the request, an XPath condition read past a syntax error or to the end of a body that lacks its element, and a sub-path segment with one brace only ({id), which is literal text. In templates, 33 changes went unseen, now covered by judges that generate their cases: where an expression ends whatever its quoted texts and pipe arguments hold, and the calendar of now_iso and of date pipes, walked one day at a time over 3,600 years. In scripts, 38 changes went unseen: 23 in parse_xml_items, whose way of following its path was wrong (see above), and the others in the limits of xml_element, the escaping of quotes, the range of seeded_int and the valid hours, minutes and seconds of parse_date, now covered by judges that generate their cases (dates checked against a table of month lengths).
  • The end-to-end suite judges the accessibility of every screen it reaches with axe-core, against the WCAG 2.1 A and AA rules, in both themes, and the last screen of each test in both languages: a violation fails the test that showed it. The screens come from the suite itself (each view, with the forms and dialogs open in it), not from a list. A known violation can wait in frontend/e2e/a11y-exceptions.json, at most six months, until a date the suite enforces. @axe-core/playwright 4.14.0 is a development dependency (MPL-2.0, 3.4 MB installed, never part of the binary or the image).
  • The end-to-end suite refuses to run against a server that was not started with the new setting DISPOSABLE_DATA=true, or without DATA_PATH set to an absolute directory outside the repository: it resets the configuration of the server it reaches, and an instance where someone keeps mocks, on port 7342 too, is no longer touched. The documented run and the CI use a temporary directory.
  • The README opens on what Mimicway does, shown rather than written: an animated diagram (your app calls Mimicway, a rule answers with a mock, another forwards to the real API, the request log records each call), then a demo of the real screens of a first mock, from the list of services to the request log. The diagram is an SVG of 5 KB per language that stops moving for readers who ask for less motion; the demo is an animated WebP of seven screens, 110 to 120 KB per language, with a still screenshot in its place for those readers. Both exist in English and French. The demo is played by the end-to-end suite on the real binary, so CI fails when a change of the interface breaks it, and npm run docs:demo regenerates it.
  • The curl walk through the API moved from the README to a page of the guide, The API in five steps: a mocked service, a condition, a forwarded rule, the request log, on port 7343 with its data in a temporary directory. CI runs its commands as written against the binary it builds, in English and French, and fails when an answer changes (scripts/check-api-tour.sh).
  • The release workflow keeps its artifacts (binaries, archives, UI, SBOMs) and the record of its Docker build a week, rather than GitHub's default of 90 days, 56 MB a run: a rehearsal is read the day it runs, a tag publishes copies of them as release assets, and a week leaves time to rerun a failed job. scripts/check-workflows.mjs fails on an upload or a Docker build of that workflow kept longer.
  • CI refuses an image over 150,000 bytes, a video or a GIF, and an SVG that holds a script, an event handler or a resource from elsewhere, or keeps moving for a reader who asked for less motion (scripts/check-images.mjs). The documentation checks now also read the images of HTML blocks (<img src>, <source srcset>): a broken one, or one shown in one la...
Read more

Mimicway 0.4.0

Choose a tag to compare

@github-actions github-actions released this 24 Oct 07:02

Removed

  • Breaking: the pre_script and post_script blocks of a rule, with their template variables {{pre_script…}} and {{post_script…}}, and the "Advanced options" of the rule form that held them. They ran at the same moment as script, on the same request, without seeing each other's result, so they only repeated it, and "post" suggested a block run after the response, which none was. A configuration where they are empty loads as before. One where a block still holds code is refused at start, at import, at restore and through the API, with a message that names the rule and the block, rather than loaded without that code; MIGRATING.md explains how to move it into script. The rule tester (POST /api/rule-test) no longer takes these two blocks, and its script_errors and script_results items no longer have a slot.

Fixed

  • The backups of the configuration hold more than the last minute. Each change made one, and five are kept: merging an import of two groups and six services made eight within 30 ms, so the five left held that import alone, and saving a rule unchanged made one too. Changes made in a burst now share one backup, taken before the first of them: a change backs up only when the last backup is a minute old (new setting BACKUP_MIN_INTERVAL_SECS, 60 by default, 0 for the former behavior). Restoring, importing a file that replaces everything and resetting still back up every time. A change that leaves the configuration as it is writes nothing, and a backup identical to the newest one is not made again. Measured on the same ten actions of the interface: 17 backups (23,645 bytes) before, 4 (3,348 bytes) after.
  • The backup a restore, an import or a reset takes of the state it overwrites now holds the last change: a change made a moment before was still on its way to the disk, and the backup held the state before it.

Security

  • A release is published only once a maintainer approves it: the jobs that create the GitHub release and push the image run in the protected release environment, so a pushed tag alone no longer publishes. No checkout of the release workflow keeps the job's token in the cloned repository any more (six did, among them those of the two publishing jobs, where any later step could read it); scripts/check-workflows.mjs, run by the CI, refuses a checkout that keeps it and a publishing job outside an environment, in every workflow.

Mimicway 0.3.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 20:47

Added

  • Dates in another unit, without converting them by hand: in a response template, {{"2026-12-31T10:00:00Z" | epoch_seconds}} gives 1798711200, and the pipes epoch_ms, epoch_minutes and date("dd/MM/yyyy HH:mm") give the other units and any format. The date is an ISO 8601 text written in the template between double quotes, or any variable that holds one (now_iso, body.created…); a value that is not such a date comes out unchanged. The builders offer these pipes in their list.
  • The script editor completes the keywords of the language (let, if, else, for, while, switch, fn, return, try…) before Mimicway's functions, and inserts each as a skeleton with the part to replace selected.
  • Traffic suggestions group the paths of a service into routes: calls that differ by an identifier (/orders/1, /orders/2), or by words answered with documents of the same structure (the services a directory knows), pool their samples under a pattern such as /orders/{id}, and the pattern's parameters are the first fields tried to explain the responses. Three calls to a route are enough, where each path needed three of its own. When the responses differ only by the value that tells them apart, because the backend repeats it, one rule repeats it ({{path.name}}) instead of one rule per value, and also answers the values never observed. Each suggestion names its pattern and the paths it groups; a literal path is suggested before a pattern that would also match it.
  • Traffic suggestions follow the services a response points to. After a refresh, the observation panel lists the backends that the observed responses name (in their bodies and their Location, Content-Location and Link headers, XML namespace and schema addresses and Mimicway's own address left out), with the routes that named them; for one that no service reaches, it opens the service form filled with a proxy in front of it. Once such a service exists, the suggested rules write its address in Mimicway instead of the backend's, built from the request the rule answers ({{header.x-forwarded-proto | default("http")}}://{{header.host}}), so that an application served by a mocked directory calls Mimicway. Only the suggested rules are rewritten, never the relayed traffic. New endpoint GET …/{name}/linked-backends.
  • A fuzz target for the suggestions (fuzz/fuzz_targets/suggestions.rs): like the property tests, it replays the suggested rules on the calls they come from and fails unless each gets back exactly what the backend answered.

Fixed

  • Opening a response in the JSON or XML builder no longer drops the expressions the builder has no source for: {{now_epoch}}, {{pre_script.total}}, {{post_script}} or a quoted text with a pipe became their bare name, written as plain text at the next save.
  • Raw TCP mocks: two changes made at the same time are both kept, or one is refused with its reason. Each was checked against the same copy of the configuration, then replaced it whole, so the second erased the first although both had been accepted (eight creations at once kept one). A service name is now stored trimmed, as it is checked: svc could sit next to svc.
  • Two services can no longer share a name within a group (or both be ungrouped) through any change of the configuration. An import (PUT /api/config) accepted them, as it accepted two groups whose names differ only by case, two groups with one URL code, a malformed code, and an ungrouped service named like a group code; it now applies the rules of creating each group and service one at a time, and refuses the whole file with the first conflict. Deleting a group refuses to ungroup a service whose name an ungrouped service or a group code already has. A name with spaces around it is stored trimmed, as it was already validated: users was accepted next to users. Routing only ever reached the first of two such services, and the interface failed to render the list that held them. A configuration file or a backup saved by a version that allowed them (0.1.0 did, on a double submission) loads with the second one renamed name-2 (then -3...), logged as a warning, instead of breaking the interface.
  • Removing a service from a group, or adding an ungrouped one to it, from the group page now acts on the service clicked: it acted on the first service of that name found, which could belong to another group.
  • The service page no longer shows "Directory URL rewriting", and the README no longer lists it among the features: no code ever rewrote anything from the rewrite_directory_urls key, so a user relying on it got the real addresses. The key stays accepted in imported and stored configurations, ignored, and may now be left out. Rules suggested from observed traffic are what rewrites such addresses now (see Added).
  • A rule whose sub-path names a parameter (/orders/{id}) and that has a condition on that parameter now matches the requests it was written for: path parameter conditions were judged on the parameters of the service's listen path only, so such a rule passed in the rule tester and never matched a real request.
  • Stopping the observation of a service, deleting, renaming or moving it, or resetting the configuration now forgets the calls observed for it: they used to stay, so observing again mixed old and new traffic, and a service created again under the same name was suggested rules from the traffic of the deleted one, maybe in front of another backend.
  • A rule suggested from observed traffic with a condition on a JSON field whose name holds / or ~ now matches: the name went into the JSON pointer unescaped, so the pointer named another field.
  • A rule suggested from observed traffic on a service with a listen path (/v1/*) now matches the calls it comes from: its sub-path kept the listen path's part (/v1/orders instead of /orders), which rules never see.

Security

  • A rule script run also stops when it holds more than 16 MiB of memory, however it holds it. Rhai bounds each value, not their sum, and a few lines of script held 1.7 GB in the arguments of one call, 1 GB in what map gathers, 850 MiB in curried function pointers, 330 MiB in map keys and 265 MiB in nested calls. The global allocator now counts the bytes each thread holds (alloc/, the one crate of the project with unsafe code: four methods that call the system allocator unchanged, tested under Miri), and a run reads its thread's count between operations.
  • A rule script can no longer take the server down from inside its limits. One replace of a 1 MiB text by a 1 MiB substitute, 94 bytes of script that any signed-in user can send to the rule tester, asked for a terabyte at once and aborted the process; xml_element given the request body as its tag built 40 GB; parse_json and parse_xml_items held up to 390 MiB for one 10 MiB request body, and split 640 MiB; a loop of slow operations on a large body kept a worker thread busy for over a minute. Now a run stops after 500 ms and at 64 variables at once, and replace, the split family, to_chars, parse_json, parse_xml_items, to_json and xml_element stop as soon as their result would break the size limits of a value (1 MiB of text, 1,000 items, 500 entries), instead of building it first; the same 10 MiB requests now cost no more memory than with a trivial script. Every limit reached is named, with its value, in the error the rule tester shows and the log records. Scripts that relied on the old reading of parse_json may now fail where they did not: it counts every key it reads, repeated or not, and the text of keys with the text of values; and a map returned by a script is checked like any other value (500 entries at most).
  • A browser that sends no Sec-Fetch-Site header (Safari before 16.4, older Firefox) can no longer make a page of another site change the configuration: a state-changing management API request is now refused when its Origin is neither the address called nor listed in CORS_ALLOWED_ORIGINS, null included. Such a browser sends a form POST or a body-less POST without a CORS preflight, so POST /api/config/restore/{filename} replaced the configuration and POST /api/services/{name}/ping made Mimicway connect. Clients that send no Origin, which are not browsers, are unaffected.
  • Every client is bounded in time and memory. Request headers must arrive within 10 seconds (hyper's own limit never applied: the server ran it without a timer, so a client sending its headers a byte at a time held a connection forever), which also closes keep-alive connections idle that long; request bodies must arrive at 16 KiB/s on average after 10 seconds of grace, or get 408. At most MAX_REQUESTS_IN_FLIGHT requests (1,024) are handled at once, and at most MAX_BUFFERED_BODY_SIZE bytes (48 MiB) of request bodies are held in memory by mocked services and the management API; past either, the request gets 503 with Retry-After: 1 at once, before its body is read when it announces its length. /api/health is never refused, and requests streamed to a proxied backend hold no budget. Ten 10 MiB requests at once to a rule with a JSON condition, a script and a {{body.…}} variable now peak at 130 MB, within the 256 MiB of the Kubernetes manifests, instead of 2.5 GB. A body over 10 MiB sent to a mocked service now gets 413 instead of 400.
  • JSON conditions and {{body.…}} template variables read the value their pointer names without building the whole document: one 10 MiB JSON body evaluated against one condition took 250 MB of memory, about the whole memory the Kubernetes manifests give the pod, and now takes 22 MB. They find exactly what they found before.
  • Breaking for the Kubernetes manifests: the base turns authentication on, both routing overlays serve their host over TLS (secret mimicway-tls), and a NetworkPolicy refuses every outbound connection of the pod but name resolution. `kubectl apply ...
Read more

Mimicway 0.2.0

Choose a tag to compare

@github-actions github-actions released this 07 Oct 06:38

Added

  • Releases: pushing a vX.Y.Z tag builds static Linux binaries (x86_64, arm64), macOS and Windows binaries with the UI inside, a multi-architecture image on ghcr.io/eoth/mimicway, CycloneDX SBOMs and checksums; each archive and SBOM is published with its keyless signature (.sigstore.json) and the build provenance of all of them (.intoto.jsonl, also in GitHub's attestation store), and the image is signed and attested the same way. SECURITY.md shows how to verify them; both Dockerfiles pin their base images by digest.
  • Release builds are reproducible: the Dockerfile builds the Linux binaries (Rust and Node.js pinned by digest, the same paths on every machine), scripts/release-archive.sh packs every archive with fixed times, order, owners and permissions, and the release workflow publishes nothing unless a second machine rebuilds the same Linux binaries and archives. The CI compares two builds whenever the way they are made changes, and every week; SECURITY.md says how to rebuild a release and compare it. The macOS and Windows binaries are built with the Rust version of the Dockerfile.
  • CI lints every workflow with actionlint and shellcheck, including the release one that only runs on tags, and the OpenSSF Scorecard of the repository is published weekly; the README shows its badge and the CI status.
  • The UI is embedded in the binary when it is built first (as the Dockerfile and the release builds do): one file is a complete Mimicway, with no frontend/dist to ship next to it. STATIC_DIR still serves a directory instead, and a binary built without the UI reads ./frontend/dist as before. Fingerprinted assets are served with a one-year immutable cache, index.html is revalidated on each visit. The embedding is a 50-line build.rs, with no new dependency.
  • A security policy (SECURITY.md: private reporting channel, scope, response times), a security model (docs/en/security.md: exposed surfaces, every outbound flow, trust boundaries, hardening checklist) and a reviewer guide (REVIEWING.md: reading order, authorization matrix, commands that check each claim).
  • An explicit LICENSE file (MIT, already announced by the README).
  • A roadmap (ROADMAP.md).
  • A contribution guide (CONTRIBUTING.md), a code of conduct (Contributor Covenant 2.1), issue forms for bugs and features, and a pull request checklist.
  • Packaging metadata (license, repository, description) in Cargo.toml and frontend/package.json, for complete SBOMs.
  • The interface is available in English and French: it follows the browser's language (English when no catalogue exists for it), and a language selector in the header remembers the choice. Each sentence is written once, in English, where it is used, and a language adds one catalogue (frontend/src/locales/<language>.json), loaded only by its users; a test fails on any message missing from a catalogue, any catalogue entry no longer used, any lost placeholder, and any visible word of the interface that escapes translation (rendered in a pseudo-locale).
  • The messages of the server that people read (API validation errors, rule tester hints, script errors, availability-test errors) follow the Accept-Language of the request, which the UI sets to its own language; English by default. Same rule and same test as the UI, with src/locales/fr.json.
  • The user guide and the README exist in English and French, page for page: docs/en/ and docs/fr/ (same file names), README.md and README.fr.md, each page linking to its other language. Every screenshot exists in both languages, taken in the same state by the end-to-end suite, which switches the interface's language between the two captures. CI fails when a page, a screenshot, a heading, an image or a language link exists in one language only. The guide's former French addresses (docs/regles-de-matching.md…) are listed in MIGRATING.md.
  • The guide shows, in both languages, states of the interface that no test reached before, each now covered by an end-to-end test that checks what the image shows: AND and OR conditions combined on one rule, rules reordered by drag and drop (with the order checked through the API and a real call), the breadcrumb of the detailed JSON builder, fake data chosen for pasted fields, the chaos settings, the members of a group, the import dialog (with a merge checked through the API) and the reset confirmation (with a real reset).
  • CI runs the end-to-end Kafka specs against the binary built with messaging-kafka; they skipped themselves everywhere else, so they had not run since the interface switched to English.

Changed

  • The CI runs, for each change, only the jobs that check the files it touches (scripts/ci-plan.mjs decides, and CI passed is the one check to require): a push of documentation alone takes half a job-minute of machine time, where every push took ten to seventeen. The Rust builds, Playwright's browser and the image layers are cached, the actions run on Node.js 24, the runners are pinned to Ubuntu 24.04, and Dependabot proposes its updates monthly, grouped, without rebasing them on every push.
  • Building from source needs Node.js 22.12 or later (the UI's test tools no longer run on Node.js 20, which reached its end of life); CI, releases and the container image build the UI with Node.js 24 LTS.
  • The interface is built for the browsers released since March 2023: Chrome and Edge 111, Firefox 114, Safari 16.4 or later (Firefox ESR 115 included). Its build moved to Vite 8, whose output is 12% smaller once compressed (88.6 kB of JavaScript gzipped, now 78.1 kB).
  • The interface has a design system of its own, Phasme (frontend/design-system.md, previewed with npm run design:preview): lichen neutrals and a moss accent in the light and dark themes, the system's own fonts with one monospace face for code, one focus ring everywhere. A mocked service or rule is drawn with a dashed stem and badge, a proxied one with a solid stem and badge, so the mode reads without color. Every color comes from one tokens file, and a test fails on a literal color in a component, on a variable read and never defined, and on any pair of text and background under WCAG AA in either theme.
  • The UI declares Svelte as a runtime dependency, which it is: the compiler puts Svelte's runtime in the shipped bundle. The audit of production packages in CI and the UI's SBOM now cover it and the packages it brings.
  • lightMock is now Mimicway (binary mimicway, image ghcr.io/eoth/mimicway, repository github.com/Eoth/mimicway). The API, service URLs, environment variables, configuration format and data directory are unchanged. The language, theme and session saved by the browser move to the new keys on the first visit, and RUST_LOG filters naming light_mock keep working, with a warning. Breaking: the default Kafka consumer group is mimicway (set KAFKA_CONSUMER_GROUP=lightmock to keep the old one), and the Kubernetes resources and volume are renamed; MIGRATING.md shows how to keep the existing volume.
  • The end-to-end suite reads the interface in English, its source language, and produces the guide's screenshots in English under English file names; new tests cover the request log view, the SOAP service form, the login screen and the signed-in header. CI fails on any Markdown link, image or anchor that does not resolve.
  • Every screenshot of the guide names its subject: the end-to-end suite scrolls it into view and fails, in CI too, when it does not show entirely in the image in either language, or when a text area of it hides part of its text. Five images that cut their subject are reframed: the Rhai autocompletion list, the conflict warning with its two buttons, and the three script examples, which now show the script next to the template that uses it.
  • The README, the user guide, the Kubernetes and UI READMEs and the build scripts are written in English first; the user guide moved to docs/en/ (English) and docs/fr/ (French).
  • The Kubernetes manifests are a base plus two overlays, k8s/ingress (a standard Ingress, the new default) and k8s/gloo-edge, in a mimicway namespace; set the image with kustomize edit set image. Breaking for kubectl apply -k k8s/: apply an overlay instead.
  • The responses that Mimicway itself sends to the applications under test (no matching rule, purely mocked service, refused path) are in English.

Security

  • Before each copy or deletion in backups/ and backups/protected/, the configuration store resolves the two directories and the configuration file on disk and refuses any that leaves the data directory it opened: a symbolic link planted there (on a shared volume, another process can write to the data directory) would have sent the copies, and the deletions of the rotation and of the thirty-day purge, wherever it pointed.
  • The container image holds the binary and its data directory only (FROM scratch), built and released alike. The Alpine base shipped OpenSSL, which Mimicway never used (it is linked statically and its TLS goes through rustls with its own root certificates), and which lagged behind Alpine's fixes: the image scan failed on two of them (CVE-2026-75804, CVE-2026-84782). With no operating system left, there is no shell in the container either: docker exec … sh no longer works.
  • Raw TCP mocks listen on BIND_ADDRESS, like the HTTP server; they listened on every interface, so a TCP mock created on a workstation was reachable from the local network while the rest of Mimicway was not. GET /api/tcp/status now reports the address of each listener.
  • Every GitHub Action of the CI is pinned to a commit SHA, so a moved tag cannot change what runs; the container scan referenced a Trivy action tag that no longer exists, which would have failed the job.
  • The build scripts no longer run an installer fetched on the spot. The L...
Read more