Repository navigation
Add OSS Scanner build image and threat model - #1626
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
| - `webrtc-sys/src/*.cpp`: LiveKit's C++ bridge to libwebrtc, especially | ||
| `packet_trailer*.cpp`, `av1_bitstream.cpp`, `frame_cryptor.cpp`, and the | ||
| video and audio frame-buffer bridges. | ||
| - Unsafe Rust over frame buffers: `libwebrtc/src/native/video_frame.rs`, |
There was a problem hiding this comment.
suggestion: I would broaden this: anywhere the unsafe keyword is used should be audited, especially where there is no corresponding // SAFETY: ... comment explaining why the operation is safe.
| participants. | ||
| - `livekit/src/room/e2ee/` and `livekit-datatrack/src/e2ee.rs`: key provider, | ||
| ratcheting, and encryption of media frames, data packets, and data tracks. | ||
| - `webrtc-sys/src/*.cpp`: LiveKit's C++ bridge to libwebrtc, especially |
There was a problem hiding this comment.
suggestion: One point to clarify is there are fundamentally two FFI layers in this repo: Rust → client languages and Rust → libwebrtc. The first is well covered by this doc, but the second should be explicitly called out. Any code in the libwebrc or webrtc-sys crates is relevant in this second FFI layer and should be in scope for auditing.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Devin Review found 1 potential issue.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
| # Build image for Anthropic's OSS Scanner. Keep the Rust version in step with rust-toolchain.toml. | ||
| FROM rust:1.97.1-bookworm |
There was a problem hiding this comment.
🟡 Scanner enrollment has no changeset
This PR adds Dockerfile without a changeset. Repository guidance requires one for every PR, even when no crates need a bump.
Learn more
The repository guidance requires a changeset for every PR and asks it to list crates that need a version bump. This PR only adds scanner configuration, so no crate needs a bump. The PR diff contains no new changeset.
Example: A scanner-only PR adds these two files but nothing under .changeset/. It meets the version-bump check's exemption for non-crate changes, yet misses the repository's every-PR changeset rule.
Recommended fix: Add a knope-compatible changeset under .changeset/ with a single unwrapped prose summary and no crate bumps, or reconcile the repository guidance with the CI exemption for changes that do not affect versioned crates.
Was this helpful? React with 👍 or 👎 to provide feedback.
| over WebRTC. `livekit-ffi` exposes the client to host languages in two ways: a | ||
| C ABI that takes protobuf requests (`room-apis`, used by the Python, Node, and | ||
| Unity SDKs) and UniFFI bindings (`core-modules`: data streams, data tracks, | ||
| signalling, and tokens, used from Swift and Kotlin). |
There was a problem hiding this comment.
nitpick: Swift and Kotlin and also flutter. If there are any security issues with the dart bindgen / that whole workflow those would be great to raise as part of this as well
| signalling, and tokens, used from Swift and Kotlin). | |
| signalling, and tokens, used from Swift, Kotlin, very soon Flutter - the infrastructure in this repository is set up for flutter to consume the `core-modules` livekit-ffi build, and poking holes at this is definitely in scope). |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Adds
.oss-scanner/Dockerfileand.oss-scanner/threat_model.mdso this repo can be enrolled in Anthropic's OSS Scanner. Same layout as livekit/livekit#4995. Enrollment is a separate PR toanthropics/oss-scanneronce these files are onmain.The threat model treats remote participants as untrusted and the server as untrusted for E2EE content, puts the unsafe/C++ FFI crates (
webrtc-sys,yuv-sys,soxr-sys) first, treats the host app on the other side oflivekit-ffias trusted, and leaves libwebrtc internals out of scope unless LiveKit's patches or usage cause the bug.Build notes:
git submodule update --init --recursive(libyuv, protocol).webrtc-sys-buildwould download (tag read from its source), unpacked outsidetarget/and pointed to byLK_CUSTOM_WEBRTC..github/scripts/install-clang.sh; the unused parts of the LLVM release (flang, mlir, lldb, static archives) are deleted in the same layer, taking it from ~11 GB to ~1.4 GB.tools/bindgens, the Node bindings,livekit-wakewordandlivekit-capturearen't built.Verification
docker buildof this Dockerfile (arm64, podman): builds; the baselinecargo testover the 21 listed packages pluslivekit-ffi --features core-modulespasses (0 failures).--network none --cpus 2 --memory 8g, the threat model's test commands run offline without recompiling.tools/checkfromanthropics/oss-scannerclones and builds this branch through the compile step, but my local 59 GB podman VM ran out of disk committing the test-binary layer. The scanner's build VM has 120 GB; not verified there.🤖 Generated with Claude Code