惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
Cisco Blogs
Cyberwarzone
Cyberwarzone
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
SecWiki News
SecWiki News
Martin Fowler
Martin Fowler
T
Tor Project blog
N
Netflix TechBlog - Medium
C
Cybersecurity and Infrastructure Security Agency CISA
V
Vulnerabilities – Threatpost
V
Visual Studio Blog
GbyAI
GbyAI
PCI Perspectives
PCI Perspectives
D
DataBreaches.Net
Jina AI
Jina AI
H
Heimdal Security Blog
云风的 BLOG
云风的 BLOG
P
Privacy International News Feed
A
About on SuperTechFans
J
Java Code Geeks
美团技术团队
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
News | PayPal Newsroom
有赞技术团队
有赞技术团队
MyScale Blog
MyScale Blog
博客园 - 司徒正美
C
Check Point Blog
T
Threat Research - Cisco Blogs
Attack and Defense Labs
Attack and Defense Labs
宝玉的分享
宝玉的分享
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
C
Cyber Attacks, Cyber Crime and Cyber Security
I
Intezer
P
Proofpoint News Feed
Blog — PlanetScale
Blog — PlanetScale
Apple Machine Learning Research
Apple Machine Learning Research
Hugging Face - Blog
Hugging Face - Blog
The Last Watchdog
The Last Watchdog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Vercel News
Vercel News
I
InfoQ
阮一峰的网络日志
阮一峰的网络日志
Cisco Talos Blog
Cisco Talos Blog
W
WeLiveSecurity
Hacker News: Ask HN
Hacker News: Ask HN
Recent Commits to openclaw:main
Recent Commits to openclaw:main
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
D
Docker
博客园 - Franky
Security Archives - TechRepublic
Security Archives - TechRepublic

Hacker News - Newest: "AI"

AI can't read an investor deck AI as an attorney? Student uses ChatGPT, Gemini to sue UW over alleged racial discrimination Hacking MCP Servers in AI Systems – The Rug Pull: Tool Changes After Approval GitHub - MeepCastana/KubeezCut: Free Web based video editor GitHub - GenAI-Gurus/awesome-eu-ai-act: Curated tools, official sources, OSS, templates, and guides for EU AI Act compliance. Can AI judge journalism? A Thiel-backed startup says yes, even if it risks chilling whistleblowers Coming soon: 10 Things That Matter in AI Right Now DARPA built an AI to fact-check enemy weapons claims What explains heterogeneity in AI adoption? When AI Meets Muscle: Context-Aware Electrical Stimulation Promises a New Way to Guide Human Movements - Department of Computer Science AI Changed How We Build. It Did Not Change What Matters. Linux rules on using AI-generated code - Copilot is OK, but humans must take 'full responsibility for the… Meta spins up AI version of Mark Zuckerberg to engage with employees Code Mode: Let Your AI Write Programs, Not Just Call Tools | TanStack Blog GitHub - Delavalom/graft: Go framework for building AI agents. Type-safe tools, multi-provider (OpenAI, Anthropic, Gemini, Bedrock), zero vendor SDKs. India's TCS tops estimates, says new AI models did not dent services demand Gen Z's fading AI hype Strong feeling: we are in a folded AI reality GitHub - machinarii/total-recall-catalog: A reference catalog of latest knowledge retrieval, memory & RAG systems GitHub - mensfeld/code-on-incus: Give each AI agent its own isolated machine with root, Docker, and systemd. Active defense detects and stops threats automatically.. Quantization, LoRA, and the 8% Problem: Benchmarking Local LLMs for Production AI Iran war: We spoke to the man making Lego-style AI videos that experts say are powerful propaganda Powell, Bessent discussed Anthropic's Mythos AI cyber threat with major U.S. banks GitHub - immartian/bellamem: Persistent belief-graph memory for AI agents. Retrieves decisive context by importance — not recency, not RAG, not /compact. recursive-mode: The Repo-Native Operating System for AI Engineering After the attack on Sam Altman's home, will AI CEO's go on the offensive? The biggest advance in AI since the LLM Opus 4.6 vs GPT 5.4 One Prompt Unity World Generation Test “AI polls” are fake polls Client Challenge Can AI be a 'child of God'? Inside Anthropic's meeting with Christian leaders How to Switch AI Chatbots and Why You Might Want To GitHub - MattMessinger1/agentic_refund_guardrail: Safe refund policy layer for AI agents — Python + TypeScript. Same behavior, shared tests. Adam/papers/emergent_values_whitepaper.md at master · strangeadvancedmarketing/Adam Ask HN: How do you stop playing 20 questions with your AI coding tools How far can automation and AI support psychotherapy? - @theU GitHub - stagas/rtdiff: realtime git diff gui and AI-assisted commits A Mac Studio for Local AI — 6 Months Later A History of the Early Years of AI at the University of Edinburgh Why AI Coding Tools Still Feel Stuck on Localhost MSN AI Datacenters Are Becoming Strategic Targets twitter.com Penn Researchers Use AI to Surface Unreported GLP-1 Side Effects in Reddit Posts Show HN: MoodSense AI (ML and FastAPI and Gradio, Deployed on Hugging Face) Moodsense Ai - a Hugging Face Space by aman179102 AI models are terrible at betting on soccer—especially xAI Grok GitHub - xialeistudio/echoic GitHub - HimashaHerath/github-dev-wrapped: AI-powered weekly GitHub activity reports deployed to GitHub Pages GitHub - alejandrobalderas/claude-code-from-source: Architecture, patterns & internals of Anthropic's AI coding agent — reverse-engineered from source maps AI and Tech brief: Ireland ascendant GitHub - Titovilal/context0: Context0 - Never Surrender Training for a Marathon with an AI Coach: What Worked and What Didn't Cyber Pulse: Agentic Intel - Apps on Google Play I Built an AI PR Reviewer That Catches Bugs by Not Looking for Bugs Gen Z workers are so fearful AI will take their job they’re intentionally sabotaging their company’s AI rollout | Fortune How AI Is Reimagining the Game of Golf–For Both Players and Courses GitHub - nattergabriel/reseed: A CLI tool for managing and distributing agent skills across projects Is SVG the final frontier? My AI workflow evolved from prompts to a near-autonomous workflow MLSharp Help - 3DGS Viewer & Generator I put my cognitive field based AI's runtime on GitHub Is Numble the first AI-proof game? A3: Kubernetes for autonomous AI agent fleets | Emergent Principles Deepali Vyas ("The Elite Recruiter") GitHub - msmarkgu/RelayFreeLLM: A restful API designed to route user prompts to various AI model providers. Unionized ProPublica staff are on strike over AI, layoffs, and wages Unleashing the Advantage of Quantum AI We're heading for an AI-fueled 'dementia crisis,' brain scientist warns The AI-Assisted Breach of Mexico's Government Infrastructure [pdf] GitHub - stef41/lmscan: 🔍 Detect AI-generated text and fingerprint which LLM wrote it. Open-source GPTZero alternative. Zero dependencies, works offline. MSN GitHub - visionscaper/collabmem: Enabling long-term collaboration with Agentic AI - building up episodic and world model memory over time with in-context awareness We gave an AI a 3 year retail lease in SF and asked it to make a profit | Andon Labs AI Code is Hollowing Out Open Source, and Maintainers are Looking the Other Way What leaked "SteamGPT" files could mean for the PC gaming platform's use of AI AI is the boss at this retail store. What could go wrong? GitHub - Wuzu11517/agentic-proxy: Local proxy meant to help reduce With Drones, Geophysics and ArtificiaI Intelligence, Researchers Prepare to Do Battle Against Land Mines A Single Operator, Two AI Platforms, Nine Government Agencies: The Full Technical Report 在 Steam 上购买 FriedrichAI: Offline AI 立省 10% GitHub - inevolin/resume-cli: Hit Claude usage limits? Resume any AI coding session elsewhere. Switch tools at zero friction. GitHub - atripati/ark: AI Runtime Kernel — a context operating system for AI agents. Eliminates tool bloat, loads only what’s needed, and gives LLMs their reasoning space back. How to Build a Secure AI PR Reviewer with Claude, GitHub Actions, and JavaScript This Startup Wants You to Pay Up to Talk With AI Versions of Human Experts Intel Arc Pro B70 Brings 32GB VRAM to Local AI for $949 WordPress 7.0: The Good, the AI, and the Still Missing AI on the couch: Anthropic gives Claude 20 hours of psychiatry IatroBench: Pre-Registered Evidence of Iatrogenic Harm from AI Safety Measures AI Agents Know About Supabase. They Don't Always Use It Right. The history and future of AI at Google, with Sundar Pichai Inside an AI‑enabled device code phishing campaign How Meta Used AI to Map Tribal Knowledge in Large-Scale Data Pipelines AI for Systems: Using LLMs to Optimize Database Query Execution Forecasting the Economic Effects of AI Introducing Tinker: Play with AI, bring your ideas to life AI sheds light on an ancient gaming mystery People really hate AI but not as much as Iran—or Democrats | Fortune What is an AI Product Engineer? Phoebe Gates wants her $185 million AI startup to succeed with 'no ties to my privilege or my last name': 'I have a chip on my shoulder' | Fortune
GitHub - bugthesystem/agentjail: Minimal Linux sandboxes for running untrusted code. Built for AI agents, build systems, and any scenario where you need to execute code you didn't write.
bugthesystem · 2026-04-28 · via Hacker News - Newest: "AI"

