This run took 39 seconds.
$ date
--- stdout ---
Fri Mar 13 11:55:14 UTC 2026
--- end ---
$ git clone file:///srv/git/mediawiki-tools-api-testing.git /src/repo --depth=1 -b master
--- stderr ---
Cloning into '/src/repo'...
--- stdout ---
--- end ---
$ git config user.name libraryupgrader
--- stdout ---
--- end ---
$ git config user.email tools.libraryupgrader@tools.wmflabs.org
--- stdout ---
--- end ---
$ git submodule update --init
--- stdout ---
--- end ---
$ grr init
--- stdout ---
Installed commit-msg hook.
--- end ---
$ git show-ref refs/heads/master
--- stdout ---
ea4b2736f7630ebb4b85bddeb324c1870e643229 refs/heads/master
--- end ---
$ /usr/bin/npm audit --json
--- stdout ---
{
"auditReportVersion": 2,
"vulnerabilities": {
"mocha": {
"name": "mocha",
"severity": "high",
"isDirect": true,
"via": [
"serialize-javascript"
],
"effects": [],
"range": "8.0.0 - 12.0.0-beta-2",
"nodes": [
"node_modules/mocha"
],
"fixAvailable": {
"name": "mocha",
"version": "7.2.0",
"isSemVerMajor": true
}
},
"serialize-javascript": {
"name": "serialize-javascript",
"severity": "high",
"isDirect": false,
"via": [
{
"source": 1113686,
"name": "serialize-javascript",
"dependency": "serialize-javascript",
"title": "Serialize JavaScript is Vulnerable to RCE via RegExp.flags and Date.prototype.toISOString()",
"url": "https://github.com/advisories/GHSA-5c6j-r48x-rmvq",
"severity": "high",
"cwe": [
"CWE-96"
],
"cvss": {
"score": 8.1,
"vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
},
"range": "<=7.0.2"
}
],
"effects": [
"mocha"
],
"range": "<=7.0.2",
"nodes": [
"node_modules/serialize-javascript"
],
"fixAvailable": {
"name": "mocha",
"version": "7.2.0",
"isSemVerMajor": true
}
}
},
"metadata": {
"vulnerabilities": {
"info": 0,
"low": 0,
"moderate": 0,
"high": 2,
"critical": 0,
"total": 2
},
"dependencies": {
"prod": 53,
"dev": 486,
"optional": 2,
"peer": 1,
"peerOptional": 0,
"total": 538
}
}
}
--- end ---
$ /usr/bin/npm audit --json
--- stdout ---
{
"auditReportVersion": 2,
"vulnerabilities": {
"mocha": {
"name": "mocha",
"severity": "high",
"isDirect": true,
"via": [
"serialize-javascript"
],
"effects": [],
"range": "8.0.0 - 12.0.0-beta-2",
"nodes": [
"node_modules/mocha"
],
"fixAvailable": {
"name": "mocha",
"version": "7.2.0",
"isSemVerMajor": true
}
},
"serialize-javascript": {
"name": "serialize-javascript",
"severity": "high",
"isDirect": false,
"via": [
{
"source": 1113686,
"name": "serialize-javascript",
"dependency": "serialize-javascript",
"title": "Serialize JavaScript is Vulnerable to RCE via RegExp.flags and Date.prototype.toISOString()",
"url": "https://github.com/advisories/GHSA-5c6j-r48x-rmvq",
"severity": "high",
"cwe": [
"CWE-96"
],
"cvss": {
"score": 8.1,
"vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
},
"range": "<=7.0.2"
}
],
"effects": [
"mocha"
],
"range": "<=7.0.2",
"nodes": [
"node_modules/serialize-javascript"
],
"fixAvailable": {
"name": "mocha",
"version": "7.2.0",
"isSemVerMajor": true
}
}
},
"metadata": {
"vulnerabilities": {
"info": 0,
"low": 0,
"moderate": 0,
"high": 2,
"critical": 0,
"total": 2
},
"dependencies": {
"prod": 53,
"dev": 486,
"optional": 2,
"peer": 1,
"peerOptional": 0,
"total": 538
}
}
}
--- end ---
Attempting to npm audit fix
$ /usr/bin/npm audit fix --dry-run --only=dev --json
--- stderr ---
npm WARN invalid config only="dev" set in command line options
npm WARN invalid config Must be one of: null, prod, production
--- stdout ---
{
"added": 538,
"removed": 0,
"changed": 0,
"audited": 539,
"funding": 119,
"audit": {
"auditReportVersion": 2,
"vulnerabilities": {
"mocha": {
"name": "mocha",
"severity": "high",
"isDirect": true,
"via": [
"serialize-javascript"
],
"effects": [],
"range": "8.0.0 - 12.0.0-beta-2",
"nodes": [
"node_modules/mocha"
],
"fixAvailable": {
"name": "mocha",
"version": "7.2.0",
"isSemVerMajor": true
}
},
"serialize-javascript": {
"name": "serialize-javascript",
"severity": "high",
"isDirect": false,
"via": [
{
"source": 1113686,
"name": "serialize-javascript",
"dependency": "serialize-javascript",
"title": "Serialize JavaScript is Vulnerable to RCE via RegExp.flags and Date.prototype.toISOString()",
"url": "https://github.com/advisories/GHSA-5c6j-r48x-rmvq",
"severity": "high",
"cwe": [
"CWE-96"
],
"cvss": {
"score": 8.1,
"vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
},
"range": "<=7.0.2"
}
],
"effects": [
"mocha"
],
"range": "<=7.0.2",
"nodes": [
"node_modules/serialize-javascript"
],
"fixAvailable": {
"name": "mocha",
"version": "7.2.0",
"isSemVerMajor": true
}
}
},
"metadata": {
"vulnerabilities": {
"info": 0,
"low": 0,
"moderate": 0,
"high": 2,
"critical": 0,
"total": 2
},
"dependencies": {
"prod": 53,
"dev": 486,
"optional": 2,
"peer": 1,
"peerOptional": 0,
"total": 538
}
}
}
}
--- end ---
{"added": 538, "removed": 0, "changed": 0, "audited": 539, "funding": 119, "audit": {"auditReportVersion": 2, "vulnerabilities": {"mocha": {"name": "mocha", "severity": "high", "isDirect": true, "via": ["serialize-javascript"], "effects": [], "range": "8.0.0 - 12.0.0-beta-2", "nodes": ["node_modules/mocha"], "fixAvailable": {"name": "mocha", "version": "7.2.0", "isSemVerMajor": true}}, "serialize-javascript": {"name": "serialize-javascript", "severity": "high", "isDirect": false, "via": [{"source": 1113686, "name": "serialize-javascript", "dependency": "serialize-javascript", "title": "Serialize JavaScript is Vulnerable to RCE via RegExp.flags and Date.prototype.toISOString()", "url": "https://github.com/advisories/GHSA-5c6j-r48x-rmvq", "severity": "high", "cwe": ["CWE-96"], "cvss": {"score": 8.1, "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"}, "range": "<=7.0.2"}], "effects": ["mocha"], "range": "<=7.0.2", "nodes": ["node_modules/serialize-javascript"], "fixAvailable": {"name": "mocha", "version": "7.2.0", "isSemVerMajor": true}}}, "metadata": {"vulnerabilities": {"info": 0, "low": 0, "moderate": 0, "high": 2, "critical": 0, "total": 2}, "dependencies": {"prod": 53, "dev": 486, "optional": 2, "peer": 1, "peerOptional": 0, "total": 538}}}}
$ /usr/bin/npm audit fix --only=dev
--- stderr ---
npm WARN invalid config only="dev" set in command line options
npm WARN invalid config Must be one of: null, prod, production
npm WARN deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead
npm WARN deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm WARN deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options.
--- stdout ---
added 537 packages, and audited 538 packages in 5s
119 packages are looking for funding
run `npm fund` for details
# npm audit report
serialize-javascript <=7.0.2
Severity: high
Serialize JavaScript is Vulnerable to RCE via RegExp.flags and Date.prototype.toISOString() - https://github.com/advisories/GHSA-5c6j-r48x-rmvq
fix available via `npm audit fix --force`
Will install mocha@7.2.0, which is a breaking change
node_modules/serialize-javascript
mocha 8.0.0 - 12.0.0-beta-2
Depends on vulnerable versions of serialize-javascript
node_modules/mocha
2 high severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
--- end ---
Verifying that tests still pass
$ /usr/bin/npm ci
--- stderr ---
npm WARN deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead
npm WARN deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm WARN deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options.
--- stdout ---
added 537 packages, and audited 538 packages in 5s
119 packages are looking for funding
run `npm fund` for details
2 high severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
--- end ---
$ /usr/bin/npm test
--- stderr ---
[baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: `npm i baseline-browser-mapping@latest -D`
[baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: `npm i baseline-browser-mapping@latest -D`
[baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: `npm i baseline-browser-mapping@latest -D`
--- stdout ---
> api-testing@1.7.3 test
> npm run lint && nyc --reporter=lcov --reporter=text-summary --reporter=text _mocha --recursive
> api-testing@1.7.3 lint
> eslint --cache .
The action api
framework
✔ should be able to make a request to the action API
✔ should return the original error text if something goes wrong
✔ should ignore allowed errors
✔ should throw non-allowed errors
tag management helpers
✔ should create a new tag and return existing
✔ should be idempotent with respect to new tag creation if force is true
✔ should handle deleting a non-existent tag gracefully
Client Factory
✔ Should share supertest agent between REST and Action API Clients
✔ Should return a test client representing an anonymous user when agent is not supplied to constructor
✔ Should return a REST test client for a specific endpoint
✔ Should return a supertest agent with an empty cookie jar
✔ Should return a supertest agent with a cookie jar set
Configuration
using /tmp/yrXRVlUDVM as the configuration root folder
Loading api-testing config from /tmp/yrXRVlUDVM/.api-testing.config.json
✔ Use .api-testing.config.json file if API_TESTING_CONFIG_FILE does not exist
Loading api-testing config from /tmp/yrXRVlUDVM/configs/quibble.json
✔ Select full path config set in API_TESTING_CONFIG_FILE env variable over local config
✔ Throw exception if config file set in API_TESTING_CONFIG_FILE does not exist
✔ Throws exception if ".api-testing.config.json" doesnt exist and API_TESTING_CONFIG_FILE is not set
Using REST_BASE_URL for configuration
✔ should return a json when REST_BASE_URL is set
Dynamic modification
✔ should apply after calling set()
✔ should apply after calling replace()
Loading api-testing config from /tmp/yrXRVlUDVM/configs/quibble.json
✔ should apply after calling load()
The REST API
methods
✔ should support get() function for GET method
✔ should support post() function for POST method
✔ should support put() function for PUT method
✔ should support del() function for DELETE method
path normalization
✔ should correctly combine "/rest.php" with "v1/my/endpoint"
✔ should correctly combine "/rest.php/" with "v1/my/endpoint"
✔ should correctly combine "rest.php/" with "v1/my/endpoint"
✔ should correctly combine "/rest.php" with "/v1/my/endpoint"
✔ should correctly combine "/rest.php/" with "/v1/my/endpoint"
✔ should correctly combine "rest.php/" with "/v1/my/endpoint"
✔ should correctly combine "/rest.php/v1/my/endpoint" with ""
✔ should correctly combine "" with "/rest.php/v1/my/endpoint"
path normalization
✔ normalizePath(foo, bar) should return /foo/bar
✔ normalizePath(foo, ) should return /foo
✔ normalizePath(foo, null) should return /foo
✔ normalizePath(, bar) should return /bar
✔ normalizePath(null, bar) should return /bar
✔ normalizePath(/, null) should return /
✔ normalizePath(/, /) should return /
✔ normalizePath(, ) should return /
✔ normalizePath(/foo/, /bar/) should return /foo/bar/
✔ normalizePath(/foo///moo//, /bar///dar/) should return /foo/moo/bar/dar/
✔ normalizePath(/foo///moo//, ) should return /foo/moo
✔ trimTrailingSlash(foo) should return foo
✔ trimTrailingSlash(/foo/) should return /foo
✔ trimTrailingSlash(/foo///) should return /foo
✔ trimTrailingSlash(/foo///moo///) should return /foo///moo
✔ trimTrailingSlash(/) should return /
✔ trimTrailingSlash() should return
✔ addLeadingSlash(foo) should return /foo
✔ addLeadingSlash(/foo/) should return /foo/
✔ addLeadingSlash(///foo///) should return ///foo///
✔ addLeadingSlash(/) should return /
✔ addLeadingSlash() should return /
54 passing (179ms)
=============================== Coverage summary ===============================
Statements : 79.33% ( 288/363 )
Branches : 68.24% ( 101/148 )
Functions : 73.07% ( 57/78 )
Lines : 79.55% ( 284/357 )
================================================================================
-------------------|---------|----------|---------|---------|---------------------------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------|---------|----------|---------|---------|---------------------------------------
All files | 79.33 | 68.24 | 73.07 | 79.55 |
REST.js | 96.87 | 52.63 | 100 | 96.87 | 75
action_clients.js | 85.07 | 82.14 | 63.63 | 85.07 | 30,118-121,125-130,148-160
actionapi.js | 64.12 | 64.28 | 66.66 | 63.28 | ...30,273-281,393-456,480-481,497-507
assert.js | 57.14 | 0 | 20 | 57.14 | 23,35-38,51,62
clientFactory.js | 100 | 100 | 100 | 100 |
config.js | 95.23 | 85.71 | 92.3 | 95.23 | 40,158
utils.js | 88 | 87.5 | 62.5 | 91.3 | 44-54
wiki.js | 85.36 | 36.36 | 83.33 | 87.5 | 34,55,94-98,118
-------------------|---------|----------|---------|---------|---------------------------------------
--- end ---
$ package-lock-lint /src/repo/package-lock.json
--- stdout ---
Checking /src/repo/package-lock.json
--- end ---
[DNM] there are no updates
$ git add .
--- stdout ---
--- end ---
$ git commit -F /tmp/tmp1qj6cios
--- stdout ---
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
--- end ---