Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,30 @@ jobs:

- name: Verify portable process cleanup
run: node scripts/live-bridge/matrix.mjs

portable-storage:
runs-on: macos-15
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9

- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 22.19.0
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build the product
run: pnpm build

- name: Use encrypted storage on macOS
run: node scripts/release/storage-smoke-child.mjs "$PWD" "$RUNNER_TEMP/braid-storage-smoke"

- name: Test macOS storage security boundaries
env:
TMPDIR: ${{ runner.temp }}
run: pnpm run test -- --scope security
10 changes: 1 addition & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,6 @@ jobs:
os: macos-15
platform: darwin
architecture: arm64
- id: windows-x64
os: windows-latest
platform: win32
architecture: x64
runs-on: ${{ matrix.os }}
timeout-minutes: 30
permissions:
Expand Down Expand Up @@ -281,10 +277,6 @@ jobs:
os: macos-15
platform: darwin
architecture: arm64
- id: windows-x64
os: windows-latest
platform: win32
architecture: x64
runs-on: ${{ matrix.os }}
timeout-minutes: 30
permissions:
Expand Down Expand Up @@ -474,7 +466,7 @@ jobs:
VERSION: ${{ needs.candidate.outputs.version }}
run: |
TAG="v$VERSION"
NOTES="Published @tangle-network/braid@$VERSION from commit ${{ inputs.commit }}. The exact package completed candidate and registry install/use checks on Linux x64, macOS arm64, and Windows x64."
NOTES="Published @tangle-network/braid@$VERSION from commit ${{ inputs.commit }}. The exact package completed candidate and registry install/use checks on Linux x64 and macOS arm64."
if git rev-parse "$TAG" >/dev/null 2>&1; then
test "$(git rev-list -n 1 "$TAG")" = "${{ inputs.commit }}"
else
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ A concrete local route is `AgentProfile` with `harness: 'pi'` → Braid admissio

Braid requires Node.js 22.19 or newer.

Current validated release targets are Linux x64 and macOS arm64.

npm rejects Windows installation because encrypted state cannot yet meet Braid's path-race boundary there.

