Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions doc/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,74 @@ Whether removing an extension through the extension control file also removes wh

Whether to generate a signature archive (sigzip) for published extensions. By default it does nothing. There are 3 modes: `create`, `renew` and `delete`. When `renew` is specified, then on startup a new keypair is generated and a new signature is generated for each extension version in the background. When `create` is specified then on startup, if no keypair exists, a keypair is created and a signature is generated for each extension version in the background. A signature is generated for newly published extension versions in both `renew` and `create` modes. The `delete` mode deletes the keypair and all generated signatures.

## Name Similarity

The `NAME_SIMILARITY` publish check flags a version whose extension name or display name matches or resembles another namespace's active extension, for an admin to review on the name squatting dashboard. It never blocks publication, whether it finds a match or fails, and like every publish check it runs only while `ovsx.scanning.enabled` is `true`. The dashboard's namespaces view, which lists pairs of namespaces with similar names, uses the popularity properties below.

| Property | `ovsx.scanning.name-similarity.enabled`
|---------------|----------------------------------------
| Type | boolean
| Default | `true`
| Compatibility | Since 1.5.0

Whether the `NAME_SIMILARITY` check runs on publish. The dashboard works either way, but without the check it has no flagged versions to show beyond extensions sharing a display name.

| Property | `ovsx.scanning.name-similarity.name-threshold`
|---------------|-----------------------------------------------
| Type | number
| Default | `0.7`
| Compatibility | Since 1.5.0

Lowest trigram similarity, above 0 and at most 1, at which two extension names count as a match. A value out of range stops the server from starting.

| Property | `ovsx.scanning.name-similarity.display-name-threshold`
|---------------|-------------------------------------------------------
| Type | number
| Default | `0.7`
| Compatibility | Since 1.5.0

Lowest trigram similarity, above 0 and at most 1, at which two display names count as a match. A value out of range stops the server from starting.

| Property | `ovsx.scanning.name-similarity.min-fuzzy-length`
|---------------|-------------------------------------------------
| Type | integer
| Default | `4`
| Compatibility | Since 1.5.0

Names shorter than this, once normalized, only match exactly, since trigram scores of very short strings say little. Must be at least 1.

| Property | `ovsx.scanning.name-similarity.max-matches`
|---------------|--------------------------------------------
| Type | integer
| Default | `10`
| Compatibility | Since 1.5.0

Most matches looked up per field and name, which bounds the work a very generic name causes. Must be at least 1.

| Property | `ovsx.scanning.name-similarity.statement-timeout`
|---------------|--------------------------------------------------
| Type | duration
| Default | `10s`
| Compatibility | Since 1.5.0

How long one lookup may run before the database cancels it, for the publish check and the dashboard alike. A cancelled check fails without blocking publication; a cancelled dashboard lookup answers 503 and suggests raising this value. Must be positive.

| Property | `ovsx.scanning.name-similarity.popular-namespace-downloads`
|---------------|------------------------------------------------------------
| Type | integer
| Default | `10000`
| Compatibility | Since 1.5.0

Downloads of its active extensions from which the more downloaded namespace of a pair counts as a popular target. The dashboard's namespaces view shows only pairs with a popular target by default, and admins can switch to all pairs. Must not be negative.

| Property | `ovsx.scanning.name-similarity.popular-namespace-ratio`
|---------------|--------------------------------------------------------
| Type | number
| Default | `10`
| Compatibility | Since 1.5.0

How many times the other namespace's downloads a popular target also needs, which keeps out pairs of two established namespaces that are rarely one squatting on the other. Must be at least 1.

## OAuth2

The `ovsx.oauth2.attribute-names.[provider-name].*` configuration properties allow mapping a login provider's attributes to Open VSX user data. By default it provides an attribute name configuration for [GitHub](https://docs.github.com/en/free-pro-team@latest/developers/apps/building-oauth-apps). It is possible to configure attribute name mappings for multiple login providers. Make sure to also configure Spring Security using its `spring.security.oauth2.client.registration.[provider-name].*` and `spring.security.oauth2.client.provider.[provider-name].*` properties.
Expand Down
10 changes: 10 additions & 0 deletions server/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ This change log covers only the server of Open VSX.

Releases up to and including v1.2.0 were backfilled from the GitHub release notes. Those list every pull request of the repository, so they also contain web UI and CLI changes.

## [next] (unreleased)

### Added

- The `NAME_SIMILARITY` publish check flags a version whose extension name or display name matches or resembles another namespace's active extension, without ever blocking publication; it runs while scanning is enabled and is configured by `ovsx.scanning.name-similarity.*`
- `GET /admin/name-squatting/collisions` looks flagged extensions, and those sharing a display name across namespaces, up again and groups each look-alike under the extension it resembles that was published first; `GET`, `POST` and `DELETE /admin/name-squatting/allowlist` manage the allowed pairs, which stop being reported; all require `manage_extensions`
- **Upgrade:** migration `V1_86` creates the `pg_trgm` extension, which the database owner can do since PostgreSQL 13, and the `name_similarity_allow` table; `V1_87` builds trigram indexes on `extension` and `extension_version` and an index on `extension_validation_failure` that block writes to those tables while building and give up after waiting 5 s for a lock, so to avoid the pause create them `CONCURRENTLY` beforehand as `V1_87` describes
- `GET /admin/name-squatting/namespaces` lists pairs of namespaces whose names are within an edit or two of each other or differ only in separators, by default only those whose more downloaded namespace counts as popular by `ovsx.scanning.name-similarity.popular-namespace-downloads` and `popular-namespace-ratio`; `POST` and `GET /admin/name-squatting/namespaces/allowlist` manage allowed namespace pairs, and `DELETE /admin/name-squatting/allowlist/{id}` removes either kind; all require `manage_extensions`
- **Upgrade:** migration `V1_88` lets `name_similarity_allow` hold pairs of namespaces and builds a trigram index on `namespace` names, which blocks writes to `namespace` while building and gives up after waiting 5 s for a lock

## [1.4.0] - 2026-11-09

### Added
Expand Down
6 changes: 6 additions & 0 deletions server/scripts/config-properties-baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ undocumented ovsx.scanning.enabled
undocumented ovsx.scanning.max-archive-size-bytes
undocumented ovsx.scanning.max-entry-count
undocumented ovsx.scanning.max-single-file-bytes
undocumented ovsx.scanning.name-similarity.display-name-threshold
undocumented ovsx.scanning.name-similarity.enabled
undocumented ovsx.scanning.name-similarity.max-matches
undocumented ovsx.scanning.name-similarity.min-fuzzy-length
undocumented ovsx.scanning.name-similarity.name-threshold
undocumented ovsx.scanning.name-similarity.statement-timeout
undocumented ovsx.scanning.namespace-ownership-check.check-active-extensions
undocumented ovsx.scanning.namespace-ownership-check.enabled
undocumented ovsx.scanning.namespace-ownership-check.enforced
Expand Down
9 changes: 9 additions & 0 deletions server/src/dev/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,15 @@ ovsx:
only-protect-verified-names: false
allow-similarity-to-own-names: true
only-check-new-extensions: true
name-similarity:
enabled: true
name-threshold: 0.7
display-name-threshold: 0.7
min-fuzzy-length: 4
max-matches: 10
statement-timeout: 10s
popular-namespace-downloads: 10000
popular-namespace-ratio: 10
secret-detection:
enabled: true
enforced: false
Expand Down
Loading