agentjail

Minimal Linux sandboxes for running untrusted code.


A Rust library plus optional control plane. One jail is one child process inside a fresh set of Linux namespaces, pivot-rooted into a minimal filesystem, seccomp-filtered, cgroup-limited, and optionally walled behind an egress-proxy allowlist. No VM. No daemon. No setuid helper.

Status — beta. The core crate (crates/agentjail) is the load-bearing piece and is covered by a privileged test suite (make test-rust-privileged). The control plane, TypeScript/Python SDKs, web UI, and gateway are useful but not yet production-hardened. Pin a version, read the threat model, then depend on it.

Isolation

  • Namespaces — mount, network, IPC, PID; optionally user.
  • Filesystempivot_root onto a bind-mounted, 128-bit-random temp root; old root is umount2(MNT_DETACH)-ed. Minimal /bin, /lib, /usr binds; tmpfs /etc with just what dynamic linking and DNS need. Landlock on Linux ≥ 5.13 (hard-fail if enabled on a kernel that lacks it).
  • NetworkNone, Loopback, or Allowlist(domains). Allowlist mode routes through an in-process HTTP CONNECT proxy that resolves the hostname once, rejects private/link-local/loopback/CGNAT IPs, and connects to the resolved address (not the hostname) to close DNS rebinding. Veth pair configured via netlink; no ip binary.
  • Syscalls — seccomp-BPF blocklist (Standard / Strict). Blocks namespace, mount, module, keyring, BPF, perf, io_uring, chroot, name_to_handle_at, ptrace, personality, clone3, mount_setattr, memfd_create, fanotify_init, quotactl, syslog; argument-filters ioctl(*, TIOCSTI, …) and socket(AF_NETLINK|AF_PACKET|AF_VSOCK, …).
  • PrivilegesPR_SET_NO_NEW_PRIVS, close_range(3, ~0, CLOEXEC) before exec, full bounding-set drop + SECBIT_NOROOT_LOCKED | SECBIT_NO_SETUID_FIXUP_LOCKED + capset zeroing every effective, permitted, and inheritable capability, in the grandchild after /proc is remounted in the new PID namespace.
  • Resources — memory / CPU / PIDs / disk I/O via cgroup v2, gated by a barrier pipe: the child blocks until the parent has assigned the cgroup, so there is no unconstrained startup window.

