Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
5efdda3
fix(core,proxy): bind provenance source repository and ref to the Ful…
tonibergholm-codento Nov 20, 2026
e8a9a5d
fix(sandbox): pass the Seatbelt profile inline with sandbox-exec -p (F7)
tonibergholm-codento Nov 20, 2026
a2d2467
fix(steward): close claim-state-machine gaps, bind transfers to the c…
tonibergholm-codento Nov 20, 2026
6bf92c4
fix(sandbox): isolate pid namespace and unix sockets under bwrap (F8,…
tonibergholm-codento Nov 20, 2026
a5bc814
fix(sandbox): deny launchctl, open, shortcuts and automator under Sea…
tonibergholm-codento Nov 20, 2026
daba9ac
fix(core): keep rules alive on malformed input and linear on hostile …
tonibergholm-codento Nov 20, 2026
89bb8f2
fix(action): trust the PR-comment marker only on the bot's comment; e…
tonibergholm-codento Nov 20, 2026
82fca75
fix(core): unmatched registry-signature keyids are no better than uns…
tonibergholm-codento Nov 20, 2026
4dedad9
fix(core): linear-time policy glob matcher
tonibergholm-codento Nov 20, 2026
7bd10c7
fix(core): flag non-registry lockfile entries with Coordinate.nonRegi…
tonibergholm-codento Nov 20, 2026
738275c
fix(proxy): harden audit-tree, compat routes, open mode, startup and …
tonibergholm-codento Nov 20, 2026
5e347fc
fix(sandbox): make the node-gyp header caches read-only
tonibergholm-codento Nov 20, 2026
21a37cc
fix(sandbox): a project root of "/" and relative cwd no longer widen …
tonibergholm-codento Nov 20, 2026
dda9e9e
fix(sandbox): screen URL credentials in npm_config_* and control char…
tonibergholm-codento Nov 20, 2026
7adc697
fix(cli): sanitize untrusted terminal output; resolve the run-scripts…
tonibergholm-codento Nov 20, 2026
b3d02ea
fix(deps): npm audit fix for production advisories
tonibergholm-codento Nov 20, 2026
e9ce509
fix(core): close tarball extraction gaps (type-7, MZ:/BZh: JS, manife…
tonibergholm-codento Nov 20, 2026
687d531
test(proxy): give the signed-fixture proxy test its test signing keys
tonibergholm-codento Nov 20, 2026
6433f02
fix(cli): bind enforced-install identity to the audited integrity and…
tonibergholm-codento Nov 20, 2026
715e81e
Merge branch 'worktree-agent-abc9101000a589736' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
d99f403
Merge branch 'worktree-agent-ae8e46040364dfcaa' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
b5a3495
Merge branch 'worktree-agent-ac64553dabad947da' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
96d29b0
Merge branch 'worktree-agent-a5643543b3ab72a1c' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
208788e
Merge branch 'worktree-agent-aea9f60afaedf03cf' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
e052e42
ci: drop token rights from jobs that run third-party install code
tonibergholm-codento Nov 20, 2026
498e799
fix(sandbox): mask local IPC under bwrap whether or not network is ap…
tonibergholm-codento Nov 20, 2026
5370ba9
fix(sandbox): host-owned per-run node-gyp devdir; pin copied-open beh…
tonibergholm-codento Nov 20, 2026
bd92af9
fix(core): parse Yarn berry locators structurally
tonibergholm-codento Nov 20, 2026
42dd055
fix(sandbox): refuse to run when the work dir sits under a local-IPC …
tonibergholm-codento Nov 20, 2026
8411e9f
fix(core): yarn berry entries gate instead of vanishing
tonibergholm-codento Nov 20, 2026
7408e8e
fix(cli): require npm >= 7 for enforced dependency scripts; sanitize …
tonibergholm-codento Nov 20, 2026
e934a77
fix: steward freeze/dispute interplay, zod 4, comment pagination, loo…
tonibergholm-codento Nov 20, 2026
00a22cd
fix(core): a yarn berry entry is registry only if its resolution pins…
tonibergholm-codento Nov 20, 2026
f48d85e
Merge branch 'worktree-agent-aea9f60afaedf03cf' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
c176dda
fix(core): close review findings on rule hardening
tonibergholm-codento Nov 20, 2026
4a3036a
Merge branch 'worktree-agent-a5643543b3ab72a1c' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
f7b80e5
Merge branch 'worktree-agent-ae8e46040364dfcaa' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
c235fc7
docs: record the security audit hardening (ADR-0056)
tonibergholm-codento Nov 20, 2026
5468496
Merge branch 'worktree-agent-ac64553dabad947da' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
824b5b4
docs: reconcile ADR-0056 and guides with the final hardening code
tonibergholm-codento Nov 20, 2026
e5586e0
docs: correct workflow-command escaping, IPC-mask refusal and prepare…
tonibergholm-codento Nov 20, 2026
76dfc2b
fix(sandbox): refuse a working directory that resolves to /
tonibergholm-codento Nov 20, 2026
855e5de
Merge branch 'worktree-agent-a5643543b3ab72a1c' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
cef9778
fix: review round 1 for steward, action and mcp
tonibergholm-codento Nov 20, 2026
1d3b71a
fix(core): close core review round 1 on extraction and script scanning
tonibergholm-codento Nov 20, 2026
438a0f8
Merge branch 'worktree-agent-ae8e46040364dfcaa' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
edfc420
docs: ADR-0056 records both backslash readings for the manifest count
tonibergholm-codento Nov 20, 2026
c049786
Merge branch 'worktree-agent-aea9f60afaedf03cf' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
f1850ad
fix(core,proxy): round-1 review fixes for lockfile sources, compat ro…
tonibergholm-codento Nov 20, 2026
bd831bf
Merge branch 'worktree-agent-ac64553dabad947da' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
4e6fc1d
docs: login credential stripping, lockfile integrity pins, stale-audi…
tonibergholm-codento Nov 20, 2026
42b3c7e
fix(steward): spend every verified challenge when loading pre-trackin…
tonibergholm-codento Nov 20, 2026
5882472
fix(sandbox): follow symlinks when guarding the working directory
tonibergholm-codento Nov 20, 2026
31f12e6
Merge branch 'worktree-agent-a5643543b3ab72a1c' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
7583509
fix(core): close core review round 2 (Windows reading, trie, require …
tonibergholm-codento Nov 20, 2026
8e918ba
fix(core,proxy): round-2 review fixes for audit revision, mixed SRI c…
tonibergholm-codento Nov 20, 2026
68829ec
Merge branch 'worktree-agent-ae8e46040364dfcaa' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
995bd80
docs: ADR-0056 on executed-file resolution and dual-path retention
tonibergholm-codento Nov 20, 2026
8965c02
Merge branch 'worktree-agent-ac64553dabad947da' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
999074f
docs: ADR-0056 on audit revision, SRI algorithms and coordinate redac…
tonibergholm-codento Nov 20, 2026
b11c03d
fix(proxy): take retained signatures only from imported versions on n…
tonibergholm-codento Nov 20, 2026
c749f75
fix(core): close core review round 3 (wrappers, inline flags, collisi…
tonibergholm-codento Nov 20, 2026
410bbd7
Merge branch 'worktree-agent-ae8e46040364dfcaa' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
960b87f
docs: ADR-0056 on code-operand scanning, inline flags and path collis…
tonibergholm-codento Nov 20, 2026
40fdc11
fix(core,proxy): round-3 review fixes for sha384 pins, pnpm v5 keys a…
tonibergholm-codento Nov 20, 2026
49e3db9
fix(core): close core review round 4 (retention readings, quotes, tri…
tonibergholm-codento Nov 20, 2026
436e13c
Merge branch 'worktree-agent-ae8e46040364dfcaa' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
a21a22b
docs: ADR-0056 on import provenance carry-over and shell -c parsing
tonibergholm-codento Nov 20, 2026
bbaa12d
fix(core,proxy): round-4 review fixes for pnpm key splitting and lega…
tonibergholm-codento Nov 20, 2026
6ff7919
fix(core): close core review round 5 (raw header path, quote spans, i…
tonibergholm-codento Nov 20, 2026
b4c77dd
Merge branch 'worktree-agent-ae8e46040364dfcaa' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
3028aff
fix(core): final core review round (PAX prefix, comments and substitu…
tonibergholm-codento Nov 20, 2026
8b333ea
fix(steward,sandbox): approve refuses a spent challenge; realpath tes…
tonibergholm-codento Nov 20, 2026
037edc4
docs: closing-review doc fixes (proof reuse, realpath cwd, store revi…
tonibergholm-codento Nov 20, 2026
d9ccf7f
fix(core): renamed destructured imports under overflow, scripts after cd
tonibergholm-codento Nov 20, 2026
5ff3972
fix(core,proxy): closing-review fixes for pnpm v5 peer keys, sha384 i…
tonibergholm-codento Nov 20, 2026
54dab62
Merge branch 'worktree-agent-ac64553dabad947da' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
5b0f358
Merge branch 'worktree-agent-ae8e46040364dfcaa' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
ddf21c1
docs: legacy proofs include pending approvals; pin gating applies to …
tonibergholm-codento Nov 20, 2026
3a3d515
test(sandbox): second realpath assertion tolerates the /private canon…
tonibergholm-codento Nov 20, 2026
39bee4c
fix(sandbox): compare IPC mask grants and candidates in resolved space
tonibergholm-codento Nov 20, 2026
9b3c19e
fix(core): stop the suffix fallback matching bare command words
tonibergholm-codento Nov 20, 2026
9d4b005
fix(core): merge duplicate lockfile pins in different algorithms inst…
tonibergholm-codento Nov 20, 2026
582469b
Merge branch 'worktree-agent-ae8e46040364dfcaa' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
01da65d
Merge branch 'worktree-agent-ac64553dabad947da' into fix/security-aud…
tonibergholm-codento Nov 20, 2026
833027e
fix(sandbox): map the /var/run alias explicitly instead of resolving …
tonibergholm-codento Nov 20, 2026
08f5548
test(sandbox): report bwrap exit code and stderr when an effect test …
tonibergholm-codento Nov 20, 2026
dd15d37
test(core): give the linear 1 MiB punctuation timing test CI headroom
tonibergholm-codento Nov 20, 2026
4ac57e5
fix(core): resolve a script path attached to a redirect operator
tonibergholm-codento Nov 20, 2026
c80059b
fix(core): treat shell redirections as redirections, not operands
tonibergholm-codento Nov 20, 2026
7fc44f6
fix(core): detect shell redirections on the raw, still-quoted word
tonibergholm-codento Nov 20, 2026
ef0dd9e
fix(sandbox): drop bwrap --die-with-parent; it intermittently killed …
tonibergholm-codento Nov 20, 2026
404da33
docs: record that a killed Sentinel leaves the bwrap command running,…
tonibergholm-codento Nov 20, 2026
6404f11
fix(core): scan relative code paths inside environment-assignment pre…
tonibergholm-codento Nov 20, 2026
c88d7f6
docs: list the remaining install-script detection gaps in ADR-0056
tonibergholm-codento Nov 20, 2026
9a65a23
test(sandbox): print bwrap setup errors from the effect suite (diagno…
tonibergholm-codento Nov 20, 2026
6f79db4
fix(sandbox): build the Landlock helper atomically
tonibergholm-codento Nov 20, 2026
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
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches: [main]
pull_request:

# npm ci runs dependency lifecycle scripts; give them a read-only token.
permissions:
contents: read

jobs:
build-test:
runs-on: ubuntu-latest
Expand Down
35 changes: 34 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,16 @@ jobs:
needs: build-and-verify
runs-on: ubuntu-latest
environment: npm-release
# Publishing rights only. The clean-install check and the GitHub release
# run in later jobs, so no third-party install code ever runs while this
# job can mint an npm OIDC token or push to the repo.
permissions:
contents: write # create the GitHub prerelease
contents: read
id-token: write # npm provenance / trusted publishing (OIDC)
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: Verify the tag exists and points at the tested commit
run: |
set -euo pipefail
Expand Down Expand Up @@ -222,6 +227,19 @@ jobs:
fi
echo "@git-agentic/sentinel-$p@$VERSION visible, dist-tag alpha OK"
done

verify-registry-install:
# Installs the just-published packages from the public registry. npm runs
# freshly resolved third-party code here (no lockfile), so this job holds
# no token at all: no OIDC, no contents write.
if: github.event_name == 'workflow_dispatch' && inputs.publish
needs: publish
runs-on: ubuntu-latest
permissions: {}
steps:
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "24"
- name: Install the published packages from the public registry in a clean project
run: |
set -euo pipefail
Expand All @@ -240,6 +258,21 @@ jobs:
./node_modules/.bin/sentinel --version | grep -qx "$VERSION"
node -e "import('@git-agentic/sentinel-core').then(m=>{if(m.ENGINE_VERSION!=='$VERSION')process.exit(1)})"
echo "clean-project registry install OK"

github-release:
if: github.event_name == 'workflow_dispatch' && inputs.publish
needs: verify-registry-install
runs-on: ubuntu-latest
permissions:
contents: write # create the GitHub prerelease
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: release-artifacts
path: release-artifacts/
- name: Create the GitHub prerelease (only after npm verification)
env:
GH_TOKEN: ${{ github.token }}
Expand Down
134 changes: 115 additions & 19 deletions ARCHITECTURE.md

Large diffs are not rendered by default.

27 changes: 20 additions & 7 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,22 @@ ADR-0045–0048 and threat-model §6.
network-egress, obfuscation, provenance (ADR-0021/0022), typosquat (ADR-0026),
release-anomaly (ADR-0029), known-advisory (ADR-0034), known-vulnerability
(semver-range CVEs, ADR-0035), native-payload-loader (dataflow-correlated
packaged-payload materialization-and-execution chain, ADR-0049). Five more
packaged-payload materialization-and-execution chain, ADR-0049). Six more
finding kinds are synthesized *outside* the rule pipeline — don't count them
as rules: `resource-abuse` (decompression-bomb caps in `extractTarball`,
ADR-0039), `unscanned-content` (>2 MB / native-binary blind-spot flag,
ADR-0041), and `content-mismatch` (raw-byte magic classification catching a
binary/compressed/archive signature behind a text-looking extension,
ADR-0049) inline in `runAudit`; `capability-novelty` from `buildAudit` (needs
ADR-0049), and `manifest-confusion` (critical: more than one npm-normalized root
manifest, a case variant, or an unscannable root manifest, ADR-0056) inline in
`runAudit`; `capability-novelty` from `buildAudit` (needs
the post-rules delta, ADR-0029); `dependencyConfusion` at score time in
`score.ts` (ADR-0026). Registry-signature
verification is offline against configured `NPM_SIGNING_KEYS` (ADR-0021);
provenance deep-verify binds the attestation to the *actual served bytes* and
requires a SLSA v1 predicate for `verified` (ADR-0022, tightened by ADR-0041).
requires a SLSA v1 predicate for `verified` (ADR-0022, tightened by ADR-0041); its
identity `sourceRepository`/`ref` come from the Fulcio certificate, never the
signer-written predicate (ADR-0056).
Advisory/vuln corpora are bundled, static, offline; regenerated by
`scripts/make-advisories.ts` / `make-vulns.ts` from local exports, never fetched
at audit time. Also here: multi-format lockfile parsing (npm/yarn/pnpm) + CycloneDX
Expand All @@ -68,7 +72,10 @@ publish time, `matchPackage`-exempt bypasses, no wall-clock in the engine
(the proxy injects `now` via `ServerOptions.now`), overlaid across the
tarball gate, `/-/audit`, `/-/explain`, `/-/audit-tree`, and `/-/manifest`.
Opt-in Ed25519 role-token auth gates the mutating routes; reads stay open
(ADR-0025). Opt-in `node:sqlite` history DB + `/-/metrics`, `/-/history`,
(ADR-0025). In open mode, import and retraction need a publish token. The proxy
binds `127.0.0.1` unless `SENTINEL_HOST` is set, and `SENTINEL_POLICY` must be
exactly `observe` or `block` (ADR-0056). `audit-tree` returns a `block` row for a
coordinate with `nonRegistry` set (git/URL lockfile sources) without fetching. Opt-in `node:sqlite` history DB + `/-/metrics`, `/-/history`,
`/-/violations/timeline` (ADR-0028). Outbound tarball fetches are pinned to the
registry origin/allowlist (SSRF), inbound `dist.tarball` rewrites require a
configured public base URL off loopback — 421 otherwise (ADR-0036). Byte caps,
Expand Down Expand Up @@ -112,7 +119,9 @@ shared route contract.
**Claim steward (`@git-agentic/sentinel-steward`)** — authenticated operational service for
exact-apex DNS TXT challenges, steward-fetched three-tier grandfathering,
claimant-key-signed transfers, 12-month renewal and freeze, 30-day announced
Tier-2 grants/transfers/dispute rulings, durable atomic state, and atomic
Tier-2 grants/transfers/dispute rulings (Tier 1 needs a homepage or repository
host at or under the claimed domain; a same-named GitHub/GitLab org does not
count, ADR-0056), durable atomic state, and atomic
directory-based Ed25519-signed corpus releases. Authenticated
claimed-namespace retractions join the next signed `advisories.json` release in
the same atomic directory. DNS and issuance run only on the steward; proxy
Expand All @@ -130,7 +139,9 @@ or bubblewrap (linux); one approved-capability model, fail-closed contract
re-denied after any allow (ADR-0038). Env is scrubbed fail-closed; `env:NAME`
approvals re-admit (ADR-0017). Exec is deny-by-default on macOS
(`execAllowFloor` + `SENSITIVE_EXECUTABLES` carve-out: curl, wget, nc, ncat,
socat, osascript, scp, sftp — ADR-0042); on Linux the exfil-tool carve-out is
socat, osascript, scp, sftp, launchctl, open, shortcuts, automator, systemd-run,
busctl, dbus-send, gdbus — ADR-0042, ADR-0056); the Seatbelt profile is passed
inline (`sandbox-exec -p`), not via a temp file; on Linux the exfil-tool carve-out is
enforced via `/dev/null` masking (ADR-0043) and the exec **floor** is enforced
via a from-source Landlock helper where kernel + `cc` allow, advisory otherwise
(fail-open, pre-checked `landlock-exec --check`, ADR-0044). `native` is
Expand All @@ -139,7 +150,9 @@ advisory-only on both platforms by decision. The sandbox is also a sensor:
reported best-effort to `POST /-/violations` — a swallowed denial evades
telemetry, not containment (ADR-0023). Enforced installs run every lifecycle
script under the sandbox via `npm_config_script_shell` interposition
(`sentinel install --enforce`, ADR-0019). `runArgv` (no-shell, execFile-style,
(`sentinel install --enforce`, ADR-0019). `--enforce` sets `SENTINEL_ROOT`; root
detection uses it (never `INIT_CWD`) and a dependency script needs a matching
`npm_package_integrity` (ADR-0056). `runArgv` (no-shell, execFile-style,
shared profile/deny-set/telemetry with `run`) backs `sentinel exec`, extending
containment to Sentinel-mediated command execution — imports/`npx` run
outside `exec` remain uncontained (ADR-0051).
Expand Down
Loading
Loading