Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Go to file
renovate[bot] 01284c261c
Update Rust crate sqlx to v0.8.1 [SECURITY] (#17064)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [sqlx](https://togithub.com/launchbadge/sqlx) | dev-dependencies |
patch | `0.8.0` -> `0.8.1` |
| [sqlx](https://togithub.com/launchbadge/sqlx) | dependencies | patch |
`0.8.0` -> `0.8.1` |

### GitHub Vulnerability Alerts

####
[GHSA-xmrp-424f-vfpx](https://togithub.com/launchbadge/sqlx/issues/3440)

The following presentation at this year's DEF CON was brought to our
attention on the SQLx Discord:

> SQL Injection isn't Dead: Smuggling Queries at the Protocol Level  
>
<http://web.archive.org/web/20240812130923/https://media.defcon.org/DEF%20CON%2032/DEF%20CON%2032%20presentations/DEF%20CON%2032%20-%20Paul%20Gerste%20-%20SQL%20Injection%20Isn't%20Dead%20Smuggling%20Queries%20at%20the%20Protocol%20Level.pdf>
> (Archive link for posterity.)

Essentially, encoding a value larger than 4GiB can cause the length
prefix in the protocol to overflow,
causing the server to interpret the rest of the string as binary
protocol commands or other data.

It appears SQLx _does_ perform truncating casts in a way that could be
problematic,
for example:
<6f2905695b/sqlx-postgres/src/arguments.rs (L163)>

This code has existed essentially since the beginning, 
so it is reasonable to assume that all published versions `<= 0.8.0` are
affected.

## Mitigation

As always, you should make sure your application is validating
untrustworthy user input.
Reject any input over 4 GiB, or any input that could _encode_ to a
string longer than 4 GiB.
Dynamically built queries are also potentially problematic if it pushes
the message size over this 4 GiB bound.


[`Encode::size_hint()`](https://docs.rs/sqlx/latest/sqlx/trait.Encode.html#method.size_hint)
can be used for sanity checks, but do not assume that the size returned
is accurate.
For example, the `Json<T>` and `Text<T>` adapters have no reasonable way
to predict or estimate the final encoded size,
so they just return `size_of::<T>()` instead.

For web application backends, consider adding some middleware that
limits the size of request bodies by default.

## Resolution

Work has started on a branch to add `#[deny]` directives for the
following Clippy lints:

*
[`cast_possible_truncation`](https://rust-lang.github.io/rust-clippy/master/#/cast_possible_truncation)
*
[`cast_possible_wrap`](https://rust-lang.github.io/rust-clippy/master/#/cast_possible_wrap)
*
[`cast_sign_loss`](https://rust-lang.github.io/rust-clippy/master/#/cast_sign_loss)

and to manually audit the code that they flag.

A fix is expected to be included in the `0.8.1` release (still WIP as of
writing).

---

### Release Notes

<details>
<summary>launchbadge/sqlx (sqlx)</summary>

###
[`v0.8.1`](https://togithub.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#081---2024-08-23)

[Compare
Source](https://togithub.com/launchbadge/sqlx/compare/v0.8.0...v0.8.1)

16 pull requests were merged this release cycle.

This release contains a fix for [RUSTSEC-2024-0363].

Postgres users are advised to upgrade ASAP as a possible exploit has
been demonstrated:
[#&#8203;3440
(comment)](https://togithub.com/launchbadge/sqlx/issues/3440#issuecomment-2307956901)

MySQL and SQLite do not *appear* to be exploitable, but upgrading is
recommended nonetheless.

##### Added

- \[[#&#8203;3421]]: correct spelling of
`MySqlConnectOptions::no_engine_substitution()`
\[\[[@&#8203;kolinfluence](https://togithub.com/kolinfluence)]]
- Deprecates `MySqlConnectOptions::no_engine_subsitution()` (oops) in
favor of the correctly spelled version.

##### Changed

- \[[#&#8203;3376]]: doc: hide `spec_error` module
\[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- This is a helper module for the macros and was not meant to be
exposed.
- It is not expected to receive any breaking changes for the 0.8.x
release, but is not designed as a public API.
        Use at your own risk.
- \[[#&#8203;3382]]: feat: bumped to `libsqlite3-sys=0.30.1` to support
sqlite 3.46
\[\[[@&#8203;CommanderStorm](https://togithub.com/CommanderStorm)]]
- \[[#&#8203;3385]]: chore(examples):Migrated the pg-chat example to
ratatui
\[\[[@&#8203;CommanderStorm](https://togithub.com/CommanderStorm)]]
- \[[#&#8203;3399]]: Upgrade to rustls 0.23
\[\[[@&#8203;djc](https://togithub.com/djc)]]
- RusTLS now has pluggable cryptography providers: `ring` (the existing
implementation),
        and `aws-lc-rs` which has optional FIPS certification.
- The existing features activating RusTLS (`runtime-tokio-rustls`,
`runtime-async-std-rustls`, `tls-rustls`)
enable the `ring` provider of RusTLS to match the existing behavior so
this *should not* be a breaking change.
- Switch to the `tls-rustls-aws-lc-rs` feature to use the `aws-lc-rs`
provider.
- If using `runtime-tokio-rustls` or `runtime-async-std-rustls`,
this will necessitate switching to the appropriate non-legacy runtime
feature:
            `runtime-tokio` or `runtime-async-std`
- See the RusTLS README for more details:
<https://github.com/rustls/rustls?tab=readme-ov-file#cryptography-providers>

##### Fixed

- \[[#&#8203;2786]]: fix(sqlx-cli): do not clean sqlx during prepare
\[\[[@&#8203;cycraig](https://togithub.com/cycraig)]]
- \[[#&#8203;3354]]: sqlite: fix inconsistent read-after-write
\[\[[@&#8203;ckampfe](https://togithub.com/ckampfe)]]
- \[[#&#8203;3371]]: Fix encoding and decoding of MySQL enums in
`sqlx::Type` \[\[[@&#8203;alu](https://togithub.com/alu)]]
- \[[#&#8203;3374]]: fix: usage of `node12` in `SQLx` action
\[\[[@&#8203;hamirmahal](https://togithub.com/hamirmahal)]]
- \[[#&#8203;3380]]: chore: replace structopt with clap in examples
\[\[[@&#8203;tottoto](https://togithub.com/tottoto)]]
- \[[#&#8203;3381]]: Fix CI after Rust 1.80, remove dead feature
references \[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- \[[#&#8203;3384]]: chore(tests): fixed deprecation warnings
\[\[[@&#8203;CommanderStorm](https://togithub.com/CommanderStorm)]]
- \[[#&#8203;3386]]: fix(dependencys):bumped cargo_metadata to `v0.18.1`
to avoid yanked `v0.14.3`
\[\[[@&#8203;CommanderStorm](https://togithub.com/CommanderStorm)]]
- \[[#&#8203;3389]]: fix(cli): typo in error for required DB URL
\[\[[@&#8203;ods](https://togithub.com/ods)]]
- \[[#&#8203;3417]]: Update version to 0.8 in README
\[\[[@&#8203;soucosmo](https://togithub.com/soucosmo)]]
- \[[#&#8203;3441]]: fix: audit protocol handling
\[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- This addresses [RUSTSEC-2024-0363] and includes regression tests for
MySQL, Postgres and SQLite.

[#&#8203;2786]: https://togithub.com/launchbadge/sqlx/pull/2786

[#&#8203;3354]: https://togithub.com/launchbadge/sqlx/pull/3354

[#&#8203;3371]: https://togithub.com/launchbadge/sqlx/pull/3371

[#&#8203;3374]: https://togithub.com/launchbadge/sqlx/pull/3374

[#&#8203;3376]: https://togithub.com/launchbadge/sqlx/pull/3376

[#&#8203;3380]: https://togithub.com/launchbadge/sqlx/pull/3380

[#&#8203;3381]: https://togithub.com/launchbadge/sqlx/pull/3381

[#&#8203;3382]: https://togithub.com/launchbadge/sqlx/pull/3382

[#&#8203;3384]: https://togithub.com/launchbadge/sqlx/pull/3384

[#&#8203;3385]: https://togithub.com/launchbadge/sqlx/pull/3385

[#&#8203;3386]: https://togithub.com/launchbadge/sqlx/pull/3386

[#&#8203;3389]: https://togithub.com/launchbadge/sqlx/pull/3389

[#&#8203;3399]: https://togithub.com/launchbadge/sqlx/pull/3399

[#&#8203;3417]: https://togithub.com/launchbadge/sqlx/pull/3417

[#&#8203;3421]: https://togithub.com/launchbadge/sqlx/pull/3421

[#&#8203;3441]: https://togithub.com/launchbadge/sqlx/pull/3441

[RUSTSEC-2024-0363]:
https://rustsec.org/advisories/RUSTSEC-2024-0363.html

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "" in timezone America/New_York,
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41Ni4wIiwidXBkYXRlZEluVmVyIjoiMzguNTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-29 08:34:08 -04:00
.cargo windows: Bump windows-rs version (#14719) 2024-07-25 10:41:59 -07:00
.cloudflare docs: Black-hole zombie pages 2024-08-20 21:37:41 -04:00
.config tests: Test 'db' package sequentially (#2654) 2023-06-28 15:00:43 +02:00
.github Pin actions/github-script action to 60a0d83 (#17023) 2024-08-28 15:42:31 -04:00
.zed A set of small fixes (#16849) 2024-08-26 02:24:08 +03:00
assets Set *_font_fallbacks default to None (#16941) 2024-08-28 22:30:46 -07:00
crates context_servers: Add ability to provide labels for prompt outputs (#17077) 2024-08-29 08:13:03 -04:00
docs docs: Link to docs for individual settings from "Configuring Languages" (#17082) 2024-08-29 08:31:49 -04:00
extensions terraform: Add outline queries (#16945) 2024-08-28 21:51:08 -07:00
legal Update Terms and Conditions (#16478) 2024-08-19 17:08:46 -04:00
nix nix: Fix gpu-lib/wayland binary patching on nix package (#16958) 2024-08-27 12:24:42 -04:00
script Don't use a mix of tabs and spaces (#17045) 2024-08-28 19:25:19 -04:00
tooling/xtask xtask: Add command for checking packages conform to certain standards (#15236) 2024-07-25 19:20:08 -04:00
.dockerignore Update .dockerignore (#14016) 2024-07-09 16:27:55 -04:00
.git-blame-ignore-revs More ignorable commits (#14596) 2024-07-16 17:09:50 -04:00
.gitattributes Prevent GitHub from displaying comments within JSON files as errors (#7043) 2024-01-29 23:11:25 -05:00
.gitignore Add the ability to store secret dev-only env vars in .env.secret.toml (#15557) 2024-07-31 12:41:09 -07:00
.mailmap Update .mailmap (#16640) 2024-08-21 18:51:58 -04:00
Cargo.lock Update Rust crate sqlx to v0.8.1 [SECURITY] (#17064) 2024-08-29 08:34:08 -04:00
Cargo.toml Update Rust crate itertools to v0.13.0 (#17048) 2024-08-28 22:13:35 -07:00
CODE_OF_CONDUCT.md Add CODE_OF_CONDUCT.md (#4239) 2024-01-23 22:31:39 -05:00
compose.yml Add Postgrest to Docker Compose (#16498) 2024-08-19 20:50:45 -04:00
CONTRIBUTING.md Update extension docs link in CONTRIBUTING.md (#17074) 2024-08-29 14:27:41 +03:00
debug.plist WIP 2023-12-14 09:25:14 -07:00
default.nix Add zed-editor package and overlay to flake (#16783) 2024-08-26 11:10:34 -04:00
docker-compose.sql collab: Setup database for LLM service (#15882) 2024-08-06 17:18:08 -04:00
Dockerfile collab: Setup database for LLM service (#15882) 2024-08-06 17:18:08 -04:00
flake.lock nix: Fix gpu-lib/wayland binary patching on nix package (#16958) 2024-08-27 12:24:42 -04:00
flake.nix nix: Fix gpu-lib/wayland binary patching on nix package (#16958) 2024-08-27 12:24:42 -04:00
LICENSE-AGPL chore: Add crate licenses. (#4158) 2024-01-23 16:56:22 +01:00
LICENSE-APACHE chore: Add crate licenses. (#4158) 2024-01-23 16:56:22 +01:00
LICENSE-GPL Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
livekit.yaml Add LiveKit server to Docker Compose (#7907) 2024-02-16 10:49:48 -05:00
Procfile Refactor: Restructure collab main function to prepare for new subcommand: serve llm (#15824) 2024-08-05 12:07:38 -07:00
Procfile.postgrest Fix llm queries (#16006) 2024-08-08 17:21:38 -07:00
README.md Update README.md 2024-07-09 14:05:29 -07:00
renovate.json renovate: Fix wasmtime package prefix 2024-07-25 11:45:14 -04:00
rust-toolchain.toml chore: Bump Rust version to 1.80 (#15186) 2024-07-25 22:48:42 +02:00
shell.nix Add zed-editor package and overlay to flake (#16783) 2024-08-26 11:10:34 -04:00
typos.toml Promote package suggestions to a first-class concept on IndexedDocsProviders (#16177) 2024-08-13 16:01:58 -04:00

Zed

CI

Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.


Installation

Packaging status

On macOS and Linux you can download Zed directly or install Zed via your local package manager.

Other platforms are not yet available:

Developing Zed

Contributing

See CONTRIBUTING.md for ways you can contribute to Zed.

Also... we're hiring! Check out our jobs page for open roles.

Licensing

License information for third party dependencies must be correctly provided for CI to pass.

We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:

  • Is it showing a no license specified error for a crate you've created? If so, add publish = false under [package] in your crate's Cargo.toml.
  • Is the error failed to satisfy license requirements for a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to the accepted array in script/licenses/zed-licenses.toml.
  • Is cargo-about unable to find the license for a dependency? If so, add a clarification field at the end of script/licenses/zed-licenses.toml, as specified in the cargo-about book.