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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .cargo/audit.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# cargo-audit configuration.
#
# This file exists so `cargo audit` and `cargo deny check advisories` reach the
# same verdict. It mirrors `deny.toml`'s `[advisories].ignore` list exactly;
# `scripts/check-advisories.sh` fails if the two sets differ.
#
# Policy and rationale: `deny.toml` (the normative source) and
# `plans/adrs/ADR-0003-advisory-remediation-and-suppression-policy.md`.
# Remove an entry here in the same change that adopts the fixed release.
[advisories]
ignore = [
"RUSTSEC-2026-0459",
"RUSTSEC-2026-0370",
"RUSTSEC-2026-0371",
"RUSTSEC-2026-0372",
]
40 changes: 34 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
name: CI

# Action pinning policy
# --------------------
# Every third-party action is pinned to a full 40-character commit SHA with a
# trailing `# vX.Y.Z` comment. The comment is load-bearing: Dependabot's
# `github-actions` entry (`.github/dependabot.yml`) updates the SHA and the
# comment together, so the pin stays reviewable. Never replace a pin with a
# mutable tag or branch. See
# `plans/implementation/security-assurance/002-ci-advisory-gates-and-action-pinning.md`.

on:
push:
branches: [main]
Expand All @@ -17,13 +26,32 @@ env:
CARGO_TERM_COLOR: always

jobs:
advisory-gate:
name: Advisory and license gate
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
# Prebuilt binaries keep the job short; the tool versions are exact and
# must match the versions recorded in the milestone closure evidence.
- uses: taiki-e/install-action@ab49d3c64680143e184118bed66a46419fc15519 # v2.90.5
with:
tool: cargo-audit@0.23.0,cargo-deny@0.20.2
# The gate itself lives in the repository so local and CI verdicts agree
# by construction. No `continue-on-error`, no retry loop: a failure here
# must fail the pull request.
- name: Advisory and license policy
run: bash scripts/check-advisories.sh

linux-correctness:
name: Linux correctness
runs-on: ubuntu-latest
timeout-minutes: 35
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
- uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable branch as of 2026-11-17
with:
toolchain: "1.94"
components: rustfmt, clippy
Expand All @@ -38,7 +66,7 @@ jobs:
sleep 10
done
sudo apt-get install -y --no-install-recommends libdbus-1-dev pkg-config
- uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@2201cc584a476d1b508be977bbe4b7d1c7a52e9c # v2.9.3
- name: Linux checks
run: bash scripts/check.sh

Expand All @@ -51,11 +79,11 @@ jobs:
matrix:
os: [macos-latest, windows-latest]
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
- uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable branch as of 2026-11-17
with:
toolchain: "1.94"
- uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@2201cc584a476d1b508be977bbe4b7d1c7a52e9c # v2.9.3
- name: Check workspace
run: cargo check --workspace --all-targets
- name: CLI/platform smoke
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/distribution-consumer-smoke.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Distribution consumer smoke

# Action pinning policy: third-party actions are pinned to full commit SHAs with
# a trailing `# vX.Y.Z` comment so Dependabot can keep them current. See
# `plans/implementation/security-assurance/002-ci-advisory-gates-and-action-pinning.md`.

