HUB
Sign inSign up
buildclamp logo

mancube/buildclamp

By mancube

•Updated 7 days ago

Static cargo-buildclamp binary (FROM scratch): capability-gated Cargo build scripts. Linux.

Image
Security
Integration & delivery
Monitoring & observability
0

89

mancube/buildclamp repository overview

⁠buildclamp

Capability-gated execution for Cargo build scripts. A build.rs runs with your privileges before anything is compiled — your SSH agent, your cloud credentials, your CI secrets. buildclamp runs each one inside limits you wrote down, so a script that reaches for the network or writes outside its own output folder fails the build instead of succeeding quietly, and the report names the kernel mechanism that held it.

Source, documentation and issues: https://github.com/lucheeseng827/buildclamp⁠

⁠What this image is

FROM scratch with one file that matters: the static cargo-buildclamp binary at /cargo-buildclamp, for linux/amd64 and linux/arm64. It is the same binary as the release tarballs on GitHub, copied in, not rebuilt. There is no shell and no package manager.

The binary carries a GitHub build-provenance attestation (on the release tarball). The image itself is not attested, so pin it by digest.

⁠Use it: copy the binary into your build image

COPY --from=mancube/buildclamp:0.2.0@sha256:3ce4b5ced1d06bca9995035974e89f62f8666d606adddbe5d21d02322005a9f2 \
     /cargo-buildclamp /usr/local/cargo/bin/

Then, in that image:

$ cargo buildclamp doctor      # what this host can actually enforce
$ cargo buildclamp observe     # runs your build, refuses nothing
$ cargo buildclamp init        # writes buildclamp.toml from what it saw
$ cargo buildclamp build       # now enforce it

Enforcement uses user namespaces, seccomp notification and Landlock, so a container needs them available to reach its enforced tiers. doctor says what it found; run it where your builds run, not on your laptop.

⁠Tags

tagmeaning
0.2.0one release, never moved
0.2the latest 0.2.x
latestthe latest non-prerelease

A moving tag is convenient and is not a pin. For a build you depend on, use the digest.

⁠What it does not do

Linux only. It holds build scripts, and proc-macro expansion when you opt in. Reads are open unless the policy opts in. It does not make running untrusted code safe; it narrows what build-time code can reach and tells you how hard each limit was held. The full list is in the README.

Apache-2.0.

Tag summary

Content type

Image

Digest

sha256:3ce4b5ced…

Size

1 MB

Last updated

7 days ago

docker pull mancube/buildclamp