1
0
mirror of https://github.com/lancedikson/bowser synced 2026-09-23 12:34:58 +00:00
Commit Graph

187 Commits

Author SHA1 Message Date
naorpeled
982a91d5e8 fix: resolve open GitHub security findings
Code scanning (js/polynomial-redos, alerts #16 and #17)
-------------------------------------------------------
bowser applies these regexps to attacker-controlled User-Agent strings, and
four of them ran in quadratic time:

  * The "Something else" fallback used /^(.*)\/(.*) / and
    /^(.*)\/(.*)[ \t]\((.*)/. Two unbounded `.*` before a required literal
    make the split ambiguous, so a UA of "/a" repeated backtracks O(n^2).
    Greedy `(.*)` always picks the last `/` that still has the delimiter
    after it, so the second group can never span a `/` -- narrowing it to
    `[^/]*` is exactly equivalent and removes the ambiguity. Verified
    identical on 1,000,000 fuzzed inputs and on the full acceptance corpus.

  * The Linespider and SlackBot version regexps used `(?:-[-\w]+)?` before a
    required `[\s/]`. Since `[-\w]` and `[\s/]` are disjoint the backtracking
    is pure waste, but the engine still walks it once per start position, so
    "linespider-" repeated is quadratic. Bounding the run to `{1,64}` makes
    it linear; no real bot-name suffix approaches 64 characters.

A sweep of all 253 regexp literals in src/ (fuzzed for superlinear scaling,
with the four pre-fix patterns used to confirm the detector works) reports no
remaining superlinear regexps. test/unit/redos.js locks this in.

Actions (actions/missing-workflow-permissions, alerts #5 and #15)
-----------------------------------------------------------------
merge-to-master.yml and draft-or-update-next-release.yml had no `permissions`
block and so inherited the default token. Both now declare least privilege,
matching publish.yml and pull-request.yml.

Dependabot (22 open alerts, all development scope)
--------------------------------------------------
bowser ships no runtime dependencies, so none of these reached consumers, but
they were live in CI. `pnpm audit` goes from 29 advisories to 0:

  * jsdoc 3 -> 4 (with docdash 1 -> 2) drops taffydb, which has no patched
    release, and picks up current markdown-it/linkify-it.
  * coveralls -> coveralls-next 6 drops `request`, which is deprecated with no
    patched release, along with form-data, qs 6.5.x, uuid 3 and tough-cookie 2.
    Same `coveralls` bin and same stdin contract; lcov conversion verified.
  * gh-pages 3 -> 6 clears the critical prototype pollution advisory.
  * pnpm overrides pin the remaining transitive-only advisories to the lowest
    patched release on each existing major.

Verified: pnpm audit clean, lint clean, 346 tests pass (the acceptance corpus
runs against both src/ and the built es5.js), build, package smoke test, and
doc generation.
2026-08-30 21:00:59 +03:00
Naor Peled
a88622557d Dual packaging, without breaking existing consumers (#628)
Co-authored-by: Yasumasa Ashida <ys.ashida@gmail.com>
2026-08-30 00:10:11 +03:00
Naor Peled
eb3f153def fix: attempt to resolve build issues (#604) 2026-02-09 00:03:04 +02:00
naorpeled
2bb8caee93 fix: remove prepublish hook 2026-02-07 19:48:42 +02:00
Copilot
0f51d8bce8 Replace lancedikson with bowser-js in GitHub URLs (#592)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: naorpeled <6171622+naorpeled@users.noreply.github.com>
2025-11-30 18:58:23 +02:00
naorpeled
eef8480944 docs(package.json): add naorpeled as contributor 2025-11-23 00:08:32 +02:00
Naor Peled
327e6f5e51 ci: add release drafter (#545) 2024-04-20 14:35:56 +03:00
Naor Peled
efb8e612a5 ci: move to Github Actions (#530) 2023-11-13 11:11:28 +02:00
Denis Demchenko
1d64ecab12 chore: bump version, write changelog and docs 2020-09-12 11:22:31 +03:00
Denis Demchenko
cc546cfb44 chore(docs): regen docs 2020-07-09 22:11:59 +03:00
Denis Demchenko
77f394c8e7 chore(package): bump version, write changelog 2020-07-09 22:08:32 +03:00
Denis Demchenko
7adb0017dd Merge pull request #397 from lancedikson/greenkeeper/sinon-9.0.0
Update sinon to the latest version 🚀
2020-07-09 21:51:01 +03:00
Denis Demchenko
a7bc7110e2 Merge pull request #417 from lancedikson/greenkeeper/compression-webpack-plugin-4.0.0
Update compression-webpack-plugin to the latest version 🚀
2020-07-09 21:50:45 +03:00
greenkeeper[bot]
98f32dfbf5 chore(package): update gh-pages to version 3.0.0 2020-05-29 20:31:26 +00:00
greenkeeper[bot]
538ee8fe0e chore(package): update compression-webpack-plugin to version 4.0.0 2020-05-12 13:33:47 +00:00
greenkeeper[bot]
c83b241238 chore(package): update sinon to version 9.0.0 2020-02-19 11:44:43 +00:00
Denis Demchenko
6add52d49c chore(package): bump version, write changelog 2020-01-28 22:26:13 +02:00
Denis Demchenko
433955ac68 Merge branch 'master' into greenkeeper/monorepo.babel7-20200114033043 2020-01-28 21:53:59 +02:00
Denis Demchenko
9af50fd1c7 Merge pull request #393 from lancedikson/greenkeeper/ava-3.0.0
Update ava to the latest version 🚀
2020-01-28 21:52:16 +02:00
greenkeeper[bot]
be8860b731 chore(package): update ava to version 3.0.0 2020-01-19 15:21:06 +00:00
greenkeeper[bot]
db8e9d4417 chore(package): update eslint-plugin-ava to version 10.0.0 2020-01-19 15:14:38 +00:00
greenkeeper[bot]
2132446318 chore(package): update @babel/register to version 7.8.3 2020-01-15 17:07:01 +00:00
greenkeeper[bot]
50f5a73386 chore(package): update @babel/preset-env to version 7.8.2 2020-01-15 17:06:57 +00:00
greenkeeper[bot]
e575388f48 chore(package): update @babel/polyfill to version 7.8.3 2020-01-15 17:06:54 +00:00
greenkeeper[bot]
b0b505fbe2 chore(package): update @babel/core to version 7.8.0 2020-01-15 17:06:49 +00:00
greenkeeper[bot]
48866a119e chore(package): update @babel/cli to version 7.8.3 2020-01-15 17:06:46 +00:00
Denis Demchenko
01f5f2281e chore(package): bump version, write changelog 2019-12-26 23:28:09 +02:00
Denis Demchenko
ca7357338f chore(package): bump version 2019-12-26 16:45:29 +02:00
Denis Demchenko
15442b789b Merge branch 'master' into greenkeeper/nyc-15.0.0 2019-12-26 16:18:07 +02:00
Denis Demchenko
a62e610f36 Merge pull request #385 from lancedikson/greenkeeper/babel-plugin-istanbul-6.0.0
Update babel-plugin-istanbul to the latest version 🚀
2019-12-26 16:16:41 +02:00
greenkeeper[bot]
0353113434 chore(package): update nyc to version 15.0.0 2019-12-23 01:13:44 +00:00
greenkeeper[bot]
460858d826 chore(package): update babel-plugin-istanbul to version 6.0.0 2019-12-23 00:59:55 +00:00
greenkeeper[bot]
8122ad99a0 chore(package): update sinon to version 8.0.0 2019-12-22 16:29:15 +00:00
Denis Demchenko
715ea30809 chore(package): bump version, update deps 2019-10-02 21:44:30 +03:00
Denis Demchenko
935d30f144 Merge pull request #346 from lancedikson/greenkeeper/eslint-plugin-ava-8.0.0
Update eslint-plugin-ava to the latest version 🚀
2019-10-02 21:30:41 +03:00
greenkeeper[bot]
1caea71a81 chore(package): update testem to version 3.0.0 2019-09-30 17:44:54 +00:00
Denis Demchenko
94a58a2d80 2.6.1 2019-09-10 19:04:13 +03:00
Denis Demchenko
4f12f6bafd chore(package): expose pkg.browser
related to #355
2019-09-10 19:02:13 +03:00
Denis Demchenko
b8ef17a7ba chore(package): write changelog, bump version 2019-09-06 14:35:23 +03:00
Mark Stacey
4356c0a503 Add 'module' field to manifest
The 'module' field is used by bundlers such as rollup and webpack to
determine the entrypoint for a package. Conventionally 'module' is used
for the ES6 entrypoint, and 'main' is used for the CommonJS entrypoint.

Adding a 'module' field allows importing bowser as an ES6 module
directly, rather than using a package-relative path to the ES6
entrypoint (e.g. `bowser/src/bowser`)

Closes #353
2019-09-05 18:28:47 -03:00
Denis Demchenko
a450ae2510 chore(package): bump version 2019-09-02 18:52:35 +03:00
greenkeeper[bot]
b548f9fed2 chore(package): update eslint-plugin-ava to version 8.0.0 2019-08-18 12:58:29 +00:00
Denis Demchenko
ee8989bc20 chore(package): bump version to 2.5.3 2019-08-04 23:50:01 +03:00
greenkeeper[bot]
4f6e7fa14b chore(package): update webpack to version 4.39.1 2019-08-02 12:48:38 +00:00
Alex Hinds
c6c4234f87 Update package.json to to point to "types" 2019-07-30 11:18:59 +10:00
Denis Demchenko
8ec03334a6 chore(package): bump package version 2019-07-17 16:48:23 +03:00
Denis Demchenko
9ba7a45c3f chore(package): bump package version 2019-07-17 13:49:27 +03:00
Denis Demchenko
fb776cf92a chore(deps): adds compression-webpack-plugin 2019-07-17 13:47:55 +03:00
Denis Demchenko
ac1ec4a6c3 Add webpack-bundle-analyzer 2019-07-17 13:47:55 +03:00
Denis Demchenko
f6aa3c7aac chore(package): bump package version 2019-07-16 22:21:40 +03:00