upgrade-boringssl

upgrade-boringssl is a command for Claude Code from twaldin/hone. It costs 24 tokens per session (1,565 once invoked), scanned C, original, MIT.

A maintenance procedure for updating Bun's fork of BoringSSL, the cryptography library it uses, with changes from Google's upstream version.

In plain words
What is it for?
Use it when merging a newer BoringSSL version into Bun, updating the pinned commit, and regenerating the source-file lists.
Why use it?
It provides a repeatable way to bring in upstream security and compatibility changes while keeping Bun's own patches. It also describes how to resolve merge conflicts and check the result builds.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it when merging a newer BoringSSL version into Bun, updating the pinned commit, and regenerating the source-file lists.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/twaldin/hone/upgrade-boringssl
View source ↗ twaldin/hone
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/twaldin/hone

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for upgrade-boringssl

README.md
[![agentmods](https://agentmods.dev/badge/commands/twaldin/hone/upgrade-boringssl/github.svg)](https://agentmods.dev/commands/twaldin/hone/upgrade-boringssl)
Your own site
<a href="https://agentmods.dev/commands/twaldin/hone/upgrade-boringssl"><img src="https://agentmods.dev/badge/commands/twaldin/hone/upgrade-boringssl/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for upgrade-boringssl

Your own site · 80×15
<a href="https://agentmods.dev/commands/twaldin/hone/upgrade-boringssl"><img src="https://agentmods.dev/badge/commands/twaldin/hone/upgrade-boringssl.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,565 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00024 $0.01565
Opus 5 $0.00012 $0.00783
Sonnet 5 $0.00005 $0.00313
Haiku 4.5 $0.00002 $0.00156

Measured yesterday against content hash 80c44e886771, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade C, and why

upgrade-boringssl scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf vendor/boringssl # force re-fetch on next build
capsules/bun-module-loader/.candidate-5187e276/.claude/commands/upgrade-boringssl.md · 101 lines

How it starts

The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Bun pins BoringSSL by commit SHA in scripts/build/deps/boringssl.ts (BORINGSSL_COMMIT). The build downloads a tarball from oven-sh/boringssl at that SHA — there is no submodule and vendor/boringssl/ is git-ignored.

The fork carries a small patch set on top of upstream (see "Preserved patches" below). Upgrading means: merge google/boringssl into oven-sh/boringssl@master, push, then bump the SHA + regenerate source lists in Bun.

Steps

1. Clone the fork and merge upstream

git clone https://github.com/oven-sh/boringssl.git /tmp/boringssl
cd /tmp/boringssl
git remote add upstream https://github.com/google/boringssl.git
git fetch upstream
git log --oneline $(git merge-base HEAD upstream/main)..HEAD   # our patches
git merge upstream/main

Resolve conflicts preserving the fork's additions. Most conflicts are upstream's periodic |...|`...` doc-comment restyle landing adjacent to a line we added — keep our line + upstream's comment style. For include/openssl/nid.h, keep upstream's new NIDs and ours (our NID numbers are from OpenSSL's range and don't collide with BoringSSL's sequential allocation).

2. Verify the merged tree builds

cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Release
ninja -C build crypto ssl decrepit

This catches mis-resolved conflicts before they reach Bun's CI.

3. Push to the fork

The default branch is master (not main).

git push origin HEAD:master
NEW_SHA=$(git rev-parse HEAD)

4. Bump Bun

In the bun repo:

  • scripts/build/deps/boringssl.ts — set BORINGSSL_COMMIT to $NEW_SHA.

  • test/js/node/process/process.test.js — update the boringssl: entry in expectedVersions to $NEW_SHA.

  • Regenerate the source lists (the file's header comment has the exact one-liner). Only gen/sources.json is authoritative — diff old vs new and apply the delta:

    rm -rf vendor/boringssl   # force re-fetch on next build
    bun bd --target=clone-boringssl
    bun -e 'const j=require("./vendor/boringssl/gen/sources.json");
            const f=l=>l.map(JSON.stringify).join(", ");
            for(const k of ["bcm","crypto","ssl","decrepit"]) console.log(k,"\n",f(j[k].srcs));
            console.log("asm\n",f([...j.bcm.asm,...j.crypto.asm]));
            console.log("nasm\n",f([...j.bcm.nasm,...j.crypto.nasm]))'
    

Read the full file on GitHub · 101 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 101 lines · 24 tokens per session scan C 80c44e886771

Subscribe to this mod's changes

upgrade-boringssl is a command published in the GitHub repository twaldin/hone (47 stars, last pushed yesterday), licensed MIT. It adds 24 tokens to every session and 1,565 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-07.