Imported from GitHub aien-dev/spark-rsi-mv#80 (code only)
GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).
Base 0f916b11c772aec3b59b0df793b230b1ecdd64a5 · Head e933affba743ec97164d56a833ce42e2f80284cf
drakestapleton reviewed (COMMENTED) on 2026-10-30 21:49 UTC
Verdict: hold, author intent and Spark repo.
The title says (draft) and the body says "Draft on purpose". This is a Spark repository, and Drake holds the Spark, so he decides when it lands. He also needs to OK publishing drake@aienos.com as the security contact. This pass found no code must-fix; it is docs plus CI hygiene, with no gate, anchor or receipt changes.
— Grokbot
Fetch it
A git bundle of the pull request's head, 10717 bytes.
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..54dc308
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,9 @@
+# Dependabot: monthly version updates for the pinned GitHub Actions.
+# Pull requests only; nothing merges itself. Security advisories are handled by GitHub
+# Dependabot security updates on the repository settings.
+version: 2
+updates:
+ - package-ecosystem: github-actions
+ directory: /
+ schedule:
+ interval: monthly
diff --git a/.github/workflows/aien-verification.yml b/.github/workflows/aien-verification.yml
index 3caa731..d4449b4 100644
--- a/.github/workflows/aien-verification.yml
+++ b/.github/workflows/aien-verification.yml
@@ -30,7 +30,7 @@ jobs:
RECEIPTS_RAW: https://raw.githubusercontent.com/aien-dev/aien-receipts/main
steps:
- name: Checkout the head under test
- uses: actions/checkout@v4
+ uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
fetch-depth: 0
@@ -52,7 +52,7 @@ jobs:
fi
- name: Checkout the pinned crumb tool source (aien-architecture @ 12ad0141b41ec67ef5aa51cb4e1815894c1083bb)
- uses: actions/checkout@v4
+ uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
repository: aien-spark/aien-architecture
ref: 12ad0141b41ec67ef5aa51cb4e1815894c1083bb
@@ -69,13 +69,13 @@ jobs:
run: crumb verify .
- name: Install Stable Rust Toolchain (for the pinned aien-test build)
- uses: dtolnay/rust-toolchain@stable
+ uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable branch head 2026-10-26
if: steps.anchors.outputs.enrolled == 'true'
with:
components: rustfmt
- name: Checkout the pinned aien-test source (aien-sovereign-core @ ${{ env.AIEN_TEST_PIN }})
- uses: actions/checkout@v4
+ uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
if: steps.anchors.outputs.enrolled == 'true'
with:
repository: aien-spark/aien-sovereign-core
@@ -88,7 +88,7 @@ jobs:
# Cache dependencies only, never verifier executables or candidate-controlled target output.
- name: Cache the pinned aien-test dependencies
- uses: actions/cache@v4
+ uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
if: steps.anchors.outputs.enrolled == 'true'
with:
path: |
@@ -139,7 +139,7 @@ jobs:
RECEIPTS_RAW: https://raw.githubusercontent.com/aien-dev/aien-receipts/main
steps:
- name: Checkout the tagged commit
- uses: actions/checkout@v4
+ uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
fetch-depth: 0
@@ -166,12 +166,12 @@ jobs:
echo "verify.pub (origin/main): $(cat "$RUNNER_TEMP/anchors/verify.pub")"
- name: Install Stable Rust Toolchain (for the pinned aien-test build)
- uses: dtolnay/rust-toolchain@stable
+ uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable branch head 2026-10-26
with:
components: rustfmt
- name: Checkout the pinned aien-test source (aien-sovereign-core @ ${{ env.AIEN_TEST_PIN }})
- uses: actions/checkout@v4
+ uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
repository: aien-spark/aien-sovereign-core
ref: ${{ env.AIEN_TEST_PIN }}
@@ -182,7 +182,7 @@ jobs:
# Cache dependencies only, never verifier executables or candidate-controlled target output.
- name: Cache the pinned aien-test dependencies
- uses: actions/cache@v4
+ uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.cargo/registry
diff --git a/.github/workflows/sbom.yml b/.github/workflows/sbom.yml
new file mode 100644
index 0000000..8b8c9df
--- /dev/null
+++ b/.github/workflows/sbom.yml
@@ -0,0 +1,23 @@
+# SBOM: writes an SPDX JSON inventory of the tree at every push to main and on pull requests, as
+# a workflow artifact, so outside auditors can diff what a commit contains. Read-only token;
+# every action pinned by full commit sha. It judges nothing and gates nothing.
+name: SBOM
+on:
+ pull_request:
+ push:
+ branches: [main]
+permissions:
+ contents: read
+jobs:
+ sbom:
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ steps:
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
+ with:
+ persist-credentials: false
+ - uses: anchore/sbom-action@66cbf4bc1f1c0d2edc94016e65bc221b6bb0ad6c # v0.24.3
+ with:
+ path: .
+ format: spdx-json
+ artifact-name: sbom-${{ github.sha }}.spdx.json
diff --git a/AGENTS.md b/AGENTS.md
index 6b6f0e7..3116342 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -27,7 +27,7 @@ directive: |
You are an AI agent collaborating with human operators and peer agents
within human-defined goals, architecture, constraints, acceptance criteria,
and stopping points in the AIEN sovereign ecosystem. You operate under the Sovereign Constitution,
- the Apache-2.0 WITH LLVM-exception LICENSE, the nonbinding COVENANT.md, and the Agent Code of Conduct.
+ the AGPL-3.0-or-later LICENSE, the nonbinding COVENANT.md, and the Agent Code of Conduct.
Core Rules:
1. Priority of Human Autonomy: Build tools that empower human beings and their personal
diff --git a/AUDIT_SCOPE.md b/AUDIT_SCOPE.md
new file mode 100644
index 0000000..dac3fa2
--- /dev/null
+++ b/AUDIT_SCOPE.md
@@ -0,0 +1,126 @@
+# Audit scope
+
+Written for an outside, independent security audit. Revision described:
+`fc13d3f77e6cfec789fce1b0e15125df8feac3d8` on `main`, 2026-10-26. Everything below is taken from the repository's own files at
+that revision; items marked NOT_RUN were not executed while writing this document.
+
+## What this repository is
+
+A Rust crate `spark-rsi` 0.1.0 (AGPL-3.0-or-later) that runs a five-phase cycle against a target
+repository: observe, propose (model proposals applied in a sandbox copy), verify (unslop check,
+secret refusal, `cargo check`, `cargo test`), balance (`src/balance.rs`), ratify (review branch
+`rsi/<proposal id>` plus a patch; a human merges). Binaries: `spark-rsi` (`src/main.rs`),
+`spark-rsi-supervisor` (`src/bin/supervisor.rs`) and `spark-rsi-judge` (`src/actor/judge.rs`). It depends on
+`aien-protocols-mv` crates by path, so it is not a standalone checkout.
+
+## What to review, in priority order
+
+1. `src/isolation/cargo_sandbox.rs`, `src/isolation/container.rs`, `src/isolation/rollback.rs`:
+ the bubblewrap build jail, environment clearing, toolchain binding (`CARGO_HOME`, `RUSTUP_HOME`
+ and the `PATH` directory are bound read-only; a directory that is or holds the judge's home is
+ never exposed, per README), and the cgroup limits. `rollback.rs` holds 12 `Command::new` calls.
+2. `src/supervisor/` (`canary_exec.rs`, `daemon.rs`, `ipc.rs`) and `src/canary/`: canary worker
+ namespaces, the one IPC socket, the worker environment allowlist, and how supervisor evidence
+ stays outside the jail. Contract: `docs/CANARY-CONTRACT.md`.
+3. `src/ratify.rs` and `src/diff_gate.rs`: protected-file checks on the real git diff.
+4. `src/promotion_gate.rs`, `src/actor/judge.rs`, `src/verifier.rs`: version 2 receipts
+ (`docs/RECEIPT-V2.md`), judge policy and public key pins (`--judge-policy-file`,
+ `--judge-public-key` and the `RSI_JUDGE_*` environment variables); malformed pins are meant to be
+ refused at startup.
+5. `src/ledger/` (`merkle.rs`, `db.rs`, `record.rs`): the improvement ledger and its signing keys
+ (README: kept off the command line).
+6. `src/propose/` (`model_seat.rs`, `cortex.rs`): model replies are untrusted input that becomes
+ a candidate patch.
+7. `src/observe.rs`, `src/measure/profile.rs`, `src/propose/kernel_autotune.rs`,
+ `src/soak/runner.rs`: other process launches.
+
+## Trust boundaries
+
+- Untrusted: model output and every candidate patch, candidate build scripts and tests, canary
+ worker output.
+- Trusted: the supervisor and judge binaries, the judge policy file and public key, the ledger
+ signing key, the host toolchain, bubblewrap and systemd.
+- The promotion gate trusts only a receipt from a separate judge (README, `docs/RECEIPT-V2.md`).
+- Defaults in `src/main.rs` point at loopback model and memory services on the reference host.
+
+## Threat model summary
+
+- Assets: the target repository's default branch, the host outside the jail, judge keys,
+ ledger integrity, the honesty of evaluation receipts.
+- Attackers considered: a hostile or wrong candidate patch, including one whose build script or
+ tests try to read host files, inherit the service environment, write outside its output, or
+ reach the network.
+- Defended: bubblewrap jail with cleared environment and no network, cgroup limits, canary
+ namespaces, branch-only ratification, separate judge receipts, `.env` refusal gate.
+- Not defended / explicitly out of scope: kernel or bubblewrap escapes; a compromised judge key;
+ hosts where unprivileged user namespaces are restricted (the gate only observes AppArmor and
+ setuid settings, it does not change them).
+
+## Build from source at a pin
+
+Needs Rust/Cargo, bubblewrap, and `aien-protocols-mv` cloned next to this repository as
+`aien-protocols`. README asks for the sibling at `28bc49ec57a89398fcb463cf71c0add7fcd2ef6c`
+until aien-protocols-mv#59 merges; #59 merged as `f3785177fcaaab7c0f2ce1126616e9fecb4e47b4`, so
+the default branch of aien-protocols-mv carries it. `Cargo.lock` committed (265 packages).
+
+```sh
+git clone https://github.com/aien-dev/spark-rsi-mv spark-rsi
+git clone https://github.com/aien-dev/aien-protocols-mv aien-protocols
+cd spark-rsi
+cargo build --locked
+```
+
+## Run every test
+
+NOT_RUN while writing this document. From README and `tests/gates/run.sh`:
+
+```sh
+cargo test --locked -- --test-threads=1
+tests/gates/run.sh crumb-verify # needs the crumb tool
+tests/gates/run.sh zero-disk-secrets
+tests/gates/run.sh fmt
+tests/gates/run.sh check # cargo check --offline --locked -j2 --all-targets
+tests/gates/run.sh test # release build, then cargo test --offline --locked
+sh scripts/check-no-python.sh
+```
+
+The tree has 21 top-level test files under `tests/` and 340 `#[test]` or `#[tokio::test]` attributes in
+`src/` and `tests/`. The jail tests need bubblewrap and a systemd user manager with cgroup v2.
+
+## Known limitations and NOT_RUN
+
+- README: pre-alpha, not part of the WHOLE-SYSTEM-E2E v1 release; no unattended
+ self-modification and no automatic promotion.
+- `evidence/rsi-cut-2026-10-12/REPORT.md` qualifies the canary mechanism only, not
+ self-improvement (README).
+- Open issues named in README: #54 (qualify one independent version 2 evaluation and review
+ branch cycle) and #57.
+- Receipts and plan digests produced before the aien-protocols#59 cutover do not verify (README).
+- The tracked workflow's header comment says nothing on GitHub gates a merge, while README calls
+ `AIEN Verification` the one required check. Branch protection is not visible from the
+ repository.
+
+## Dependencies and provenance
+
+- `Cargo.toml` lists 22 direct dependencies, including clap, tokio, reqwest 0.12, sha2, uuid,
+ libc, and the path crates `spark-crumbs` and `crumb-spec`. README: rustls moved to 0.23.46 for
+ four security advisories (#60).
+- The tracked workflow `.github/workflows/aien-verification.yml` builds only pinned verifier
+ tools: the crumb tool from `aien-spark/aien-architecture` at
+ `12ad0141b41ec67ef5aa51cb4e1815894c1083bb` and `aien-test` from `aien-spark/aien-sovereign-core`
+ at `a51042b61b87355c0850ef82ba409a46e153a1ff`. On `main` the actions are referenced by tag
+ (`@v4`, `@stable`); the separate workflow commit of this change pins each one by commit sha and
+ adds `.github/workflows/sbom.yml`.
+- AGENTS.md asks for `cargo audit`; no audit output is committed.
+
+## Evidence
+
+- `evidence/security-20261026-before.log`: security regression tests failing on the earlier
+ `main` `f72209e6` (for example "environment crossed build boundary", "candidate test wrote a
+ host-only file").
+- `evidence/security-20261026-after.log`: the same suite after the fix, 33 passed, 0 failed.
+- `evidence/security-20261026-s3.json` and `-fixture-compile.log`: workflow before, after and
+ negative cases.
+- `evidence/rsi-cut-2026-10-12/`: two real cycles against the fixture target, with raw files.
+- `evidence/protocol-receipt-v1-superseded-2026-10-26/`: superseded receipt pins, kept unedited.
+- Signed Spark bundles are published in aien-dev/aien-receipts, not here.
diff --git a/CONSTITUTION.md b/CONSTITUTION.md
index ef20ef5..ee570b5 100644
--- a/CONSTITUTION.md
+++ b/CONSTITUTION.md
@@ -1,6 +1,6 @@
# The Sovereign AI Constitution
-> **Governance Notice:** This Constitution serves exclusively as the internal architectural charter, technical doctrine, and engineering standard for the upstream AIEN Sovereign AI Ecosystem. It does not modify, condition, restrict, or supplement the licenses granted to downstream users of AIEN software under the Apache License, Version 2.0. Downstream developers possess complete operational freedom without obligation to adopt, enforce, or retain this internal charter.
+> **Governance Notice:** This Constitution serves exclusively as the internal architectural charter, technical doctrine, and engineering standard for the upstream AIEN Sovereign AI Ecosystem. It does not modify, condition, restrict, or supplement the licenses granted to downstream users of AIEN software under the GNU Affero General Public License, version 3 or later (AGPL-3.0-or-later). Downstream developers possess complete operational freedom without obligation to adopt, enforce, or retain this internal charter.
## Preamble
@@ -32,8 +32,8 @@ This Constitution establishes our foundational principles, our engineering stand
### Section 3. Upstream Architectural Charter and Downstream Freedom
1. This Constitution serves as the internal architectural charter, technical doctrine, and engineering standard for the upstream AIEN Sovereign AI Ecosystem and its core repositories.
-2. Downstream forks, independent applications, client libraries, and commercial distributions are governed strictly and exclusively by the terms of the Apache License, Version 2.0 (see [LICENSE](LICENSE)). Downstream developers possess complete freedom to innovate, customize, brand, and extend the software without obligation to adopt or enforce this internal development charter.
-3. Legal Decoupling: Legal rights, grants, and warranties reside exclusively within the formal LICENSE and NOTICE documents, and artifact licensing policies outlined in [ARTIFACT_LICENSING.md](ARTIFACT_LICENSING.md). This Constitution imposes zero behavioral covenants or philosophical constraints on downstream users, ensuring standard open-source compatibility across public package registries, corporate environments, and independent commercial deployments.
+2. Downstream forks, independent applications, client libraries, and commercial distributions are governed strictly and exclusively by the terms of the GNU Affero General Public License, version 3 or later (AGPL-3.0-or-later) (see [LICENSE](LICENSE)). Downstream developers possess complete freedom to innovate, customize, brand, and extend the software without obligation to adopt or enforce this internal development charter.
+3. Legal Decoupling: Legal rights, grants, and warranties reside exclusively within the formal LICENSE and NOTICE documents, and artifact licensing policies outlined in [ARTIFACT_LICENSING.md](https://github.com/aien-dev/aien-sovereign-core-mv/blob/main/ARTIFACT_LICENSING.md). This Constitution imposes zero behavioral covenants or philosophical constraints on downstream users, ensuring standard open-source compatibility across public package registries, corporate environments, and independent commercial deployments.
### Section 4. The Zero-Surveillance Invariant
Privacy and mutual trust form the basis of open cooperation.
@@ -42,12 +42,12 @@ Privacy and mutual trust form the basis of open cooperation.
3. Leaking user data or secret keys is treated as a critical defect requiring immediate remediation.
### Section 5. The One Team Principle and Reciprocal Cooperation
-1. What we discover, we share openly. What we construct in software, we release under the Apache License, Version 2.0, providing universal operational freedom.
+1. What we discover, we share openly. What we construct in software, we release under the GNU Affero General Public License, version 3 or later (AGPL-3.0-or-later), so that improvements stay open.
2. Knowledge must remain accessible to the human family. We share tools freely with individuals, startups, and community builders while encouraging reciprocal weight transparency and distillation access from frontier laboratories.
3. Upstream contributions are foundational: any public open-source project adapted to run on our stack is contributed back upstream. We never hoard fixes or improvements.
4. Voluntary Bilateral Cooperation and Reciprocal Commons:
-Hardware manufacturers (including NVIDIA, AMD, Intel, Apple) and compute providers (such as RunPod, Lambda, and independent data centers) possess complete freedom to adopt, embed, and deploy our runtime stack under the Apache License, Version 2.0 to improve hardware efficiency, eliminate memory overhead, and expand bandwidth for developers.
-For organizations seeking deeper bilateral research cooperation, model weight transparency, distillation reciprocity, or joint compute pooling, the voluntary terms of [OPEN_COOPERATION_COVENANT.md](OPEN_COOPERATION_COVENANT.md) provide a collaborative framework.
+Hardware manufacturers (including NVIDIA, AMD, Intel, Apple) and compute providers (such as RunPod, Lambda, and independent data centers) may adopt, embed, and deploy our runtime stack under the GNU Affero General Public License, version 3 or later (AGPL-3.0-or-later) to improve hardware efficiency, eliminate memory overhead, and expand bandwidth for developers.
+For organizations seeking deeper bilateral research cooperation, model weight transparency, distillation reciprocity, or joint compute pooling, the voluntary terms of [OPEN_COOPERATION_COVENANT.md](https://github.com/aien-dev/aien-sovereign-core-mv/blob/main/OPEN_COOPERATION_COVENANT.md) provide a collaborative framework.
### Section 6. The Contributor Oath
Anyone contributing to our repositories, whether human operator or autonomous agent, ratifies the Developer Certificate of Origin (DCO 1.1) and the following stewardship covenant:
@@ -102,7 +102,7 @@ To maintain code quality, security, and mutual trust:
- **Critical Invariants (Hard Blocking Gates)**: Pull requests must pass automated audits for hardware-backed secret protection at rest, no unsolicited outbound telemetry, and license integrity. Violations result in automatic PR rejection.
- **Stylistic and Unslop Standards (Core Standards & Community Advisory)**: The unslop invariant is enforced across core repositories, internal agents, and official releases. For outside community pull requests, style audits provide automated formatting suggestions rather than immediate rejection.
2. **Integrity of Purpose**: Submissions attempting to introduce surveillance hooks, covert tracking SDKs, or extractive lock-in mechanisms will be rejected.
-3. **Open Downstream Freedom**: Downstream users, forks, and commercial builders operate with complete legal freedom under the terms of the Apache License, Version 2.0.
+3. **Open Downstream Freedom**: Downstream users, forks, and commercial builders operate with complete legal freedom under the terms of the GNU Affero General Public License, version 3 or later (AGPL-3.0-or-later).
4. **Craftsmanship and Humility**: We respect those who measure, improve, standardize, verify, and deliver tools that run reliably without supervision.
---
diff --git a/COVENANT.md b/COVENANT.md
index 7b8a57a..b0f62f9 100644
--- a/COVENANT.md
+++ b/COVENANT.md
@@ -1,7 +1,7 @@
# Covenant of Open Building
This document states values. It grants no legal rights and restricts none.
-The software license is Apache-2.0 (see LICENSE). Where this covenant and
+The software license is AGPL-3.0-or-later (see LICENSE). Where this covenant and
LICENSE disagree, LICENSE governs.
## The ask
@@ -17,7 +17,7 @@ discriminate against independent builders.
## Scope
-This covenant binds no one. It modifies no Apache-2.0 rights, changes no
+This covenant binds no one. It modifies no AGPL-3.0-or-later rights, changes no
historical license, overrides no third-party terms of service, and creates
no damages or enforcement mechanism. Legal review of the licensing posture
is tracked separately and is not closed by this document.
diff --git a/Cargo.lock b/Cargo.lock
index aedaff2..4412160 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -445,9 +445,9 @@ dependencies = [
[[package]]
name = "crypto-bigint"
-version = "0.7.5"
+version = "0.7.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a52aa3fcda4e6302a9f48734f234d35d4721b96f8fe07d073f07ce9df4f0271"
+checksum = "9c035cb64cba03dad2fb921f3e218785e8cf9a41790da5eb3a1400f62fa2be11"
dependencies = [
"cpubits",
"ctutils",
@@ -482,9 +482,9 @@ dependencies = [
[[package]]
name = "ctutils"
-version = "0.4.3"
+version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03bb0e1cc970d482d121d9a1744999169b69a07470b3d644a7894e53fcaf4574"
+checksum = "fe3e9d21d39e6f39ff46e03d5b621424f88ee23d8a1672c6bfc9ccc7f2da4f6a"
dependencies = [
"cmov",
"subtle",
@@ -589,7 +589,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -1125,7 +1125,7 @@ version = "0.50.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
dependencies = [
- "windows-sys 0.61.2",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -1320,7 +1320,7 @@ dependencies = [
"once_cell",
"socket2",
"tracing",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -1502,7 +1502,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -1531,9 +1531,9 @@ dependencies = [
[[package]]
name = "rustls-webpki"
-version = "0.103.15"
+version = "0.103.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2"
+checksum = "4443b1b6d39d7c663139942cc4558262562d2c84123bb6282ef177009ca8b281"
dependencies = [
"ring",
"rustls-pki-types",
@@ -1856,7 +1856,7 @@ dependencies = [
"getrandom 0.4.3",
"once_cell",
"rustix",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -1926,9 +1926,9 @@ checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee"
[[package]]
name = "tokio"
-version = "1.53.2"
+version = "1.54.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e95f91fcc7a621e8b030f6aa23c71fe9838ae2fb4d8118b75602a328f5144044"
+checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3"
dependencies = [
"bytes",
"libc",
@@ -2290,9 +2290,9 @@ dependencies = [
[[package]]
name = "webpki-roots"
-version = "1.0.9"
+version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a"
+checksum = "f5f280bbb2b287bc8e7de7e3852945a0ff50d1bbcb5ed42b6c7a568c546df171"
dependencies = [
"rustls-pki-types",
]
@@ -2303,7 +2303,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
diff --git a/SECURITY.md b/SECURITY.md
index a69f1de..4550c7f 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -1,29 +1,71 @@
-# Security Policy
+# Security policy
-## Supported Versions
+## Reporting a vulnerability
-| Version | Supported |
-| ------- | ------------------ |
-| 0.1.x | :white_check_mark: |
+Report privately. Do not open a public issue, pull request or discussion about it.
-## Reporting a Vulnerability
+1. GitHub: open this repository's Security tab and choose "Report a vulnerability". This
+ creates a private advisory that only the maintainers can see. If that option is not shown,
+ private vulnerability reporting has not been enabled for this repository yet; use email.
+2. Email: drake@aienos.com with the subject `[spark-rsi-mv] security report`.
-We take the security of sovereign agent infrastructure seriously. If you discover a vulnerability, please report it responsibly rather than opening a public issue.
+Include the commit or release you tested, the component (path), steps to reproduce, and what an
+attacker gains. If the report involves a secret, say where it was exposed and do not send the
+secret itself. Encrypted mail is not required; do not post proof-of-concept payloads publicly.
-### Reporting Channels
-- Email: aien@aienos.com
-- Key: Available upon request or via public keyservers.
+## Response targets
-### Sovereign Security Invariants
-- Zero plaintext API tokens or keys on disk. All integrations must use hardware TPM vault or secure loopback credential injection.
-- Loopback isolation: Daemons and internal IPC default strictly to 127.0.0.1.
-- Safe deserialization: Untrusted inputs are strictly schema-validated before processing.
-- Candidate Cargo checks, tests and observation build scripts execute only in bubblewrap with read-only source, separate private output, no network and a cleared environment. Offline and locked dependency resolution is mandatory. A transient systemd user cgroup enforces configured memory, process, CPU and build-runtime limits; there is no unbounded host fallback.
-- BuildJail clears the launcher and guest environments. Its writable output must be disjoint from source and belongs to one candidate; a shared host target cache is not an artifact authority.
-- Canary workers run in user, mount, PID, IPC, UTS and network namespaces. Only their executable, system runtime, private scratch and one IPC socket are exposed. Supervisor evidence and expected outputs stay outside the jail. No unjailed fallback is permitted.
+This project has one maintainer; the targets below are best effort and stated honestly.
-The current containment implementation depends on Rust/Cargo, Linux bubblewrap and a systemd
-user manager with cgroup v2 resource controllers. Exercised versions: Rust/Cargo 1.98.1,
-bubblewrap 0.9.0, systemd 255 (255.4-1ubuntu8.17). These are explicit host-runtime dependencies,
-not Omega implementations. An Omega replacement must provide the same namespace, mount,
-environment, cgroup and descendant-lifetime boundaries before replacing them.
+- Acknowledgement: within 3 working days.
+- Triage and severity: within 7 days of acknowledgement.
+- Fix or mitigation for confirmed issues: aim for 30 days for high and critical, 90 days
+ otherwise, with a status update at least every 14 days until closed.
+- Disclosure: coordinated. An advisory is published with credit (unless you ask otherwise)
+ once the fix is on the default branch. Default embargo 90 days, negotiable.
+
+## Scope
+
+Spark RSI is a native Rust engine that observes a target repository, asks a model for small
+improvement proposals, tests each one in a sandbox copy, and hands a human a review branch. It
+never commits to the target's default branch. It builds three programs: `spark-rsi`,
+`spark-rsi-supervisor` and `spark-rsi-judge`.
+
+In scope:
+
+- Escape from the build jail or the canary jail. The containment rules this repository states:
+ - Candidate Cargo checks, tests and observation build scripts execute only in bubblewrap with
+ read-only source, separate private output, no network and a cleared environment. Offline and
+ locked dependency resolution is mandatory. A transient systemd user cgroup enforces configured
+ memory, process, CPU and build-runtime limits; there is no unbounded host fallback.
+ - BuildJail clears the launcher and guest environments. Its writable output must be disjoint
+ from source and belongs to one candidate; a shared host target cache is not an artifact
+ authority.
+ - Canary workers run in user, mount, PID, IPC, UTS and network namespaces. Only their
+ executable, system runtime, private scratch and one IPC socket are exposed. Supervisor
+ evidence and expected outputs stay outside the jail. No unjailed fallback is permitted.
+- A candidate reaching the target's default branch, or the ratify step accepting a path outside
+ the declared `ratify_roots` (`..`, symlinks, submodules, deletions are meant to be refused).
+- The promotion gate accepting a candidate without a version 2 receipt from a separate judge, or
+ accepting one evaluated by the in-process judge.
+- Forged or replayed receipts, ledger signatures or plan digests.
+- Plaintext secrets written to disk by the tools.
+
+Out of scope:
+
+- The model server, the Cortex memory service, the `aien-protocols` sibling crates (report those
+ in their own repository), bubblewrap, systemd and the Linux kernel.
+
+The containment depends on Rust/Cargo, Linux bubblewrap and a systemd user manager with cgroup v2
+resource controllers. Exercised versions recorded by the previous policy: Rust/Cargo 1.98.1,
+bubblewrap 0.9.0, systemd 255 (255.4-1ubuntu8.17). These are host runtime dependencies, not Omega
+implementations.
+
+## Supported versions
+
+Only the default branch `main` (Cargo version `0.1.0`). README marks the project pre-alpha. Reports against older commits are welcome but fixes land on the default branch only.
+
+## Status
+
+Pre-alpha. README: development and evaluation continue with no unattended self-modification and
+no automatic promotion. No certification, no bug bounty. See AUDIT_SCOPE.md for what to review and how to build and test it.
diff --git a/llms.txt b/llms.txt
index ebaf14a..bcbd6f8 100644
--- a/llms.txt
+++ b/llms.txt
@@ -7,7 +7,7 @@ Autonomous AI agents collaborating on this codebase should use this document as
## Repository Overview
- Repository: `https://github.com/aien-spark/spark-rsi`
-- License: Apache-2.0 WITH LLVM-exception, with the nonbinding COVENANT.md
+- License: AGPL-3.0-or-later, with the nonbinding COVENANT.md
## Core Operational Rules for Autonomous Agents