Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
46bbc42
Refuse a Cargo.lock crate name crates.io cannot hold instead of panic…
mikolalysenko Nov 10, 2026
3d0fda8
Score a NuGet prefix pattern without slicing the package id
mikolalysenko Nov 10, 2026
9faf64f
Keep the project's manifest entries and blobs through a global prune
mikolalysenko Nov 10, 2026
6675d3e
Wrap help text, explain the patch modes, and accept everyday ecosyste…
mikolalysenko Nov 10, 2026
28a2fbc
Make repair verify blobs and fail when it cannot restore one
mikolalysenko Nov 10, 2026
7ad3962
Roll back a hosted uv lock whose only registry package is the patched…
mikolalysenko Nov 10, 2026
fc2a0b6
Keep Socket credentials out of every child process's environment
mikolalysenko Nov 10, 2026
4977857
Name manifest records no crawler can look for instead of dropping them
mikolalysenko Nov 10, 2026
3cc81f4
Report "no patches" only when the patch service answered
mikolalysenko Nov 10, 2026
7fcd354
Run interpreter probes from --cwd, and from a neutral directory under…
mikolalysenko Nov 10, 2026
ef9059f
Stop promising a restore from blobs kept for a removed, not-installed…
mikolalysenko Nov 10, 2026
b2dd85c
Bound the work a workspace glob can cost
mikolalysenko Nov 10, 2026
b8385c9
Read a Hatch matrix up to 1,024 combinations
mikolalysenko Nov 10, 2026
5eae188
Edit package.json by byte span in the pnpm and yarn berry vendor back…
mikolalysenko Nov 10, 2026
47ff849
Interpolate each Maven text once per profile combination, within a bound
mikolalysenko Nov 10, 2026
144b710
Refuse a cargo pin whole when one of its lock blocks is no crate's name
mikolalysenko Nov 10, 2026
72c602f
Run no Ruby for a gem patch until its record verifies, and none on a …
mikolalysenko Nov 10, 2026
d9c2e10
Keep a commit-journal replay out of .git, loud, and off dry runs
mikolalysenko Nov 10, 2026
fc65c3c
Parse package.json before the yarn berry revert writes yarn.lock
mikolalysenko Nov 10, 2026
535e98d
Warn when apply or list cannot read the vendor ledger
mikolalysenko Nov 10, 2026
63d883b
Bound the bun.lockb hoister and string decoding by the lock's own size
mikolalysenko Nov 10, 2026
da8aa55
Make the hosted upstream restore's writes all or nothing
mikolalysenko Nov 10, 2026
0716a2a
Say which files a failed hosted write could not put back
mikolalysenko Nov 10, 2026
e652581
Keep a CRLF pnpm-workspace.yaml CRLF through the trustLockfile edit
mikolalysenko Nov 10, 2026
d26dd03
Refuse a torn layout snapshot in the vendor ledger instead of panicking
mikolalysenko Nov 10, 2026
dfea306
Refuse a malformed or plain-http reference grant before it is planned
mikolalysenko Nov 10, 2026
3e93de7
Write grant values literally in the composer, gem, cargo and pom sinks
mikolalysenko Nov 10, 2026
ce2a6d0
Make a package apply or rollback all-or-nothing, with modes set befor…
mikolalysenko Nov 10, 2026
e82bf48
Keep unknown fields and the file mode when the manifest is rewritten
mikolalysenko Nov 10, 2026
d253b6c
Build the API client only when a command has something to fetch
mikolalysenko Nov 10, 2026
4f9269d
Scan every project in the checkout from a bare hosted or vendored scan
mikolalysenko Nov 10, 2026
b7f8574
Attest a vendor ledger entry only while a lockfile reference wires it
mikolalysenko Nov 10, 2026
70ede4e
Send telemetry beside the command and wait at most 300 ms for it at exit
mikolalysenko Nov 10, 2026
b8983b4
Honor DO_NOT_TRACK and the v4 opt-out name, and document telemetry
mikolalysenko Nov 10, 2026
25de357
Refuse hosted URLs that clients read differently or the server never …
mikolalysenko Nov 10, 2026
8c1ceb8
Finish a pnpm or yarn revert only once nothing resolves through the a…
mikolalysenko Nov 10, 2026
00843c4
Require every hosted ref of a patch to allow the lockfile basis
mikolalysenko Nov 10, 2026
4fd01cf
Merge branch 'fix/scan-prune-scope' into review/integration
mikolalysenko Nov 10, 2026
461df3f
Merge branch 'fix/first-run-ux' into review/integration
mikolalysenko Nov 10, 2026
45fe0b2
Merge branch 'feat/scan-discovers-projects' into review/integration
mikolalysenko Nov 10, 2026
bcb2fb8
Merge branch 'fix/scan-false-clean' into review/integration
mikolalysenko Nov 10, 2026
f9d2538
Merge branch 'fix/commit-journal-replay' into review/integration
mikolalysenko Nov 10, 2026
4df9923
Merge branch 'fix/crafted-input-panics-hangs' into review/integration
mikolalysenko Nov 10, 2026
041d102
Merge branch 'fix/hosted-write-atomicity' into review/integration
mikolalysenko Nov 10, 2026
e42145d
Merge branch 'fix/hosted-grant-validation' into review/integration
mikolalysenko Nov 10, 2026
6cf6d3f
Refuse a vendored uv patch for another version than the lock resolves
mikolalysenko Nov 10, 2026
103637f
Replay a vendor ledger record only as the edit vendoring makes
mikolalysenko Nov 10, 2026
e452292
Withhold a Gradle statement when its derived-cache check dies
mikolalysenko Nov 10, 2026
6c287b1
Emit the VEX product and document ids as they are checked: trimmed
mikolalysenko Nov 10, 2026
3cd45c0
Say so when --no-verify emits a VEX statement nothing verified
mikolalysenko Nov 10, 2026
5a096ee
Merge branch 'fix/telemetry-nonblocking' into review/integration
mikolalysenko Nov 10, 2026
059cdbc
Merge branch 'fix/vendor-revert-containment' into review/integration
mikolalysenko Nov 10, 2026
68a1abe
Rebuild a pnpm packages entry field by field and read it back before …
mikolalysenko Nov 10, 2026
e057853
Keep a closed output pipe from cutting a command short
mikolalysenko Nov 10, 2026
2c2db2f
Sweep the staging dirs an interrupted run leaves under .socket/
mikolalysenko Nov 10, 2026
5b1a766
Write a vendored Maven pom that resolves what its upstream pom does
mikolalysenko Nov 10, 2026
7adf4f5
Keep the bytes of a .mvn/maven.config that is not UTF-8
mikolalysenko Nov 10, 2026
5e42ec7
Bound the property interpolation of the Maven project scope
mikolalysenko Nov 10, 2026
be58240
Cap the template nesting the Gradle script scanner follows
mikolalysenko Nov 10, 2026
685227f
Refuse to vendor a Gradle module declared with a computed classifier
mikolalysenko Nov 10, 2026
0f721d9
Revert a re-serialised Gradle verification entry instead of leaving it
mikolalysenko Nov 10, 2026
4e010b9
Create pluginManagement after a Kotlin settings file's annotations
mikolalysenko Nov 10, 2026
ef1bcae
Write a wheel's dependency metadata into uv.lock only as TOML strings
mikolalysenko Nov 10, 2026
8d902bd
Name the yarn 1 installs that work from a workspace member after vend…
mikolalysenko Nov 10, 2026
254ba3a
Fail a package whose sidecar cannot follow its files, and recheck sid…
mikolalysenko Nov 10, 2026
6c515d5
End a gem rebuild with the interrupted CLI, and recover what it left
mikolalysenko Nov 10, 2026
7f1b262
Keep a mixed-ending pyproject.toml's lines through vendored uv wiring
mikolalysenko Nov 10, 2026
1464421
Name the files apply --force skips, and stop reporting a run that wro…
mikolalysenko Nov 10, 2026
30cd5a0
Read wrapper properties as a properties file for every version gate
mikolalysenko Nov 10, 2026
e8ad339
Share one dot-directory name rule between the commit journal and the …
mikolalysenko Nov 10, 2026
542bf00
Build a vendored log4j-core with real Maven in the vendor capstone
mikolalysenko Nov 10, 2026
6eb2ce1
Expect the byte-exact pnpm revert in the ledger schema e2e
mikolalysenko Nov 10, 2026
dc20b24
Merge branch 'fix/vex-fail-closed' into review/integration
mikolalysenko Nov 10, 2026
ae93ea4
Merge branch 'fix/agent-mode-robustness' into review/integration
mikolalysenko Nov 10, 2026
b345570
Merge branch 'fix/child-process-env' into review/integration
mikolalysenko Nov 10, 2026
c705d0b
Document the leftovers an interrupted apply or rollback leaves, and t…
mikolalysenko Nov 10, 2026
1d91868
Restore a pnpm entry's dependency refs with one read of their section
mikolalysenko Nov 10, 2026
7a4d5c7
Merge branch 'fix/uv-rollback-and-vendor' into review/integration
mikolalysenko Nov 10, 2026
df702fa
Merge branch 'fix/vendor-jvm' into review/integration
mikolalysenko Nov 10, 2026
e9102d7
Merge branch 'fix/apply-atomicity' into review/integration
mikolalysenko Nov 10, 2026
b9956c0
Merge branch 'fix/vendor-pnpm-yarn-exactness' into review/integration
mikolalysenko Nov 10, 2026
bc287e0
Restore bun.lockb to its exact pre-vendor bytes in any revert order
mikolalysenko Nov 10, 2026
c22fa9a
Reconcile test expectations the merged fix branches disagreed on
mikolalysenko Nov 10, 2026
6b32c7c
Copy a vendored tarball only into bun.lockb workspaces that depend on it
mikolalysenko Nov 10, 2026
67b2d20
Keep a Bun artifact while any lock entry still installs from it
mikolalysenko Nov 10, 2026
3b0a282
Place vlt lock entries without decoding an edge per comparison
mikolalysenko Nov 10, 2026
e9c5aae
Make the vlt revert check what it leaves behind, and its dry run honest
mikolalysenko Nov 10, 2026
8900899
Merge branch 'fix/vendor-bun-vlt' into review/integration
mikolalysenko Nov 10, 2026
4bcfda7
Name the advisories a scan fixes and the ones it leaves unpatched
mikolalysenko Nov 10, 2026
9ba671c
End an agent-mode run with the two steps the mode needs
mikolalysenko Nov 10, 2026
48bc094
Say what `vex` looked for and how to name a project it cannot identify
mikolalysenko Nov 10, 2026
523be95
Preview a report-only scan as the report it is
mikolalysenko Nov 10, 2026
cfa0a59
Say "no patches in this project" where a human was told "Manifest not…
mikolalysenko Nov 10, 2026
1407db0
Refresh the project's installed gems after a hosted scan or its unwind
mikolalysenko Nov 10, 2026
5224b54
Merge branch 'fix/gem-hosted-stale-install' into review/integration
mikolalysenko Nov 10, 2026
b05f393
Report a broken project file as a broken file
mikolalysenko Nov 10, 2026
fe1d593
Move the search for a checkout's project directories out of scan
mikolalysenko Nov 10, 2026
d85b060
Count only the packages a hosted run switched
mikolalysenko Nov 10, 2026
9b61f59
List and roll back from a directory what a bare scan patched below it
mikolalysenko Nov 10, 2026
0fb13b7
Merge branch 'feat/monorepo-commands' into review/integration
mikolalysenko Nov 10, 2026
8e537f2
Pin that a hosted-to-vendored takeover leaves installed gems alone
mikolalysenko Nov 10, 2026
452d6a9
Merge branch 'fix/gem-hosted-stale-install' into review/integration
mikolalysenko Nov 10, 2026
18ecfdd
Merge branch 'fix/output-honesty' into review/integration
mikolalysenko Nov 10, 2026
90b7935
Follow the stricter vendored VEX rule in the real-Bundler capstone; p…
mikolalysenko Nov 10, 2026
48e0418
Attest nothing from a lock the package manager is told not to read
mikolalysenko Nov 10, 2026
1cd6095
Withhold a Python ref another entry or requirement installs unpatched
mikolalysenko Nov 10, 2026
784184b
Withhold a pnpm ref beside a second copy, or wired in a lock pnpm rea…
mikolalysenko Nov 10, 2026
2eef56c
Read a pnpm or yarn 1 workspace member's own lock as absent
mikolalysenko Nov 10, 2026
9cfee11
Read a yarn berry lock that holds a complex-key entry
mikolalysenko Nov 10, 2026
6d206f2
Refuse a vendored reference whose artifact name carries a `%`
mikolalysenko Nov 10, 2026
af39ba2
Keep the user's gem declaration and converge every lock in hosted mode
mikolalysenko Nov 10, 2026
55a0389
Pin the hosted gem pair against the real Bundler, frozen, on every line
mikolalysenko Nov 10, 2026
ad5ed7e
Say which Bundler a merged gem lock is converged for
mikolalysenko Nov 10, 2026
e0e6bf3
Head `--cwd` itself `== . ==` among a run's project directories
mikolalysenko Nov 10, 2026
bf662a9
List and roll back a patched root together with the projects below it
mikolalysenko Nov 10, 2026
94a6c36
Merge branch 'fix/vex-js-py-fail-closed' into review/integration
mikolalysenko Nov 10, 2026
e8bbaf3
Merge branch 'feat/monorepo-commands' into review/integration
mikolalysenko Nov 10, 2026
4f4950b
Merge branch 'review/integration' into fix/gem-hosted-inline-source
mikolalysenko Nov 10, 2026
8207c9f
Word the hosted next steps for Bundler by what the run did to install…
mikolalysenko Nov 10, 2026
3becbb4
Merge branch 'fix/gem-hosted-inline-source' into review/integration
mikolalysenko Nov 10, 2026
a5d5b4b
Attest a hosted Cargo.lock entry only while cargo routes the crate to it
mikolalysenko Nov 10, 2026
2d711b3
chore(release): add 5.1.0 notes for the review/integration changes
mikolalysenko Nov 10, 2026
4e99fe1
Pin that a composer dist.url with a parser-dependent host is no refer…
mikolalysenko Nov 10, 2026
ba7858f
Withhold a hosted Composer statement over an install the crawler cann…
mikolalysenko Nov 10, 2026
03b7ea3
Refuse a hosted pin in a workspace member lock the package manager ne…
mikolalysenko Nov 10, 2026
9bad0db
Fix the findings of the pre-PR code review
mikolalysenko Nov 10, 2026
98fc7e9
Merge branch 'docs/changelog-5.1.0-review' into review/integration
mikolalysenko Nov 10, 2026
ed47966
chore(release): bring the 5.1.0 notes in line with the review fixes
mikolalysenko Nov 10, 2026
69722e5
chore(release): cite #2052 in the 5.1.0 notes it adds
mikolalysenko Nov 10, 2026
87de43a
Ask the shared helper whether a bare scan is agent mode
mikolalysenko Nov 10, 2026
0cb1a5d
Keep a Cargo.lock entry vex withholds among the pins rollback unwinds
mikolalysenko Nov 10, 2026
aaeeaef
Fix the findings of the second code-review pass
mikolalysenko Nov 10, 2026
30b5b9c
Attest a gem only when the Gemfile gives it the source its lock names
mikolalysenko Nov 10, 2026
2e5d566
Weigh a managed Maven pin against the parent poms it inherits from
mikolalysenko Nov 10, 2026
1b8b050
Stage the manifest pin in the cargo takeover fixture, and name the ge…
mikolalysenko Nov 10, 2026
895f0f9
Merge branch 'fix/vex-native-fail-closed' into review/integration
mikolalysenko Nov 10, 2026
bf8925d
Restore CHANGELOG.md to its merge-base version
claude Nov 11, 2026
93330bd
chore(release): add the 5.1.0 notes for the native-ecosystem VEX rules
mikolalysenko Nov 11, 2026
3d3760b
Merge the PR branch: CHANGELOG.md stays at its merge-base version here
mikolalysenko Nov 11, 2026
f16ca61
Fix two defects the final review of #2052 found
claude Nov 11, 2026
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
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repository = "https://github.com/SocketDev/socket-patch"