```bash
npm install --global @tangle-network/braid
braid
Expand Down
8 changes: 8 additions & 0 deletions THIRD_PARTY_LICENSES.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
"license": "MIT",
"name": "@hono/node-server"
},
{
"license": "MIT",
"name": "@koromix/koffi-linux-x64"
},
{
"license": "MIT",
"name": "@napi-rs/keyring-linux-x64-gnu"
Expand Down Expand Up @@ -141,6 +145,10 @@
"license": "MIT",
"name": "is-any-array"
},
{
"license": "MIT",
"name": "koffi"
},
{
"license": "MIT",
"name": "linear-sum-assignment"
Expand Down
5 changes: 4 additions & 1 deletion THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The implementation is expected to depend on and adapt behavior from the followin
| [Microsoft Aspire](https://github.com/dotnet/aspire) | Windows Job Object creation and cleanup pattern for portable release proof | `dotnet/aspire@be77aa36daf995fae0e72091141410c7082fcba3` | MIT |
| [`better-sqlite3-multiple-ciphers`](https://github.com/m4heshd/better-sqlite3-multiple-ciphers) | Pinned production SQLite binding with SQLCipher-compatible encryption | `better-sqlite3-multiple-ciphers@13.0.3` | MIT |
| [`@napi-rs/keyring`](https://github.com/Brooooooklyn/keyring-node) | Native macOS Keychain, Linux Secret Service, and Windows Credential Manager access without passing secrets through command arguments | `@napi-rs/keyring@1.3.0` | MIT |
| [Koffi](https://github.com/Koromix/koffi) | Prebuilt Node FFI for operating system `openat`, `mkdirat`, `linkat`, `renameat`, and `unlinkat` calls | `koffi@3.1.4` | MIT |

## Attribution rule

Expand All @@ -28,7 +29,9 @@ The original copyright and license notice must remain with every substantial cop

A dependency declared in `package.json` does not require a file-level source header, but its license must remain represented in the generated release license inventory.

W5 adds the pinned `better-sqlite3-multiple-ciphers@13.0.3` and `@napi-rs/keyring@1.3.0` production dependencies and no new copied source.
W5 adds the pinned `better-sqlite3-multiple-ciphers@13.0.3`, `@napi-rs/keyring@1.3.0`, and `koffi@3.1.4` production dependencies.

It contains no copied source from these packages.

Its coordinator, storage port, credential port, and release scripts use Braid code and Node.js platform APIs around that binding.

Expand Down
2 changes: 1 addition & 1 deletion docs/03-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ Raw trace export is a separate explicit action with a preview of included conten

The required installation route is `npm install --global @tangle-network/braid` with binary name `braid`.

Release verification covers clean installations on current supported macOS arm64, Linux x64, and Windows x64 environments.
Release verification covers clean installations on current supported macOS arm64 and Linux x64 environments.

The package refuses to run against a shared contract version outside its tested range and explains the supported range.

Expand Down
14 changes: 13 additions & 1 deletion docs/07-security-and-privacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,19 @@ Trust review includes `.braid/config.json`, selected profile sources, hooks, loc

All Braid local paths are converted to canonical absolute paths before policy checks.

Operations use file descriptors or no-follow flags where available and recheck identity before mutation to resist symlink replacement.
Linux and macOS path operations call the operating system's descriptor-relative functions through Koffi.

Each path component opens below its parent descriptor with no-follow flags.

Current npm releases support Linux and macOS.
Inherited key descriptors use procfs on Linux and `F_GETPATH` on macOS before Braid checks that the key stays outside the workspace.
Linux reopens the validated SQLite descriptor through procfs.
macOS resolves the validated descriptor because stock SQLite needs normal journal and WAL paths.
Braid then rejects startup unless SQLite's live database descriptor matches the validated inode.
The agent filesystem jail cannot reach Braid's external state directory.
A hostile process running as the same operating-system user is outside this boundary.

The package rejects Windows until Braid has an equivalent native path-opening primitive.

Writes reject path traversal, NUL bytes, device files, sockets, FIFOs, hard-link surprises where detectable, and destinations outside allowed roots.

Expand Down
8 changes: 4 additions & 4 deletions docs/08-verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ A failing or uncalibrated judge blocks semantic claims but cannot override passi

### Layer 9: installation and release checks

The exact npm tarball installs in clean current supported macOS arm64, Linux x64, and Windows x64 environments.
The exact npm tarball installs in clean current supported macOS arm64 and Linux x64 environments.

Each environment verifies native database encryption, terminal startup, headless turn, path handling, credential adapter behavior, update check disablement, and uninstall without deleting user data.

Expand Down Expand Up @@ -540,9 +540,9 @@ The candidate job runs `pnpm check` once, then `pnpm release:prepare` builds and

A code-free job endorses that exact package before publication.

After npm publication, the same clean-install, plain-flow, encrypted-storage, digest, architecture, and cleanup smoke runs for the candidate and registry package on Linux x64, macOS arm64, and Windows x64.
After npm publication, the same clean-install, plain-flow, encrypted-storage, digest, architecture, and cleanup smoke runs for the candidate and registry package on Linux x64 and macOS arm64.

The publication process validates those six records, the package SHA-256, and npm provenance.
The publication process validates those four records, the package SHA-256, and npm provenance.

It writes `publication/proof.json` below the external artifact directory.

Expand Down Expand Up @@ -599,7 +599,7 @@ Each check records identifier, category, required status, command, working direc

An audit archive includes every check field and output digest.

The publication endorsement covers the exact package, package manifest, six platform-use records, and npm provenance.
The publication endorsement covers the exact package, package manifest, four platform-use records, and npm provenance.

The publication and tag jobs accept only the public key pinned in `release/endorsement-public-key.pem` and recompute the complete index before accepting its signature.

Expand Down
6 changes: 3 additions & 3 deletions docs/09-delivery-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,16 +405,16 @@ All owning repositories for final compatible releases, then `tangle-network/brai
- Endorse the exact candidate package and package manifest in an isolated code-free job.
- Publish `@tangle-network/braid` with npm provenance.
- Download the registry package in clean supported environments and repeat the post-publication smoke.
- Require matching candidate and registry package digests plus successful plain messaging, encrypted storage, and temporary-state cleanup on Linux x64, macOS arm64, and Windows x64.
- Validate the six platform results and npm provenance in one publication record.
- Require matching candidate and registry package digests plus successful plain messaging, encrypted storage, and temporary-state cleanup on Linux x64 and macOS arm64.
- Validate the four platform results and npm provenance in one publication record.
- Endorse that fixed release bundle in an isolated code-free job.
- Tag the source commit and attach the package, publication records, screenshots, and flow recording.

### Done when

The exact main commit passes `pnpm check` and `pnpm release:prepare`.

All three candidate checks and all three registry checks must pass.
Both candidate checks and both registry checks must pass.

The registry package SHA-256 must match the approved candidate.

Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
"engines": {
"node": ">=22.19.0"
},
"os": [
"darwin",
"linux"
],
"packageManager": "pnpm@11.18.0",
"license": "MIT",
"repository": {
Expand Down Expand Up @@ -100,7 +104,8 @@
"@tangle-network/agent-runtime": "0.132.0",
"@tangle-network/sandbox": "0.19.4",
"better-sqlite3-multiple-ciphers": "13.0.3",
"chalk": "6.0.0"
"chalk": "6.0.0",
"koffi": "3.1.4"
},
"devDependencies": {
"@biomejs/biome": "2.5.7",
Expand Down
144 changes: 144 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading