Repository navigation
feat(BREAKING): support checksums on extends and only configure process plugins from trusted configuration - #1396
Merged
Merged
Conversation
Remote configuration can't specify process plugins because they don't run sandboxed, but it could still configure process plugins specified in local configuration. For a plugin like dprint-plugin-exec, that means remote configuration could choose the commands that get run. Process plugins are now only configured by local configuration files, with a note when remote configuration specified something for one.
… plugins An extends entry can now end with an @ followed by the SHA-256 checksum of the configuration file (ex. https://example.com/dprint.json@<sha256>), which errors when the file doesn't match. Remote configuration extended with a checksum by trusted configuration is trusted to configure process plugins. Everything it extends must also have a checksum.
- check the server for a newer file when a cached extended config doesn't match its checksum - verify the tarball checksum for npm specifiers the same as for npm plugins, which also pins the files in the package that the config extends - compare checksums case insensitively and error for a checksum on an npm specifier without a version - only warn once per process plugin about untrusted configuration, and not when the remote configuration only locks it - clarify the docs on which configuration is trusted and how to get the checksum - add tests for inheriting process plugin config, longer checksum chains, and npm registry config extended with a checksum
…udes and parent associations Remote configuration that trusted configuration extended with a checksum can't change without the checksum changing, so like local configuration it can now specify negated excludes (ex. !**/*.txt) and associations reaching a parent directory, which are removed from other remote configuration.
dsherret
force-pushed
the
fix/remote-process-plugin-config
branch
from
October 23, 2026 14:29
278b052 to
b0de256
Compare
Remote configuration that trusted configuration extended with a checksum can't change without the checksum changing and process plugins require a checksum, so it can now specify non-Wasm plugins like local configuration.
…emote configuration The notes now show what to extend the remote configuration with to allow what's ignored (ex. https://dprint.dev/dprint.json@<sha256>), using the checksum of the package's tarball for an npm specifier. They show an example instead when the configuration is extended by untrusted configuration, since a checksum there wouldn't make it trusted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #1393, so merge that first.
extendsentries can now end with an@followed by the SHA-256 checksum of the configuration file (ex.https://example.com/dprint.json@<sha256>). This works for URLs, relative paths, and npm specifiers with a version, where it's the checksum of the package's tarball the same as for npm plugins. dprint errors when the file doesn't match, checking the server for a newer file first when the cached one doesn't match.excludes, and associations reaching a parent directory.This is a breaking change for anyone sharing process plugin configuration (ex. exec commands) via remote configuration. They can move it into a local configuration file or extend the remote configuration with a checksum.