From ebe9140c9194282420e64603920c49cbb3ec1324 Mon Sep 17 00:00:00 2001 From: Ilan Harel Date: Mon, 23 Nov 2026 09:23:35 +0200 Subject: [PATCH 1/3] 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 9230d2ddd50033eb3cf95f88340277c8bdb81a3e Mon Sep 17 00:00:00 2001 From: Ilan Harel Date: Mon, 23 Nov 2026 09:30:25 +0200 Subject: [PATCH 2/3] chore(deps): build against OpenShell v0.1.9 Pin openshell-policy-schema and openshell-policy to v0.1.9 (ce58cf8). Lint warns about wildcard hosts that can match private IP literals (upstream #5522); tests cover middleware selectors with a port (#4359) and gateway API Activity denials in diff-logs (#5606). Docs and generated headers name v0.1.9. Signed-off-by: Ilan Harel --- .cargo/audit.toml | 2 +- AGENTS.md | 2 +- CHANGELOG.md | 3 + Cargo.lock | 10 +- Cargo.toml | 6 +- Dockerfile | 2 +- README.md | 12 ++- ROADMAP.md | 2 +- docs/DEVELOPING.md | 16 +-- examples/polyglot/openshell/policy.yaml | 2 +- src/diff_logs.rs | 19 +++- src/generate.rs | 2 +- src/image.rs | 6 +- src/lint.rs | 8 +- src/render.rs | 2 +- src/validate.rs | 105 +++++++++++++++++++- tests/cli.rs | 45 +++++++++ tests/fixtures/sample/policy.expected.yaml | 2 +- tests/gateway_policies.rs | 24 +++++ tests/golden/diff_logs_human_color.txt | 2 +- tests/golden/diff_logs_human_plain.txt | 2 +- tests/golden/diff_logs_ocsf_1_8_0_plain.txt | 2 +- 22 files changed, 241 insertions(+), 35 deletions(-) diff --git a/.cargo/audit.toml b/.cargo/audit.toml index 612847a..ec37f42 100644 --- a/.cargo/audit.toml +++ b/.cargo/audit.toml @@ -5,7 +5,7 @@ ignore = [ # RUSTSEC-2026-0459: libsqlite3-sys 0.37.0 (C SQLite CVE-2026-119375), fixed in >= 0.39.0. # https://rustsec.org/advisories/RUSTSEC-2026-0459 - tracked in https://github.com/ilanh/openshell-annotate/issues/76 - # Transitive and not upgradable from this repo: OpenShell v0.1.7 and v0.1.8 openshell-crypto -> sqlx 0.9.0 -> sqlx-sqlite =0.9.0 + # Transitive and not upgradable from this repo: OpenShell v0.1.7 to v0.1.9 openshell-crypto -> sqlx 0.9.0 -> sqlx-sqlite =0.9.0 # (exact pin) -> libsqlite3-sys 0.37.0. openshell-annotate does not use SQLite itself. # Remove this entry once an OpenShell release bumps sqlx/libsqlite3-sys and we move the pin to it. "RUSTSEC-2026-0459", diff --git a/AGENTS.md b/AGENTS.md index 96420cd..8b8aeb2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -10,7 +10,7 @@ subprocesses; add directives with reasons; run `scan`, `generate`, `lint`, `drif ## When changing this tool - Build/test: `cargo build && cargo test` (Rust 1.94+). The schema crate is a git dependency pinned to the - OpenShell `v0.1.8` tag (see `Cargo.toml`, `Cargo.lock` pins the commit). Update the tag deliberately and re-run + OpenShell `v0.1.9` tag (see `Cargo.toml`, `Cargo.lock` pins the commit). Update the tag deliberately and re-run the golden tests. `openshell-next` builds against the newest upstream tag, prereleases included, and is moved by `.github/workflows/openshell-next.yml`; fixes that need the newer OpenShell go there, fixes valid on the current pin go to `main` (see `docs/DEVELOPING.md`, "Tracking the next OpenShell release"). diff --git a/CHANGELOG.md b/CHANGELOG.md index 084b0cb..2e58d3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ version section and adds the squash-merged PR titles since the previous tag. Ver ## [Unreleased] +- chore(deps): build against OpenShell v0.1.9 (`openshell-policy-schema`, `openshell-policy`, commit ce58cf8); docs, generated policy headers and the `diff-logs`/`--image` notes now name v0.1.9 (#107) +- feat(lint): warn when a wildcard host in an `egress` directive or a `--policy` endpoint without `allowed_ips` can match a private IP literal (`10.*.*.*`, `**.*.*`): since OpenShell v0.1.9 a wildcard endpoint no longer allows private IP literals on its own (#107) +- test: the gateway validator rejects middleware selectors with a port (OpenShell v0.1.9); `diff-logs` skips gateway API Activity denials in both the old (`type_uid` 600399) and the new Create/Update/Delete shape (#107) - 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..45ed4f3 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/ai-openshell/openshell?tag=v0.1.8#f3d976590d3eb1379690a2abaf0f0e26c21d487d" +source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.9#ce58cf8e9b953281352d98a637e41616295b1318" 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/ai-openshell/openshell?tag=v0.1.8#f3d976590d3eb1379690a2abaf0f0e26c21d487d" +source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.9#ce58cf8e9b953281352d98a637e41616295b1318" dependencies = [ "aws-lc-rs", "jsonwebtoken", @@ -2164,7 +2164,7 @@ dependencies = [ [[package]] name = "openshell-extension-core" version = "0.0.0" -source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.8#f3d976590d3eb1379690a2abaf0f0e26c21d487d" +source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.9#ce58cf8e9b953281352d98a637e41616295b1318" dependencies = [ "hyper-util", "serde", @@ -2177,7 +2177,7 @@ dependencies = [ [[package]] name = "openshell-policy" version = "0.0.0" -source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.8#f3d976590d3eb1379690a2abaf0f0e26c21d487d" +source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.9#ce58cf8e9b953281352d98a637e41616295b1318" dependencies = [ "hickory-proto", "miette", @@ -2191,7 +2191,7 @@ dependencies = [ [[package]] name = "openshell-policy-schema" version = "0.0.0" -source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.8#f3d976590d3eb1379690a2abaf0f0e26c21d487d" +source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.9#ce58cf8e9b953281352d98a637e41616295b1318" dependencies = [ "miette", "noyalib", diff --git a/Cargo.toml b/Cargo.toml index 7d1b80c..35a3e81 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,10 +10,10 @@ repository = "https://github.com/ilanh/openshell-annotate" 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/ai-openshell/openshell", tag = "v0.1.8" } +# Pinned to the OpenShell v0.1.9 tag; Cargo.lock records the exact commit. +openshell-policy-schema = { git = "https://github.com/ai-openshell/openshell", tag = "v0.1.9" } # Same tag. Schema parsing accepts policies the gateway later rejects; this crate is that validator. -openshell-policy = { git = "https://github.com/ai-openshell/openshell", tag = "v0.1.8" } +openshell-policy = { git = "https://github.com/ai-openshell/openshell", tag = "v0.1.9" } anyhow = "1" clap = { version = "4", features = ["derive"] } ignore = "0.4" diff --git a/Dockerfile b/Dockerfile index ababfbe..b717113 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/ai-openshell/openshell (tag v0.1.8, commit pinned +# `openshell-policy-schema` is a git dependency on https://github.com/ai-openshell/openshell (tag v0.1.9, 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 24ef48a..be6867e 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ un-annotated calls, and gates CI on drift. > **Independent community project.** openshell-annotate is not affiliated with, endorsed by, or sponsored by > NVIDIA. It uses NVIDIA OpenShell's public policy schema crate (Apache-2.0) to validate what it generates. -Early pre-release **v0.1.0-rc.3** (targets OpenShell policy schema v1, `openshell-policy-schema` @ v0.1.8). +Early pre-release **v0.1.0-rc.3** (targets OpenShell policy schema v1, `openshell-policy-schema` @ v0.1.9). Licensed under Apache-2.0. ## Try it in two minutes @@ -136,7 +136,7 @@ stderr. Exit codes and `--deny-warnings` do not depend on the format. ### Files the image keeps outside OpenShell's baseline (`generate --image`) -OpenShell 0.1.8 only lets the sandbox read `/usr /lib /etc /app /var/log /proc /dev/urandom` (plus the workspace when +OpenShell 0.1.9 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 ([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 @@ -355,8 +355,14 @@ the rule; a profile bound to other binaries (the bundled `github` profile is for (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 (ai-openshell/openshell#5278); the symlink lives in the image, so lint cannot see it: put the symlink's target in `@openshell fs`. +- OpenShell v0.1.9 changes: a wildcard endpoint no longer allows a private IP literal (RFC 1918, CGNAT, TEST-NET and + similar) on its own (ai-openshell/openshell#5522), so lint warns when a wildcard host in a directive or a `--policy` file + can match one (`10.*.*.*`, `**.*.*`); declare each private address as its own endpoint, or give the policy endpoint + `allowed_ips`. Middleware selectors (`network_middlewares.*.endpoints`) can no longer include a port + (ai-openshell/openshell#4359); annotate does not generate middlewares, but `lint --policy`, `drift` and `generate` run + the gateway validator on committed policies and report it. - 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 +- `diff-logs` only sees network and L7 events: OpenShell 0.1.9 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. A helper spawned by an allowed binary (git -> git-remote-http) is matched through its parent. - Semantic checks mirror `openshell-policy::validate_sandbox_policy` (documented rules) but the authoritative diff --git a/ROADMAP.md b/ROADMAP.md index 175e5ae..e8a6fbd 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -18,7 +18,7 @@ Order matters: each milestone builds on the previous one. Nothing is published ( ## 2. Docker image (publish) - **Scope:** small runtime image with the binary (tree-sitter grammars compiled in; distroless/cc base, 34.9 MB), entrypoint `openshell-annotate`, workdir `/src`. - **Deliverables:** multi-stage `Dockerfile`, `scripts/docker-build.sh` (local tag `openshell-annotate:dev`, no OpenShell checkout needed), then, after approval, a publish workflow to a registry (ghcr.io) with version tags. -- **Depends on:** a public home for the repo (the `openshell-policy-schema` dependency now resolves from the public OpenShell repo at tag v0.1.8, so the build is portable). Publishing to a registry needs the maintainer's approval. +- **Depends on:** a public home for the repo (the `openshell-policy-schema` dependency now resolves from the public OpenShell repo at tag v0.1.9, so the build is portable). Publishing to a registry needs the maintainer's approval. ## 3. GitHub Action + GitLab CI template - **Scope:** run `lint --deny-warnings` and `drift --policy openshell/policy.yaml` on every pull/merge request; fail with annotations. diff --git a/docs/DEVELOPING.md b/docs/DEVELOPING.md index 01ec5f7..727b65b 100644 --- a/docs/DEVELOPING.md +++ b/docs/DEVELOPING.md @@ -8,10 +8,10 @@ build that downloads crates takes longer. | Needed for | What | |---|---| -| everything | Git, a C compiler (`build-essential` / Xcode command line tools: the tree-sitter grammars are C), network access to crates.io and github.com (the OpenShell schema crate is a git dependency pinned to the `v0.1.8` tag) | +| everything | Git, a C compiler (`build-essential` / Xcode command line tools: the tree-sitter grammars are C), network access to crates.io and github.com (the OpenShell schema crate is a git dependency pinned to the `v0.1.9` tag) | | build and test | Rust **1.94** or newer through [rustup](https://rustup.rs). CI pins 1.94 | | Docker image (optional) | Docker with BuildKit | -| sandbox flow (optional) | the `openshell` CLI and `openshell-prover` at 0.1.8, a running OpenShell gateway, and Docker (see section 7) | +| sandbox flow (optional) | the `openshell` CLI and `openshell-prover` at 0.1.9, a running OpenShell gateway, and Docker (see section 7) | ``` rustup toolchain install 1.94 --profile minimal --component rustfmt,clippy @@ -122,7 +122,7 @@ sorts after its own prereleases (`latest`, `latest-stable`, `list`, `pinned`, `n ### Tracking the next OpenShell release (`openshell-next`) `openshell-next` is the one long-lived branch besides `main`. It is `main` plus the OpenShell pin moved to the newest -upstream tag, prereleases included (for example `v0.1.9-pre.3` while `main` is on `v0.1.8`), plus any fix that only +upstream tag, prereleases included (for example `v0.1.10-pre.3` while `main` is on `v0.1.9`), plus any fix that only makes sense on that version. It exists so the next OpenShell is integrated, and its breakage fixed, before it ships as stable. A draft pull request `openshell-next` → `main` and an issue labelled `openshell-next` track it; the issue gets a comment for every new upstream tag. @@ -227,11 +227,15 @@ openshell-annotate diff-logs path/to/sandbox.log --write # inserts directives a # otherwise writes openshell/observed-egress.sh (scanned like any source: review or delete it) ``` -Sample logs for both formats are in `tests/fixtures/logs/`. Filesystem denials are not logged by OpenShell 0.1.8, so +Sample logs for both formats are in `tests/fixtures/logs/`. Filesystem denials are not logged by OpenShell 0.1.9, 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.*` (ai-openshell/openshell#5048) needs no change; the OCSF fixture is real v0.1.7 output. +`diff-logs` reads only network (4001) and HTTP (4002) activity. Gateway API Activity records (class 6003) are +skipped, so OpenShell v0.1.9 reporting write-method authorization denials as Create/Update/Delete instead of Other +(`type_uid` 600399, ai-openshell/openshell#5606) needs no change; a unit test covers both shapes. + ## 6. Docker image ``` @@ -255,7 +259,7 @@ scripts/flow.sh /path/to/project --diff-logs sandbox.log # + diff-logs scripts/flow.sh /path/to/project --image my-image:tag --run-seconds 30 --exercise exercise.js -- sleep 600 ``` -It needs `openshell` and `openshell-prover` 0.1.8 on PATH and a connected gateway (`openshell status` shows `Connected`), and +It needs `openshell` and `openshell-prover` 0.1.9 on PATH and a connected gateway (`openshell status` shows `Connected`), and `OPENSHELL_ANNOTATE=/path/to/binary` if the binary is not on PATH. The image's interpreter paths must be real executables (not symlinks) and match `[languages]` in `openshell-annotate.toml`, because OpenShell matches the resolved binary path. A bare `sleep` workload produces no traffic and so no events: drive the sandbox with `--exercise FILE.js` (run with `node -e`), @@ -301,4 +305,4 @@ public repo or a paid plan). `.github/rulesets/protect-openshell-next.json` bloc | `docs are stale` | run `scripts/gen-docs.sh` and commit `docs/` | | `docs/GITHUB_ACTIONS.md is out of date with actions/*/action.yml` | run `scripts/gen-actions-docs.sh` and commit it; add a `BEGIN/END actions-docs ` section for a new action | | sandbox probes get `403` from `api.github.com` | unauthenticated GitHub API rate limit (60 requests per hour per IP), not a policy decision; wait for the reset or use another host | -| `openshell-prover: not found` in `flow.sh` | install the OpenShell 0.1.8 tools; the static commands (`scan`, `generate`, `lint`, `drift`, `diff-logs`) do not need them | +| `openshell-prover: not found` in `flow.sh` | install the OpenShell 0.1.9 tools; the static commands (`scan`, `generate`, `lint`, `drift`, `diff-logs`) do not need them | diff --git a/examples/polyglot/openshell/policy.yaml b/examples/polyglot/openshell/policy.yaml index 77e238d..493d836 100644 --- a/examples/polyglot/openshell/policy.yaml +++ b/examples/polyglot/openshell/policy.yaml @@ -1,5 +1,5 @@ # Generated by openshell-annotate @VERSION@ - DO NOT EDIT. Change the @openshell directives in source and regenerate. -# Validated against openshell-policy-schema and the OpenShell v0.1.8 gateway validator. Each entry's comment gives the reason and source file:line. +# Validated against openshell-policy-schema and the OpenShell v0.1.9 gateway validator. Each entry's comment gives the reason and source file:line. # Startup-only sections (filesystem_policy, landlock, process) need a sandbox recreate to change; network_policies are live. version: 1 filesystem_policy: diff --git a/src/diff_logs.rs b/src/diff_logs.rs index afaca53..4a15918 100644 --- a/src/diff_logs.rs +++ b/src/diff_logs.rs @@ -3,7 +3,7 @@ //! directives that never matched an event are reported as stale. //! //! Delivery of these logs is best-effort: *absence of a deny or an allow is not proof*. Filesystem denials are not logged by -//! OpenShell 0.1.8 (upstream #4270), so only network and L7 HTTP events are handled. +//! OpenShell 0.1.9 (upstream #4270), so only network and L7 HTTP events are handled. use crate::config::Config; use crate::directive::{Directive, Kind}; @@ -876,7 +876,7 @@ pub fn render_text(rep: &Report) -> String { "diff-logs: {} event(s) ({} denied, {} allowed); {} suggestion(s), {} stale directive(s)\n", rep.events, rep.denied, rep.allowed, rep.suggestions.len(), rep.stale.len() ); - s.push_str("note: logs are best-effort and lossy; absence of an event is not proof. Filesystem denials are not logged by OpenShell 0.1.8 (#4270).\n"); + s.push_str("note: logs are best-effort and lossy; absence of an event is not proof. Filesystem denials are not logged by OpenShell 0.1.9 (#4270).\n"); for g in &rep.suggestions { let up = g.kind.to_ascii_uppercase(); s.push_str(&format!( @@ -988,6 +988,21 @@ garbage line\n"; ); } + #[test] + fn skips_gateway_api_activity_denials_old_and_new() { + // Gateway authorization denials are OCSF API Activity (class 6003) records, not sandbox egress. OpenShell + // v0.1.9 (ai-openshell/openshell#5606) reports write denials as Create/Update/Delete (type_uid 600301..3) + // instead of Other (600399); diff-logs never selects on type_uid, so both shapes are skipped. + let t = concat!( + "{\"class_uid\":6003,\"activity_id\":99,\"type_uid\":600399,\"status_id\":2,\"action\":\"Denied\",\"dst_endpoint\":{\"domain\":\"gw\",\"port\":8080}}\n", + "{\"class_uid\":6003,\"activity_id\":3,\"type_uid\":600303,\"status_id\":2,\"action\":\"Denied\",\"dst_endpoint\":{\"domain\":\"gw\",\"port\":8080}}\n", + "{\"class_uid\":4001,\"action_id\":2,\"dst_endpoint\":{\"domain\":\"pypi.org\",\"port\":443}}\n", + ); + let e = parse_logs(t, "x"); + assert_eq!(e.len(), 1); + assert_eq!(e[0].host, "pypi.org"); + } + #[test] fn sandbox_attribution_location_does_not_matter() { // OpenShell v0.1.8 (ai-openshell/openshell#5048) moved supervisor sandbox attribution from top-level `container.*` diff --git a/src/generate.rs b/src/generate.rs index ce30b5a..0cd973e 100644 --- a/src/generate.rs +++ b/src/generate.rs @@ -652,7 +652,7 @@ pub fn generate( // Emit let mut y = String::new(); y.push_str(&format!("# Generated by {TOOL} - DO NOT EDIT. Change the @openshell directives in source and regenerate.\n")); - y.push_str("# Validated against openshell-policy-schema and the OpenShell v0.1.8 gateway validator. Each entry's comment gives the reason and source file:line.\n"); + y.push_str("# Validated against openshell-policy-schema and the OpenShell v0.1.9 gateway validator. Each entry's comment gives the reason and source file:line.\n"); y.push_str("# Startup-only sections (filesystem_policy, landlock, process) need a sandbox recreate to change; network_policies are live.\n"); y.push_str("version: 1\n"); if !fs_read.is_empty() || !fs_write.is_empty() { diff --git a/src/image.rs b/src/image.rs index a4cc937..2520bab 100644 --- a/src/image.rs +++ b/src/image.rs @@ -1,8 +1,8 @@ //! `generate --image IMAGE`: propose `fs read` directives for application paths in a container image. //! //! The OpenShell supervisor only grants read access to a fixed baseline (`/usr /lib /etc /app /var/log /proc -//! /dev/urandom`, plus `/tmp` and `/dev/null` for writing, verified in v0.1.7 and v0.1.8 `PROXY_BASELINE_*`). An app that lives -//! elsewhere (`/opt/context7`) fails at startup with EACCES, and OpenShell 0.1.8 does not log filesystem denials +//! /dev/urandom`, plus `/tmp` and `/dev/null` for writing, verified in v0.1.7 to v0.1.9 `PROXY_BASELINE_*`). An app that lives +//! elsewhere (`/opt/context7`) fails at startup with EACCES, and OpenShell 0.1.9 does not log filesystem denials //! (upstream #4270), so neither the logs nor `diff-logs` can point at it. The image says where the app lives: its //! WORKDIR, ENTRYPOINT and CMD. @@ -260,7 +260,7 @@ pub fn add_dirs(props: &mut Vec, dirs: Vec, declared: &[String /// Renders the stderr note listing the proposals and the `@openshell fs read` lines to add for them. pub fn render_note(image: &str, props: &[Proposal]) -> String { let mut s = format!( - "note: image {image} keeps files outside OpenShell's baseline read set ({}); the sandbox cannot read them, and OpenShell 0.1.8 does not log that denial (#4270):\n", + "note: image {image} keeps files outside OpenShell's baseline read set ({}); the sandbox cannot read them, and OpenShell 0.1.9 does not log that denial (#4270):\n", ["/usr", "/lib", "/etc", "/app", "/var/log", "/proc", "/dev/urandom"].join(" ") ); for p in props { diff --git a/src/lint.rs b/src/lint.rs index 458dfda..4895c05 100644 --- a/src/lint.rs +++ b/src/lint.rs @@ -521,7 +521,13 @@ pub fn lint(scan: &Scan, cfg: &Config) -> Vec { out.push(directive_finding(&d.file, d.line, m)); } if let Kind::Egress { host, .. } = &d.kind { - if let Some(m) = validate::host_warning(host) { + for m in [ + validate::host_warning(host), + validate::wildcard_private_ip_warning(host), + ] + .into_iter() + .flatten() + { out.push(Finding::new( d.file.clone(), d.line, diff --git a/src/render.rs b/src/render.rs index 142b77c..ef5a7e4 100644 --- a/src/render.rs +++ b/src/render.rs @@ -662,7 +662,7 @@ pub fn diff_logs_human( } out.push_str(&style.paint( "2", - "note: logs are best-effort and lossy; absence of an event is not proof. Filesystem denials are not logged by OpenShell 0.1.8 (#4270).\n", + "note: logs are best-effort and lossy; absence of an event is not proof. Filesystem denials are not logged by OpenShell 0.1.9 (#4270).\n", )); out } diff --git a/src/validate.rs b/src/validate.rs index d70bd7b..487c0d8 100644 --- a/src/validate.rs +++ b/src/validate.rs @@ -2,7 +2,7 @@ //! //! Authoritative checks live in `openshell-policy-schema` (parsing, unknown fields) and in //! [`gateway_violations`], which calls `openshell_policy::validate_and_canonicalize_sandbox_policy` -//! (OpenShell v0.1.8, the same tag as the schema crate). This module also re-implements the +//! (OpenShell v0.1.9, the same tag as the schema crate). This module also re-implements the //! file-level semantic rules documented in `docs/how-it-works/policies/schema.mdx` so errors carry //! directive locations. `generate` round-trips its output through `parse_policy` and the gateway //! validator. @@ -79,6 +79,79 @@ pub fn host_warning(host: &str) -> Option { Some(format!("`{host}` is an IPv4-mapped IPv6 address; OpenShell v0.1.8+ evaluates these destinations as IPv4, so the rule never matches: use `{v4}`")) } +/// Private and special-use IPv4 ranges a wildcard endpoint no longer admits as IP literals since OpenShell v0.1.9 +/// (ai-openshell/openshell#5522): RFC 1918, CGNAT, IETF protocol assignments, the three TEST-NETs, benchmarking and +/// broadcast. Loopback, link-local and unspecified are always blocked and rejected by [`check_host`] already. +/// Each entry is the inclusive range per octet. +const GRANT_ONLY_V4: &[[(u8, u8); 4]] = &[ + [(10, 10), (0, 255), (0, 255), (0, 255)], + [(172, 172), (16, 31), (0, 255), (0, 255)], + [(192, 192), (168, 168), (0, 255), (0, 255)], + [(100, 100), (64, 127), (0, 255), (0, 255)], + [(192, 192), (0, 0), (0, 0), (0, 255)], + [(192, 192), (0, 0), (2, 2), (0, 255)], + [(198, 198), (18, 19), (0, 255), (0, 255)], + [(198, 198), (51, 51), (100, 100), (0, 255)], + [(203, 203), (0, 0), (113, 113), (0, 255)], + [(255, 255), (255, 255), (255, 255), (255, 255)], +]; + +/// Matches one DNS label against a pattern label in which `*` stands for any run of characters. +fn label_glob(pat: &str, s: &str) -> bool { + match pat.split_once('*') { + None => pat == s, + Some((head, rest)) => { + s.starts_with(head) + && (0..=s.len() - head.len()).any(|i| label_glob(rest, &s[head.len() + i..])) + } + } +} + +/// Returns a private IPv4 address that the wildcard `host` matches, if any. A leading `**` label matches one or more +/// labels; other labels match one label each. +fn wildcard_private_v4(host: &str) -> Option { + let h = host.trim_matches(|c| c == '[' || c == ']'); + if !h.contains('*') { + return None; + } + let labels: Vec<&str> = h.split('.').collect(); + let (spread, tail) = match labels.split_first() { + Some((&"**", rest)) => (true, rest), + _ => (false, &labels[..]), + }; + let fits = if spread { + tail.len() < 4 + } else { + tail.len() == 4 + }; + if !fits + || tail + .iter() + .any(|l| l.is_empty() || !l.chars().all(|c| c.is_ascii_digit() || c == '*')) + { + return None; + } + let mut pats = vec!["*"; 4 - tail.len()]; + pats.extend_from_slice(tail); + GRANT_ONLY_V4.iter().find_map(|net| { + let mut octets = [0u8; 4]; + for (i, &(lo, hi)) in net.iter().enumerate() { + octets[i] = (lo..=hi).find(|v| label_glob(pats[i], &v.to_string()))?; + } + Some(std::net::Ipv4Addr::from(octets)) + }) +} + +/// Returns a warning when the wildcard `host` can match a private IPv4 literal such as `10.0.0.1`. +/// +/// Since OpenShell v0.1.9 (ai-openshell/openshell#5522) a wildcard endpoint no longer allows a private IP literal on +/// its own: the destination needs an exact endpoint for that address or an `allowed_ips` grant. Callers skip the +/// warning for policy endpoints that have `allowed_ips`. +pub fn wildcard_private_ip_warning(host: &str) -> Option { + let ip = wildcard_private_v4(host)?; + Some(format!("wildcard host `{host}` matches private IP literals such as `{ip}`; OpenShell v0.1.9+ no longer allows a private IP literal through a wildcard endpoint: declare each private address as its own endpoint (in a policy file, `allowed_ips` also works)")) +} + /// Checks a `filesystem_policy` path; `write` is true for `read_write` entries. /// /// # Errors @@ -400,6 +473,11 @@ pub fn check_document(doc: &PolicyDocument) -> (Vec, Vec) { if let Some(m) = host_warning(&ep.host) { warns.push(format!("{at}: {m}")); } + if ep.allowed_ips.is_empty() { + if let Some(m) = wildcard_private_ip_warning(&ep.host) { + warns.push(format!("{at}: {m}")); + } + } } if ep.port != 0 && !ep.ports.is_empty() { errs.push(format!("{at}: `port` and `ports` are mutually exclusive")); @@ -491,6 +569,31 @@ mod tests { assert!(host_warning("api.example.com").is_none()); } + #[test] + fn wildcard_hosts_that_match_private_ip_literals_warn() { + assert!(wildcard_private_ip_warning("**.*.*") + .unwrap() + .contains("such as `10.0.0.0`")); + assert!(wildcard_private_ip_warning("10.*.*.*").is_some()); + assert!(wildcard_private_ip_warning("*.23.45.67") + .unwrap() + .contains("`10.23.45.67`")); + assert!(wildcard_private_ip_warning("**.168.1.1") + .unwrap() + .contains("`10.168.1.1`")); + assert!(wildcard_private_ip_warning("17*.*.*.*") + .unwrap() + .contains("`172.16.0.0`")); + assert!(wildcard_private_ip_warning("[**.*.*]").is_some()); + // public-only, exact or DNS wildcards: no warning + assert!(wildcard_private_ip_warning("8.*.*.*").is_none()); + assert!(wildcard_private_ip_warning("172.32.*.*").is_none()); + assert!(wildcard_private_ip_warning("10.0.0.1").is_none()); + assert!(wildcard_private_ip_warning("*.example.com").is_none()); + assert!(wildcard_private_ip_warning("**.example.com").is_none()); + assert!(wildcard_private_ip_warning("*.*.*.*.*").is_none()); + } + #[test] fn fs_paths() { assert!(check_fs_path("/workspace/data", true).is_ok()); diff --git a/tests/cli.rs b/tests/cli.rs index f9c6675..0d06443 100644 --- a/tests/cli.rs +++ b/tests/cli.rs @@ -2272,3 +2272,48 @@ fn lint_policy_warns_about_ipv4_mapped_hosts() { "{s}" ); } + +/// OpenShell v0.1.9 (ai-openshell/openshell#5522): a wildcard endpoint no longer allows a private IP literal on its +/// own. lint warns about wildcard hosts that match private IPv4 literals, unless the policy endpoint has `allowed_ips`. +#[test] +fn lint_warns_about_wildcards_that_match_private_ip_literals() { + let t = tempfile::tempdir().unwrap(); + std::fs::write(t.path().join("a.js"), "console.log(1)\n").unwrap(); + let policy = |extra: &str| { + format!("version: 1\nnetwork_policies:\n lan:\n endpoints:\n - host: \"**.*.*\"\n port: 443\n{extra} binaries:\n - path: /usr/bin/curl\n") + }; + std::fs::write(t.path().join("p.yaml"), policy("")).unwrap(); + let o = run( + t.path(), + &["lint", "--format", "compact", "--policy", "p.yaml"], + ); + let s = out(&o); + assert!( + s.contains("wildcard host `**.*.*` matches private IP literals such as `10.0.0.0`"), + "{s}{}", + err(&o) + ); + std::fs::write( + t.path().join("p.yaml"), + policy(" allowed_ips:\n - 10.23.45.0/24\n"), + ) + .unwrap(); + let s = out(&run( + t.path(), + &["lint", "--format", "compact", "--policy", "p.yaml"], + )); + assert!(!s.contains("private IP literals"), "{s}"); + // and in an egress directive, where only an exact address helps + std::fs::write( + t.path().join("a.js"), + "// @openshell egress 10.*.*.*:443 reason=\"lan\"\nconsole.log(1)\n", + ) + .unwrap(); + let s = out(&run(t.path(), &["lint", "--format", "compact"])); + assert!( + s.contains( + "a.js:1: warning[directive]: wildcard host `10.*.*.*` matches private IP literals" + ), + "{s}" + ); +} diff --git a/tests/fixtures/sample/policy.expected.yaml b/tests/fixtures/sample/policy.expected.yaml index 4306257..46d1634 100644 --- a/tests/fixtures/sample/policy.expected.yaml +++ b/tests/fixtures/sample/policy.expected.yaml @@ -1,5 +1,5 @@ # Generated by openshell-annotate @VERSION@ - DO NOT EDIT. Change the @openshell directives in source and regenerate. -# Validated against openshell-policy-schema and the OpenShell v0.1.8 gateway validator. Each entry's comment gives the reason and source file:line. +# Validated against openshell-policy-schema and the OpenShell v0.1.9 gateway validator. Each entry's comment gives the reason and source file:line. # Startup-only sections (filesystem_policy, landlock, process) need a sandbox recreate to change; network_policies are live. version: 1 filesystem_policy: diff --git a/tests/gateway_policies.rs b/tests/gateway_policies.rs index e611744..99576e9 100644 --- a/tests/gateway_policies.rs +++ b/tests/gateway_policies.rs @@ -74,3 +74,27 @@ fn websocket_credential_rewrite_needs_the_websocket_protocol() { let ws = openshell_annotate::validate::gateway_violations(&policy("websocket")).unwrap(); assert!(ws.is_empty(), "{ws:?}"); } + +/// OpenShell v0.1.9 (ai-openshell/openshell#4359): middleware endpoint selectors match hosts on every port, and a +/// selector with a port now fails validation. annotate does not generate `network_middlewares`, but `lint --policy`, +/// `drift` and `generate` run the gateway validator on committed policies, so they report it. +#[test] +fn middleware_selectors_cannot_include_a_port() { + let policy = |include: &str| { + format!( + "version: 1\nnetwork_middlewares:\n redact:\n middleware: openshell/regex\n order: 10\n config:\n mode: redact\n on_error: fail_closed\n endpoints:\n include: [\"{include}\"]\nnetwork_policies:\n api:\n binaries:\n - path: /usr/bin/curl\n endpoints:\n - host: api.example.com\n port: 443\n" + ) + }; + let with_port = + openshell_annotate::validate::gateway_violations(&policy("api.example.com:443")).unwrap(); + assert!( + with_port.iter().any(|v| v.contains("cannot include one")), + "{with_port:?}" + ); + let without = + openshell_annotate::validate::gateway_violations(&policy("api.example.com")).unwrap(); + assert!( + !without.iter().any(|v| v.contains("cannot include one")), + "{without:?}" + ); +} diff --git a/tests/golden/diff_logs_human_color.txt b/tests/golden/diff_logs_human_color.txt index 7778dfb..f8252e0 100644 --- a/tests/golden/diff_logs_human_color.txt +++ b/tests/golden/diff_logs_human_color.txt @@ -59,5 +59,5 @@ ✖ 4 suggestions (1 stale directive · 1 not actionable) 💡 next: `openshell-annotate diff-logs denied.log --write` inserts 3 directives (review, then regenerate the policy) -note: logs are best-effort and lossy; absence of an event is not proof. Filesystem denials are not logged by OpenShell 0.1.8 (#4270). +note: logs are best-effort and lossy; absence of an event is not proof. Filesystem denials are not logged by OpenShell 0.1.9 (#4270).  \ No newline at end of file diff --git a/tests/golden/diff_logs_human_plain.txt b/tests/golden/diff_logs_human_plain.txt index ddfc288..a7737de 100644 --- a/tests/golden/diff_logs_human_plain.txt +++ b/tests/golden/diff_logs_human_plain.txt @@ -59,4 +59,4 @@ blocked: 169.254.169.254:80 x1 4 suggestions (1 stale directive, 1 not actionable) next: `openshell-annotate diff-logs denied.log --write` inserts 3 directives (review, then regenerate the policy) -note: logs are best-effort and lossy; absence of an event is not proof. Filesystem denials are not logged by OpenShell 0.1.8 (#4270). +note: logs are best-effort and lossy; absence of an event is not proof. Filesystem denials are not logged by OpenShell 0.1.9 (#4270). diff --git a/tests/golden/diff_logs_ocsf_1_8_0_plain.txt b/tests/golden/diff_logs_ocsf_1_8_0_plain.txt index 2489c23..b3b1f88 100644 --- a/tests/golden/diff_logs_ocsf_1_8_0_plain.txt +++ b/tests/golden/diff_logs_ocsf_1_8_0_plain.txt @@ -39,4 +39,4 @@ stale: jsonplaceholder.typicode.com:443 /usr/local/bin/python3.12 3 suggestions (1 stale directive) next: `openshell-annotate diff-logs ocsf.jsonl --write` inserts 3 directives (review, then regenerate the policy) -note: logs are best-effort and lossy; absence of an event is not proof. Filesystem denials are not logged by OpenShell 0.1.8 (#4270). +note: logs are best-effort and lossy; absence of an event is not proof. Filesystem denials are not logged by OpenShell 0.1.9 (#4270). From 37e9e560fd284abe96cbb33d580ea1f003314f00 Mon Sep 17 00:00:00 2001 From: Ilan Harel Date: Mon, 23 Nov 2026 09:33:07 +0200 Subject: [PATCH 3/3] 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",