Requirements

  • Linux ≥ 5.13, cgroup v2, user namespaces.
  • Rust 1.85+ (edition 2024).
  • CAP_NET_ADMIN — Allowlist mode only (veth + netlink).

Use

[dependencies]
agentjail = "0.1"
tokio = { version = "1", features = ["rt", "macros"] }
use agentjail::{Jail, preset_build};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let jail = Jail::new(preset_build("./src", "./out"))?;
    let out  = jail.run("npm", &["run", "build"]).await?;
    println!("exit={} oom={}", out.exit_code, out.oom_killed);
    Ok(())
}

Presets

Preset Network Memory Timeout
preset_build None 512 MB 600 s
preset_install Allowlist 512 MB 600 s
preset_agent None 256 MB 300 s
preset_gpu None 8 GB 3600 s
preset_dev Loopback 1 GB 3600 s

preset_install requires explicit domains:

preset_install("./src", "./out", vec![
    "registry.npmjs.org".into(),
    "registry.yarnpkg.com".into(),
])

Config

use agentjail::{Jail, JailConfig, Network, SeccompLevel};

let jail = Jail::new(JailConfig {
    source:       "/code".into(),       // read-only at /workspace
    output:       "/artifacts".into(),  // read-write at /output
    network:      Network::None,
    seccomp:      SeccompLevel::Standard,
    memory_mb:    512,
    cpu_percent:  100,                  // 100 = 1 core
    max_pids:     64,
    io_read_mbps: 100,
    io_write_mbps: 50,
    timeout_secs: 300,
    ..Default::default()
})?;

Network

Network::Allowlist(vec![
    "api.anthropic.com".into(),
    "registry.npmjs.org".into(),
    "*.mcp.example.com".into(),
])

The proxy validates the hostname against the allowlist, resolves it via DNS, filters every private/loopback/link-local/CGNAT/test-net address, and connects to the remaining routable IP. TLS passes through unchanged (HTTPS, SSE, WebSocket).

GPU (experimental)

Exposes the NVIDIA kernel-driver attack surface. Trusted workloads only.

JailConfig { gpu: GpuConfig { enabled: true, devices: vec![0] },
             ..Default::default() }

Resource monitoring

let handle = jail.spawn("npm", &["run", "build"])?;
if let Some(s) = handle.stats() {
    println!("mem {} / peak {} MB  pids {}",
        s.memory_current_bytes / 1_048_576,
        s.memory_peak_bytes    / 1_048_576,
        s.pids_current);
}
let out = handle.wait().await?;
if out.oom_killed { eprintln!("OOM"); }

Events

let (_handle, mut rx) = jail.spawn_with_events("npm", &["run", "build"])?;
while let Some(ev) = rx.recv().await {
    match ev {
        JailEvent::Stdout(l)        => println!("{l}"),
        JailEvent::Stderr(l)        => eprintln!("{l}"),
        JailEvent::OomKilled        => eprintln!("OOM"),
        JailEvent::Completed { .. } => break,
        _ => {}
    }
}

Snapshots and live forks

let snap = Snapshot::create(&output, &snapshot_dir)?;
snap.restore()?;

// Clone a running jail's output without pausing it (reflink on btrfs/xfs,
// fallback to regular copy elsewhere; the jail is frozen sub-millisecond
// via the cgroup freezer for the clone's duration).
let handle = jail.spawn("python", &["train.py"])?;
let (forked, _info) = jail.live_fork(Some(&handle), "/tmp/fork-out")?;

Snapshots restored through the incremental pool strip S_ISUID / S_ISGID bits and reject manifest entries with absolute or .. paths.

Verified threat model

Each row links to the regression test that would fail if the protection ever did. All tests live in crates/agentjail/tests/.