on:
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -62,7 +66,7 @@ jobs:
SNP_VERSION: ${{ inputs.snp_version }}
SYNC_VERSION: ${{ inputs.snip_sync_version }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
- name: Install public snp release asset
if: ${{ inputs.snp_version != '' }}
shell: bash
Expand Down Expand Up @@ -107,7 +111,7 @@ jobs:
SNP_VERSION: ${{ inputs.snp_version }}
SYNC_VERSION: ${{ inputs.snip_sync_version }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
- name: Install public snp release asset
if: ${{ inputs.snp_version != '' }}
shell: bash
Expand Down Expand Up @@ -152,7 +156,7 @@ jobs:
SNP_VERSION: ${{ inputs.snp_version }}
SYNC_VERSION: ${{ inputs.snip_sync_version }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
- name: Install public snp release asset
if: ${{ inputs.snp_version != '' }}
shell: bash
Expand Down Expand Up @@ -197,7 +201,7 @@ jobs:
SNP_VERSION: ${{ inputs.snp_version }}
SYNC_VERSION: ${{ inputs.snip_sync_version }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
- name: Install public snp release asset
if: ${{ inputs.snp_version != '' }}
shell: bash
Expand Down Expand Up @@ -242,7 +246,7 @@ jobs:
SNP_VERSION: ${{ inputs.snp_version }}
SYNC_VERSION: ${{ inputs.snip_sync_version }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
- name: Install public snp release asset
if: ${{ inputs.snp_version != '' }}
shell: pwsh
Expand Down Expand Up @@ -299,7 +303,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
- name: Exercise exact README default snp bootstrap
shell: bash
run: |
Expand Down Expand Up @@ -330,7 +334,7 @@ jobs:
runs-on: ubuntu-24.04-arm
timeout-minutes: 10
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
- name: Exercise exact README default snp bootstrap
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: Markdown link check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
- name: Check links in README and the user guide
uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
with:
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/release-binaries.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Release binaries

# Action pinning policy: third-party actions are pinned to full commit SHAs with
# a trailing `# vX.Y.Z` comment so Dependabot can keep them current. See
# `plans/implementation/security-assurance/002-ci-advisory-gates-and-action-pinning.md`.

on:
push:
tags:
Expand Down Expand Up @@ -45,7 +49,7 @@ jobs:
mode: ${{ steps.validate.outputs.mode }}
steps:
- name: Check out the requested tag
uses: actions/checkout@v5
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
# For workflow_dispatch, github.ref is the branch containing this
# workflow, so the explicit tag input must take precedence.
Expand Down Expand Up @@ -140,13 +144,13 @@ jobs:

steps:
- name: Check out the validated tag
uses: actions/checkout@v5
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
ref: ${{ needs.preflight.outputs.tag }}
fetch-depth: 0

- name: Install Rust toolchain and target
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable branch as of 2026-11-17
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
targets: ${{ matrix.target }}
Expand All @@ -161,7 +165,7 @@ jobs:

- name: Install pinned Zig
if: runner.os == 'Linux'
uses: goto-bus-stop/setup-zig@abea47f85e598557f500fa1fd2ab7464fcb39406
uses: goto-bus-stop/setup-zig@abea47f85e598557f500fa1fd2ab7464fcb39406 # v2.2.1
with:
version: ${{ env.ZIG_VERSION }}

Expand Down Expand Up @@ -415,7 +419,7 @@ jobs:
}

- name: Upload verified staged artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: release-${{ matrix.target }}
path: dist/
Expand All @@ -428,7 +432,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Download staged artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: release-*
path: dist
Expand Down Expand Up @@ -469,7 +473,7 @@ jobs:
fi

- name: Preserve verified asset set for optional attachment
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: release-aggregate
path: dist/
Expand All @@ -485,7 +489,7 @@ jobs:
contents: write
steps:
- name: Download verified aggregate
uses: actions/download-artifact@v4
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: release-aggregate
path: dist
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
# But allow committing .cargo/config.toml (needed for Windows stack size, etc.)
!/.cargo/config.toml
!/.cargo/config
# cargo-audit reads this so its verdict matches `cargo deny check`; the advisory
# gate is only reproducible if the suppression list is committed.
!/.cargo/audit.toml

# Rust documentation files
**/*.html
Expand Down
7 changes: 5 additions & 2 deletions .skills/encryption-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const ARGON2_PARALLELISM: u32 = 4; // 4 threads — matches typical desktop CPU

Memory cost is `1 << 14` (16 MiB), time cost 3, parallelism 4 (`src/encryption.rs:37-39`).

**WARNING**: Changing Argon2 parameters is a **breaking change**. All existing encrypted snippets will fail to decrypt because the same salt + different parameters produces a different derived key. If changing, add parameter versioning to `EncryptedPayload` (1-byte version header) and support decrypting with old parameters for backward compatibility.
**WARNING**: Changing Argon2 parameters is a **breaking change**. All existing encrypted snippets would fail to decrypt because the same salt + different parameters produces a different derived key. The payload already carries a 1-byte version header that selects the parameters (`argon2_params_for_version`), so a parameter change must introduce a **new version** with the old parameters retained for reading — never retune an existing version in place. See [`architecture/encryption.md`](../architecture/encryption.md) § Versioning Constraint.

## Key Derivation

Expand Down Expand Up @@ -121,9 +121,12 @@ Derived keys are cached per-session to avoid re-running Argon2id for the same (a
## Known Limitations

1. Key material persists in AES-GCM cipher key schedule (not zeroized)
2. No parameter versioning — changing Argon2 constants breaks all stored data
2. Retuning an existing payload version's Argon2 parameters breaks all stored
data — a parameter change needs a new version instead
3. `DerivedKey` implements `Zeroize` but the copy inside `Aes256Gcm` is not zeroized
4. No streaming API — entire plaintext/ciphertext must fit in memory
5. Payload version 2 (id-bound AAD) is **read-only** in this build; the write
switch is release-gated. Do not document it as an active protection.

## Tests

Expand Down
3 changes: 2 additions & 1 deletion .skills/planning.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ Pre-convention `Status: complete` in promoted flat plans maps to `closed`.
Stable subsystem names: `distribution-release`, `server-lifecycle-http`,
`updater-transport`, `cli-library-sync-consolidation`, `mcp-integration`,
`eggstack-dependency-refresh`, `maintenance-consolidation`,
`locking-convergence`, `snippet-crud-surface`, `sync-cursor-protocol`.
`locking-convergence`, `snippet-crud-surface`, `sync-cursor-protocol`,
`security-assurance`.

## Work classification

Expand Down
Loading
Loading