Skip to content

ci: enable trusted publishing releases (v3.x) - #229

Merged
Eomm merged 2 commits into
v3.xfrom
ci/trusted-publishing-v3.x
Oct 18, 2026
Merged

Eomm merged 2 commits into
v3.xfrom
ci/trusted-publishing-v3.x

Conversation

@mcollina

@mcollina mcollina commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Backport of 42e2318 (trusted publishing via the fastify/workflows reusable release) to v3.x.

Differences from main:

  • publishes under the three dist-tag (the existing npm dist-tag for v3), so latest stays on v4;
  • make-latest: false, so the GitHub release isn't marked as latest;
  • also allows the pre* bump types with an optional preid; prereleases go to three-next.

Pinned to the fastify/workflows#243 merge commit (b0a2ab2), which adds the dist-tag, make-latest and preid inputs.

Releases must be dispatched from the Actions tab with the v3.x branch selected.

🤖 Generated with Claude Code

Puppo and others added 2 commits October 15, 2026 11:54
Backport of 42e2318 to v3.x. Publishes under the `three` dist-tag and
does not mark the GitHub release as latest.

(cherry picked from commit 42e2318)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Pin the reusable release workflow to the fastify/workflows#243 merge
and allow the pre* bump types (published under `three-next`), as on v2.x.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@mcollina
mcollina marked this pull request as ready for review October 17, 2026 19:06