Attack Protection Test
Read host ~/.ssh / ~/.aws Not mounted test_cannot_read_ssh_keys
Read /etc/shadow, machine-id Minimal /etc test_etc_shadow_not_accessible
Network exfiltration Netns + allowlist proxy test_network_none_blocks_external, test_reverse_shell_blocked
Fork bomb PID limit test_pid_limit_blocks_fork_bomb
Memory blow-up Memory limit + OOM detection test_large_stdout_does_not_oom
Disk thrashing I/O bandwidth limits test_io_write_bandwidth_limit_enforced
Signal host processes PID namespace test_pid_namespace_full_sandbox
Mount manipulation mount + new mount API blocked seccomp_standard_blocks_documented_syscalls
chroot escape pivot_root + detach; chroot seccomp-blocked test_chroot_no_home
io_uring bypass io_uring_* blocked seccomp_standard_blocks_documented_syscalls
Compat-mode escape personality() blocked seccomp_standard_blocks_documented_syscalls
Namespace escape clone3, unshare, setns blocked test_seccomp_blocks_unshare
BPF / perf bpf, perf_event_open, userfaultfd blocked test_seccomp_blocks_bpf
Executable memory memfd_create blocked seccomp_standard_blocks_documented_syscalls
Write + exec on /tmp NOEXEC test_tmp_noexec
Setuid escalation PR_SET_NO_NEW_PRIVS
Core-dump leak RLIMIT_CORE=0 test_rlimit_core_disabled
Parent stdout OOM Output capped at 256 MiB per stream test_large_stdout_does_not_oom
FD exhaustion RLIMIT_NOFILE at 4096 test_fd_limit_enforced
Symlink traversal Skipped in snapshots, forks, cleanup test_snapshot_restore_does_not_follow_symlinks
Zombie / fd leak PR_SET_PDEATHSIG + Drop kills+reaps test_no_zombie_after_drop
Cross-tenant read tenant_id stamped on every row; list filters, get returns 404 operator_cannot_read_other_tenants_workspace_by_id, credentials_are_tenant_scoped
Token spent on foreign tenant's bill TokenRecord.tenant_id; proxy looks up keys.get(tenant, service) agentjail-phantom
Malicious .gitmodules / core.sshCommand RCE on host Clone-jail: strict-ish seccomp, allowlist network, no host access clone_jail_clones_a_small_public_repo
Operator enumerates platform bind addrs / state_dir via GET /v1/config Admin-only fields; omitted for operator role settings_bind_addrs_hidden_from_operators
Snapshot rehydrate spoofing (id guessing) Requires parent_workspace_id, verified against the snapshot's recorded parent from_snapshot_requires_and_checks_parent_workspace_id

Limits

  • Linux-only. Not a VM; a kernel exploit escapes. For stronger isolation pair with gVisor or run inside a Firecracker microVM.
  • GPU mode widens the attack surface to the NVIDIA driver.
  • Allowlist mode costs one veth pair per concurrent jail; stale interfaces are reaped at agentjail-server startup via cleanup_stale_veths().

Control plane

An optional HTTP server (agentjail-server) sits in front of the library: phantom-token credential broker, jail/workspace/snapshot ledgers in Postgres, an SSE stream of upstream API calls, and a web UI. Installed pre-release; APIs may move. Useful for local dev, demos, and staging.

Tenancy

Every workspace, snapshot, session, jail-ledger row, and upstream credential is stamped with a tenant_id. API keys carry it plus a role:

token@tenant:role            # role ∈ { admin, operator }

Operators see only their own tenant. Admins see every tenant and can target a specific one via ?tenant=<id>. Cross-tenant direct-id access returns 404, never 403 — the server never reveals whether a row outside the caller's scope exists.

# Multiple keys, comma-separated. Every component is mandatory; a
# misconfigured entry fails loud rather than silently granting admin.
export AGENTJAIL_API_KEY="\
  ak_ops@platform:admin,\
  ak_acme_alice@acme:operator,\
  ak_globex_ops@globex:operator"
docker compose -f docker-compose.platform.yml up --build
# UI:  http://localhost:3000/t/<tenant>
# API: http://localhost:7000

See docs/tenancy.md for the full key format, role semantics, DB shape, and test coverage.

Flavors

