Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
84 lines (71 loc) · 3.12 KB
/
Copy pathCargo.toml
File metadata and controls
84 lines (71 loc) · 3.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
[package]
name = "sudo-proxy"
version = "1.2.2"
edition = "2021"
license = "MIT"
description = "Privileged command execution proxy with human approval via pkexec or sudo"
repository = "https://github.com/tarides/sudo-proxy"
homepage = "https://github.com/tarides/sudo-proxy"
readme = "README.md"
keywords = ["sudo", "pkexec", "privilege", "mcp", "ai-agent"]
categories = ["command-line-utilities", "authentication", "os::unix-apis"]
# cargo-binstall: fetch the prebuilt static binaries from GitHub Releases
# instead of compiling. The release asset is a single MUSL tarball holding
# all four binaries, named sudo-proxy-v<version>-x86_64-linux.tar.gz, with
# the binaries under a top-level directory of the same stem. Only x86_64
# Linux is published; on any other target binstall finds no `pkg-url` and
# falls back to `cargo install` (build from source).
[package.metadata.binstall]
pkg-fmt = "tgz"
bin-dir = "sudo-proxy-v{ version }-x86_64-linux/{ bin }{ binary-ext }"
[package.metadata.binstall.overrides.x86_64-unknown-linux-musl]
pkg-url = "{ repo }/releases/download/v{ version }/sudo-proxy-v{ version }-x86_64-linux.tar.gz"
[package.metadata.binstall.overrides.x86_64-unknown-linux-gnu]
pkg-url = "{ repo }/releases/download/v{ version }/sudo-proxy-v{ version }-x86_64-linux.tar.gz"
# Minisign signature verification. cargo-binstall downloads `<asset>.sig`
# alongside the tarball and verifies it against this public key before
# installing; a bad or missing signature aborts the install. The matching
# secret key is a dedicated release-signing key held only as the
# MINISIGN_SECRET_KEY GitHub Actions secret and used by .github/workflows/
# release.yml — it is never committed. Key ID A6F84B53410B83FB.
[package.metadata.binstall.signing]
algorithm = "minisign"
pubkey = "RWT7gwtBU0v4puI76u0oYwMAT9nmYwGimSOnqJJ+kHExsjTDQj1eZkMW"
[[bin]]
name = "sudo-proxy"
path = "src/bin/sudo-proxy.rs"
[[bin]]
name = "sudo-request"
path = "src/bin/sudo-request.rs"
[[bin]]
name = "pkexec-cache"
path = "src/bin/pkexec-cache.rs"
[[bin]]
name = "sudo-proxy-mcp"
path = "src/bin/sudo-proxy-mcp.rs"
required-features = ["mcp"]
[lib]
name = "sudo_proxy"
path = "src/lib.rs"
# `mcp` is on by default so `cargo install sudo-proxy` builds the
# `sudo-proxy-mcp` binary (the MCP Registry's cargo install path uses no extra
# flags). Build the core binaries alone with `--no-default-features`.
[features]
default = ["mcp"]
mcp = ["dep:rmcp", "dep:tokio", "dep:schemars"]
[lints.rust]
# `kani` is set by the Kani model checker (cargo kani), never by a normal
# build. Register it so the `-D warnings` clippy gate doesn't trip over the
# `#[cfg(kani)]` proof module. See src/proofs.rs and docs/formalisation-roadmap.md.
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(kani)'] }
[dependencies]
base64 = "0.22"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
libc = "0.2"
uuid = { version = "1", features = ["v4"] }
rmcp = { version = "0.15", features = ["transport-io"], optional = true }
tokio = { version = "1.54", features = ["macros", "rt-multi-thread", "net", "time"], optional = true }
schemars = { version = "1", optional = true }
[dev-dependencies]
tempfile = "3"