<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[nttlabs - Medium]]></title>
        <description><![CDATA[NTT Open Source - Medium]]></description>
        <link>https://medium.com/nttlabs?source=rss----74f667786e9f---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>nttlabs - Medium</title>
            <link>https://medium.com/nttlabs?source=rss----74f667786e9f---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 03:35:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/nttlabs" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[checkpointd: Automatic Crash Recovery of Stateful Agents from Memory Checkpoints on Kubernetes]]></title>
            <link>https://medium.com/nttlabs/checkpointd-1619ed033e05?source=rss----74f667786e9f---4</link>
            <guid isPermaLink="false">https://medium.com/p/1619ed033e05</guid>
            <category><![CDATA[a2a-protocol]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[checkpoints]]></category>
            <dc:creator><![CDATA[Kohei Tokunaga]]></dc:creator>
            <pubDate>Thu, 08 Oct 2026 11:06:54 GMT</pubDate>
            <atom:updated>2026-10-08T11:06:53.266Z</atom:updated>
            <content:encoded><![CDATA[<p>AI agents autonomously performing tasks on behalf of humans can be stateful and long-running. However, containers on Kubernetes are stateless by default and lose progress stored in memory when they crash.</p><h3>Automatic recovery of crashed agent state with checkpointd</h3><p>To solve this issue, we’ve created <a href="https://github.com/ktock/checkpointd">checkpointd</a>. It runs stateful, sandboxed agents on Kubernetes using <a href="https://github.com/agent-substrate/substrate">Agent Substrate,</a> with automatic crash recovery of agent’s state from memory checkpoints.</p><p><a href="https://github.com/ktock/checkpointd">GitHub - ktock/checkpointd: Checkpoint-based Durable Execution of Agents on Kubernetes</a></p><p>Each agent’s memory is transparently checkpointed and a crashed agent is automatically resumed from where it left off. It uses <a href="https://a2a-protocol.org/latest/">the A2A protocol</a> for agent-to-agent communication with our custom transport and the standard <a href="https://github.com/a2aproject/a2a-go">a2a-go</a> framework can be used to write agents.</p><p>Checkpointd started as a fork of <a href="https://github.com/google/ax">Agent Executor (AX)</a> and is built on <a href="https://github.com/agent-substrate/substrate">Agent Substrate</a>, with added support for crash recovery of A2A agents’ state. checkpointd is currently experimental.</p><h3>When does it checkpoint and resume an agent?</h3><p>checkpointd checkpoints and resumes agents every time they send or receive a message.</p><p>For example, the following pseudocode describes a chat agent that calls an LLM to infer a response to the client’s prompt (callLLM), asks another agent for a second opinion (askReviewerAgent) and eventually returns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*B1Fyf5wASr-nvHEgjTzA7w.png" /><figcaption>example chat agent</figcaption></figure><p>Checkpointd checkpoints and suspends this agent when it sends a message to another agent (askReviewerAgent). When this agent receives a response, checkpointd resumes it. If it crashes before sending the next message or return, it’s recovered from the checkpoint so that its progress isn’t lost.</p><h3>How does it work?</h3><p>checkpointd relies on <a href="http://github.com/agent-substrate/substrate">Agent Substrate</a> to checkpoint, resume and sandbox agents. checkpointd itself works as a message relay among A2A agents, controlling the timing of checkpointing and resumption.</p><p>checkpointd executes agents in a collaborative manner. Conceptually, checkpointd repeats the following steps for each message.</p><ol><li>Resume the message’s target agent and pass the message to the agent.</li><li>When this agent returns a new message (targeting another agent), checkpointd checkpoints and suspends the agent.</li><li>Persist this new message to the database so it survives checkpointd’s own crashes. Proceed to the next turn for this message.</li></ol><p>If the agent crashes before returning a new message, it is recovered from the last checkpoint. If checkpointd itself crashes, it restores the last message from the database and retries the last turn.</p><h3>Crash recovery demo of a chat agent</h3><p>This section describes a demo on KinD, showing that a crashed agent is recovered while preserving its state. Prerequisites are Docker, kind, kubectl, Go and git.</p><p>First, clone the checkpointd repository.</p><pre>git clone https://github.com/ktock/checkpointd<br>cd checkpointd</pre><p>Start a demo KinD cluster that runs checkpointd and the following agents.</p><ul><li>Chat agent: An agent the client can talk to. It asks the reviewer agent for a second opinion on each response.</li><li>Reviewer agent: An agent that gives the chat agent a second opinion.</li></ul><p><em>NOTE: the demo downloads </em><a href="https://huggingface.co/unsloth/Qwen3-1.7B-GGUF/blob/main/Qwen3-1.7B-Q3_K_S.gguf"><em>Qwen3 1.7B quantized by Unsloth</em></a><em> (867MB).</em></p><pre>./examples/agent-crash-demo/setup.sh</pre><p>demo.sh starts an interactive multi-turn conversation with the chat agent.</p><pre>./examples/agent-crash-demo/demo.sh</pre><p>You can input a message whenever a prompt (&gt;) appears. The chat agent has roughly a 50% chance of crashing on each turn. When it crashes, its memory including the earlier conversation history is recovered from a checkpoint.</p><p>In the following example, the agent crashed while answering “What is your name?” which was the second input in the conversation. It then recovered its state including the earlier “Hello!” greeting.</p><pre>&gt; What is your name?<br>[agent-crash-demo] running: /tmp/checkpointd-agent-crash-demo-a2a-cli.of6077et/a2a --transport jsonrpc --timeout 240s send http://127.0.0.1:39849/agents/chat-agent/ -o json --task 01a11a5d-637e-7acc-ba46-ef7ff8398aed --tenant 7dec36a4b3224048 What is your name?<br>[agent-crash-demo] Detected crash of chat-agent: &quot;panic: self-destructing agent-crash-demo&quot;<br>  reply:<br>    Assistant: I am a language model named Llama. I help users with various tasks, like answering questions, writing, and more. Let me know how I can assist you!<br>    Reviewer: The response is informative and helpful, but it could be more engaging by addressing the user directly and asking for their needs. A more personalized approach would enhance the interaction.<br>    <br>    --- conversation log from process memory ---<br>    [0]<br>    User: Hello!<br>    Assistant: Hello! How can I help you today?<br>    Reviewer: The response is appropriate and polite, but it could be more personalized by addressing the user directly. A more engaging follow-up might include a question to encourage further interaction.<br>    ------------------------<br>    [1]<br>    User: What is your name?<br>    Assistant: I am a language model named Llama. I help users with various tasks, like answering questions, writing, and more. Let me know how I can assist you!<br>    Reviewer: The response is informative and helpful, but it could be more engaging by addressing the user directly and asking for their needs. A more personalized approach would enhance the interaction.</pre><p>Finally, the following command cleans up the cluster.</p><pre>./examples/agent-crash-demo/cleanup.sh</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1619ed033e05" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nttlabs/checkpointd-1619ed033e05">checkpointd: Automatic Crash Recovery of Stateful Agents from Memory Checkpoints on Kubernetes</a> was originally published in <a href="https://medium.com/nttlabs">nttlabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Improvements to Rootless mode in Docker v29.5]]></title>
            <link>https://medium.com/nttlabs/improvements-to-rootless-mode-in-docker-v29-5-4e0347464ad0?source=rss----74f667786e9f---4</link>
            <guid isPermaLink="false">https://medium.com/p/4e0347464ad0</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[rootless]]></category>
            <category><![CDATA[user-mode]]></category>
            <dc:creator><![CDATA[Akihiro Suda]]></dc:creator>
            <pubDate>Fri, 15 May 2026 20:31:34 GMT</pubDate>
            <atom:updated>2026-05-15T20:31:33.073Z</atom:updated>
            <content:encoded><![CDATA[<p>Rootless mode, which enables running Docker daemon without root privileges, has been significantly improved in <a href="https://docs.docker.com/engine/release-notes/29/#2950">Docker v29.5</a> (May 15, 2026):</p><ul><li>Faster image pulling and pushing</li><li>Support for docker run --net=host</li><li>Support for localhost registries</li><li>Source IP propagation without the legacy slirp4netns dependency</li></ul><h3>What is Rootless mode?</h3><p>Rootless mode means running the entire Docker daemon (not just containers) as a non-root user, for protecting the host from potential Docker vulnerabilities and misconfigurations. Even if an attacker escapes from a container, they can access only the files and processes available to the non-root daemon user.</p><p>Rootless mode itself is not new; it was originally implemented in 2018 and has been merged into Docker since <a href="https://docs.docker.com/engine/release-notes/19.03/#19030">v19.03</a> (2019).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/0*u-0uZGTVLLQ8EGcj" /><figcaption><a href="https://www.slideshare.net/Docker/dcsf19-hardening-docker-daemon-with-rootless-mode/3">https://www.slideshare.net/Docker/dcsf19-hardening-docker-daemon-with-rootless-mode/3</a></figcaption></figure><p><a href="https://medium.com/nttlabs/rootless-docker-12decb900fb9">RootlessモードでDockerをより安全にする [DockerCon発表レポート]</a></p><h4>Getting started</h4><p>To get started with Rootless Docker, install the docker-ce-rootless-extras package and run dockerd-rootless-setuptool.sh install as a non-root user.</p><pre># See https://docs.docker.com/engine/install for how to configure apt<br>sudo apt install docker-ce-rootless-extras<br><br>dockerd-rootless-setuptool.sh install</pre><p>See also:</p><ul><li><a href="https://docs.docker.com/engine/security/rootless/">https://docs.docker.com/engine/security/rootless/</a></li><li><a href="https://rootlesscontaine.rs/">https://rootlesscontaine.rs/</a></li></ul><h3>Improvements in Docker v29.5</h3><p>Rootless Docker had been notorious for its limitations in networking, as the entire daemon was encapsulated in a network namespace (NetNS) associated with a user-mode TCP/IP stack such as <a href="https://github.com/rootless-containers/slirp4netns">slirp4netns</a>.</p><p>Such limitations included:</p><ul><li>Poor throughput of image pulling and pushing (typically less than 10 Gbps)</li><li>Lack of support for docker run --net=host</li><li>Lack of support for localhost registries ( docker pull localhost:PORT/IMAGE)</li></ul><p><strong>These limitations have been resolved in Docker v29.5</strong>, by moving the daemon out of the NetNS associated with user-mode TCP/IP stack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dPqFlHLmvHcFuRhzPPQ2WA.png" /><figcaption>NetNS for User-mode TCP/IP is now detached from dockerd</figcaption></figure><p>Notably, support for docker run --net=host should be highly useful, as it allows containers to bypass the overhead of the user-mode TCP/IP entirely. It should be still noted that --net=host carries the security risk of exposing abstract UNIX sockets to the containers, however, it is less likely catastrophic in the case of rootless mode. This concern can be even alleviated by specifying --user=SUBUSER in conjunction.</p><p><a href="https://medium.com/nttlabs/dont-use-host-network-namespace-f548aeeef575">[CVE-2020–15257] Don’t use --net=host . Don’t use spec.hostNetwork .</a></p><h4>Elimination of slirp4netns dependency</h4><p>Besides, this release also replaces <a href="https://github.com/rootless-containers/slirp4netns">slirp4netns</a> with <a href="https://github.com/containers/gvisor-tap-vsock">gvisor-tap-vsock</a> in the default setup, as slirp4netns is based on very old and potentially unsafe C code <a href="https://en.wikipedia.org/wiki/Slirp">dating back to the 1990s</a>. In contrast, gvisor-tap-vsock is written in pure Go and expected to have fewer potential vulnerabilities, although it is still not completely free from <a href="https://github.com/containers/gvisor-tap-vsock/blob/v0.8.8/vendor/gvisor.dev/gvisor/pkg/tcpip/checksum/checksum_unsafe.go">unsafe code</a>.</p><p>In prior releases of Rootless Docker, users often specified an environment variable DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER=slirp4netns to switch the port driver of <a href="https://github.com/rootless-containers/rootlesskit">RootlessKit</a> from builtin to slirp4netns for enabling source IP propagation in port forwarding ( docker run -p ). Otherwise, the source IP information in TCP packets was always forged to have the IP of Docker’s bridge interface (typically 172.17.0.1).</p><p>In Docker v29.5, users do not need to specify DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER , however, they have to disable userland-proxy for enabling source IP propagation:</p><pre>mkdir -p ~/.config/docker<br>echo &#39;{&quot;userland-proxy&quot;: false}&#39; &gt;~/.config/docker/daemon.json<br>systemctl --user restart docker</pre><p>The userland-proxy is planned to be disabled by default in a future release of Docker:</p><p><a href="https://github.com/moby/moby/issues/14856">Disable Userland proxy by default · Issue #14856 · moby/moby</a></p><p>Also, depending on the host configuration, users may need to load the br_netfilter kernel module:</p><pre>sudo tee /etc/modules-load.d/docker.conf &lt;&lt;EOF &gt;/dev/null<br>br_netfilter<br>EOF<br>sudo systemctl restart systemd-modules-load.service</pre><h3>NTT is hiring!</h3><p>We at <a href="https://www.rd.ntt/e/">NTT</a> are looking for engineers who work in Open Source communities in the fields of containers, etc. Visit &lt;<a href="https://www.rd.ntt/e/sic/recruit/">https://www.rd.ntt/e/sic/recruit/</a>&gt; to see how to join us.</p><p>私たち<a href="https://www.rd.ntt/">NTT</a>は、コンテナなどの領域のオープンソースコミュニティで、共に活動する仲間を募集しています。ぜひ弊社採用情報ページをご覧ください: &lt;<a href="https://www.rd.ntt/sic/recruit/">https://www.rd.ntt/sic/recruit/</a>&gt;</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e0347464ad0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nttlabs/improvements-to-rootless-mode-in-docker-v29-5-4e0347464ad0">Improvements to Rootless mode in Docker v29.5</a> was originally published in <a href="https://medium.com/nttlabs">nttlabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ubuntu 26.04 can install APT packages from GitHub Container Registry]]></title>
            <link>https://medium.com/nttlabs/ubuntu-26-04-can-install-apt-packages-from-github-container-registry-532412990318?source=rss----74f667786e9f---4</link>
            <guid isPermaLink="false">https://medium.com/p/532412990318</guid>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[apt-get]]></category>
            <category><![CDATA[github-container-registry]]></category>
            <category><![CDATA[open-container-initiative]]></category>
            <dc:creator><![CDATA[Akihiro Suda]]></dc:creator>
            <pubDate>Thu, 23 Apr 2026 12:58:51 GMT</pubDate>
            <atom:updated>2026-04-23T12:58:50.307Z</atom:updated>
            <content:encoded><![CDATA[<p>With the release of version 26.04 planned today, Ubuntu now supports installing APT packages hosted on OCI-compliant container image registries such as GitHub Container Registry (ghcr.io), via the <a href="https://github.com/AkihiroSuda/apt-transport-oci">apt-transport-oci </a>plugin I wrote <a href="https://x.com/_AkihiroSuda_/status/1410126837280215044">5 years ago</a>.</p><p>This means third-party package maintainers no longer need to maintain their own web servers for hosting apt packages. They still have to maintain their container image registry, but it is already offered by GitHub for free.</p><blockquote><strong><em>Note</em></strong><em>: &quot;OCI&quot; in this article refers to the “</em><a href="https://opencontainers.org/"><em>Open Container Initiative</em></a><em>”, not to “Oracle Cloud Infrastructure”.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hZpaub1V49liToJlFJ69ow.png" /></figure><h3>Example (for package consumers)</h3><p>The following example installs the hello-apt-transport-oci package from the <a href="https://ghcr.io/akihirosuda/apt-transport-oci-examples:latest">oci://ghcr.io/akihirosuda/apt-transport-oci-examples:latest</a> image, which is built from the GitHub repository <a href="https://github.com/AkihiroSuda/apt-transport-oci-examples">https://github.com/AkihiroSuda/apt-transport-oci-examples</a> .</p><p>First, install the <a href="https://github.com/AkihiroSuda/apt-transport-oci">apt-transport-oci </a>plugin:</p><pre>sudo apt install apt-transport-oci</pre><p>Then create /etc/apt/sources.list.d/oci.sources with the following content:</p><pre>Types: deb<br>URIs: oci://ghcr.io/akihirosuda/apt-transport-oci-examples:latest<br>Suites: stable<br>Components: main<br>Signed-By: /etc/apt/keyrings/apt-transport-oci-examples.gpg</pre><p>Download the GPG key:</p><pre>curl -fsSL https://raw.githubusercontent.com/AkihiroSuda/apt-transport-oci-examples/refs/heads/master/apt-transport-oci-examples.gpg \<br>  | sudo gpg --dearmor -o /etc/apt/keyrings/apt-transport-oci-examples.gpg</pre><p>Confirm the signature:</p><pre>$ <strong>gpg --show-keys --with-fingerprint /etc/apt/keyrings/apt-transport-oci-examples.gpg </strong><br>pub   ed25519 2026-04-21 [SC] [expires: 2029-04-20]<br>      E26B 12C8 C96A 4E4B CDF5  517A 3EB0 4A34 581C DAF6<br>uid                      Akihiro Suda, on behalf of apt-transport-oci-examples &lt;akihiro.suda.cz@hco.ntt.co.jp&gt;<br>sub   cv25519 2026-04-21 [E]</pre><p>Update the apt cache and install the hello-apt-transport-oci package:</p><pre>sudo apt update<br>sudo apt install hello-apt-transport-oci</pre><p>Confirm it works:</p><pre>$ <strong>hello-apt-transport-oci</strong><br>Hello, apt-transport-oci</pre><h3>Example (for package maintainers)</h3><h4>Packaging dpkg</h4><p>A dpkg file can be created using the traditional <a href="https://man7.org/linux/man-pages/man1/dpkg-deb.1.html">dpkg-deb</a> command with the file tree to be packaged and the DEBIAN/control metadata file as follows:</p><pre>$ <strong>tree hello-apt-transport-oci/</strong><br>hello-apt-transport-oci/<br>├── DEBIAN<br>│   └── control<br>└── usr<br>    └── bin<br>        └── hello-apt-transport-oci<br><br>4 directories, 2 files<br><br>$ <strong>cat hello-apt-transport-oci/DEBIAN/control </strong><br>Package: hello-apt-transport-oci<br>Version: 0.1<br>Architecture: all<br>Maintainer: example@example.com<br>Description: hello apt-transport-oci<br><br><strong>$</strong> <strong>dpkg-deb --build --root-owner-group hello-apt-transport-oci hello-apt-transport-oci_0.1_all.deb</strong><br>dpkg-deb: building package &#39;hello-apt-transport-oci&#39; in &#39;hello-apt-transport-oci_0.1_all.deb&#39;.</pre><p>There are also several package building tools. Notably, <a href="https://project-dalec.github.io/dalec/">Dalec</a> is useful for Docker users, as it is implemented as a custom syntax for Dockerfiles: <a href="https://project-dalec.github.io/dalec/quickstart">https://project-dalec.github.io/dalec/quickstart</a></p><h4>Creating an APT tree</h4><p><a href="https://www.aptly.info/">aptly</a> is convenient for creating the APT repository tree:</p><pre>sudo apt install aptly</pre><pre>aptly repo create hello-apt-transport-oci<br>aptly repo add hello-apt-transport-oci hello-apt-transport-oci_0.1_all.deb<br>aptly publish repo -distribution=stable -architectures=all,amd64,arm64 hello-apt-transport-oci</pre><p>The repository data will be locally published on ~/.aptly/public :</p><pre>$ <strong>tree ~/.aptly/public</strong><br>/home/USER/.aptly/public<br>├── dists<br>│   └── stable<br>│       ├── Contents-all.gz<br>│       ├── Contents-amd64.gz<br>│       ├── Contents-arm64.gz<br>│       ├── InRelease<br>│       ├── main<br>│       │   ├── binary-all<br>│       │   │   ├── Packages<br>│       │   │   ├── Packages.bz2<br>│       │   │   ├── Packages.gz<br>│       │   │   └── Release<br>│       │   ├── binary-amd64<br>│       │   │   ├── Packages<br>│       │   │   ├── Packages.bz2<br>│       │   │   ├── Packages.gz<br>│       │   │   └── Release<br>│       │   ├── binary-arm64<br>│       │   │   ├── Packages<br>│       │   │   ├── Packages.bz2<br>│       │   │   ├── Packages.gz<br>│       │   │   └── Release<br>│       │   ├── Contents-all.gz<br>│       │   ├── Contents-amd64.gz<br>│       │   └── Contents-arm64.gz<br>│       ├── Release<br>│       └── Release.gpg<br>└── pool<br>    └── main<br>        └── h<br>            └── hello-apt-transport-oci<br>                └── hello-apt-transport-oci_0.1_all.deb<br><br>11 directories, 22 files</pre><h4>Pushing to a registry</h4><p>Use <a href="https://oras.land/">ORAS</a> (OCI Registry As Storage) to push an APT tree to a registry:</p><pre>sudo apt install oras</pre><pre>cd ~/.aptly/public<br>find . -type f -printf &quot;%p:application/octet-stream\n&quot; \<br>  | xargs oras push ghcr.io/USERNAME/hello-apt-transport:latest</pre><p>See <a href="https://github.com/AkihiroSuda/apt-transport-oci-examples">https://github.com/AkihiroSuda/apt-transport-oci-examples</a> for further details.</p><h3>FAQ: Do I need to use containers?</h3><p>No. The topic is about using the distribution protocol that has been used for containers, not about using containers themselves.</p><h3>FAQ: Why use container image registries?</h3><p>Because GitHub Container Registry is free in both storage size and bandwidth:</p><blockquote><strong>Billing for container image storage</strong>: Container image storage and bandwidth for the Container registry is currently free.</blockquote><blockquote><a href="https://docs.github.com/en/billing/concepts/product-billing/github-packages#free-use-of-github-packages"><em>https://docs.github.com/en/billing/concepts/product-billing/github-packages#free-use-of-github-packages</em></a></blockquote><p>It still has a few limitations, but those limitations are very loose and almost negligible:</p><blockquote>・The Container registry has a 10 GB size limit for each layer.<br>・The Container registry has a 10 minute timeout limit for uploads.</blockquote><blockquote><a href="https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#troubleshooting"><em>https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#troubleshooting</em></a></blockquote><p>For these benefits, Homebrew has also been using GitHub Container Registry since <a href="https://brew.sh/2021/04/12/homebrew-3.1.0/">2021</a>.</p><h4>Why not use GitHub Packages?</h4><p>Because <a href="https://docs.github.com/en/packages/learn-github-packages/introduction-to-github-packages#support-for-package-registries">GitHub Packages</a> does not support APT. The service has been focusing on language package managers such as NPM and Maven so far.</p><h4>Why not use GitHub Pages?</h4><p>Because <a href="https://docs.github.com/en/pages/getting-started-with-github-pages/github-pages-limits">GitHub Pages</a> is intended to be used for Web pages, not for serving arbitrary HTTP(S) content such as APT packages. For that reason, it comes with relatively tight usage limits:</p><blockquote>・Published GitHub Pages sites may be no larger than 1 GB.<br>[...]<br>・GitHub Pages sites have a <em>soft</em> bandwidth limit of 100 GB per month.</blockquote><blockquote><a href="https://docs.github.com/en/pages/getting-started-with-github-pages/github-pages-limits#usage-limits"><em>https://docs.github.com/en/pages/getting-started-with-github-pages/github-pages-limits#usage-limits</em></a></blockquote><h3>FAQ: What about DNF?</h3><p>I didn&#39;t support DNF when I wrote the apt-transport-oci plugin in 2021, because DNF at that time didn&#39;t appear to have a plugin system that is as flexible as APT.</p><p>However, the situation has changed with the release of DNF5 (Fedora 41). Luiz Carvalho at Red Hat recently implemented an experimental DNF5 plugin that enables OCI transport in the same way as apt-transport-oci: <a href="https://github.com/lcarva/libdnf5-oci-plugin">https://github.com/lcarva/libdnf5-oci-plugin</a> . I hope that libdnf5-oci-plugin will eventually be included in Fedora, RHEL, and similar distributions.</p><h3>NTT is hiring!</h3><p>We at <a href="https://www.rd.ntt/e/">NTT</a> are looking for engineers who work in Open Source communities in the fields of containers, etc. Visit &lt;<a href="https://www.rd.ntt/e/sic/recruit/">https://www.rd.ntt/e/sic/recruit/</a>&gt; to see how to join us.</p><p>私たち<a href="https://www.rd.ntt/">NTT</a>は、コンテナなどの領域のオープンソースコミュニティで、共に活動する仲間を募集しています。ぜひ弊社採用情報ページをご覧ください: &lt;<a href="https://www.rd.ntt/sic/recruit/">https://www.rd.ntt/sic/recruit/</a>&gt;</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=532412990318" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nttlabs/ubuntu-26-04-can-install-apt-packages-from-github-container-registry-532412990318">Ubuntu 26.04 can install APT packages from GitHub Container Registry</a> was originally published in <a href="https://medium.com/nttlabs">nttlabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[KubeCon Europe 2026] Reimagining Auto-Instrumentation: Prototyping Distributed Tracing Without…]]></title>
            <link>https://medium.com/nttlabs/kubecon-europe-2026-reimagining-auto-instrumentation-prototyping-distributed-tracing-without-305177058afe?source=rss----74f667786e9f---4</link>
            <guid isPermaLink="false">https://medium.com/p/305177058afe</guid>
            <category><![CDATA[distributed-tracing]]></category>
            <category><![CDATA[observability]]></category>
            <dc:creator><![CDATA[Kenta Iijima]]></dc:creator>
            <pubDate>Fri, 10 Apr 2026 01:48:29 GMT</pubDate>
            <atom:updated>2026-04-10T01:48:28.448Z</atom:updated>
            <content:encoded><![CDATA[<h3>[KubeCon Europe 2026] Reimagining Auto-Instrumentation: Prototyping Distributed Tracing Without Header Propagation on K8s</h3><p>This article recaps my poster session, “<a href="https://sched.co/2CW12">Reimagining Auto-Instrumentation: Prototyping Distributed Tracing Without Header Propagation on K8s</a>” presented at KubeCon + CloudNativeCon Europe 2026.</p><h3>Introduction</h3><p>Distributed tracing is typically achieved through header propagation, which passes trace context in request headers so that different services can link their spans into a single distributed trace. Header propagation can be implemented through either manual instrumentation or auto-instrumentation. With manual instrumentation, you embed header propagation logic directly in application code, which incurs high implementation costs and tight coupling. With auto-instrumentation, header propagation is handled below the application layer, so you don’t have to change the application code. However, there are some limitations in terms of supported languages, libraries, or protocols. Furthermore, when receiving and sending are handled by different threads, context loss between threads makes the header propagation approach fundamentally difficult to apply. As long as header propagation is used, removing all such limitations is difficult; therefore, a new approach to achieving auto-instrumentation is necessary.</p><p>To address these limitations, auto-instrumentation without header propagation, which infers span relationships, has received attention.</p><p>A representative method for this approach is <a href="https://github.com/Sachin-A/TraceWeaver">TraceWeaver (SIGCOMM’24)</a>. First, it constructs delay distributions between in-span and out-span events. Second, it scores each candidate mapping using these distributions. Third, it selects the most probable mapping.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w3DZJCR_-4aXdFPXA4pXQw.png" /><figcaption>Figure 1. Design of TraceWeaver</figcaption></figure><h3>Toward a Broader Scope for TraceWeaver</h3><p>However, existing implementations of auto-instrumentation without header propagation do not cover some important cases. First, they assume a request-response communication model and do not handle pipeline architectures, where stages process requests sequentially without request-response pairing. Second, they do not provide a concrete deployment strategy for Kubernetes environments.</p><p>In this study, we extend TraceWeaver through the following two tasks. In Task 1, we extend the mapping method for pipeline architectures because demand for efficient pipeline processing platforms is expected to grow, driven by applications such as AI computing and IoT data processing. In Task 2, we consider a deployment configuration for applications on Kubernetes. Specifically, we design a method to capture request data from pods without changing application code.</p><h3>Proposed Method and Configuration</h3><p>In this work, we assume a non-branching pipeline, where requests may be dropped at bottleneck stages. When a request is dropped at an intermediate stage, the corresponding span is missing from the trace, resulting in span loss.</p><p>To support this pipeline setting, we change the span content and reformulate the mapping problem. In TraceWeaver, each span contains both a request and a response. In contrast, in our setting, each span contains either a request or a response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1V5IcR7HSV7jLCJXINopLA.png" /><figcaption>Figure 2. Comparison of span structure between TraceWeaver and our approach</figcaption></figure><p>Our implementation follows the same iterative framework as TraceWeaver — (1) build the delay distribution, (2) score each candidate mapping — but replaces the optimization in Step (3).</p><p>TraceWeaver solves a Maximum Independent Set (MIS) problem to find the best mapping. Because solving MIS on a large graph is computationally expensive, it divides spans into batches. However, batching requires knowing how many skip spans to add to each batch to compensate for span loss. In TraceWeaver’s microservice setting, in-spans and out-spans have a temporal nesting structure, which allows estimating the number of skip spans per batch. In pipeline architectures, this nesting structure does not exist, so the required number of skip spans per batch cannot be determined before mapping.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kr2s03htN1HvVjEyc5JwUQ.png" /><figcaption>Figure 3. Temporal nesting structure</figcaption></figure><p>To avoid this problem, we reformulate Step (3) as a linear sum assignment (LSA) problem, which can be solved using a single N × N cost matrix without batching. Each element represents the likelihood that a given in-span corresponds to a given out-span. When span loss occurs, the number of in-spans and out-spans differs, so the system introduces skip spans — virtual spans that pad the shorter side to form a square matrix. For mappings involving skip spans, a common value (the minimum likelihood in the matrix) is assigned. The LSA solver then selects N elements — one per row and one per column — that maximize the total likelihood.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WOBHmUFd1mK5totBWNUVsg.png" /><figcaption>Figure 4. How to solve the mapping problem in our approach</figcaption></figure><p>For the configuration to be used with applications on Kubernetes, we design a setup that uses <a href="https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation">OpenTelemetry eBPF Instrumentation (OBI)</a> as the request capture tool. Since our approach does not rely on OBI’s context propagation mechanism, there are few protocol limitations. It works by simply specifying the target process to monitor, requiring no changes to application code. For this prototype, we use <a href="https://github.com/jaegertracing/jaeger-operator#jaeger-v2-operator">Jaeger with in-memory storage</a> for both the collector and the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*doXc3haXai5fmX1QooXKJw.png" /><figcaption>Figure 5. Deployment configuration on Kubernetes</figcaption></figure><h3>Experiments &amp; Results</h3><p>We evaluated the proposed approach using a test application that consists of a three-stage unidirectional pipeline with no branching. Communication between pods uses the default Kubernetes network and HTTP/1. In each service, processing is emulated with a sleep operation whose duration is determined by request metadata, a service-specific value, and a random value drawn from a normal distribution. This setup emulates a streaming workload where processing time scales with data size — for example, video inference where larger frames lead to longer processing times. Each service drops a request when it detects a bottleneck, causing span loss.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2nhTguilX9jNrT-xlqr6sw.png" /><figcaption>Figure 6. Test application for evaluation</figcaption></figure><p>To obtain ground-truth data, we instrumented the same application with the <a href="https://opentelemetry.io/docs/languages/">OpenTelemetry APIs &amp; SDKs</a>, which provides accurate distributed traces through header propagation. We compared the mappings inferred by the proposed method against this ground truth.</p><p>The graph shows that accuracy is approximately 96–100% when there is no span loss, but decreases significantly as the span loss rate increases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YA8JVqR-35gqTBJKen3hgQ.png" /><figcaption>Figure 7. Mapping accuracy under different span loss rates</figcaption></figure><h3>Future Work</h3><ul><li><strong>Improve mapping accuracy under high span loss rates: </strong>The main reason for the accuracy drop is that the estimated delay distribution can diverge from the true distribution under high span loss rates. To address this issue, we plan to improve the initialization of the distribution and the update strategy.</li><li><strong>Support more complex applications:</strong> Applications with branches, where one span maps to multiple spans, require multi-dimensional assignment, so linear sum assignment is not sufficient.</li><li><strong>Integrate the method</strong> <strong>with OpenTelemetry or similar frameworks:</strong> This integration would automate the collection process and allow our method to be used with other observability tools.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=305177058afe" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nttlabs/kubecon-europe-2026-reimagining-auto-instrumentation-prototyping-distributed-tracing-without-305177058afe">[KubeCon Europe 2026] Reimagining Auto-Instrumentation: Prototyping Distributed Tracing Without…</a> was originally published in <a href="https://medium.com/nttlabs">nttlabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[elfconv v1.0.0: Real-world Linux applications running fast in your browser]]></title>
            <link>https://medium.com/nttlabs/elfconv-v1-0-0-real-world-linux-applications-running-fast-in-your-browser-80e6572b3a89?source=rss----74f667786e9f---4</link>
            <guid isPermaLink="false">https://medium.com/p/80e6572b3a89</guid>
            <dc:creator><![CDATA[Masashi Yoshimura]]></dc:creator>
            <pubDate>Tue, 31 Mar 2026 06:00:42 GMT</pubDate>
            <atom:updated>2026-03-31T06:00:41.633Z</atom:updated>
            <content:encoded><![CDATA[<h3>Background</h3><p>In recent years, browsers have become powerful enough to run many rich applications, such as video, games, 3D rendering, and even LLMs.</p><p>At the same time, access to system resources is heavily restricted for security reasons. Because of this, many native applications cannot run directly in the browser.</p><p>To address this limitation, projects such as <a href="https://github.com/copy/v86">v86</a> and <a href="https://github.com/container2wasm/container2wasm">container2wasm</a> run CPU emulators on top of WebAssembly and boot a guest OS. This makes it possible to run almost any native application in the browser. However, since these approaches rely on CPU emulation, they suffer from significant performance overhead.</p><h3>elfconv v1.0.0 Release</h3><p><a href="https://github.com/yomaytk/elfconv">elfconv</a> converts Linux applications into WebAssembly ahead of time (AOT), allowing them to run much faster than emulator-based solutions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*jdcJKILXlx8NdVkM4we-xg.png" /></figure><p>elfconv enables several use cases:</p><ol><li>Running Linux applications that rely heavily on Linux features (e.g., shells or compilers) directly in the browser</li><li>Moving server-side Linux applications to the client, improving privacy and reducing server load</li><li>Building browser applications using existing Linux libraries distributed via tools like apt</li></ol><p>There are already several projects that port native applications to WebAssembly, such as <a href="https://github.com/pyodide/pyodide">Pyodide</a>, <a href="https://github.com/electric-sql/pglite">PGLite</a>, and <a href="https://github.com/ffmpegwasm/ffmpeg.wasm">ffmpeg.wasm</a>. However, these ports usually require significant manual effort, and keeping up with upstream changes can also be challenging. elfconv has the potential to make this process much easier.</p><p>For more details about performance and optimization techniques, please refer to our previous blog post: <a href="https://medium.com/nttlabs/some-performance-improvements-in-the-binary-translator-that-converts-linux-applications-c6b26945cf39">elfconv: Linux Apps to High-Performance Wasm Binary Translator</a></p><p>After continuous improvements, we are happy to announce the release of <a href="https://github.com/yomaytk/elfconv/releases/tag/v1.0.0"><strong>elfconv v1.0.0</strong></a>! 🚀</p><p>In this post, we introduce the main updates in this version.</p><h3>1. Enhanced demos</h3><p>In this release, we added browser demos that run <strong>GNU Bash</strong> and <strong>Python</strong>. These demos run Linux applications <strong>built from upstream source code without any modifications</strong>.</p><p>This shows that elfconv is moving beyond toy programs and benchmarks, and is becoming capable of running real-world Linux applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l1HpQJ6wXpZ2b43ja9N07Q.png" /></figure><h3>2. Multi-process support in the browser</h3><p>We implemented support for clone and execve system calls. This makes it possible to run multi-process programs in the browser, including GNU Bash as shown in the demos.</p><p>Technically, <strong>each Linux process is mapped to a Web Worker.</strong> A lightweight runtime called <strong>js-kernel</strong> acts like an operating system, handling file systems and process management. Each Web Worker communicates only with js-kernel.</p><p>In addition, Wasm memory for each worker is managed by js-kernel, and resources are isolated across workers. This design provides resource isolation similar to Linux processes.</p><p>Overall, this architecture closely resembles the Linux process model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E9vlbgmmxFUyk9X_AbJpdg.png" /></figure><h3>3. Host file system mounting</h3><p>Many native applications depend on external data and files. To support this, we added a feature to mount the host file system into the browser’s MEMFS. This feature is based on emscripten --preload-file function.</p><p>By setting environment variables MOUNT_SETTINGat build time, specific directories can be mounted and accessed by the application. We can generate the Wasm with mounting the host file system as follows.</p><pre>outdir/$ TARGET=aarch64-wasm INITWASM=1 MOUNT_SETTING=&quot;/host/dir@/mount/point&quot; ./elfconv.sh /path/to/elf</pre><h3>4. <strong>Improved Linux syscall support</strong></h3><p>In elfconv, Linux system calls for browsers are implemented in as a large switch statement.</p><p>Up to v1.0.0, we added and improved many syscalls (e.g., ppoll, ioctl, pipe2). As a result, commands such as ps, vi, and top now work in busybox.</p><h3>5. Build system overhaul</h3><p>The elfconv build system is based on <a href="https://github.com/lifting-bits/remill">remill</a>. Previously, remill only supported limited environments (ubuntu 22.04 + LLVM 16) and depended on <a href="https://github.com/lifting-bits/cxx-common">cxx-common</a>, which had not been maintained for over two years.</p><p>With the introduction of a new <a href="https://github.com/yomaytk/elfconv/tree/main/dependencies">superbuild system</a> by <a href="https://github.com/mrexodia">Duncan Ogilvie</a>, support for many Linux platforms has improved, and the dependency on cxx-common has been reduced.</p><p>We also improved the container-based build environment, significantly reducing build time and image size. As a result, the build process is now much more stable.</p><h3><strong>Future work</strong></h3><p>We are mainly working on <strong>supporting Linux shared objects</strong>. Once implemented, this will allow many pre-built binaries distributed through package managers to be ported directly to WebAssembly.</p><p>We also welcome any issues or pull requests to elfconv.</p><p>we at NTT are looking for people interested in working with us in open source communities, especially in areas such as WebAssembly and systems software. Please visit &lt;<a href="https://www.rd.ntt/e/sic/recruit/">https://www.rd.ntt/e/sic/recruit/</a>&gt; for more information!</p><p>私たちNTTは、WebAssemblyやシステムソフトウェアの分野において、オープンソースコミュニティと共に活動する仲間を募集しています。ぜひ弊社の採用情報ページ (<a href="https://www.rd.ntt/sic/recruit/">https://www.rd.ntt/sic/recruit/</a>) をご覧ください。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80e6572b3a89" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nttlabs/elfconv-v1-0-0-real-world-linux-applications-running-fast-in-your-browser-80e6572b3a89">elfconv v1.0.0: Real-world Linux applications running fast in your browser</a> was originally published in <a href="https://medium.com/nttlabs">nttlabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[gomodjail: library sandboxing for Go modules]]></title>
            <link>https://medium.com/nttlabs/gomodjail-library-sandboxing-for-go-modules-451b22d02700?source=rss----74f667786e9f---4</link>
            <guid isPermaLink="false">https://medium.com/p/451b22d02700</guid>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[supply-chain-security]]></category>
            <category><![CDATA[sandbox]]></category>
            <category><![CDATA[fosdem]]></category>
            <dc:creator><![CDATA[Akihiro Suda]]></dc:creator>
            <pubDate>Tue, 27 Jan 2026 00:38:04 GMT</pubDate>
            <atom:updated>2026-01-27T00:38:02.776Z</atom:updated>
            <content:encoded><![CDATA[<p>This article introduces <a href="https://github.com/AkihiroSuda/gomodjail/tree/master"><strong>gomodjail</strong></a>, an experimental tool that “jails” Go modules by applying syscall restrictions using seccomp and symbol tables, in order to mitigate potential supply chain attacks and other vulnerabilities.</p><p>In other words, <strong>gomodjail provides a “container” engine for Go modules </strong>but with finer granularity than Docker containers, FreeBSD jails, etc.</p><p><strong>gomodjail focuses on simplicity</strong>; a security policy for gomodjail can be applied just by adding // gomodjail:confined comment to the go.mod file of the target program, and running it with thegomodjail run command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*AnLkuGkP62u6RehAWyhWKA.png" /><figcaption><strong>gomodjail focuses on simplicity</strong></figcaption></figure><h3>Background: open source is under attack</h3><p>Software is practically never written from scratch; It’s always assembled from enormous library dependencies, often including open-source ones. This supply chain is under attack:</p><ul><li><a href="https://research.swtch.com/xz-timeline"><strong>xz/liblzma backdoor incident</strong></a><strong> </strong>(2024): A backdoor was injected to xz/liblzma by its maintainer (not by the original author), who had been making harmless contributions to the project for more than two years. <strong>This incident proved that even maintainers of widely adopted libraries cannot be blindly trusted.</strong></li><li><a href="https://socket.dev/blog/wget-to-wipeout-malicious-go-modules-fetch-destructive-payload"><strong>Massive campaign of fake Go modules</strong></a><strong> </strong>(circa 2025-): In spring 2025, hundreds of fake Go modules were published on GitHub. The repositories impersonated genuine ones but contained malicious code. In some cases, the numbers of the GitHub stars even exceeded those of the genuine repositories.</li><li><a href="https://arxiv.org/html/2501.19012v1"><strong>Slopsquatting</strong></a> (circa 2024-): AI coding agents may hallucinate and inject malicious dependencies with plausible package names. Even when an LLM itself doesn’t hallucinate, it can be still deceived by fake sites on the Internet. The <a href="https://x.com/longer_n/status/2014335971505123760">chat session</a> below shows Microsoft Copilot being deceived to suggest downloading a malicious copy of 7-zip from a fake “official” site.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*47q48CW7ZKhzzezWRR0Udw.png" /><figcaption><strong>Microsoft Copilot being deceived to suggest downloading 7-zip from a fake “official” site. </strong>The chat session is from <a href="https://x.com/longer_n/status/2014335971505123760">https://x.com/longer_n/status/2014335971505123760</a></figcaption></figure><h3>Library sandboxing</h3><p><strong>Library sandboxing means confining capabilities of a library so that it cannot perform specific operations, such as reading/writing arbitrary files and executing arbitrary shell commands.</strong> This is similar to containers such as Docker and FreeBSD jails, but it differs from containers in that the confinement applies at the granularity of a library, not an OS process.</p><p>For example, <a href="https://blog.mozilla.org/attack-and-defense/2021/12/06/webassembly-and-back-again-fine-grained-sandboxing-in-firefox-95/">Firefox</a> adopted <a href="https://rlbox.dev/">RLBox</a> in 2021 to wrap C library calls in a WebAssembly sandbox. However, library sandboxing hasn’t seen wide adoption, perhaps due to its complexity: sandboxing a library typically takes days, not minutes.</p><blockquote>“On average, sandboxing a library takes only a few days”<br> — <a href="https://www.usenix.org/system/files/sec20_slides_narayan.pdf">https://www.usenix.org/system/files/sec20_slides_narayan.pdf</a></blockquote><h3>Introducing gomodjail</h3><p><a href="https://github.com/AkihiroSuda/gomodjail"><strong>gomodjail</strong></a><strong> is a library sandboxing tool for Go, focusing on simplicity.</strong></p><p>Take a look at <a href="https://github.com/AkihiroSuda/gomodjail/blob/v0.3.0/examples/victim/main.go">examples/victim/main.go</a> :</p><pre>package main<br><br>import (<br> &quot;fmt&quot;<br><br> p &quot;github.com/AkihiroSuda/gomodjail/examples/poisoned&quot;<br>)<br><br>func main() {<br> const x, y = 42, 43<br> fmt.Printf(&quot;%d + %d = %d\n&quot;, x, y, p.Add(x, y))<br>}</pre><p>The code is expected to just print 42 + 43 = 85 without any side effects. However, the <a href="https://github.com/AkihiroSuda/gomodjail/blob/v0.3.0/examples/poisoned/poisoned.go#L9-L25">Add(x, y)</a> function here is poisoned to execute a “malicious” command:</p><pre><strong>$</strong> go build<br><strong>$</strong> ./victim<br>*** ARBITRARY SHELL CODE EXECUTION ***<br><br>This &#39;vi&#39; command was executed by the &#39;github.com/AkihiroSuda/gomodjail/examples/poisoned&#39; module.<br><br>This example is harmless, of course, but suppose that this was a malicious code.<br><br>Type &#39;:q!&#39; to leave this screen.</pre><p>gomodjail can confine this poisoned module so that it cannot execute such commands. It can be applied in just the following two steps:</p><ul><li><strong>Step 1</strong>: Make sure that <a href="https://github.com/AkihiroSuda/gomodjail/blob/v0.3.0/examples/victim/go.mod">go.mod</a> has the comment directive //gomodjail:confined</li></ul><pre>require github.com/AkihiroSuda/gomodjail/examples/poisoned v0.0.0-00010101000000-000000000000 // gomodjail:confined</pre><ul><li><strong>Step 2</strong>: Run the program with the gomodjail run command:</li></ul><pre><strong>$</strong> gomodjail run --go-mod=go.mod -- ./victim<br>level=WARN msg=***Blocked*** syscall=pidfd_open module=github.com/AkihiroSuda/gomodjail/examples/poisoned</pre><h4>How it works</h4><p>gomodjail hooks dangerous syscalls such as open() and execve() using seccomp on Linux, or DYLD_INSERT_LIBRARIES on macOS. When a hooked syscall is executed, gomodjail unwinds the call stack to identify the Go module that invoked the syscall. If the module belongs to a blocklist, gomodjail blocks the syscall and injects EPERM as errno .</p><p>This run-time approach comes with several caveats; notably it is not applicable to modules that import unsafe , reflect , C, etc., since such modules may alter the call stack. A future version of gomodjail may incorporate a compilation-time approach to mitigate these caveats.</p><h3>Meet me at FOSDEM 2026 for further details</h3><p>I’ll talk about gomodjail at <a href="https://fosdem.org/2026/">FOSDEM</a>:</p><ul><li><strong>Title</strong>: <a href="https://fosdem.org/2026/schedule/event/37NC8K-gomodjail/">“gomodjail: library sandboxing for Go modules”</a></li><li><strong>DevRoom</strong>: Go (UB5.132, <a href="https://fosdem.org/2026/schedule/buildings/#u">Building U</a>)</li><li><strong>Date</strong>: February 1, 2026 (Sunday)</li><li><strong>Time:</strong> 12:00–12:30</li></ul><p>Feel free to visit my session for further details about the project.</p><p>Besides that, I’ll also have a session titled <a href="https://fosdem.org/2026/schedule/event/RGCTDY-lima/">“<strong>Lima v2.0: expanding the focus to hardening AI</strong>”</a> on <strong>Saturday (Jan 31, 15:30–16:00)</strong>. Lima has been an <a href="https://github.com/lima-vm/lima/blob/v2.0.3/go.mod#L1">adopter</a> of gomodjail, although gomodjail is not going to be the main topic in the session on Saturday.</p><h3>NTT is hiring!</h3><p>We at <a href="https://www.rd.ntt/e/">NTT</a> are looking for engineers who work in Open Source communities in the fields of software supply chain security, sandboxing, etc. Visit &lt;<a href="https://www.rd.ntt/e/sic/recruit/">https://www.rd.ntt/e/sic/recruit/</a>&gt; to see how to join us.</p><p>私たち<a href="https://www.rd.ntt/">NTT</a>は、ソフトウェアサプライチェーンセキュリティやサンドボックスなどの領域のオープンソースコミュニティで、共に活動する仲間を募集しています。ぜひ弊社採用情報ページをご覧ください: &lt;<a href="https://www.rd.ntt/sic/recruit/">https://www.rd.ntt/sic/recruit/</a>&gt;</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=451b22d02700" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nttlabs/gomodjail-library-sandboxing-for-go-modules-451b22d02700">gomodjail: library sandboxing for Go modules</a> was originally published in <a href="https://medium.com/nttlabs">nttlabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Agentic RL in Practice: Optimizing a LangGraph Self-RAG Agent with NeMo RL (GRPO)]]></title>
            <link>https://medium.com/nttlabs/agentic-rl-in-practice-optimizing-a-langgraph-self-rag-agent-with-nemo-rl-grpo-4a208a2597a7?source=rss----74f667786e9f---4</link>
            <guid isPermaLink="false">https://medium.com/p/4a208a2597a7</guid>
            <category><![CDATA[nemo-rl]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[retrieval-augmented-gen]]></category>
            <category><![CDATA[langchain]]></category>
            <dc:creator><![CDATA[kenji tanaka]]></dc:creator>
            <pubDate>Sat, 27 Dec 2025 00:35:32 GMT</pubDate>
            <atom:updated>2025-12-27T06:01:48.780Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Frpq8LO_YWbCS3vLOT_zZw.jpeg" /></figure><p>こんにちは、NTTソフトウェアイノベーションセンタ システムソフトウェアプロジェクト（SIC SOG）の田仲です。こちらは、Nemo RL で Agentic-RL を試してみた、という記事になります。</p><h3>Agentic-RL とは</h3><p>まず最初に、Agentic-RL についてご説明します。Agentic RL（Agentic Reinforcement Learning）は、「目標に向けて自分で考えて行動するエージェント」を強化学習で作る、機械学習手法の一つです [1]。 エージェントは観察→計画→行動→評価を繰り返し、報酬（うまくいった度合い）を手がかりに行動方針を少しずつ改善（モデル更新）します。長い手順のタスクで「次に何をすべきか」を自律的に判断する点が特徴で、過去の強化学習のようなゲームを解くだけでなく、ツール操作や作業の自動化など、現実の複雑な課題に応用が効きやすいです。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VFnUiqA6O_CGpfJSQ9ylRw.jpeg" /></figure><p>実環境において、事前学習済みモデルをそのままデプロイして満足なケースはまれで、作業状況や道具、タスクに対してエージェントを先鋭化・適応させていく継続的な学習が必要になります [2]。新しい知識や手順の追加は、SFT（教師あり微調整）で学ばせることができます。一方で、状況に応じた行動の選び方をより安定させるには、RLを用いるのがトレンドになっております [3]。つまり、データを収集しながら継続的にSFT・RLを実施することで、現場に適応したAIエージェントが確立できると考えられております。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bj3B_LD_oVOVp-oxwbd7_w.jpeg" /></figure><h3>Agentic-RL を実践するには</h3><p>現在、Agentic-RL を実践するためのフレームワークは多数存在しております。興味ある方は、<a href="https://github.com/thinkwee/AgentsMeetRL">https://github.com/thinkwee/AgentsMeetRL</a>、などが参考になると思います。SIC SOG では現在、Microsoft 社製の <a href="https://github.com/microsoft/agent-lightning">Agent Lightning</a>、Nvidia 社製の <a href="https://github.com/NVIDIA-NeMo/RL">Nemo RL</a>、について知見を蓄積中でございます。</p><h3>Agentic-RL やってみよう</h3><p>本章では練習問題として、<a href="https://langchain-ai.github.io/langgraph/tutorials/rag/langgraph_self_rag/">LangGraph の Self-RAG（自己評価付き RAG）</a>エージェントを題材に、<a href="https://docs.nvidia.com/nemo/rl/latest/guides/grpo.html">NeMo RL の GRPO（Group Relative Policy Optimization）</a>による強化学習を適用し、「ステップ数を減らしつつ品質と根拠整合性を保つ」Agentic-RL フレームワークを簡単に組み立てます。なお、このブログでは各種手法の詳細については触れないため、正確な情報は各参考文献を参照してください。</p><p><strong>Self-RAG とは<br></strong>RAG（Retrieval-Augmented Generation）[4] は外部知識を参照して回答を生成する定番手法ですが、実運用では「検索が本当に必要か」を問わずに一定回数の検索を挟んでしまい、レイテンシとコストがかさむ要因となります。さらに、取得した文書が外れていても生成自体は進むため、回答が根拠に十分支えられないままそれらしく書けてしまう問題が残ります。Self-RAG [5] は、この課題を「モデル自身が検索と生成を自己評価しながら進める」ことで解決した枠組みです。具体的には、必要なときだけ検索するオンデマンド retrieval を可能にし、場合によっては検索を完全にスキップしたり、生成途中に追加で検索したりできます。この Self-RAG を LangGraph のノード分割と評価器で実装したのが、<a href="https://langchain-ai.github.io/langgraph/tutorials/rag/langgraph_self_rag">LangGraph Self-RAG</a> になります（詳細は後述）。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K8k-TyySmbb965v-BJc-Cg.jpeg" /></figure><p><strong>モチベーション<br></strong>しかしながら、Self-RAG を実運用してみると「検索の要/不要の判断が甘く、結局毎回検索する」「根拠と回答の整合性をどう測るか」が目立ってきます。これらはモデルの知識不足というより、いつ検索し、どの根拠で答えるかというエージェントの自律性・行動方針の問題です。そこで、エージェントの制御そのものを学習で改善する Agentic-RL が必要になります。</p><p><strong>ゴールと評価指標<br></strong>このプロジェクトのゴールは「最終回答までのステップ数を減らしつつ、回答品質と根拠整合性を保つ」とします。ステップ数は、過剰な検索やループを抑える直接のターゲットになります。品質は、質問に答えているかという観点の評価で、根拠整合性は回答がコンテキストに裏付けられているかという観点の評価です。</p><p><strong>エージェントの状態 AgentState を設計する<br></strong>前述の指標をエージェント内部状態に落とし込めるよう設計します。LangGraph ではノード間で状態を受け渡すために、全ノードが共通で参照できる AgentState を定義します。今回は、AgentState に 会話履歴、正規化された質問、取得した文書、最終回答、各種カウンタ（rewrite_count や tool_call_count）を入れました。</p><pre>class AgentState(TypedDict, total=False):<br>    messages: Sequence[BaseMessage]           # Human/AI/ToolMessage の履歴<br>    question: str | None                      # 正規化された質問<br>    documents: List[str] | None               # RAG 生成に使うコンテキスト<br>    generation: str | None                    # 最終回答<br>    rewrite_count: int                        # リライト回数<br>    tool_call_count: int                      # ツール呼び出し回数<br>    placeholder_failures: int                 # 曖昧な最終回答の回数<br>    sp: List[List[Any]] | None                # Supporting Facts<br>    sp_structured: List[Dict[str, Any]] | None<br>    metadata: Dict[str, Any]                  # ground truth, provenance など</pre><p>rewrite_count や tool_call_countを状態として持つことで、エージェントのメタ情報をNemo RL に渡すことができ、ループ抑制や報酬設計がかのうになります。</p><p><strong>agent / retrieve / rewrite / generate の制御フローを作る<br></strong>Self-RAG のフローを以下の図に示します。コアは 4 つのノードと1つのエッジで、agent ノードは「検索するか、最終回答に行くか」を決め、retrieve_node が実際の検索を実行します。 workflow.add_conditional_edges(&quot;retrieve&quot;, grade_result) が「この文脈で生成して良いか、それとも質問をリライトすべきか」を決め、必要なら rewrite ノードにて質問を書き換えて agent ノードに戻します。十分な文脈があると判断したら generate ノードにて回答を生成して終了します。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lu0sWT4JPe6pTqd6OvYxDg.png" /></figure><p>workflow.add_conditional_edges(&quot;retrieve&quot;, grade_result) は、生成モデル自身を評価器として使い、判断結果grade_resultの数値に落とします。ここでgrade_resultは 、GradeDocuments は取得文書が質問に十分関連しているか、GradeDocuments は回答がコンテキストに裏付けられているか、の判定結果です。</p><p><strong>環境と報酬モデルを作る<br></strong>RL では「1 回の実行」を 1 エピソードとして扱うため、LangGraph を 1 回走らせてメトリクスを集計します。ここで集めたいのは、ステップ数、検索回数、リライト回数、最終回答、取得文書、そして ground truth（正解）に基づく Exact Match（EM）や F1 などです。次に、これらのメトリクスと LLM grader のスコアを合成して報酬を決定します。報酬は「速さ」「品質」「根拠」などのモデルの伸ばしたい能力を決める設計図です。今回は、以下のように設計しました。</p><p>【ツール使用回数・リライト回数の削減を狙った報酬】</p><ul><li>多いと負の報酬を与えるようにした。当初、正の報酬を与えていたら、低精度・低ステップでの回答をするようになってしまい負の報酬とした。（所謂、報酬ハッキング[]というやつを実際に見れて感動した。）</li><li>報酬ハッキングを起こさない工夫として、閾値以下ならば追加で正の報酬を与える posterior GRPO を使用した。</li></ul><p>【正解を用いた引用文章の正確さ・F1スコアの向上を狙った報酬】</p><ul><li>グランドトゥルースを用いて評価し、正負の報酬を与える</li><li>どちらも個別に報酬を与え合計している。その際に、望ましくない以下のようなパターンで学習しないように、以下のような場合には報酬の合計値がゼロになるように設定した。<br> * 引用が間違っている（負の報酬）が、F1スコアが高い（正の報酬）<br> * 引用は正しい（正の報酬）が。F1スコアが低い（負の報酬）</li></ul><p><strong>LangGraph と Nemo RL をブリッジする<br></strong>NeMo RL 側では主に「message_log_batch」と「metadata」を入力として扱います。一方、Self-RAG（LangGraph）側の評価では、取得した文書や通過したノードなどの詳細な実行ログが得られます。そこで、Self-RAG の実行中に得られた情報のうち報酬計算に必要なもの（ground truth、取得文書、通過ノードに加えて、取得回数・再検索回数・ノード通過数などの各種カウンター）を metadata にまとめて付与し、NeMo RL に渡します。報酬計算時には message_log_batch から質問・応答を取り出し、metadata の付帯情報と突き合わせて EpisodeMetrics を組み立てます。最後に、EpisodeMetrics に格納された取得結果・経路・カウンター値を用いて報酬テンソルを算出し、NeMo RL に返します。</p><p><strong>GRPO<br></strong>GRPO[7] は、同一の質問（prompt）に対して複数の候補応答を同時に生成し、それらを同一質問内で相対比較することで方針を更新する。具体的には、1 回の学習ステップで複数の prompt をまとめて扱い、各 prompt につき複数の応答候補をサンプリングする。候補ごとに得られた報酬は prompt 単位でグループ化され、同一グループ内の平均との差分（必要に応じて分散で正規化）から advantage を構成する。この advantage を用いて、良い候補応答の生成確率を上げ、相対的に悪い候補の確率を下げる方向に、PPO 系の clipped policy gradient と KL 正則化を組み合わせて重みを更新する。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F_4q5ZljQtHL-3vPQ5H7Vg.jpeg" /></figure><h3>評価</h3><p><strong>評価環境</strong></p><ul><li>使用したモデル：Qwen2.5–1.5B-Instruct [8]</li><li>使用したGPU：Nvidia A100 x2<br>LangGraph 用に1台、Nemo RL 用に1台、という構成です。</li><li>使用したデータセット<br>- Hotpot QA[9]：学習と評価に使いました。<br>- Fever[10]：強化学習の汎化能力を観察する意図で、学習には用いず、評価にのみ使用しました。</li><li>学習の設定<br>先行の知見として、学習初期ステップでは簡単な問題を用い、学習が進んだタイミングで難しい問題に切り替えるスケジューリングの有効性が知られており[11]、本実験では Hotpot QA の 難易度 タグに基づき、2つの難易度に学習データを分割し2段階の強化学習を施しました。</li></ul><p><strong>評価結果（</strong>Hotpot QA）<br>評価として、事後学習なし（Baseline）、Hotpot QA の easy のみで事後学習、 easy と medium の混在で事後学習、の 3 条件のSelf-RAG ループ数（agent → retrive → rewrite を1ループとした）と F1スコアで比較しました。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*S-5iVkDSLHiBiUuKYar4Kg.png" /></figure><p>平均ループ数の大幅な削減、F1スコアの微増が確認されました。平均2.42ループであったが、検索なしで直接回答した件数は Baseline から 事後学習後で 140% 増大しており、”不要なRAG検索をしない” という目的が達成できていることを確認しました。また、目的達成のために精度を犠牲にしていない点も確認できました。</p><p><strong>学習挙動（エントロピーと報酬）<br></strong>エージェントのエントロピー（ランダム性が高いほどエントロピーが高い）[12]が、強化学習ステップと共に減少していることがわかりました。よって、強化学習によりエージェントの意図していない動作を抑制できる可能性が示されました。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/1*g0JJO0SnQKU-a1EK0Uw7VQ.png" /></figure><p>エージェントが獲得した報酬も、強化学習ステップと共に増大しており、強化学習がスムーズに進んでいることがわかりました。また、今回は 18 step までの学習としているが、報酬がサチっていないことから、学習が飽和したというより、まだ改善余地が残っているように見えています。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/1*kiVufR9Sx78c-YpwOAtNxQ.png" /></figure><p><strong>評価結果（Fever）<br></strong>学習には用いていない Fever データを用いて評価した結果、こちらでもループ数の削減と、精度の微増が確認された。Fever は Hotpot QA とタスク形式が異なるため、この改善は特定データセットへの過適合というより、検索・停止・リライトの意思決定というメタな振る舞いが学習された可能性を示します。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*H-0ROVnWpIdGKnz635mH7g.png" /></figure><h3>感想、示唆</h3><p><strong>報酬設計</strong><br>今回、報酬の設計に一番苦労しました。報酬は「何を良しとするか」を数値に落とす作業ですが、少しの重み変更で方策が別方向へ収束します。本実験でも、ツール使用回数やリライト回数に素直に正のインセンティブを置いた際に、即回答でも根拠が弱い回答を量産するなど、報酬ハッキングが起きました。有効な報酬設計には、エージェントにどんな振る舞いをしてほしいか、に関する正しい定義・理解で求められるように思いました。</p><p><strong>低い計算コスト<br></strong> 今回の設定は 12時間/GPU 程度で学習が回り、試行錯誤を回すことができました。Agentic-RL は設計空間が広く、まずは「短いサイクルで壊して直す」ことが重要になります。学習が重いと報酬設計の探索が困難になるため、この計算規模で動いたこと自体が実務上有益です。また、システムとしての最適化余地は大いにあると考えており、弊研究グループの力の見せ所だと考えております。</p><p><strong>今後の展望</strong><br>本ブログは、最高性能の追求というより「LangGraph にてエージェントを定義し、報酬を返し、GRPO で更新できる」ことの検証がメインです。LangGraph 側の状態遷移とログを、NeMo RL が扱えるメッセージログとメタデータに落とす橋渡しが理解できたことで、同じ枠組みを他のエージェントにも適用できるのではないか、と考えております。今後、この技術を横展開することによって、社内外のAIエージェントに対しても評価・改善のループを回し、AIエージェントの運用コストの削減と挙動の安定化を狙います。</p><p>SIC SOG では、本日紹介した、ワークフロー設計、Agentic-RL の実装、以外にも、プロンプトの自動改善、SFT による知識注入、エージェントのメトリクス収集、についても知見を蓄積し、実運用で使えるエージェント継続学習基盤の確立を目指しています。AIエージェントの開発は、研究とプロダクトの接続点そのものです。エージェントの評価設計、報酬設計、学習基盤、運用までを一気通貫で扱いたい方・ご興味ある方は是非ご連絡ください。</p><h3>参考文献</h3><p>[1] Zhang, G., et. al., “The Landscape of Agentic Reinforcement Learning for LLMs: A Survey,” <a href="https://arxiv.org/abs/2509.02547">https://arxiv.org/abs/2509.02547</a>.<br>[2] Ouyang, L., et. al., “Training language models to follow instructions with human feedback,” <a href="https://arxiv.org/abs/2203.02155">https://arxiv.org/abs/2203.02155</a>.<br>[3] Liu, M., et. al., “ProRL: Prolonged Reinforcement Learning Expands Reasoning Boundaries in Large Language Models,” <a href="https://arxiv.org/html/2505.24864v1?utm_source=chatgpt.com">https://arxiv.org/abs/2505.24864v1</a>.<br>[4] Lewis, P., et. al., “Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks,” <a href="https://arxiv.org/abs/2005.11401?utm_source=chatgpt.com">https://arxiv.org/abs/2005.11401</a>.<br>[5] Asai, A., et. al., “Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection,” <a href="https://arxiv.org/abs/2310.11511?utm_source=chatgpt.com">https://arxiv.org/abs/2310.11511</a>.<br>[6] Skalse, Joar., et. al., “Defining and Characterizing Reward Hacking,” <a href="https://arxiv.org/pdf/2209.13085">https://arxiv.org/pdf/2209.13085</a>.<br>[7] Shao, Z., et. al., “DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models,” <a href="https://arxiv.org/abs/2402.03300?utm_source=chatgpt.com">https://arxiv.org/abs/2402.03300</a>.<br>[8] Qwen Team, “Qwen2.5 Technical Report,” <a href="https://arxiv.org/abs/2412.15115">https://arxiv.org/abs/2412.15115</a>.<br>[9] Yang, Z., et. al., “HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answering,” <a href="https://arxiv.org/abs/1809.09600">https://arxiv.org/abs/1809.09600</a>.<br>[10] Thorne, J., “FEVER: a large-scale dataset for Fact Extraction and VERification,” <a href="https://arxiv.org/abs/1803.05355">https://arxiv.org/abs/1803.05355</a>.<br>[11] Narvekar, S., “Curriculum Learning for Reinforcement Learning Domains: A Framework and Survey,” <a href="https://arxiv.org/abs/2003.04960">https://arxiv.org/abs/2003.04960</a>.<br>[12] Ahmed, Z., “Understanding the impact of entropy on policy optimization,” <a href="https://arxiv.org/abs/1811.11214?utm_source=chatgpt.com">https://arxiv.org/abs/1811.11214</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a208a2597a7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nttlabs/agentic-rl-in-practice-optimizing-a-langgraph-self-rag-agent-with-nemo-rl-grpo-4a208a2597a7">Agentic RL in Practice: Optimizing a LangGraph Self-RAG Agent with NeMo RL (GRPO)</a> was originally published in <a href="https://medium.com/nttlabs">nttlabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LinuxカーネルのRustアトミック型]]></title>
            <link>https://medium.com/nttlabs/linux-kernel-rust-atomics-75cf0393645e?source=rss----74f667786e9f---4</link>
            <guid isPermaLink="false">https://medium.com/p/75cf0393645e</guid>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[linux-kernel]]></category>
            <dc:creator><![CDATA[FUJITA Tomonori]]></dc:creator>
            <pubDate>Mon, 22 Dec 2025 23:58:18 GMT</pubDate>
            <atom:updated>2025-12-23T09:21:06.908Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>「え、Rust製のLinuxカーネルモジュール、すでに普及してるの？」</strong></p><p>LinuxカーネルのRust製モジュールが普及するのはまだ先だから、厳しく精査されないだろうと安心して適当な記事を書いてきました。ところが、今年6月にリリースされたAndroid 16には、Rustで実装されたカーネルモジュールが含まれており、すでに広く普及していました。</p><p>今回は、カーネル用に独自実装されたRustのアトミック型について紹介します。</p><h3>メモリモデル</h3><p>Linuxカーネルは、Rustの<a href="https://doc.rust-lang.org/std/sync/atomic/index.html">標準ライブラリのアトミック型</a>を使わず、独自のアトミック型を実装しています。その大きな理由は、Rustの標準のアトミック型が前提とするメモリモデルとカーネルのメモリモデルLKMM（Linux kernel Memory Model）が異なるからです。</p><p>「メモリモデル？」という方も読み進められる技術レベルのことしか書かれてないので、安心してください。メモリモデルは、複数CPU（複数スレッド）から見たときに、メモリの読み書きがどの順序で観測されうるか、そして同期操作が何を保証するかを定めたルールだと考えてください。命令はコンパイラ最適化やCPUの再順序化があるため、直感どおりに「上から実行される」とは限りません。</p><p>メモリモデルの前提が揃っていないと、例えばRustとCが同じメモリ領域に並行してアクセスする場合に、読み書きが観測される順序や可視性についての理解が食い違い、開発者が意図した同期が成立しない可能性があります。</p><p>Rust自体にLKMMサポートを加える<a href="https://github.com/rust-lang/unsafe-code-guidelines/issues/348">提案</a>もありましたが、最終的にはLinuxカーネル側で独自のアトミック型を実装する設計に落ち着きました。</p><h3><strong>汎用アトミック型</strong></h3><p>標準ライブラリのアトミック型は、AtomicI32やAtomicI64のように、プリミティブ型ごとに専用の型が用意されています（AtomicBoolやAtomicUsizeなども同様）。一方、カーネル用のアトミック型は Atomic&lt;T&gt;という型パラメータ付きの形で定義されています。</p><p>「お、標準ライブラリよりも使いやすい。いろいろな型をアトミックに？」と思った方もいるかもしれませんが、カーネル用APIがアプリケーション用APIよりも使いやすいなどということはありえません。Atomic&lt;T&gt;は「任意の型をアトミックにできる」わけではありません。Tは、内部表現としてi32もしくはi64に対応付けられる型に限られます。例えばisize（ビット幅はアーキテクチャ依存）や、#[repr(i32)]か#[repr(i64)]を付けたenumなどが対象です。</p><p>これは、カーネルのC側で長年使われてきた主要な整数向けのアトミックな型が32ビットのatomic_tと64ビットのatomic64_tであり、Rust側の実装もそれら向けに用意されたCのAPIを薄くラップして提供しているためです。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*E9as0qdkRELsoID-GXkiDw.png" /><figcaption>RustからCのアトミック型のマッピング</figcaption></figure><p>C側のアトミックAPIは性能を優先して多くが インライン関数やマクロとして提供されています。そのためRust側から利用する場合、バインディングの都合で呼び出しがラッパー経由になり、純粋な性能面では不利になる可能性があります。</p><p>それでもこの設計が選ばれているのは、速度面の最適化よりも、カーネルが長年使い続けてきた同期機構のセマンティクスにそのまま乗れることを重視しているためです。Rust側で同等の命令列を自前で実装しようとすると、アーキテクチャ固有命令や各種バリア、周辺機構との整合まで含めて、カーネル固有の前提を継続的に再現し続ける必要が出てきます。</p><p>その結果、性能よりも「Cとの一貫性を保ちやすい」こと、そしてコードを保守しやすいことを重視して、CのアトミックAPIへ1対1でマッピングする方針になっています。</p><p>独自アトミック型のAPIは、標準ライブラリのアトミックAPIと似せてあり、違和感なく使えるはずです。</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/921d6085d816eaef76ae38f031ce48bb/href">https://medium.com/media/921d6085d816eaef76ae38f031ce48bb/href</a></iframe><h3><strong>i8もアトミックに</strong></h3><p>Linuxカーネルの開発でRustを使い始めた、という理由もなく困難な道を選んできた人を除けば、標準ライブラリで使っていたi8 やi16 のアトミック型も同じ感覚で使いたい、と考えるかもしれません。そのような希望（未確認）に対応すべく、筆者はこの点の改善に取り組んでいるため、ここでは課題を整理します。</p><p>上で説明したように、カーネルの Atomic&lt;T&gt;はCのアトミックAPIに1対1でマッピングする方針で設計されています。しかしC側には、i8 や i16に対応するアトミック型やAPIは用意されていません。</p><p>アトミック操作は専用のCPU命令に依存するものが多く、アーキテクチャごとに実装や検証のコストが増えがちです。Cと一貫性のあるRustのアトミック実装を各アーキテクチャで維持する負担を考えると、Rust側で独自に再実装するアプローチは関係者の合意を得にくく、C側の既存実装をできるだけ活用する方針のほうが現実的です。</p><h3>まとめ</h3><p>Linuxカーネル内のRustでは、標準ライブラリのアトミック型をそのまま使うのではなく、LKMMを前提にしたカーネル独自のアトミック型が採用されています。さらに、Arcのように内部で標準のアトミック型を使う型も、Cのアトミック型を使う独自実装へ置き換えられています。</p><p>同じ流れとして、<a href="https://medium.com/nttlabs/linux-kernel-and-rust-type-system-7e2f6c6fc3c2">時間関係の型</a>もカーネル独自の実装に置き換えられたことも紹介しました。標準のRustライブラリからカーネルの前提で正しく動く独自ライブラリへの置き換えが進み、Rustでドライバを実装するための現実的な環境が整ってきています。</p><p>NTT研究所では、低レイヤの開発に興味がある仲間を募集中です。連絡お待ちしています。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75cf0393645e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nttlabs/linux-kernel-rust-atomics-75cf0393645e">LinuxカーネルのRustアトミック型</a> was originally published in <a href="https://medium.com/nttlabs">nttlabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rustの型システムでLinuxカーネルのバグを防ぐ]]></title>
            <link>https://medium.com/nttlabs/linux-kernel-and-rust-type-system-7e2f6c6fc3c2?source=rss----74f667786e9f---4</link>
            <guid isPermaLink="false">https://medium.com/p/7e2f6c6fc3c2</guid>
            <category><![CDATA[linux-kernel]]></category>
            <category><![CDATA[rust]]></category>
            <dc:creator><![CDATA[FUJITA Tomonori]]></dc:creator>
            <pubDate>Mon, 18 Aug 2025 00:31:59 GMT</pubDate>
            <atom:updated>2025-08-18T00:31:59.531Z</atom:updated>
            <content:encoded><![CDATA[<p>過去のデバイスドライバのバグを分類し、それをRustでどの程度防げるかを分析するという面倒な仕事からは、引き続き目を背け、Rustの型システムを活用してコンパイル時にAPI誤用によるバグを防ぐ設計例として、筆者が開発に関わっているタイマー抽象化APIを紹介します。</p><h4>タイマーAPI基礎知識</h4><p>特定の時点を時間を表すCの型としてktime_tがあり、これは64ビット符号付き整数（s64）で表現され、単位はナノ秒です。ktime_t型は期間を表す型としても使われます。</p><p>Linuxカーネルには、下記のように複数のクロックソースが用意されていて、デバイスドライバは用途や特性に応じてクロックソースを使い分けます。例えば、realtimeクロックは補正によって時間が過去に戻る場合があるので、経過時間の測定用途には不向きです。また、独自のクロックソースを実装しているデバイスドライバもあります。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kFirmE1sEvtC6vLXzMAi8g.png" /><figcaption>クロックソース（一部）</figcaption></figure><h4>経過時間の計算に関するバグ</h4><p>今回は、経過時間の計算に関するバグを例に取り上げます。</p><p>経過時間を求めるときには、2つのktime_tの差を計算します。しかし、このとき異なるクロックソース由来のktime_tを比較すると不正な値になってしまう、というバグが起こり得ます。</p><p>本来であれば、必ず同じクロックソースから取得したktime_t同士で演算を行う必要があります。ところがC言語のAPIでは、ktime_t型は単なる s64として定義されているため、クロックソースが異なっていてもコンパイルは通ってしまいます。</p><p>異なるクロックソースのktime_tを誤って演算できないようにするには、ktime_tとクロックソースの関係を保持する仕組み が必要です。<br>C言語で考えると、コンパイル時にチェックする方法としてはクロックソースごとに独自のktime_t型を定義する ことが考えられます。技術的には可能ですが、その場合はktime_t型を使う多数のカーネルAPIをクロックソースごとに用意する 必要があり、現実的ではなさそうです。一方、実行時チェックでよいのであれば、ktime_t型にクロックソースの情報を持たせて比較する、といった方法も考えられますね。</p><p>どちらの方法も今すぐ忘れましょう。そんな実験は自作OSでやってください。</p><h4>素直なRust版ktime_tの設計</h4><p>Rustの型システムを使って、コンパイル時にバグを防ぐことのできる設計を考えてみましょう。</p><p>まずは、C言語のktime_tを素直にラップした構造体の一例です。</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/122043f7612ed49d661c7026261b7cb1/href">https://medium.com/media/122043f7612ed49d661c7026261b7cb1/href</a></iframe><p>特定の時点を表す型をInstant、期間を表す型をDeltaと分けて定義しましたが、内部的にはCのktime_tを保持しています。この設計では、Instant型とクロックソースが関係付けられていないので、Cと同様に異なるクロックソース由来のInstantの演算を防ぐことはできません。Rustで単純にCをラップしただけでは、Rustのなんとなく安全な雰囲気は出せても、具体的なメリットは得られないことがわかりました。</p><h4>改良したRust版ktime_tの設計</h4><p>Linuxカーネルで実際に使われているRust版のInstant型は、ジェネリック型パラメータを持つ構造体として定義されています。ClockSourceは、パラメータとして使える型を制限するために用いられており、Rustでトレイトと呼ばれるものです。この記事はRustが使えるようになるためのものではないので、なんとなくわかった気になって読み進めてください。</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8c65144b3533c0a243277b3e35927733/href">https://medium.com/media/8c65144b3533c0a243277b3e35927733/href</a></iframe><p>Instant型にはClockSourceトレイトを実装した型が埋め込まれているように見えますが、実際には コンパイル時にInstant型とクロックソースを関連づけて型チェックを行うためだけに使われます。そのため、Instant型のメモリサイズはパラメータを持たない素直な設計の構造体と変わりません。また、ClockSourceトレイトを実装する型、Monotonicなど全ての構造体は空で、実行時にメモリは確保されません。</p><p>異なるクロックソースに関連づけられたInstant型は、それぞれ別の型として扱われるため、両者を演算しようとするとコンパイルエラーになります。</p><p>関数もジェネリック型パラメータをサポートしているため、どのクロックソースに関連づけられたInstant型でも引数や戻り値として利用できます。同じような関数をクロックソースの数だけ実装する必要はありません。</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9aadbe4d9f7dfe339e7160d76bce2468/href">https://medium.com/media/9aadbe4d9f7dfe339e7160d76bce2468/href</a></iframe><h4>まとめ</h4><p>Rustの型システムを活用することで、CのAPIをラップした、より安全なAPIを実現できそうですね。</p><p>NTT研究所では、低レイヤの開発に興味がある仲間を募集中です。連絡お待ちしています。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e2f6c6fc3c2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nttlabs/linux-kernel-and-rust-type-system-7e2f6c6fc3c2">Rustの型システムでLinuxカーネルのバグを防ぐ</a> was originally published in <a href="https://medium.com/nttlabs">nttlabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Alcoholless: A Lightweight Security Sandbox for macOS Programs (Homebrew, AI Agents, etc.)]]></title>
            <link>https://medium.com/nttlabs/alcoholless-lightweight-security-sandbox-for-macos-ccf0d1927301?source=rss----74f667786e9f---4</link>
            <guid isPermaLink="false">https://medium.com/p/ccf0d1927301</guid>
            <category><![CDATA[google-gemini]]></category>
            <category><![CDATA[sandbox]]></category>
            <category><![CDATA[alcoholless]]></category>
            <category><![CDATA[macos]]></category>
            <category><![CDATA[homebrew]]></category>
            <dc:creator><![CDATA[Akihiro Suda]]></dc:creator>
            <pubDate>Tue, 22 Jul 2025 07:15:14 GMT</pubDate>
            <atom:updated>2025-07-22T07:15:14.767Z</atom:updated>
            <content:encoded><![CDATA[<p>This article introduces <a href="https://github.com/AkihiroSuda/alcless"><strong><em>Alcoholless</em></strong></a><strong>: a lightweight security sandbox for macOS program</strong>s. While Alcoholless was originally made for the sake of securing Homebrew, basically it can be used for almost any CLI programs on macOS. <strong>Notably, Alcoholless is useful for allowing an AI agent to run shell commands with less risk of breaking the host operating system.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*XxuHqJCqyot6SmaT-1aMYg.png" /><figcaption>AI may hallucinate, or may be deceived by a web search result, to run a malicious command</figcaption></figure><h3>Software supply chain under attack</h3><p>Homebrew is the most popular open source package manager on macOS, with more than 7700 package formulae. The large number of packages is both a strength and a weakness; While having many packages is certainly convenient, it raises doubts about whether the entire source code for all of them has been comprehensively reviewed.</p><p>For example, the notorious xz/liblzma backdoor incident (<a href="https://tukaani.org/xz-backdoor/">CVE-2024–3094</a>) has shown even well-known packages can be compromised, although Homebrew was not affected in this case by chance.</p><p>This kind of supply chain attack may actually happen with any package manager; this month (July 2025) saw <a href="https://socket.dev/blog/npm-phishing-campaign-leads-to-prettier-tooling-packages-compromise">a very sophisticated phishing campaign that compromised several packages on npm</a>.</p><h3>AI agents may make mistakes</h3><p>For better or worse, it is becoming common practice to allow AI agents to run arbitrary shell commands. This practice is extremely dangerous of course; an AI agent may hallucinate, or may be deceived by a web search result, to<a href="https://www.trendmicro.com/vinfo/ae/security/news/cybercrime-and-digital-threats/slopsquatting-when-ai-agents-hallucinate-malicious-packages"> install malware with plausible package names</a>:</p><pre>pip install &lt;PLAUSIBLE_PACKAGE_NAME&gt;</pre><p>To alleviate the risk of running such arbitrary commands, AI agents such as <a href="https://github.com/openai/codex/blob/rust-v0.8.0/codex-cli/src/utils/agent/sandbox/macos-seatbelt.ts#L80-L150">OpenAI Codex CLI </a>and <a href="https://github.com/google-gemini/gemini-cli/blob/v0.1.13/packages/cli/src/utils/sandbox-macos-restrictive-open.sb">Google Gemini CLI</a> utilize Apple’s sandbox-execcommand on macOS.</p><pre>sandbox-exec -f PROFILE COMMAND [ARGS]</pre><p>sandbox-exec supports limiting file access with a profile like:</p><pre>(<strong>allow</strong> file-read*)<br>(<strong>deny</strong> file-write*)<br>(<strong>allow</strong> file-write* (<strong>literal</strong> “/dev/null”))</pre><p>However, sandbox-exec seems to have been deprecated since circa 2016.</p><pre>$ <strong>man sandbox-exec</strong><br>[…]<br>DESCRIPTION<br> The sandbox-exec command is DEPRECATED.<br> Developers who wish to sandbox an app should instead adopt<br> the App Sandbox feature described in the App Sandbox Design Guide.</pre><p>In the manual page, Apple recommends using “<a href="https://developer.apple.com/documentation/security/app-sandbox">App Sandbox</a>” instead, however, App Sandbox doesn’t actually provide the direct replacement for the sandbox-exec command.</p><h3>Introducing Alcoholless</h3><p><a href="https://github.com/AkihiroSuda/alcless">Alcoholless</a> provides a simple CLI to run shell commands with reduced security risk:</p><pre>cd ~/SOME_DIRECTORY<br>alcless brew install xz<br>alcless xz SOME_FILE</pre><p>In the example above, xz works as a separate user with an access for the copy of the current directory. Changed files are synced back to the current directory when the command exits.</p><h4>How it works</h4><p><strong>Alcoholless just utilizes 1990s’ commands</strong> ( su , sudo , rsync) and the macOS equivalent of useradd to implement container-like environments, without extending the XNU kernel to support Linux-style container syscalls. A fun fact is that both su and sudo have to be utilized because sudo can’t fully switch the user context on macOS by itself, <a href="https://github.com/AkihiroSuda/alcless/blob/v0.1.1/README.md#why-wrap-su-inside-sudo">due to Mach’s quirks that are not recognized by POSIX</a>.</p><p>Alcoholless could even harden security if it utilized Apple’s <a href="https://developer.apple.com/documentation/virtualization">Virtualization.framework</a>, however, it doesn’t do that, as <a href="https://github.com/AkihiroSuda/alcless/blob/v0.1.1/README.md#why-not-use-vm">the framework apparently does not provide a way to automate the initialization steps of a macOS VM</a> (accept EULA, skip enabling iCloud, set up SSH, etc.).</p><p>This barrier is annoying, but it also comes with several bonuses in avoiding virtualization:</p><ul><li>No performance overhead</li><li>Minimal disk consumption</li><li>Direct access to the host hardware (GPU, etc.)</li><li>Works fine on GitHub Actions (no nested virtualization)</li></ul><h3>Getting started</h3><p><a href="https://github.com/AkihiroSuda/alcless">Alcoholless</a> can be installed from the source code as follows:</p><pre>brew install go<br>git clone https://github.com/AkihiroSuda/alcless.git<br>cd alcless<br>git checkout v0.1.1<br>make<br>sudo make install</pre><p>Alternatively, you can also download binary packages from &lt;<a href="https://github.com/AkihiroSuda/alcless/releases">https://github.com/AkihiroSuda/alcless/releases</a>&gt;.</p><p>For the first run, the alclessctl create default command has to be executed. You’ll be asked to type the password to create the new user account alcless_${USER}_default :</p><pre>$ <strong>alclessctl create default</strong><br>7:41PM INF Creating an instance instance=default instUser=alcless_user_default<br>⚠️  The following commands will be executed:<br>sudo sysadminctl -addUser alcless_user_default -password -<br>sudo chmod go-rx /Users/alcless_user_default<br>sudo sh -c &#39;echo &#39;&quot;&#39;&quot;&#39;suda ALL=(root) NOPASSWD: /usr/bin/su - alcless_user_default -c *&#39;&quot;&#39;&quot;&#39; &gt;&#39;&quot;&#39;&quot;&#39;/etc/sudoers.d/alcless_user_default&#39;&quot;&#39;&quot;&#39;&#39;<br>❓ Press return to continue, or Ctrl-C to abort<br><strong>[RETURN]</strong><br>CONTINUE<br>7:42PM INF Running command cmd=&quot;sudo sysadminctl -addUser alcless_user_default -password -&quot;<br>2025-07-21 19:42:06.758 sysadminctl[37537:5738895] ----------------------------<br>2025-07-21 19:42:06.758 sysadminctl[37537:5738895] No clear text password or interactive option was specified (adduser, change/reset password will not allow user to use FDE) !<br>2025-07-21 19:42:06.758 sysadminctl[37537:5738895] ----------------------------<br>User password: <strong>[PASSWORD]</strong><br>[...]</pre><p>You may also have to verify that your home directory has restrictive permissions:</p><pre>$ <strong>ls -ld ~</strong><br>drwxr-x---+ 55 user staff  1760  7 22 05:19 /Users/user/<br><br>$ <strong>chmod 700 ~</strong><br><br>$ <strong>ls -ld ~</strong><br>drwx------+ 55 user staff  1760  7 22 05:19 /Users/user/</pre><h4>Basic usage</h4><p>After the completion of alcless create default, you have to cd to a directory that is to be synced to the alcess_${USER}_default environment:</p><pre>mkdir -p ~/tmp<br>cd ~/tmp<br># Create some content in the current project directory<br>echo foo &gt;foo</pre><p>Then you can install and run a Homebrew package such as xz :</p><pre>$ <strong>alcless brew install xz</strong><br>[...]<br><br>$ <strong>alcless xz foo</strong><br>7:44PM INF ➡️Syncing the files src=/Users/user/tmp/ dst=default:/Users/alcless_user_default/Users/user/tmp<br>7:44PM INF ⬅️Syncing the files back (dry run) src=default:/Users/alcless_user_default/Users/user/tmp/ dst=/Users/user/tmp<br>*deleting foo<br>.d..t.... ./<br>&gt;f+++++++ foo.xz<br>7:44PM INF ⬅️Syncing the files back src=default:/Users/alcless_user_default/Users/user/tmp/ dst=/Users/user/tmp<br>⚠️  The following commands will be executed:<br>rsync -rai --delete -e &#39;/usr/local/bin/alclessctl shell --workdir=/ --plain&#39; default:/Users/alcless_user_default/Users/user/tmp/ /Users/user/tmp<br>❓ Press return to continue, or Ctrl-C to abort<br><strong>[RETURN]</strong><br>CONTINUE<br>*deleting foo<br>.d..t.... ./<br>&gt;f+++++++ foo.xz</pre><p>alcless syncs the current directory /Users/${USER}/tmp to /Users/alcless_${USER}_default/Users/${USER}/tmp , executes the specified command using the user credential of alcless_${USER}_default, and syncs back the directory with a confirmation prompt.</p><h4>Usage with Gemini</h4><p><a href="https://github.com/google-gemini/gemini-cli">Gemini CLI</a> can be installed in Alcoholless as follows:</p><pre>alcless brew install gemini-cli</pre><p>This command may take around 10 minutes due to recompilation of several dependency packages such as node. This recompilation is needed as the Homebrew prefix (/Users/alcless_${USER}_default/homebrew) differs from the standard installation of Homebrew (/opt/homebrew).</p><p>Then add your <a href="https://aistudio.google.com/app/apikey">GEMINI_API_KEY</a> to .zshenv inside Alcoholless:</p><pre>alcless sh -c &#39;vi ~/.zshenv&#39;</pre><p>Now you can run Gemini CLI and let it run arbitrary shell commands inside Alcoholless:</p><pre>$ <strong>alcless gemini</strong><br><br>╭─────────────────────────────────────────────────────────────╮<br>│  &gt; <strong>Install a Python package that shows the current weather  </strong>│<br>╰─────────────────────────────────────────────────────────────╯<br><br> ╭──────────────────────────────────────────────────────────────────────────────────────────────────────╮<br> │ ✔  GoogleSearch Searching the web for: &quot;python package current weather&quot;                              │<br> │                                                                                                      │<br> │    Search results for &quot;python package current weather&quot; returned.                                     │<br> ╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯<br>✦ I will install the python-weather package, which allows you to get the current weather for a location.<br> ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮<br> │ ?  Shell pip install python-weather (Install the `python-weather` package using pip.) ←                 │<br> │                                                                                                         │<br> │   pip install python-weather                                                                            │<br> │                                                                                                         │<br> │ Allow execution?                                                                                        │<br> │                                                                                                         │<br> │ ● 1. Yes, allow once                                                                                    │<br> │   2. Yes, allow always &quot;pip ...&quot;                                                                        │<br> │   3. No (esc)                                                                                           │<br> │                                                                                                         │<br> ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯</pre><p>It should be noted that Alcoholless is not a panacea; <strong>it is still highly recommended to review AI-generated commands before execution.</strong><br>While the AI is unlikely able to steal or falsify a file outside the working directory (unless macOS has a bug around the user isolation), it might be still able to exploit other attacks such as cryptomining or denial-of-service.</p><h3>NTT is hiring!</h3><p>We at <a href="https://www.rd.ntt/e/">NTT</a> are looking for engineers who work in Open Source communities in the fields of software supply chain security, AI sandboxing, etc. Visit &lt;<a href="https://www.rd.ntt/e/sic/recruit/">https://www.rd.ntt/e/sic/recruit/</a>&gt; to see how to join us.</p><p>私たち<a href="https://www.rd.ntt/">NTT</a>は、ソフトウェアサプライチェーンセキュリティやAIサンドボックスなどの領域のオープンソースコミュニティで、共に活動する仲間を募集しています。ぜひ弊社採用情報ページをご覧ください: &lt;<a href="https://www.rd.ntt/sic/recruit/">https://www.rd.ntt/sic/recruit/</a>&gt;</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ccf0d1927301" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nttlabs/alcoholless-lightweight-security-sandbox-for-macos-ccf0d1927301">Alcoholless: A Lightweight Security Sandbox for macOS Programs (Homebrew, AI Agents, etc.)</a> was originally published in <a href="https://medium.com/nttlabs">nttlabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>