Apache License 2.0

项目介绍

google/sandboxed-api 是一个托管在 GitHub 上的开源项目,主要使用 C++ 编写,采用 Apache License 2.0 许可证,目前获得 1.8k 个 Star、201 次 Fork。

仓库全名
google/sandboxed-api
开源许可证
Apache License 2.0
Star 数
1.8k
Fork 数
201
未关闭 Issue
22

README 摘要

Copyright 2019-2026 Google LLC Introduction The open-source Sandboxed API (SAPI) project builds on top of Google's Sandbox2 and aims to make sandboxing of C/C++ libraries less burdensome. Sandboxed API provides three main benefits: Instead of sandboxing entire programs or having to change source code to be able to sandbox a part of a program as with Sandbox2, individual C/C++ libraries can be sandboxed with SAPI. As…

完整内容见 GitHub 原始 README 或本页 。

常见问题

sandboxed-api 用什么语言开发?

主要使用 C++ 编写,采用 Apache License 2.0 许可证,目前有 1.8k 个 Star。

sandboxed-api 可以免费商用吗?

仓库采用 Apache License 2.0 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 sandboxed-api 的源码?

可以直接克隆仓库:git clone https://github.com/google/sandboxed-api.git,默认分支为 main;安装与运行步骤见仓库 README。

sandboxed-api 最近还在维护吗?

仓库最近一次更新为 3 天前,当前有 22 个未关闭 Issue;Star 数为 1.8k,可作为社区活跃度的参考。

简要分析

热度分
2221
价值分
1127
活跃状态
活跃

语言占比

Assembly
C
C++
CMake
Jsonnet
Python
Shell
Starlark

Release

README

CI status on GitHub

Sandboxed API lockup text with sandbox visual

Copyright 2019-2026 Google LLC

Introduction

The open-source Sandboxed API (SAPI) project builds on top of Google’s Sandbox2 and aims to make sandboxing of C/C++ libraries less burdensome.

Sandboxed API provides three main benefits:

  • Instead of sandboxing entire programs or having to change source code to be able to sandbox a part of a program as with Sandbox2, individual C/C++ libraries can be sandboxed with SAPI. As a result, the main program is isolated from code execution vulnerabilities in the C/C++ library.

  • Our working motto is: Sandbox once, use anywhere. Libraries sandboxed with Sandboxed API can be reused easily, which removes the burden for future projects. Before Sandboxed API, sandboxes available for use at Google required additional implementation work with each new instance of a project which was intended to be sandboxed, even if it reused the same software library. Sandbox2 policies and other restrictions applied to the sandboxed process had to be reimplemented each time, and data exchange mechanisms between trusted and untrusted parts of the code had to be designed from scratch.

  • Each SAPI library utilizes a tightly defined security policy, in contrast to the typical sandboxed project, where security policies must cover the total syscall/resource footprint of all utilized libraries.

Sandboxed API (SAPI) has been designed, developed, and is maintained by members of the Google Sandbox Team. It also uses our field-tested Sandbox2. Currently, many internal projects are using SAPI to isolate their production workloads.

Sandbox2 is also open-sourced as part of the SAPI project and can be used independently.

Documentation

Developer documentation is available at Sandboxed API and Sandbox2.

We recommend reading SAPI Getting Started guide, or Sandbox2 Getting Started respectively.

If you are interested in a general overview of sandboxing technologies, see https://developers.google.com/code-sandboxing.

Dependencies

SAPI and Sandbox2 both support Bazel and CMake build systems. The following dependencies are required on Debian 13 (“Trixie”):

sudo apt-get update
sudo apt-get install -qy --no-install-recommends \
      build-essential \
      clang-19 \
      git \
      gnupg \
      libcap-dev \
      libclang-19-dev \
      libclang-rt-19-dev \
      libncurses-dev \
      libzstd-dev \
      linux-libc-dev \
      llvm-19-dev \
      pkg-config \
      unzip \
      wget \
      zip \
      zlib1g-dev
# Bazel only, check https://bazel.build/install/ubuntu for details
sudo apt-get install -qy --no-install-recommends \
      bazel \
      openjdk-17-jdk-headless
# CMake only
sudo apt-get install -qy --no-install-recommends \
      cmake \
      ninja-build
LLVM

SAPI offers a clang tool header generator based on LLVM Libtooling.

We aim to provide support for at least the latest three LLVM releases and test on Debian stable.

Getting Involved

If you want to contribute, please read CONTRIBUTING.md and send us pull requests. You can also report bugs or file feature requests.

If you’d like to talk to the developers or get notified about major product updates, you may want to subscribe to our mailing list or sign up with this link.

评论

暂无评论