From ebe9140c9194282420e64603920c49cbb3ec1324 Mon Sep 17 00:00:00 2001 From: Ilan Harel Date: Mon, 23 Nov 2026 09:23:35 +0200 Subject: [PATCH 1/2] chore(deps): point OpenShell git dependencies and tooling at ai-openshell/openshell OpenShell moved from NVIDIA/OpenShell to ai-openshell/openshell (upstream #5833); the old URL only redirects. Same v0.1.8 commit (f3d9765), so only the Cargo.lock source strings change. Signed-off-by: Ilan Harel --- .github/workflows/openshell-next.yml | 4 ++-- .github/workflows/security.yml | 4 ++-- .github/workflows/upstream-compat.yml | 4 ++-- CHANGELOG.md | 1 + Cargo.lock | 10 +++++----- Cargo.toml | 4 ++-- Dockerfile | 2 +- README.md | 12 ++++++------ SECURITY.md | 2 +- deny.toml | 4 ++-- docs/DEVELOPING.md | 8 ++++++-- scripts/openshell-next.sh | 2 +- scripts/openshell-tags.sh | 6 +++--- scripts/upstream-compat.sh | 6 +++--- scripts/verify-openshell-pin.sh | 24 ++++++++++++------------ src/diff_logs.rs | 2 +- src/lint.rs | 2 +- src/validate.rs | 2 +- tests/cli.rs | 4 ++-- tests/gateway_policies.rs | 2 +- 20 files changed, 55 insertions(+), 50 deletions(-) diff --git a/.github/workflows/openshell-next.yml b/.github/workflows/openshell-next.yml index 7e2be7f..77aa0b4 100644 --- a/.github/workflows/openshell-next.yml +++ b/.github/workflows/openshell-next.yml @@ -1,6 +1,6 @@ name: openshell-next -# Keeps the long-lived `openshell-next` branch building against the newest NVIDIA/OpenShell tag, prereleases included, +# Keeps the long-lived `openshell-next` branch building against the newest ai-openshell/openshell tag, prereleases included, # so the next OpenShell release is integrated (and any breakage fixed) before it ships as stable. # Twice daily (04:17 and 07:17 UTC): merge main into openshell-next, bump the OpenShell pin when upstream has a newer # tag, run the tests, push, and report on the tracking issue (label `openshell-next`). The later run is a backup: @@ -49,7 +49,7 @@ concurrency: env: CARGO_TERM_COLOR: always BRANCH: openshell-next - UPSTREAM: https://github.com/NVIDIA/OpenShell + UPSTREAM: https://github.com/ai-openshell/openshell jobs: track: diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index d714ae5..aff912a 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -4,7 +4,7 @@ name: Security # actionlint lint every workflow (with shellcheck on `run:` scripts) # gitleaks scan the full git history for committed secrets # cargo-deny advisories, licenses, bans and sources for the Rust dependency tree (deny.toml) -# openshell-pin the NVIDIA/OpenShell git pin: Cargo.toml tag = Cargo.lock commit = upstream tag +# openshell-pin the ai-openshell/openshell git pin: Cargo.toml tag = Cargo.lock commit = upstream tag # Tools are downloaded by scripts/ci-tools.sh at pinned versions and checked against pinned SHA-256 hashes # (actionlint also against its GitHub build provenance). Run the same checks locally: scripts/security-local.sh # The job names are required status checks on main (.github/rulesets/protect-main.json, #103): renaming a job here @@ -71,7 +71,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - - name: Verify the NVIDIA/OpenShell pin + - name: Verify the ai-openshell/openshell pin env: GH_TOKEN: ${{ github.token }} run: scripts/verify-openshell-pin.sh diff --git a/.github/workflows/upstream-compat.yml b/.github/workflows/upstream-compat.yml index c6e1218..888dbfb 100644 --- a/.github/workflows/upstream-compat.yml +++ b/.github/workflows/upstream-compat.yml @@ -1,6 +1,6 @@ name: Upstream compatibility -# Builds and tests main against NVIDIA/OpenShell's newest release, newest prerelease and its main branch (both policy +# Builds and tests main against ai-openshell/openshell's newest release, newest prerelease and its main branch (both policy # crates repointed to the same upstream commit), so upstream changes show up here before they bite users. # Informational only: this is NOT a required check (see .github/rulesets/protect-main.json), and only scheduled and # manual runs can fail. The `openshell-next` branch (.github/workflows/openshell-next.yml) is where a newer pin is @@ -78,7 +78,7 @@ jobs: gh label create upstream-compat --color D93F0B --description "Broken against a newer OpenShell" 2>/dev/null || true { echo "**Target:** \`$TARGET\` (\`${LABEL:-unresolved}\` @ \`${SHA:-unknown}\`)" - echo "**Upstream commit:** https://github.com/NVIDIA/OpenShell/commit/${SHA:-}" + echo "**Upstream commit:** https://github.com/ai-openshell/openshell/commit/${SHA:-}" echo "**Run / full log:** $RUN_URL" echo echo "Last lines of the log:" diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c213f3..084b0cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ version section and adds the squash-merged PR titles since the previous tag. Ver ## [Unreleased] +- chore(deps): OpenShell moved to `ai-openshell/openshell`: the git dependencies, `Cargo.lock` sources (same v0.1.8 commit), `deny.toml` `allow-git`, the pin/tag/compat/openshell-next scripts and workflows, and upstream links in the docs use the new URL instead of the `NVIDIA/OpenShell` redirect (#105) - ci: the `Security` checks `actionlint`, `gitleaks`, `cargo-deny` and `openshell-pin` are required status checks on `main`, next to `check` and `audit` (`protect-main` ruleset, #103) - ci: `Security` workflow (#101): actionlint on the workflows, gitleaks over the full git history, `cargo deny check` with a new `deny.toml` (advisories, licenses, bans, sources), and `scripts/verify-openshell-pin.sh`, which checks that the Cargo.toml OpenShell tag, the Cargo.lock commit and the upstream tag agree; tools are installed by `scripts/ci-tools.sh` at pinned versions with pinned SHA-256 hashes (actionlint also by attestation); `scripts/security-local.sh` runs the same checks locally; `ci.yml` pins `actions/checkout` and `actions/cache` by commit SHA - feat(lint): warn about OpenShell v0.1.8 pitfalls: `ws://`/`wss://` URL literals declared only by a `rest` egress (REST endpoints answer WebSocket upgrades with 403), and IPv4-mapped IPv6 hosts (`::ffff:a.b.c.d`, evaluated as IPv4) in egress directives and policy files; README notes that symlinked filesystem paths (fail launch since v0.1.8) cannot be detected statically diff --git a/Cargo.lock b/Cargo.lock index 1fd3f8e..5bcff5b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2111,7 +2111,7 @@ dependencies = [ [[package]] name = "openshell-core" version = "0.0.0" -source = "git+https://github.com/NVIDIA/OpenShell?tag=v0.1.8#f3d976590d3eb1379690a2abaf0f0e26c21d487d" +source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.8#f3d976590d3eb1379690a2abaf0f0e26c21d487d" dependencies = [ "async-trait", "base64 0.22.1", @@ -2146,7 +2146,7 @@ dependencies = [ [[package]] name = "openshell-crypto" version = "0.0.0" -source = "git+https://github.com/NVIDIA/OpenShell?tag=v0.1.8#f3d976590d3eb1379690a2abaf0f0e26c21d487d" +source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.8#f3d976590d3eb1379690a2abaf0f0e26c21d487d" dependencies = [ "aws-lc-rs", "jsonwebtoken", @@ -2164,7 +2164,7 @@ dependencies = [ [[package]] name = "openshell-extension-core" version = "0.0.0" -source = "git+https://github.com/NVIDIA/OpenShell?tag=v0.1.8#f3d976590d3eb1379690a2abaf0f0e26c21d487d" +source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.8#f3d976590d3eb1379690a2abaf0f0e26c21d487d" dependencies = [ "hyper-util", "serde", @@ -2177,7 +2177,7 @@ dependencies = [ [[package]] name = "openshell-policy" version = "0.0.0" -source = "git+https://github.com/NVIDIA/OpenShell?tag=v0.1.8#f3d976590d3eb1379690a2abaf0f0e26c21d487d" +source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.8#f3d976590d3eb1379690a2abaf0f0e26c21d487d" dependencies = [ "hickory-proto", "miette", @@ -2191,7 +2191,7 @@ dependencies = [ [[package]] name = "openshell-policy-schema" version = "0.0.0" -source = "git+https://github.com/NVIDIA/OpenShell?tag=v0.1.8#f3d976590d3eb1379690a2abaf0f0e26c21d487d" +source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.8#f3d976590d3eb1379690a2abaf0f0e26c21d487d" dependencies = [ "miette", "noyalib", diff --git a/Cargo.toml b/Cargo.toml index 210d16a..7d1b80c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,9 +11,9 @@ authors = ["Ilan Harel"] [dependencies] # Pinned to the OpenShell v0.1.8 tag; Cargo.lock records the exact commit. -openshell-policy-schema = { git = "https://github.com/NVIDIA/OpenShell", tag = "v0.1.8" } +openshell-policy-schema = { git = "https://github.com/ai-openshell/openshell", tag = "v0.1.8" } # Same tag. Schema parsing accepts policies the gateway later rejects; this crate is that validator. -openshell-policy = { git = "https://github.com/NVIDIA/OpenShell", tag = "v0.1.8" } +openshell-policy = { git = "https://github.com/ai-openshell/openshell", tag = "v0.1.8" } anyhow = "1" clap = { version = "4", features = ["derive"] } ignore = "0.4" diff --git a/Dockerfile b/Dockerfile index d1eaab9..ababfbe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1.7 # Build: scripts/docker-build.sh (or: docker build -t openshell-annotate:dev .) # -# `openshell-policy-schema` is a git dependency on https://github.com/NVIDIA/OpenShell (tag v0.1.8, commit pinned +# `openshell-policy-schema` is a git dependency on https://github.com/ai-openshell/openshell (tag v0.1.8, commit pinned # in Cargo.lock), fetched by cargo during the build, so no local OpenShell checkout is needed. FROM rust:1.94-bookworm AS build WORKDIR /build diff --git a/README.md b/README.md index 5bc5c23..24ef48a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # openshell-annotate -Policy-as-code for [NVIDIA OpenShell](https://github.com/NVIDIA/OpenShell) sandboxes. Developers write +Policy-as-code for [NVIDIA OpenShell](https://github.com/ai-openshell/openshell) sandboxes. Developers write structured comments next to the code that needs access; the CLI scans the repo and generates `policy.yaml` (every entry commented with its reason and `file:line`) plus a separate providers file, lints for un-annotated calls, and gates CI on drift. @@ -138,7 +138,7 @@ stderr. Exit codes and `--deny-warnings` do not depend on the format. OpenShell 0.1.8 only lets the sandbox read `/usr /lib /etc /app /var/log /proc /dev/urandom` (plus the workspace when `include_workdir` is on) once a `filesystem_policy` exists, and it does not log filesystem denials -([NVIDIA/OpenShell#4270](https://github.com/NVIDIA/OpenShell/issues/4270)), so an application under `/opt/` fails with a bare +([ai-openshell/openshell#4270](https://github.com/ai-openshell/openshell/issues/4270)), so an application under `/opt/` fails with a bare `EACCES`. `generate --image IMAGE` inspects the image (docker, then podman: WORKDIR, ENTRYPOINT, CMD, and the directory layout from a throw-away `create` + `export | tar -t`; nothing is started) and prints, on stderr, a proposal such as `# @openshell fs read /opt/context7 reason="..."` for each directory that is neither in the baseline nor under a declared @@ -312,7 +312,7 @@ cloud APIs only. For every credential nothing declares (reported as `unmapped`), directives in the file that declares it (`tls=skip` endpoints get `allow_uninspected_credentials: true`, which OpenShell requires). Files that already exist are kept. Review the auth style, then check and import it. The skeleton sends the credential as a bearer token in `Authorization`; since OpenShell v0.1.8 a credential is substituted only where the profile -declares it ([NVIDIA/OpenShell#4886](https://github.com/NVIDIA/OpenShell/pull/4886)), so an API that takes it in another header +declares it ([ai-openshell/openshell#4886](https://github.com/ai-openshell/openshell/pull/4886)), so an API that takes it in another header (`x-api-key`), a query parameter or a URL path needs `auth_style: header|query|path` with `header_name`, `query_param` or `path_template`: @@ -350,11 +350,11 @@ the rule; a profile bound to other binaries (the bundled `github` profile is for listed in `[lint] ignore_hosts`. - JS regex literals are not parsed; Python docstrings are strings (directives must be `#` comments). - OpenShell v0.1.8 changes that lint checks: a `ws://`/`wss://` URL literal whose host is declared only by an inspected - `rest` egress is a warning (REST endpoints answer WebSocket upgrades with 403, NVIDIA/OpenShell#5336; use + `rest` egress is a warning (REST endpoints answer WebSocket upgrades with 403, ai-openshell/openshell#5336; use `protocol=websocket`), and an IPv4-mapped IPv6 host (`::ffff:203.0.113.7`) in a directive or a `--policy` file is a warning - (it is evaluated as IPv4, NVIDIA/OpenShell#5101). A WebSocket client with a computed URL or behind an SDK is not seen. + (it is evaluated as IPv4, ai-openshell/openshell#5101). A WebSocket client with a computed URL or behind an SDK is not seen. Filesystem policy paths that go through a symlink inside a writable directory now fail sandbox launch - (NVIDIA/OpenShell#5278); the symlink lives in the image, so lint cannot see it: put the symlink's target in `@openshell fs`. + (ai-openshell/openshell#5278); the symlink lives in the image, so lint cannot see it: put the symlink's target in `@openshell fs`. - Filesystem/process/landlock are startup-only in OpenShell; drift labels them `startup`. - `diff-logs` only sees network and L7 events: OpenShell 0.1.8 does not log Landlock/filesystem denials (upstream #4270), log delivery is batched and best-effort (wait a few seconds after the workload; absence of an event is not proof), and `NET:REFUSE` lines carry no binary. diff --git a/SECURITY.md b/SECURITY.md index b96b5dc..9c72d10 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -14,7 +14,7 @@ OpenShell itself should be reported to the OpenShell project (see its `SECURITY. - Every pull request and push to `main`, plus a weekly run, goes through the `Security` workflow: actionlint on the workflows, gitleaks over the full git history, `cargo deny check` (RustSec advisories, licenses, sources; see - `deny.toml`) and a check that the pinned `NVIDIA/OpenShell` tag, the commit in `Cargo.lock` and the upstream tag + `deny.toml`) and a check that the pinned `ai-openshell/openshell` tag, the commit in `Cargo.lock` and the upstream tag agree. `cargo audit` runs in CI as well. All of these are required status checks for merging into `main`. - Third-party GitHub Actions are pinned by commit SHA. CI tools are downloaded at pinned versions and checked against pinned SHA-256 hashes. diff --git a/deny.toml b/deny.toml index cff6516..5f12bc2 100644 --- a/deny.toml +++ b/deny.toml @@ -47,9 +47,9 @@ allow-wildcard-paths = true highlight = "simplest-path" [sources] -# Only crates.io and the pinned NVIDIA/OpenShell git repository. The pin itself (tag -> commit in Cargo.lock) is +# Only crates.io and the pinned ai-openshell/openshell git repository. The pin itself (tag -> commit in Cargo.lock) is # checked by scripts/verify-openshell-pin.sh. unknown-registry = "deny" unknown-git = "deny" allow-registry = ["https://github.com/rust-lang/crates.io-index"] -allow-git = ["https://github.com/NVIDIA/OpenShell"] +allow-git = ["https://github.com/ai-openshell/openshell"] diff --git a/docs/DEVELOPING.md b/docs/DEVELOPING.md index 64a950c..01ec5f7 100644 --- a/docs/DEVELOPING.md +++ b/docs/DEVELOPING.md @@ -75,11 +75,15 @@ tool, change its version and hash together. A new license in the dependency tree reviewed and added to `deny.toml`. Pin every third-party action by full commit SHA with the version in a comment (`uses: owner/action@ # vX.Y.Z`); actionlint does not enforce this, review does. -CI never downloads OpenShell binaries: it builds the policy crates from the `NVIDIA/OpenShell` git tag. OpenShell's +CI never downloads OpenShell binaries: it builds the policy crates from the `ai-openshell/openshell` git tag. OpenShell's release attestations cover its built packages, which can be built from another commit than the tag (v0.1.8's .deb came from 22209de, the tag is f3d9765), so the `openshell-pin` job checks the source pin instead and reports whether GitHub verified the commit's signature. +OpenShell moved from `NVIDIA/OpenShell` to `ai-openshell/openshell` in November 2026 (upstream #5833). The old +URL redirects, but `Cargo.toml`, `deny.toml` (`allow-git`) and the scripts use the new one, so `cargo deny` rejects a +lock file that still resolves from `NVIDIA/OpenShell` and `scripts/verify-openshell-pin.sh` finds no pin in it. + Clippy gains new lints with every Rust release. If it fails on a newer toolchain but passes on 1.94, fix the lint in a separate commit (CI will keep using 1.94 until the pin is bumped on purpose in `ci.yml`, `Dockerfile` and `Cargo.toml`). @@ -225,7 +229,7 @@ openshell-annotate diff-logs path/to/sandbox.log --write # inserts directives a Sample logs for both formats are in `tests/fixtures/logs/`. Filesystem denials are not logged by OpenShell 0.1.8, so `diff-logs` only sees network and L7 events. It reads no sandbox attribution fields, so OpenShell v0.1.8 moving -`container.uid`/`container.name` to `device.container.*` (NVIDIA/OpenShell#5048) needs no change; the OCSF fixture +`container.uid`/`container.name` to `device.container.*` (ai-openshell/openshell#5048) needs no change; the OCSF fixture is real v0.1.7 output. ## 6. Docker image diff --git a/scripts/openshell-next.sh b/scripts/openshell-next.sh index e0658d9..4f20f39 100755 --- a/scripts/openshell-next.sh +++ b/scripts/openshell-next.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Maintain the `openshell-next` integration branch, which builds against the newest NVIDIA/OpenShell tag +# Maintain the `openshell-next` integration branch, which builds against the newest ai-openshell/openshell tag # (prereleases included). Used by .github/workflows/openshell-next.yml; safe to run by hand on a local checkout. # # scripts/openshell-next.sh bump # pin both OpenShell crates to in Cargo.toml and re-resolve Cargo.lock diff --git a/scripts/openshell-tags.sh b/scripts/openshell-tags.sh index 2ca6934..bbb1615 100755 --- a/scripts/openshell-tags.sh +++ b/scripts/openshell-tags.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# List and compare NVIDIA/OpenShell release tags in release order (a stable vX.Y.Z sorts after its vX.Y.Z-pre.N). +# List and compare ai-openshell/openshell release tags in release order (a stable vX.Y.Z sorts after its vX.Y.Z-pre.N). # # scripts/openshell-tags.sh latest # newest tag, prereleases included (what `openshell-next` tracks) # scripts/openshell-tags.sh latest-stable # newest vX.Y.Z @@ -9,14 +9,14 @@ # scripts/openshell-tags.sh is-stable A # exit 0 when A is vX.Y.Z (no prerelease suffix) # # Only vX.Y.Z and vX.Y.Z-pre.N tags count; anything else upstream (`dev`, `vm-runtime`, ...) is ignored. -# Env: UPSTREAM_REPO (default https://github.com/NVIDIA/OpenShell); OPENSHELL_TAGS (newline-separated tag list to use +# Env: UPSTREAM_REPO (default https://github.com/ai-openshell/openshell); OPENSHELL_TAGS (newline-separated tag list to use # instead of asking the remote, for tests and offline runs); OPENSHELL_ANNOTATE_ROOT (checkout whose Cargo.toml # `pinned` reads; default: the checkout this script lives in). # Exit: 0 ok / true, 1 false, 2 usage or no tags found. set -euo pipefail cd "${OPENSHELL_ANNOTATE_ROOT:-$(dirname "$0")/..}" -REPO="${UPSTREAM_REPO:-https://github.com/NVIDIA/OpenShell}" +REPO="${UPSTREAM_REPO:-https://github.com/ai-openshell/openshell}" RE='^v[0-9]+\.[0-9]+\.[0-9]+(-pre\.[0-9]+)?$' usage() { sed -n '2,13p' "$0" | sed 's/^# \{0,1\}//' >&2; exit 2; } diff --git a/scripts/upstream-compat.sh b/scripts/upstream-compat.sh index ab02173..524cfc1 100755 --- a/scripts/upstream-compat.sh +++ b/scripts/upstream-compat.sh @@ -3,18 +3,18 @@ # (openshell-policy-schema and openshell-policy, both repointed to the same upstream commit), # WITHOUT touching this working tree (Cargo.toml / Cargo.lock stay pinned). Works on a temporary copy. # -# scripts/upstream-compat.sh latest-release # newest stable vX.Y.Z tag of NVIDIA/OpenShell +# scripts/upstream-compat.sh latest-release # newest stable vX.Y.Z tag of ai-openshell/openshell # scripts/upstream-compat.sh latest-prerelease # newest tag incl. vX.Y.Z-pre.N (what openshell-next tracks; = latest-release when no newer prerelease) # scripts/upstream-compat.sh main # OpenShell HEAD # scripts/upstream-compat.sh v0.1.7-pre.3 # any tag, branch or commit SHA # -# Env: UPSTREAM_REPO (default https://github.com/NVIDIA/OpenShell), UPSTREAM_COMPAT_LOG (also write the log there), +# Env: UPSTREAM_REPO (default https://github.com/ai-openshell/openshell), UPSTREAM_COMPAT_LOG (also write the log there), # CARGO_TARGET_DIR (reuse a build cache), GITHUB_STEP_SUMMARY / GITHUB_OUTPUT (set automatically in Actions). # Exit: 0 compatible, 1 build/test failure, 2 usage / could not resolve the ref. set -euo pipefail cd "$(dirname "$0")/.." -REPO="${UPSTREAM_REPO:-https://github.com/NVIDIA/OpenShell}" +REPO="${UPSTREAM_REPO:-https://github.com/ai-openshell/openshell}" TARGET="${1:-}" [ -n "$TARGET" ] || { echo "usage: $0 " >&2; exit 2; } diff --git a/scripts/verify-openshell-pin.sh b/scripts/verify-openshell-pin.sh index 36e1ee9..91c489b 100755 --- a/scripts/verify-openshell-pin.sh +++ b/scripts/verify-openshell-pin.sh @@ -1,34 +1,34 @@ #!/usr/bin/env bash -# Verify the NVIDIA/OpenShell git dependency pin (run by the `openshell-pin` job in .github/workflows/security.yml). +# Verify the ai-openshell/openshell git dependency pin (run by the `openshell-pin` job in .github/workflows/security.yml). # scripts/verify-openshell-pin.sh # CI does not download OpenShell release binaries: the two policy crates are git dependencies on -# https://github.com/NVIDIA/OpenShell by tag (Cargo.toml), and Cargo.lock records the commit cargo fetched. Release -# attestations (`gh attestation verify --repo NVIDIA/OpenShell`) cover OpenShell's built artifacts such as the .deb, not +# https://github.com/ai-openshell/openshell by tag (Cargo.toml), and Cargo.lock records the commit cargo fetched. Release +# attestations (`gh attestation verify --repo ai-openshell/openshell`) cover OpenShell's built artifacts such as the .deb, not # its source tree, and those artifacts can be built from a different commit than the tag (v0.1.8's .deb came from 22209de, # its tag points at f3d9765), so they cannot vouch for what cargo builds here. What this script checks instead: # 1. every OpenShell crate in Cargo.toml uses the same `tag = "vX.Y.Z[-pre.N]"` (no branch or rev pins); -# 2. every NVIDIA/OpenShell package in Cargo.lock comes from that tag and one commit; +# 2. every ai-openshell/openshell package in Cargo.lock comes from that tag and one commit; # 3. that commit is what the tag points to upstream right now (`git ls-remote`, annotated tags peeled), so a moved or # re-created tag, or a lock file edited by hand, fails; # 4. with `gh` available, GitHub reports the commit's signature as verified (a warning, not a failure, if not). -# Env: UPSTREAM_REPO (default https://github.com/NVIDIA/OpenShell). +# Env: UPSTREAM_REPO (default https://github.com/ai-openshell/openshell). set -euo pipefail cd "$(dirname "$0")/.." -REPO="${UPSTREAM_REPO:-https://github.com/NVIDIA/OpenShell}" +REPO="${UPSTREAM_REPO:-https://github.com/ai-openshell/openshell}" fail() { echo "::error::$*" >&2; exit 1; } -tags="$(grep -E '^[a-z0-9_-]+ *= *\{[^}]*git *= *"https://github.com/NVIDIA/OpenShell"' Cargo.toml || true)" -[ -n "$tags" ] || fail "no NVIDIA/OpenShell git dependency found in Cargo.toml" +tags="$(grep -E '^[a-z0-9_-]+ *= *\{[^}]*git *= *"https://github.com/ai-openshell/openshell"' Cargo.toml || true)" +[ -n "$tags" ] || fail "no ai-openshell/openshell git dependency found in Cargo.toml" if printf '%s\n' "$tags" | grep -Eq '(branch|rev) *='; then - fail "Cargo.toml pins NVIDIA/OpenShell by branch or rev; use a release tag" + fail "Cargo.toml pins ai-openshell/openshell by branch or rev; use a release tag" fi tag="$(printf '%s\n' "$tags" | sed -nE 's/.*tag *= *"([^"]+)".*/\1/p' | sort -u)" [ "$(printf '%s\n' "$tag" | grep -c .)" = 1 ] || fail "OpenShell crates use different tags in Cargo.toml: $(printf "%s " "$tag")" printf '%s' "$tag" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$' || fail "unexpected OpenShell tag: $tag" -sources="$(grep -E '^source = "git\+https://github.com/NVIDIA/OpenShell' Cargo.lock | sort -u)" -[ -n "$sources" ] || fail "no NVIDIA/OpenShell package in Cargo.lock" -[ "$(printf '%s\n' "$sources" | grep -c .)" = 1 ] || fail "Cargo.lock has more than one NVIDIA/OpenShell source: +sources="$(grep -E '^source = "git\+https://github.com/ai-openshell/openshell' Cargo.lock | sort -u)" +[ -n "$sources" ] || fail "no ai-openshell/openshell package in Cargo.lock" +[ "$(printf '%s\n' "$sources" | grep -c .)" = 1 ] || fail "Cargo.lock has more than one ai-openshell/openshell source: $sources" locked_tag="$(printf '%s' "$sources" | sed -nE 's/.*\?tag=([^#]+)#.*/\1/p')" commit="$(printf '%s' "$sources" | sed -nE 's/.*#([0-9a-f]{40})"$/\1/p')" diff --git a/src/diff_logs.rs b/src/diff_logs.rs index 9b54658..afaca53 100644 --- a/src/diff_logs.rs +++ b/src/diff_logs.rs @@ -990,7 +990,7 @@ garbage line\n"; #[test] fn sandbox_attribution_location_does_not_matter() { - // OpenShell v0.1.8 (NVIDIA/OpenShell#5048) moved supervisor sandbox attribution from top-level `container.*` + // OpenShell v0.1.8 (ai-openshell/openshell#5048) moved supervisor sandbox attribution from top-level `container.*` // to `device.container.*`. diff-logs never reads either, so both shapes give the same event. let body = "\"class_uid\":4001,\"activity_id\":1,\"status_detail\":\"transparent_tcp_policy_denied\",\"dst_endpoint\":{\"domain\":\"pypi.org\",\"port\":443},\"actor\":{\"process\":{\"name\":\"/usr/bin/python3\"}},\"action_id\":2,\"action\":\"Denied\""; let v017 = format!("{{{body},\"device\":{{\"hostname\":\"sandbox\"}},\"container\":{{\"name\":\"s\",\"uid\":\"u\"}}}}\n"); diff --git a/src/lint.rs b/src/lint.rs index 212082e..458dfda 100644 --- a/src/lint.rs +++ b/src/lint.rs @@ -744,7 +744,7 @@ fn egress_protocol(d: &Directive) -> Option { } /// Warns about `ws://` / `wss://` URL literals whose host and port are declared only by inspected `rest` egress -/// directives. Since OpenShell v0.1.8 (NVIDIA/OpenShell#5336) a REST endpoint answers WebSocket upgrade requests +/// directives. Since OpenShell v0.1.8 (ai-openshell/openshell#5336) a REST endpoint answers WebSocket upgrade requests /// with 403, so these clients need `protocol=websocket`. Comment-only lines and excluded files are skipped. fn websocket_on_rest(scan: &Scan, cfg: &Config) -> Vec { static RE: OnceLock = OnceLock::new(); diff --git a/src/validate.rs b/src/validate.rs index 2f62b91..d70bd7b 100644 --- a/src/validate.rs +++ b/src/validate.rs @@ -71,7 +71,7 @@ pub fn check_host(host: &str) -> Result<(), String> { /// Returns a warning when `host` is an IPv4-mapped IPv6 address such as `::ffff:203.0.113.7`. /// -/// Since OpenShell v0.1.8 (NVIDIA/OpenShell#5101) transparent TCP connections to such destinations are evaluated as +/// Since OpenShell v0.1.8 (ai-openshell/openshell#5101) transparent TCP connections to such destinations are evaluated as /// IPv4, so a rule has to name the IPv4 address. Brackets are ignored. pub fn host_warning(host: &str) -> Option { let h = host.trim_matches(|c| c == '[' || c == ']'); diff --git a/tests/cli.rs b/tests/cli.rs index 7fb98f2..f9c6675 100644 --- a/tests/cli.rs +++ b/tests/cli.rs @@ -2207,7 +2207,7 @@ fn diff_logs_reads_openshell_0_1_7_ocsf_1_8_0_records() { golden("diff_logs_ocsf_1_8_0_plain.txt", &out(&o)); } -/// OpenShell v0.1.8 (NVIDIA/OpenShell#5336): a REST endpoint answers WebSocket upgrades with 403, so lint warns +/// OpenShell v0.1.8 (ai-openshell/openshell#5336): a REST endpoint answers WebSocket upgrades with 403, so lint warns /// about `ws://`/`wss://` URLs declared only by an inspected `rest` egress, and not once `protocol=websocket` is used. #[test] fn lint_warns_about_websocket_urls_on_rest_egress() { @@ -2237,7 +2237,7 @@ fn lint_warns_about_websocket_urls_on_rest_egress() { assert!(!s.contains("WebSocket URL"), "{s}"); } -/// OpenShell v0.1.8 (NVIDIA/OpenShell#5101) evaluates IPv4-mapped IPv6 destinations as IPv4: lint warns about such +/// OpenShell v0.1.8 (ai-openshell/openshell#5101) evaluates IPv4-mapped IPv6 destinations as IPv4: lint warns about such /// hosts in a policy file. #[test] fn lint_policy_warns_about_ipv4_mapped_hosts() { diff --git a/tests/gateway_policies.rs b/tests/gateway_policies.rs index ab76d94..e611744 100644 --- a/tests/gateway_policies.rs +++ b/tests/gateway_policies.rs @@ -57,7 +57,7 @@ fn example_and_golden_policies_pass_the_gateway_validator() { ); } -/// OpenShell v0.1.8 (NVIDIA/OpenShell#5336): `websocket_credential_rewrite: true` needs `protocol: websocket`. +/// OpenShell v0.1.8 (ai-openshell/openshell#5336): `websocket_credential_rewrite: true` needs `protocol: websocket`. /// `lint --policy`, `drift` and `generate` run the gateway validator, so they report it with the upstream hint. #[test] fn websocket_credential_rewrite_needs_the_websocket_protocol() { From 37e9e560fd284abe96cbb33d580ea1f003314f00 Mon Sep 17 00:00:00 2001 From: Ilan Harel Date: Mon, 23 Nov 2026 09:33:07 +0200 Subject: [PATCH 2/2] chore(deps): update url to 2.5.9 (RUSTSEC-2026-0592) Signed-off-by: Ilan Harel --- CHANGELOG.md | 1 + Cargo.lock | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 084b0cb..6f73bd1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ version section and adds the squash-merged PR titles since the previous tag. Ver ## [Unreleased] +- chore(deps): update `url` to 2.5.9 (and `form_urlencoded` to 1.2.3) in `Cargo.lock` for RUSTSEC-2026-0592, a stack overflow in `Url::origin()` on nested `blob:` URLs; `url` comes in through OpenShell's crates (#111) - chore(deps): OpenShell moved to `ai-openshell/openshell`: the git dependencies, `Cargo.lock` sources (same v0.1.8 commit), `deny.toml` `allow-git`, the pin/tag/compat/openshell-next scripts and workflows, and upstream links in the docs use the new URL instead of the `NVIDIA/OpenShell` redirect (#105) - ci: the `Security` checks `actionlint`, `gitleaks`, `cargo-deny` and `openshell-pin` are required status checks on `main`, next to `check` and `audit` (`protect-main` ruleset, #103) - ci: `Security` workflow (#101): actionlint on the workflows, gitleaks over the full git history, `cargo deny check` with a new `deny.toml` (advisories, licenses, bans, sources), and `scripts/verify-openshell-pin.sh`, which checks that the Cargo.toml OpenShell tag, the Cargo.lock commit and the upstream tag agree; tools are installed by `scripts/ci-tools.sh` at pinned versions with pinned SHA-256 hashes (actionlint also by attestation); `scripts/security-local.sh` runs the same checks locally; `ci.yml` pins `actions/checkout` and `actions/cache` by commit SHA diff --git a/Cargo.lock b/Cargo.lock index 5bcff5b..3ee8415 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -873,9 +873,9 @@ checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" [[package]] name = "form_urlencoded" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +checksum = "afa489199eaffb1211795df1c6236ce1ad0d41a6fa45250add73e3b02420f06e" dependencies = [ "percent-encoding", ] @@ -3906,9 +3906,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.8" +version = "2.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +checksum = "f00cd2407bb42c0ef17be88d4cf020f5cceffd121665bac9b8b9493a369b3b1a" dependencies = [ "form_urlencoded", "idna",