Skip to content
Merged
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
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,12 @@ plan/visibility change, or credential rotation.

## Maintainer release checklist

`BUILD-INFO.json` in an archive must retain the exact approved `build-info.json`
bytes after complete bounded schema/provenance validation. Do not re-serialize
that record, change dependency order, or replace final byte comparison with
semantic JSON equality. Canonical metadata/SBOM descriptions are separate from
the bound original build record.

1. Review `sources.env`, its diff history, upstream signatures, checksums, and
source/toolchain BOM, minimum-OS declarations, and the derived
`v<FFMPEG_VERSION>-motrix.<BUILD_REVISION>` tag. Confirm the intended current
Expand Down
25 changes: 23 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,27 @@ default keychain, trust store, Action commit, source archive or toolchain change
The continuing authorization is freshly bound only to `.7`, with the same 42
advisories and 2026-10-15 UTC deadline; no prior Environment approval is reused.
All six earlier annotated tags remain immutable.
Formal `.7` run `36871808723` passed both genuine Developer ID signing and
exact-ZIP notarization jobs following fresh human Environment confirmation.
The isolated keychain lifecycle correction worked on both macOS architectures;
no identity lookup or notarization failure remains in that run. Both native
Windows final smoke tests also passed. All four macOS/Windows final structural
checks then failed closed at the exact `BUILD-INFO` byte comparison: the packager
re-serialized the validated record, changing formatting and potentially
dependency order instead of preserving the approved bytes. Assembly, Ed25519 signing and
publication were skipped; no public Release exists. Candidate `.8` retains one
bounded, binary, race-checked read for both complete schema/provenance validation
and archive content. Normalized dependency descriptions remain separate metadata;
the archived build record is no longer rewritten. Exact final byte comparisons
are unchanged, and malformed/duplicate/unknown records still fail validation.
Six-target public fixtures run the real isolated packaging CLI on noncanonical
valid JSON with CRLF, whitespace and reversed dependency order and prove that
the complete original bytes survive ZIP/TAR packaging without modifying input.
Signing/notarization, keychain isolation, all workflows, official Action commits,
source archives and toolchains are unchanged. The continuing authorization is
freshly bound only to `.8`, with the same 42 advisories and 2026-10-15 UTC deadline;
new protected-Environment confirmations are required, and all seven earlier
annotated tags and their run-specific signing evidence remain immutable.
The protected-main prepare job checks this gate before cache restoration,
source compilation, environment approvals, or signing/publishing credentials.
An approval must bind every exact Action commit, the SHA-256 of the complete
Expand Down Expand Up @@ -212,8 +233,8 @@ PGP verification is unchanged.
```bash
set -euo pipefail
repo=motrixapp/ffmpeg-static
tag=v9.0.2-motrix.7
asset=ffmpeg-9.0.2-motrix.7-linux-x64.tar.gz
tag=v9.0.2-motrix.8
asset=ffmpeg-9.0.2-motrix.8-linux-x64.tar.gz
manifest=ffmpeg-manifest.json
gh release verify "$tag" -R "$repo"
gh release download "$tag" -R "$repo" -p "$manifest" -p "$manifest.sig" -p SHA256SUMS
Expand Down
17 changes: 11 additions & 6 deletions scripts/package-artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
MAX_LICENSE_FILE_BYTES,
MAX_NOTARIZATION_JSON_BYTES,
PACKAGE_README,
_read_bounded_regular_file,
artifact_license,
artifact_stem,
canonical_json,
load_sources,
load_json_bytes,
load_json_file,
minimum_os,
notarization_log_asset_name,
Expand All @@ -48,12 +50,15 @@ def digest_bytes(data: bytes) -> str:

def _load_build_info(
path: Path, target_name: str, sources: dict[str, str], configure_args: list[str]
) -> tuple[dict[str, object], list[dict[str, str]]]:
info = load_json_file(path, "build info", maximum=256 * 1024)
normalized, dependencies = validate_build_info(
) -> tuple[bytes, list[dict[str, str]]]:
# Validate and archive the SAME bounded, race-checked binary read. Formatting
# and array order are part of the approved input bytes, not disposable data.
data = _read_bounded_regular_file(path, "build info", 256 * 1024)
info = load_json_bytes(data, "build info", maximum=256 * 1024)
_normalized, dependencies = validate_build_info(
info, target_name, sources, configure_args
)
return normalized, dependencies
return data, dependencies


def _license_entries(
Expand Down Expand Up @@ -135,10 +140,10 @@ def archive_entries(
configure_args = parse_configure_record(configure_data)
entries.append(("configure.txt", configure_data, 0o644))

info, dependencies = _load_build_info(
info_bytes, dependencies = _load_build_info(
build_info, target_name, sources, configure_args
)
entries.append(("BUILD-INFO.json", canonical_json(info), 0o644))
entries.append(("BUILD-INFO.json", info_bytes, 0o644))
entries.append(("README.txt", PACKAGE_README, 0o644))
license_entries, license_records = _license_entries(
payload, target_name, sources
Expand Down
6 changes: 3 additions & 3 deletions security/action-reachability-review.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
"schemaVersion": 1,
"status": "assessment-only",
"reviewedAt": "2026-10-01",
"releaseTag": "v9.0.2-motrix.7",
"releaseTag": "v9.0.2-motrix.8",
"auditReportSha256": "06e7bf28f087a2ed4ef7c4c9d244c79267b439da48924ee07081d03750cafcd1",
"workflowSha256": {
".github/workflows/ci.yml": "74d679b32694fa267a8e546f59dd2658c5a80b0413bec7ea9fd6d53eaa2f7682",
".github/workflows/dependency-audit.yml": "507bdf1a9233c83eb2926f001cae71e1fa03e43830ad326491050a53d8e3364b",
".github/workflows/release.yml": "4eee054e4c8a2e14a3ed47c6152f6e7fea738d928adfec30d4b78262a71f5aaa"
},
"sourceLockSha256": "5a0746f3233815574f26aeca10889056a5b1db85297bf08df67ee8856ca4f2e3",
"sourceLockSha256": "b3ac51dbf3dc8ec472b6a4404fc5fc9d77013fc0480114aeea8ea196214cf630",
"actionReferences": [
"actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6",
"actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9",
"actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1",
"actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c",
"actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a"
],
"decision": "Supporting static assessment only, not release authority or proof of non-reachability. On 2026-10-01 agalwood authorized corrective revisions until the first formal Release succeeds, in response to the disclosed .4 scope and unchanged 42 residual advisories through 2026-10-15 UTC. Authority is only the separately recorded maintainer decision in action-risk-review.json, bound to the complete exact scope and at most 14-day validity. This fresh record binds only v9.0.2-motrix.7 to the same complete same-day audit. Formal .6 run 36858422887 passed all 22 preceding jobs, including both Windows finalizers. After human macOS Environment confirmation, PKCS12 decoding/import and the unique valid Developer ID/Team checks passed, but both codesign identity lookups failed before any successful signature or notarization. The maintainer reuploaded canonical Base64 and the rerun failed identically. No Secret value was inspected or public Release created. The signing script omitted registration of its temporary keychain in the user search list. The .7 correction snapshots that list before create-keychain, safely parses bounded literal absolute paths without evaluation, preserves its entries/order while registering the owned keychain, and restores the snapshot before deletion on every exit. Restoration/deletion failure cannot report success. Full production-script tests use public fake commands and data, never real keychains, signatures or credentials, covering each setup/signing failure, create side effects, empty lists, literal special/space paths, malformed/bounded inventories and cleanup failures. Native macOS required CI and secret-free pre-sign jobs run these tests before candidate download/approval. Actual Developer ID signing is still tested only in the protected formal job. Unique valid Developer ID selection, SHA1 identity, explicit codesign --keychain, nonextractable imports, codesign-only access, internal Team/certificate pins, hardened runtime, timestamps and exact ZIP notarization remain. No default-keychain mutation, trust-store import, Action commit, source archive/URL, toolchain, dispatch input, API binding, cache prefix, Secret name/surface, signing environment or publication authority changes. Existing strict wrapped Base64 decoding, isolated Windows packaging/risk checks, protected binary readers, deterministic macOS baseline and bounded read-only NASM evidence remain. All 42 inventoried advisories persist, including cache service/extraction risks before validation and signature type-binding risk; none is claimed fixed or wholly unreachable. Publication still requires every exact-commit CI check, size/race/hash/byte comparison, independent rebuild, platform signing/notarization, pinned Ed25519 root, independent final verification, fresh protected-Environment confirmations and Immutable Releases. All six earlier annotated tags remain immutable; no prior Environment approval or exact-scope record is reused. New advisories, deadline extensions or unrelated source/Action updates require a new human decision.",
"decision": "Supporting static assessment only. Authority is only the separately recorded maintainer decision in action-risk-review.json, bound to the complete exact scope and at most 14-day validity. On 2026-10-01 agalwood authorized corrective revisions until the first formal Release succeeds, with the same 42 residual Action advisories (1 Critical, 18 High, 19 Medium, 4 Low) and unchanged 2026-10-15 UTC deadline. This fresh exact-scope record binds only v9.0.2-motrix.8, its source lock, every unchanged workflow byte, the unchanged complete same-day audit 36807648066 and official full-SHA Action references. Formal .7 run 36871808723 passed genuine Developer ID signing and exact-ZIP notarization on both macOS architectures after fresh Environment confirmation, plus both native Windows final smoke tests. Four final structural jobs failed closed at BUILD-INFO exact-byte comparison because packaging re-serialized the validated record. Assembly, Ed25519 signing and publication were skipped; no Release was published or Secret value inspected. The .8 correction archives the same single bounded, binary, race-checked BUILD-INFO read used for complete strict JSON/schema/provenance validation, preserving approved bytes verbatim. Normalized dependency descriptions remain separate metadata/SBOM data. All exact final byte comparisons and malformed/duplicate/unknown-record, source, configure, license and architecture checks remain. Public six-target fixtures run the real isolated packaging CLI with noncanonical valid JSON, CRLF, whitespace and reversed dependency order, proving original bytes in ZIP/TAR and unchanged input. No workflow, Action, source archive/URL, toolchain, cache policy, dispatch/API/artifact binding, Secret surface/permission, keychain isolation, certificate pin, hardened runtime, timestamp, notarization or publication authority changes. Existing strict Base64, isolated Windows packaging/risk checks, protected readers, deterministic macOS baseline and NASM evidence remain. All 42 advisories persist, including cache service/extraction risks before validation and signature type-binding risk; none is claimed fixed or wholly unreachable. Publication still requires exact-commit CI, size/race/hash/byte checks, independent rebuilds, platform signing/notarization, pinned Ed25519 authentication, independent final verification, Immutable Releases and fresh human Environment confirmations. All seven prior tags remain immutable; no prior scope, approval or run-specific signature/notarization evidence is reused for .8. Further corrections require fresh exact-scope records. New advisories, deadline extensions or unrelated source/Action updates require a new human decision. This assessment grants no release or Environment approval.",
"limitations": [
"Static call-path review, not complete dynamic taint analysis, exploit testing, or proof of non-reachability.",
"The lock inventory includes code beyond the selected entrypoint; findings are retained rather than suppressed.",
Expand Down
8 changes: 4 additions & 4 deletions security/action-risk-review.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"reviewedAt": "2026-10-01",
"validUntil": "2026-10-15",
"reviewedBy": "agalwood",
"decision": "On 2026-10-01 agalwood authorized corrective revisions until the first formal Release succeeds in response to the disclosed .4 scope and unchanged 42 residual Action advisories (1 Critical, 18 High, 19 Medium, 4 Low), retaining the 2026-10-15 UTC deadline. This fresh record binds only v9.0.2-motrix.7 to its exact source lock, every workflow byte, supporting assessment, complete same-day audit report and official full-SHA Action references. Formal .6 run 36858422887 passed all 22 preceding jobs, including both Windows finalizers. After human macOS Environment confirmation, decoding, PKCS12 import and unique valid Developer ID/Team checks passed, but both codesign identity lookups failed before a successful signature or notarization. Reuploading canonical Base64 and rerunning the same commit failed identically; no Secret contents were inspected or public Release created. The script omitted its temporary keychain from the user search list. The .7 correction snapshots that list before creation, parses bounded literal paths without evaluation, registers the owned keychain while preserving existing entries/order, and restores the original list before deletion on every exit. Cleanup failures cannot report success. Full production-script tests with public fake commands/data cover registration, setup/signing failures, create side effects, empty/literal-space/special-character paths, malformed inventories and restoration/deletion failures. They never touch a real keychain or credential, and do not claim an actual Developer ID signature. Native macOS required CI and secret-free pre-sign jobs run them before candidate download/approval. SHA1 identity selection, explicit --keychain, unique valid Developer ID, nonextractable keys, codesign-only access, internal Team/certificate pins, hardened runtime, timestamps and exact ZIP notarization remain. No default keychain, trust store, source archive/URL, toolchain, official Action commit, Secret name/permission or publication authority changes. Existing strict wrapped Base64 decoding, isolated Windows packaging/risk checks, native fresh packaging checks, protected binary-mode readers, deterministic macOS baseline and read-only bounded NASM evidence remain. Audit 36807648066 and its complete 42-advisory inventory are unchanged; none is claimed fixed or wholly unreachable, including cache service/extraction risks before validation and signature type-binding risk. Publication remains conditional on all required exact-commit CI checks, file/race/size/hash guards, independent clean rebuilds, Developer ID signing/notarization, Ed25519 authentication, independent final verification, Immutable Releases and fresh protected-Environment confirmations. All six prior annotated tags stay immutable; no previous hash binding or Environment approval is reused. Further corrective revisions need fresh exact-scope records. New advisories, deadline extensions or unrelated source/Action updates need a new human decision. This limited record grants no Environment approval, no exception for another tag or unrecorded scope, and no publication after the deadline.",
"decision": "On 2026-10-01 agalwood authorized corrective revisions until the first formal Release succeeds, with the same 42 residual Action advisories (1 Critical, 18 High, 19 Medium, 4 Low) and unchanged 2026-10-15 UTC deadline. This fresh exact-scope record binds only v9.0.2-motrix.8, its source lock, every unchanged workflow byte, the unchanged complete same-day audit 36807648066 and official full-SHA Action references. Formal .7 run 36871808723 passed genuine Developer ID signing and exact-ZIP notarization on both macOS architectures after fresh Environment confirmation, plus both native Windows final smoke tests. Four final structural jobs failed closed at BUILD-INFO exact-byte comparison because packaging re-serialized the validated record. Assembly, Ed25519 signing and publication were skipped; no Release was published or Secret value inspected. The .8 correction archives the same single bounded, binary, race-checked BUILD-INFO read used for complete strict JSON/schema/provenance validation, preserving approved bytes verbatim. Normalized dependency descriptions remain separate metadata/SBOM data. All exact final byte comparisons and malformed/duplicate/unknown-record, source, configure, license and architecture checks remain. Public six-target fixtures run the real isolated packaging CLI with noncanonical valid JSON, CRLF, whitespace and reversed dependency order, proving original bytes in ZIP/TAR and unchanged input. No workflow, Action, source archive/URL, toolchain, cache policy, dispatch/API/artifact binding, Secret surface/permission, keychain isolation, certificate pin, hardened runtime, timestamp, notarization or publication authority changes. Existing strict Base64, isolated Windows packaging/risk checks, protected readers, deterministic macOS baseline and NASM evidence remain. All 42 advisories persist, including cache service/extraction risks before validation and signature type-binding risk; none is claimed fixed or wholly unreachable. Publication still requires exact-commit CI, size/race/hash/byte checks, independent rebuilds, platform signing/notarization, pinned Ed25519 authentication, independent final verification, Immutable Releases and fresh human Environment confirmations. All seven prior tags remain immutable; no prior scope, approval or run-specific signature/notarization evidence is reused for .8. Further corrections require fresh exact-scope records. New advisories, deadline extensions or unrelated source/Action updates require a new human decision. This limited decision grants no Environment approval, no exception for another tag or unknown scope, and no publication after the deadline.",
"actionReferences": [
"actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6",
"actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9",
Expand Down Expand Up @@ -57,12 +57,12 @@
"GHSA-vxpw-j846-p89q"
],
"auditReportSha256": "06e7bf28f087a2ed4ef7c4c9d244c79267b439da48924ee07081d03750cafcd1",
"releaseTag": "v9.0.2-motrix.7",
"sourceLockSha256": "5a0746f3233815574f26aeca10889056a5b1db85297bf08df67ee8856ca4f2e3",
"releaseTag": "v9.0.2-motrix.8",
"sourceLockSha256": "b3ac51dbf3dc8ec472b6a4404fc5fc9d77013fc0480114aeea8ea196214cf630",
"workflowSha256": {
".github/workflows/ci.yml": "74d679b32694fa267a8e546f59dd2658c5a80b0413bec7ea9fd6d53eaa2f7682",
".github/workflows/dependency-audit.yml": "507bdf1a9233c83eb2926f001cae71e1fa03e43830ad326491050a53d8e3364b",
".github/workflows/release.yml": "4eee054e4c8a2e14a3ed47c6152f6e7fea738d928adfec30d4b78262a71f5aaa"
},
"assessmentSha256": "893b60c20064a69de04d14086ce22632e6249b812034be918fed1c6c3e1e5a42"
"assessmentSha256": "8602ba441a30f8583dafc5ef474fa075db79fec5c6f07ffc16da3ba0e097ecbe"
}
2 changes: 1 addition & 1 deletion sources.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Keep this file compatible with both POSIX-style shell sourcing and the
# dependency-free parser in scripts/pipeline_lib.py (plain KEY=VALUE only).

BUILD_REVISION=7
BUILD_REVISION=8
SOURCE_DATE_EPOCH=1789699562
MACOS_MIN_VERSION=12.0
THIRD_PARTY_NOTICES_SHA256=e9e78e757a9f33e38c23107194fb86a868b5e095690d1b340852033d16a79065
Expand Down
2 changes: 1 addition & 1 deletion tests/test_dependency_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_recorded_scope_and_approved_and_blocked_fixtures(self) -> None:
reviews.validate(self.approved_review(), self.references, self.today)
reviews.validate_scope(self.review, ROOT / ".github/workflows", ROOT / "sources.env",
self.review["releaseTag"], ROOT / "security/action-reachability-review.json")
self.assertEqual(self.review["releaseTag"], "v9.0.2-motrix.7")
self.assertEqual(self.review["releaseTag"], "v9.0.2-motrix.8")
blocked = copy.deepcopy(self.review)
blocked["status"] = "blocked"
with self.assertRaisesRegex(ValueError, "formal release blocked"):
Expand Down
Loading
Loading