diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f26e8fb..06dd0b8a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,3 +29,22 @@ jobs: libxkbcommon-dev libwayland-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libgtk-3-dev libasound2-dev mesa-vulkan-drivers command: cargo test --workspace && cargo clippy --workspace --all-targets -- -D warnings + + # The licence policy (deny.toml, docs/legal/compliance.md): the shared gate doesn't run + # cargo-deny, so AniCraft checks its own dependency licences, bans and sources here. + licenses: + timeout-minutes: 20 + name: Licences, bans and sources (cargo deny) + runs-on: ubuntu-24.04 + steps: + - name: Harden runner + uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4 + with: + egress-policy: audit + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Install cargo-deny + run: cargo install cargo-deny --locked --version 0.20.2 + - name: Check licences, bans and sources + run: cargo deny --locked check licenses bans sources diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index 71ed329e..2fe13967 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -31,6 +31,8 @@ shaders or SDK code). | Sample animation (ball, star, sun, hills, sky) | First launch, tests, CLI `--sample` | AniCraft contributors | Original work, generated in code (`crates/doc/src/sample.rs`) | MIT OR Apache-2.0 | | Interactive sample (menu, Play button, spinner) | File › New from Sample (`which: interactive`), Test Movie tests and screenshots | AniCraft contributors | Original work, generated in code (`crates/doc/src/sample.rs`, `interactive`) | MIT OR Apache-2.0 | | Built-in templates (Leaderboard and Rectangle banners, Social square, Storyboard 16:9, Character turnaround, Lip-sync mouth chart: guides, layers, labels and placeholder mouth shapes) | File › New from Template and the start screen (ADR 0065) | AniCraft contributors | Original work, generated in code (`crates/doc/src/templates.rs`); sizes and safe areas follow public conventions (the IAB's 728 × 90 and 300 × 250 ad units, EBU R 95's 93 % action-safe and 90 % title-safe areas), the mouth set the common phoneme groups animators use | MIT OR Apache-2.0 | +| `symphonia` 0.6 and its sub-crates (core, common, metadata, FLAC, MP3, AAC, ADPCM, ALAC, PCM, Vorbis, CAF, MP4, MKV, Ogg, RIFF), through the shared `craft-audio` crate | Sound decoding | Philip Deljanov and the Symphonia contributors | (crates.io), used unmodified | MPL-2.0, an approved exception (`docs/legal/compliance.md` §2) | +| `jpeg-encoder` 0.6, through the shared `craft-image-codecs` crate | JPEG export | Volker Ströbel and contributors; portions derived from the Independent JPEG Group's software | (crates.io) | (MIT OR Apache-2.0) AND IJG, an approved exception; acknowledgement in `NOTICE` | | Colour theme | UI | AniCraft contributors | Original work (`src/theme.rs`) | MIT OR Apache-2.0 | | `docs/brand/artcraft-logo-white.png` | ArtCraft brand mark (wordmark, light ink for dark backgrounds) | ArtCraft Team | storytold/craftrules `assets/brand/` | ArtCraft brand terms (`docs/brand/LICENSE-brand.txt`), not open source | | `docs/brand/artcraft-logo-white.svg` | ArtCraft brand mark (wordmark, light ink for dark backgrounds) | ArtCraft Team | storytold/craftrules `assets/brand/` | ArtCraft brand terms (`docs/brand/LICENSE-brand.txt`), not open source | diff --git a/CHANGELOG.md b/CHANGELOG.md index c24cdf20..cea66135 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +* **Licences: the shared libraries' exceptions, and the licence check back in CI.** `symphonia` (MPL-2.0, sound decoding through `craft-audio`) and `jpeg-encoder` (IJG, JPEG export through `craft-image-codecs`) are accepted as crate-scoped exceptions, named in `NOTICE` and `ATTRIBUTION.md`, with the reasons in `docs/legal/compliance.md`. CI runs `cargo deny check licenses bans sources` in its own job again, since the shared gate doesn't. * **Security: safer reads and temp files.** Import to Library checks an image's size (256 MiB) before reading it, and saves, audio exports and the video soundtrack write their temporary files under unguessable names, created exclusively. * **Saved commands (command macros)** (ADR 0097, M6). * In the **History** panel, **Ctrl+click** steps (Shift+click a range) and choose **Save As diff --git a/NOTICE b/NOTICE index e67d58af..4468f6b4 100644 --- a/NOTICE +++ b/NOTICE @@ -28,6 +28,11 @@ Official builds also embed, from the shared craft-fonts build input (CRAFT_FONTS with the package as OFL-Inter.txt and OFL-JetBrainsMono.txt. Rust crates (about 420 across all platforms) are permissively licensed (MIT, Apache-2.0, BSD, -ISC, Zlib, BSL-1.0, Unicode-3.0, Unlicense, 0BSD). Where a crate offers a copyleft alternative, +ISC, Zlib, BSL-1.0, Unicode-3.0, Unlicense, 0BSD), with two exceptions that come in through +the shared Craft libraries: + symphonia and its sub-crates (sound decoding): Mozilla Public License 2.0, used unmodified. + Their source code is at https://github.com/pdeljanov/Symphonia (see ATTRIBUTION.md). + jpeg-encoder (JPEG export): MIT or Apache-2.0, with portions under the IJG licence. + This software is based in part on the work of the Independent JPEG Group. Where a crate offers a copyleft alternative, AniCraft uses it under its permissive licence. Binary releases ship the full licence texts of all crates (see docs/legal/compliance.md, "Release checklist"). diff --git a/deny.toml b/deny.toml index 1e0d8b9a..46a6ddb5 100644 --- a/deny.toml +++ b/deny.toml @@ -35,6 +35,79 @@ allow = ["OFL-1.1", "Ubuntu-font-1.0"] crate = "webpki-root-certs@=1.0.12" allow = ["CDLA-Permissive-2.0"] +# Approved by the project lead (2026-11-17) for the shared Craft libraries: `craft-audio` decodes +# through symphonia (MPL-2.0, file-level copyleft, used unmodified; its source is linked from +# ATTRIBUTION.md) and `craft-image-codecs` encodes JPEG with jpeg-encoder (IJG, acknowledged in +# NOTICE). Scoped to these crates; the allowlist above is unchanged. Raised with the shared +# libraries team: storytold/craft-libs#2100. +[[licenses.exceptions]] +crate = "symphonia" +allow = ["MPL-2.0"] + +[[licenses.exceptions]] +crate = "symphonia-core" +allow = ["MPL-2.0"] + +[[licenses.exceptions]] +crate = "symphonia-common" +allow = ["MPL-2.0"] + +[[licenses.exceptions]] +crate = "symphonia-metadata" +allow = ["MPL-2.0"] + +[[licenses.exceptions]] +crate = "symphonia-bundle-flac" +allow = ["MPL-2.0"] + +[[licenses.exceptions]] +crate = "symphonia-bundle-mp3" +allow = ["MPL-2.0"] + +[[licenses.exceptions]] +crate = "symphonia-codec-aac" +allow = ["MPL-2.0"] + +[[licenses.exceptions]] +crate = "symphonia-codec-adpcm" +allow = ["MPL-2.0"] + +[[licenses.exceptions]] +crate = "symphonia-codec-alac" +allow = ["MPL-2.0"] + +[[licenses.exceptions]] +crate = "symphonia-codec-pcm" +allow = ["MPL-2.0"] + +[[licenses.exceptions]] +crate = "symphonia-codec-vorbis" +allow = ["MPL-2.0"] + +[[licenses.exceptions]] +crate = "symphonia-format-caf" +allow = ["MPL-2.0"] + +[[licenses.exceptions]] +crate = "symphonia-format-isomp4" +allow = ["MPL-2.0"] + +[[licenses.exceptions]] +crate = "symphonia-format-mkv" +allow = ["MPL-2.0"] + +[[licenses.exceptions]] +crate = "symphonia-format-ogg" +allow = ["MPL-2.0"] + +[[licenses.exceptions]] +crate = "symphonia-format-riff" +allow = ["MPL-2.0"] + +[[licenses.exceptions]] +crate = "jpeg-encoder" +allow = ["IJG"] + [licenses.private] # Our own workspace crates are MIT OR Apache-2.0 (checked by `cargo deny` like any other crate). ignore = false diff --git a/docs/legal/compliance.md b/docs/legal/compliance.md index b44984c1..5cf36711 100644 --- a/docs/legal/compliance.md +++ b/docs/legal/compliance.md @@ -29,6 +29,22 @@ accepts `webpki-root-certs` 1.0.12 under CDLA-Permissive-2.0 for Mozilla certifi in by the HTTPS verifier. It applies only to that data crate and version; the code licence allowlist is unchanged. +**Shared-library exceptions (approved by the project lead, 2026-11-17).** The move to the shared +Craft crates brought two licences the allowlist doesn't name. Both are accepted as crate-scoped +exceptions in `deny.toml`, and the allowlist itself is unchanged: + +* `symphonia` 0.6 and its sub-crates, **MPL-2.0**, through `craft-audio` (sound decoding). + MPL-2.0 is file-level copyleft: AniCraft uses the files unmodified, names them in + `ATTRIBUTION.md` with a link to their source, and keeps its own code under MIT OR Apache-2.0. + Modifying a symphonia file would make that file's changes MPL-2.0. +* `jpeg-encoder` 0.6, **(MIT OR Apache-2.0) AND IJG**, through `craft-image-codecs` (JPEG + export). The IJG licence asks for an acknowledgement, which is in `NOTICE`. + +`symphonia-codec-aac` is an AAC decoder, and AAC is a patent-pool codec (section 4). Whether the +shared libraries make it opt-in, and whether they move to their own permissive decoders, is +tracked with that team in storytold/craft-libs#2100. CI runs `cargo deny check licenses bans +sources` in its own job again (the shared gate doesn't). + ```sh cargo deny check licenses bans sources # policy in deny.toml; must pass before every commit cargo deny check advisories # RustSec security advisories (needs network) @@ -141,7 +157,8 @@ Apache-2.0) with `ogg` (BSD-3-Clause), `nanomp3` and `nanomp3-core` (MP3 decodin Apache-2.0), and in the desktop app `cpal` (sound output, Apache-2.0) with its platform crates (`windows` on Windows, `alsa`/`alsa-sys` on Linux and the BSDs, MIT OR Apache-2.0; CoreAudio bindings on macOS). No new licence. `symphonia`, the usual Rust decoder, is MPL-2.0 and was not -used. +used then; it came in later through the shared `craft-audio` crate (see the shared-library +exceptions above). Sound output in the browser (2026-11-13, ADR 0095) uses the same `cpal` with its `wasm-bindgen` feature (Web Audio), which brings only crates already in the web build or under MIT OR @@ -241,4 +258,5 @@ No new crate. The installers are built with tools that are not Rust dependencies | "AniCraft" trademark clearance | Settled by the project lead (2026-11-09): the name is kept | | Freedom-to-operate patent search for core animation features | Open (recommended before 1.0) | | Full licence-text bundle generation (`cargo about`) in the release pipeline | Open (M8; the installers ship `LICENSE-*`, `NOTICE`, `ATTRIBUTION.md` and the font OFLs today) | +| MPL-2.0 `symphonia` (incl. an AAC decoder) and IJG `jpeg-encoder` through the shared crates | Accepted as exceptions by the project lead (2026-11-17); opt-in AAC and permissive decoders raised in storytold/craft-libs#2100; counsel to confirm the AAC decoder | | WiX's MS-RL parts inside the MSI (WixUI, `Wix4UtilCA`) and the AppImage runtime's LGPL libfuse3 | Open: family-wide practice, counsel to confirm (ADR 0026) |