Runtime "flavors" (nodejs, python, bun, …) are host directories under $state_dir/flavors/<name>/ bind-mounted read-only into each jail at /opt/flavors/<name>/, with bin/ auto-prepended to PATH. The jail engine stays language-agnostic — adding deno or ruby is a matter of dropping a directory, not touching core code.

POST /v1/workspaces
{ "flavors": ["nodejs", "python"] }

Discovery: GET /v1/flavors returns names only (host paths stay admin-internal). See docs/flavors.md.

Clone-jail

git clone runs inside its own short-lived jail by default — strict-ish seccomp, per-repo network allowlist, 60 s timeout, no host access. A malicious .gitmodules or core.sshCommand can't reach anything outside the target dir. Opt back into the old host-side path on restricted container runtimes:

export AGENTJAIL_CLONE_MODE=host   # default is `jail`

Surface

  • Identity: GET /v1/whoami · GET /v1/flavors
  • Credentials (per-tenant): POST /v1/credentials · GET /v1/credentials · DELETE /v1/credentials/:service (all accept ?tenant=<id> for admins)
  • Sessions: POST /v1/sessions · POST /v1/sessions/:id/exec
  • Runs: POST /v1/runs (/fork, /stream)
  • Workspaces: POST /v1/workspaces (/fork, /exec) · PATCH /v1/workspaces/:id · POST /v1/workspaces/:id/snapshot · POST /v1/workspaces/from-snapshot (requires parent_workspace_id)
  • Lists (tenant-filtered): GET /v1/workspaces · GET /v1/snapshots · GET /v1/sessions · GET /v1/jails · GET /v1/audit
  • Detail: GET /v1/snapshots/:id/manifest · GET /v1/jails/:id · GET /v1/config (bind-addrs + state_dir admin-only)

Web UI

control plane

React 19 + Vite + Tailwind. Every dashboard page lives at /t/:tenant/... so the active tenant is visible + bookmarkable; the shell header shows a tenant + role badge. Pages: Dashboard, Projects, API Sessions, Integrations, Playground, Docs. Operator tools behind an Advanced menu: Execution Ledger, Snapshots, API Audit, Accounts, System Settings. Admins browsing another tenant via URL see a cross-tenant view chip on sensitive pages.

TypeScript SDK

@agentjail/sdk — zero deps, Node ≥ 18. Sandboxes never see real API keys: they get phantom tokens (phm_<hex>) plus *_BASE_URL env vars pointing at the proxy.

import { Agentjail } from "@agentjail/sdk";

const aj = new Agentjail({
  baseUrl: "http://localhost:7000",
  apiKey:  process.env.AGENTJAIL_API_KEY!,
});

await aj.credentials.put({ service: "openai", secret: process.env.OPENAI_API_KEY! });

const result = await aj.runs.create({ code: "print('hi')", language: "python" });

for await (const ev of aj.runs.stream({ code, language: "python" })) {
  if (ev.type === "stdout") process.stdout.write(ev.line + "\n");
}

const session = await aj.sessions.create({
  services: ["openai", "github"],
  scopes:   { github: ["/repos/my-org/*"] },
  ttlSecs:  600,
});
spawn("node", ["agent.js"], { env: { ...process.env, ...session.env } });

Surface: credentials, sessions, runs (create / fork / stream), workspaces, snapshots, jails, audit. Reference: packages/sdk-node/README.md.

Python SDK

agentjail — Python ≥ 3.10, depends on httpx. Symmetrical with the Node SDK; see packages/sdk-python/README.md.

Build and test

make test-rust                     # low-privilege unit slice (in Docker)
make test-rust-privileged          # full security suite, --privileged Docker
make test-rust-privileged-clone    # end-to-end clone-jail + workspace-exec
                                   # pipeline (real git + two jails)
( cd packages/sdk-node    && npm test )
( cd packages/sdk-python  && pytest )
( cd web && npm run build )

GPU tests need an NVIDIA GPU + the Container Toolkit:

docker compose run --rm gpu cargo test --test gpu_test -- --nocapture

License

MIT. See LICENSE.