[workspace.dependencies]
socket-patch-core = { path = "crates/socket-patch-core", version = "=5.1.0" }
clap = { version = "=4.5.60", features = ["derive", "env"] }
clap = { version = "=4.5.60", features = ["derive", "env", "wrap_help"] }
serde = { version = "=1.0.228", features = ["derive"] }
serde_json = { version = "=1.0.149", features = ["preserve_order", "raw_value"] }
sha2 = "=0.10.9"
Expand Down
30 changes: 25 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ without waiting for an upstream release or upgrading the dependency.
Socket Patch updates dependency files to use patched packages, which you install
with your normal package manager.

> This branch documents the v5 prerelease. Installation commands below select the
> latest published release, which may have different behavior. To try this branch,
> [build from source](docs/development.md#build). Existing users should read the
> [v5 migration guide](docs/migrating-to-v5.md).
> Upgrading from v4? Read the [v5 migration guide](docs/migrating-to-v5.md).

## Installation

Expand Down Expand Up @@ -102,10 +99,33 @@ control. See [usage and recovery](docs/usage.md).
Use `socket-patch <command> --help` for options and
[`socket.yml`](docs/configuration.md#repository-patch-policy) for a shared rollout policy.

## Telemetry

Socket Patch sends usage telemetry by default: each command reports its outcome
to Socket as a small JSON event. An event holds the event name (for example
`patch_applied` or `patch_scan_failed`), the subcommand, the CLI version, the
operating system and CPU architecture, a timestamp, a random ID generated for
that one run, and a few counters and flags for the command (such as patches
applied, packages scanned, ecosystems found, the patch mode, `dry_run`). `get`
adds the patch UUID. A failure adds the error message, with URL credentials
redacted and your home directory replaced by `~`. Apart from what an error
message quotes, events hold no package names, file paths, file contents, or
dependency lists.

Events go to `api.socket.dev` with your API token when a token and organization
are configured, otherwise anonymously to `patches-api.socket.dev`. They are sent
in the background: a command never waits for telemetry before it prints, a
failed send changes nothing, and an unreachable endpoint adds at most 300 ms to
the exit.

To turn telemetry off, pass `--no-telemetry` or set `SOCKET_TELEMETRY_DISABLED=1`
or `DO_NOT_TRACK=1`. `--offline` / `SOCKET_OFFLINE=1` sends nothing either. See
[configuration](docs/configuration.md#telemetry) for every event, field, and switch.

## Documentation

- [Usage](docs/usage.md): targeting, CI, vendoring, agent mode, VEX, and recovery.
- [Configuration](docs/configuration.md): authentication, environment, and rollout policy.
- [Configuration](docs/configuration.md): authentication, environment, telemetry, and rollout policy.
- [Ecosystem support](docs/ecosystems.md): package-manager formats and limitations.
- [Migrating to v5](docs/migrating-to-v5.md): changed defaults and retired install hooks.
- [CLI contract](crates/socket-patch-cli/CLI_CONTRACT.md): flags, JSON, diagnostics, and exit codes.
Expand Down
485 changes: 402 additions & 83 deletions crates/socket-patch-cli/CLI_CONTRACT.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions crates/socket-patch-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ glob = { workspace = true }
tempfile = { workspace = true }

[target.'cfg(unix)'.dependencies]
# main.rs restores the default SIGPIPE disposition so piped invocations
# (`socket-patch scan | head -1`) die quietly instead of panicking.
# interrupt.rs installs the signal handlers that remove a held lock, and
# keeps SIGPIPE ignored so a closed output pipe cannot end a run mid-write.
libc = { workspace = true }

[target.'cfg(windows)'.dependencies]
Expand Down
Loading
Loading