@Tony133 Tony133 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Eomm
Eomm merged commit 8e8e5c6 into v3.x Oct 18, 2026
34 checks passed
@Eomm
Eomm deleted the ci/trusted-publishing-v3.x branch October 18, 2026 10:32
vharseko added a commit to OpenIdentityPlatform/OpenAM that referenced this pull request Oct 29, 2026
…26-110725 fast-uri: Scheme spoofing, host confusion and relative-reference rewriting (3.1.7 -> 3.1.9) (#1204)

Bumps `fast-uri` from 3.1.7 to 3.1.9 in both UI modules
(`package-lock.json` only), clearing Dependabot alerts #377–#380
(`openam-ui-js-sdk`) and #382–#385 (`openam-ui-ria`). This follows
#1118, which took both modules from 3.1.5 to 3.1.7; 3.1.8 and 3.1.9 are
the next two security releases of the 3.x line.

Supersedes #1203, which bumps `openam-ui-js-sdk` only; its lock-file
change is byte-for-byte the one here.

## Advisories

`fast-uri` is the RFC 3986 parser behind `ajv` 8 (`parse`, `serialize`,
`resolve`, `normalize`, `equal`). In all five advisories its output
names a different URI than the one it was given — a different scheme,
host or path than RFC 3986 and WHATWG parsers read, or than the caller
checked. Each one matters only to an application that makes a security
decision on one representation of an attacker-supplied URI and then uses
another.

**CVE-2026-110306 / GHSA-w74x-v6f9-j3xg** (fixed in 3.1.9) — URI scheme
spoofing; encoding error (CWE-172), validate before canonicalize
(CWE-180). `parse` and `serialize` ran the scheme through the legacy
global `unescape()` before validating it, although RFC 3986 §3.1 allows
no percent-encoding in a scheme. `normalize('%6Aavascript:alert(1)')`
and `resolve('https://a.example/', '%6Aavascript:alert(1)')` returned
`javascript:alert(1)`, the `%u006A` form did the same, and
`equal('%68ttp://a/', 'http://a/')` was `true`. An application that
screens dangerous schemes on the raw input and then stores or renders
the normalized form gets a live `javascript:`, `data:` or `vbscript:`
URL. 3.1.9 validates the scheme as written and never decodes it, so such
input fails with `URI scheme is malformed.` (fastify/fast-uri@597f254).

**CVE-2026-110180 / GHSA-wjr9-j795-jxcr** (fixed in 3.1.9, affected
since 3.1.3) — Host confusion; improper input validation (CWE-20),
interpretation conflict (CWE-436). For `http`, `https`, `ws`, `wss` and
any scheme with `domainHost`, `canonicalizeHost()` handed the host to
the WHATWG `URL` parser and adopted its `.hostname` without checking
that the parser had read the whole input as a host. fast-uri's host
group admits `@`, and the WHATWG parser strips TAB, LF and CR, so
`http://a@b@evil.example/` came back with host `evil.example` and no
`error`, a host carrying a raw TAB, CR or LF lost those characters, and
`equal()` treated the smuggled host as the clean one. 3.1.9 refuses a
domain host that contains a character outside the RFC 3986 reg-name set,
or that the WHATWG parser does not read as a bare host: `parse` reports
`URI host is malformed.` and `resolve` throws
(fastify/fast-uri@ddfc6a5).

**CVE-2026-110095 / GHSA-xhq7-xmqj-769h** (fixed in 3.1.9) — Improper
resolution of path equivalence (CWE-41). `normalize()` and `serialize()`
applied `remove_dot_segments` to the path of a relative-path reference,
although RFC 3986 §5.2.4 defines it only for the merged target path
during resolution. `normalize('a/../b')` returned `/b` and
`normalize('../x')` returned `x`, so `resolve(base, normalize(ref))`
named a different resource than `resolve(base, ref)` and `equal()`
conflated distinct references. 3.1.9 keeps a relative reference relative
and keeps its unresolvable leading `..` segments
(`removeDotSegmentsRelative`; fastify/fast-uri@b110a35,
fastify/fast-uri@9eb8759).

**CVE-2026-110725 / GHSA-333x-w4r6-6crp** (fixed in 3.1.9) — Scheme
injection; improper resolution of path equivalence (CWE-41), improper
encoding or escaping of output (CWE-116). With the non-default option
`reference: 'suffix'`, `serialize()`, `normalize()` and `resolve()`
emitted a reference without authority whose first path segment kept a
bare colon, which RFC 3986 §3.3 forbids in `path-noscheme`:
`normalize('javascript:alert(1)', { reference: 'suffix' })` returned
`javascript:alert(1)`, which reparses as a live scheme. 3.1.9 escapes
that colon in suffix output, as the default serialization already did
(fastify/fast-uri@39e6493). Only callers that pass `reference: 'suffix'`
are affected.

**CVE-2026-86472 / GHSA-hrr3-gc8f-f4qj** (fixed in 3.1.8) — Improper
handling of case sensitivity (CWE-178). fast-uri folded the host to
lowercase before percent-decoding it, so `%41` decoded to an uppercase
`A` that was never folded, and for a scheme-relative reference
(`//host`) no scheme-specific canonicalization repaired it:
`parse('//%41.com').host` was `A.com` while `//a.com` and `//A.com` gave
`a.com`, and `equal('//%41.com', '//a.com')` was `false`. A
case-sensitive host allow- or denylist could be evaded, although the
evading spelling still reaches the same host. 3.1.8 folds the case after
decoding (fastify/fast-uri@c88b59e). Dependabot auto-dismissed the
matching alerts (#347 in `openam-ui-js-sdk`, #353 in `openam-ui-ria`) on
2026-09-30, so they are not open, but 3.1.7 is inside the affected range
and this bump is what takes both modules past it.

| | Severity | Affected (3.x) | Fixed in |
|---|---|---|---|
| GHSA-w74x-v6f9-j3xg | Medium — CVSS 3.1 6.1
(`AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`) | >= 3.0.0, < 3.1.9 | 3.1.9 |
| GHSA-wjr9-j795-jxcr | Medium — CVSS 3.1 4.8
(`AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N`) | >= 3.1.3, < 3.1.9 | 3.1.9 |
| GHSA-xhq7-xmqj-769h | Low — CVSS 3.1 3.7
(`AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N`) | >= 3.0.0, < 3.1.9 | 3.1.9 |
| GHSA-333x-w4r6-6crp | Low — CVSS 3.1 3.7
(`AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N`) | >= 3.0.0, < 3.1.9 | 3.1.9 |
| GHSA-hrr3-gc8f-f4qj | Medium — CVSS 3.1 4.8
(`AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N`) | >= 3.0.0, < 3.1.8 | 3.1.8 |

The 2.x and 4.x lines received the same fixes in 2.4.8 and 4.2.3 (2.4.7
and 4.1.5 for GHSA-hrr3); neither line is in these lock files.

## Impact on OpenAM

None at runtime, none in the build. In both modules `fast-uri` is a
transitive development dependency (`dev: true`) that no OpenAM source
imports, and it does not end up in any module zip or in the WAR.

### `openam-ui-js-sdk`

The single copy in the lock file is required (`^3.0.1`) by the three
nested `ajv` 8 copies under `@microsoft/tsdoc-config` (8.18.0),
`@rushstack/node-core-library` (8.20.0) and `ajv-formats` (8.20.0), all
of which belong to the `@microsoft/api-extractor` 7.58.12 subtree — a
direct `devDependency` that `vite-plugin-dts` also uses through
`unplugin-dts`. The top-level `ajv` 6.15.0 that `eslint` uses parses
URIs with `uri-js` and does not load `fast-uri`. Nothing from the
subtree reaches the `app` / `lib` zips (`target/app`, `target/lib`) or
the WAR's `extui/`.

The Maven build does load it. `npm run build` (compile phase) runs
`build:lib` → `vite build --config vite.lib.config.ts`, whose `dts({
bundleTypes: true, … })` plugin calls API Extractor to roll up the
declarations:

- `ExtractorConfig.prepare` validates the configuration object that
`unplugin-dts` builds in memory against API Extractor's bundled
`api-extractor.schema.json` (the module has no `api-extractor.json`).
- `TSDocConfigFile.loadFile` validates API Extractor's bundled
`extends/tsdoc-base.json` (the module has no `tsdoc.json`) against
`@microsoft/tsdoc`'s `tsdoc.schema.json`.

Ajv calls `fast-uri` only while compiling those schemas — `parse`,
`serialize` and `resolve` on their `$id` / `$ref` values and base IDs
(`dist/compile/resolve.js`, `dist/compile/index.js`) — and never on the
data it validates; the `uri` and `uri-reference` formats of
`ajv-formats` are regular expressions. It never calls `normalize()` or
`equal()` and never passes `reference: 'suffix'`, so GHSA-333x cannot
occur at all. The only strings `fast-uri` sees are identifiers from JSON
schemas shipped inside the npm packages — nothing from OpenAM sources,
users or the network. `npm run test:run` (`vitest.config.js`) and `npm
run dev` (`vite.config.ts`) configure only `@vitejs/plugin-react` and
never load API Extractor.

### `openam-ui-ria`

The single copy in the lock file is required (`^3.0.1`) by the single
`ajv`, 8.17.1. That `ajv` is a direct `devDependency` only so that
`overrides.eslint.ajv = "$ajv"` can replace the ajv 4 that `eslint`
3.8.1 would otherwise pull in through `table` 3.8.3 and its
`ajv-keywords` 1.5.1 peer; nothing else depends on it.

Nothing in the build loads it. `npm run build:production` (`grunt prod`)
runs the `eslint` task through `grunt-eslint` 19.0.0. eslint 3.8.1
validates its configuration with `is-my-json-valid` and requires `table`
only from its own `table` formatter (`lib/formatters/table.js`), but the
Gruntfile passes `require.resolve("eslint-formatter-warning-summary")`,
which `CLIEngine.getFormatter` loads by path and which needs only
`chalk` and `text-table`. `npm run test` (`grunt karma:build`) has no
path to `ajv` either. The module zip (`src/main/assembly/zip.xml`) packs
`target/compiled`.

Neither flaw is reachable in either module. The bump takes the
development toolchain out of the affected range.

## Change

The `node_modules/fast-uri` entry in
`openam-ui/openam-ui-js-sdk/package-lock.json` and in
`openam-ui/openam-ui-ria/package-lock.json`: 3.1.7 → 3.1.9 (`version`,
`resolved`, `integrity`). Neither `package.json` changes — every `ajv`
that requires `fast-uri` asks for `^3.0.1`, which 3.1.9 satisfies. No
code change.

Apart from the five fixes, v3.1.7...v3.1.9 contains tests, a README note
on suffix-reference authority ambiguity and a release workflow
(fastify/fast-uri#229): 3.1.9 is the first `fast-uri` release published
from GitHub Actions through npm trusted publishing, which is the new
releaser Dependabot reports on #1203.

Verified:
- both lock files carry an `integrity` that matches `npm view
fast-uri@3.1.9 dist.integrity` and the SHA-512 of the downloaded
tarball; the `openam-ui-js-sdk` lock file is identical to the one on
#1203
- the published 3.1.9 carries the fixes: `index.js` validates the scheme
without `unescape()` (`validateScheme`), rejects malformed domain hosts
(`hasForbiddenDomainHost`, `isHostOnlyURL`), keeps relative references
relative (`removeDotSegmentsRelative`), escapes the first-segment colon
under `reference: 'suffix'`, and folds host case after percent-decoding;
the package still has no dependencies
- the registry entry was published by the `GitHub Actions` trusted
publisher with an SLSA provenance attestation, and its `gitHead` is
fastify/fast-uri@0def703 (`Bumped v3.1.9`)
- `node_modules/fast-uri` is the only `fast-uri` entry in each lock
file; the `openam-ui-api` lock file does not resolve it
- the GitHub Advisory Database lists no advisory affecting
`fast-uri@3.1.9`

## References

- GHSA-w74x-v6f9-j3xg
- GHSA-wjr9-j795-jxcr
- GHSA-xhq7-xmqj-769h
- GHSA-333x-w4r6-6crp
- GHSA-hrr3-gc8f-f4qj
- https://nvd.nist.gov/vuln/detail/CVE-2026-110306
- https://nvd.nist.gov/vuln/detail/CVE-2026-110180
- https://nvd.nist.gov/vuln/detail/CVE-2026-110095
- https://nvd.nist.gov/vuln/detail/CVE-2026-110725
- https://nvd.nist.gov/vuln/detail/CVE-2026-86472
-
fastify/fast-uri@597f254
-
fastify/fast-uri@ddfc6a5
-
fastify/fast-uri@b110a35
-
fastify/fast-uri@9eb8759
-
fastify/fast-uri@39e6493
-
fastify/fast-uri@c88b59e
- https://github.com/fastify/fast-uri/releases/tag/v3.1.8
- https://github.com/fastify/fast-uri/releases/tag/v3.1.9
- fastify/fast-uri@v3.1.7...v3.1.9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants