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
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Code ownership for the required code-owner review on the default-branch
# ruleset. Two or more owners so an authoring owner is never locked out
# of merging their own change.
* @twn-lloyd @yokoszn
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Bug report
about: Something produces the wrong output, panics or fails to build
labels: bug
---

**What happened**

**What you expected**

**Reproduction**

A minimal command, code snippet or input file. For decoder problems, attach the input bytes or
a generator script.

**Environment**

- transcode version or commit:
- Rust version (`rustc --version`):
- OS and architecture:
- ffmpeg present? (only for ffmpeg-backed tests):
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Report a security vulnerability
url: https://github.com/webfold-ai/transcode/security/advisories/new
about: Please use private reporting for vulnerabilities. Do not open a public issue.
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Feature request
about: Propose a codec, container or API change
labels: enhancement
---

**Problem or use case**

**Proposed change**

**Alternatives considered**

**Patent or licensing status of the format, if known**
19 changes: 19 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Summary

<!-- What changes, and why. Link the issue if there is one. -->

## Output compatibility

<!-- Does this change any bytes a codec produces, or any decoded result? If yes, which test pins it and why is the new output correct? -->

## Checks

- [ ] `cargo fmt --all -- --check`
- [ ] `cargo test --locked`
- [ ] `cargo clippy --locked --all-targets -- -D warnings`
- [ ] New or changed decoder paths are covered by a test or a fuzz input
- [ ] No `unsafe` added, and no new runtime dependency (or one is justified below)

## Notes for reviewers

<!-- Patent, licensing or dependency implications, if any. -->
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
groups:
rust-dependencies:
patterns: ["*"]
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI

on:
pull_request:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read

jobs:
rust:
# This job name is the required status check ("Rust checks") in the
# default-branch ruleset. Renaming it requires updating the ruleset too.
name: Rust checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# Several integration tests use ffmpeg as an external decoder oracle. They skip
# when ffmpeg is absent, so install it explicitly to make the job meaningful.
- name: Install ffmpeg (test oracle)
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends ffmpeg
ffmpeg -version | head -n 1
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master as of 2026-11-04
with:
toolchain: stable
components: rustfmt, clippy
- name: Check formatting
run: cargo fmt --all -- --check
- name: Build
run: cargo build --locked --all-targets
- name: Test
run: cargo test --locked --no-fail-fast
- name: Clippy
run: cargo clippy --locked --all-targets -- -D warnings

msrv:
name: MSRV 1.89
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master as of 2026-11-04
with:
toolchain: "1.89.0"
# Build only. The MSRV job does not run tests, so it is not a full test gate on 1.89.
- name: Build on the minimum supported Rust version
run: cargo build --locked --all-targets
47 changes: 47 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CodeQL

# Static analysis for the Scorecard SAST check. Runs on pull requests that touch Rust
# sources, on pushes to main, and weekly as a backstop.

on:
pull_request:
paths:
- "src/**"
- "tests/**"
- "fuzz/**"
- "Cargo.toml"
- "Cargo.lock"
- ".github/workflows/codeql.yml"
push:
branches: [main]
schedule:
- cron: "23 2 * * 3"
workflow_dispatch:

permissions:
contents: read

jobs:
analyze:
name: CodeQL (Rust)
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master as of 2026-11-04
with:
toolchain: stable
- name: Initialize CodeQL
uses: github/codeql-action/init@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
with:
languages: rust
build-mode: none
queries: security-extended
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
with:
category: "/language:rust"
25 changes: 25 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Dependency review

# Fails a pull request that adds a dependency with a known high-severity vulnerability.
# GitHub's dependency graph must be enabled for the repository. For private repositories
# this also requires GitHub Advanced Security.

on:
pull_request:

permissions:
contents: read

jobs:
dependency-review:
name: Dependency review
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Review dependency changes
uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0
with:
fail-on-severity: high
51 changes: 51 additions & 0 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Fuzz

# cargo-fuzz (libFuzzer) runs every decoder target that accepts untrusted bytes.
# Short runs on pull requests that touch code, and a longer scheduled run every day,
# so the Scorecard Fuzzing check sees continuous fuzzing.

on:
pull_request:
paths:
- "src/**"
- "tests/**"
- "fuzz/**"
- "Cargo.toml"
- "Cargo.lock"
- ".github/workflows/fuzz.yml"
push:
branches: [main]
schedule:
- cron: "17 5 * * *"
workflow_dispatch:

permissions:
contents: read

jobs:
fuzz:
name: cargo-fuzz (${{ matrix.target }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [fuzz_png, fuzz_jpeg, fuzz_flac, fuzz_slac, fuzz_mp3, fuzz_aac, fuzz_opus]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master as of 2026-11-04
with:
toolchain: nightly
- name: Install cargo-fuzz
run: cargo install --locked cargo-fuzz
- name: Run ${{ matrix.target }}
run: cargo +nightly fuzz run ${{ matrix.target }} --fuzz-dir fuzz -- -max_total_time=180 -rss_limit_mb=4096
- name: Keep crash inputs
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: fuzz-artifacts-${{ matrix.target }}
path: fuzz/artifacts/${{ matrix.target }}
retention-days: 30
if-no-files-found: ignore
86 changes: 86 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Release

# Runs only for version tags (v*). A tag is created by a maintainer; this workflow never
# creates tags itself. It builds the transcode CLI for Linux x86_64, signs the artifact
# with Sigstore (keyless, via GitHub OIDC), and attaches SLSA build provenance.

on:
push:
tags:
- "v*"

permissions:
contents: read

jobs:
release:
name: Build and publish release assets
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write # cosign keyless signing and artifact attestations
attestations: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master as of 2026-11-04
with:
toolchain: "1.89.0"
- name: Install ffmpeg (test oracle)
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends ffmpeg
- name: Test before packaging
run: cargo test --locked --release --no-fail-fast
- name: Check tag matches package version
env:
TAG_NAME: ${{ github.ref_name }}
run: |
PACKAGE_VERSION=$(sed -n 's/^version = "\([^"]*\)"$/\1/p' Cargo.toml | head -n 1)
test "v${PACKAGE_VERSION}" = "${TAG_NAME}"
- name: Build
run: cargo build --release --locked --bin transcode
- name: Package assets
env:
TAG_NAME: ${{ github.ref_name }}
run: |
mkdir -p dist
cp target/release/transcode dist/transcode-linux-x86_64
cp LICENSE README.md dist/
tar -czf "dist/transcode-${TAG_NAME}-linux-x86_64.tar.gz" -C dist transcode-linux-x86_64 LICENSE README.md
(cd dist && sha256sum "transcode-${TAG_NAME}-linux-x86_64.tar.gz" > SHA256SUMS)
- name: Install cosign
uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
- name: Sign release artifacts (keyless Sigstore bundles)
run: |
cd dist
for f in "transcode-${TAG_NAME}-linux-x86_64.tar.gz" SHA256SUMS; do
cosign sign-blob --yes --bundle "${f}.sigstore.json" "$f"
done
env:
TAG_NAME: ${{ github.ref_name }}
- name: Generate SLSA build provenance
id: attest
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
with:
subject-path: "dist/transcode-*-linux-x86_64.tar.gz"
- name: Copy provenance bundle to the release assets
env:
BUNDLE_PATH: ${{ steps.attest.outputs.bundle-path }}
TAG_NAME: ${{ github.ref_name }}
run: |
test -s "$BUNDLE_PATH"
cp "$BUNDLE_PATH" "dist/transcode-${TAG_NAME}-linux-x86_64.tar.gz.intoto.jsonl"
- name: Create GitHub release
env:
GH_TOKEN: ${{ github.token }}
TAG_NAME: ${{ github.ref_name }}
run: |
cd dist
gh release create "$TAG_NAME" \
"transcode-${TAG_NAME}-linux-x86_64.tar.gz" \
"transcode-${TAG_NAME}-linux-x86_64.tar.gz.sigstore.json" \
"transcode-${TAG_NAME}-linux-x86_64.tar.gz.intoto.jsonl" \
SHA256SUMS SHA256SUMS.sigstore.json \
--generate-notes
45 changes: 45 additions & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Scorecard

# OpenSSF Scorecard. Results are published so the README badge and the scorecard.dev
# page stay current. Requires the repository to be public for publishing to work.

on:
branch_protection_rule:
schedule:
- cron: "20 7 * * 1"
push:
branches: [main]
workflow_dispatch:

# Scorecard recommends read-all at the top level, and grants write only per job.
permissions: read-all

jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
contents: read
actions: read
security-events: write
id-token: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Run analysis
uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0
with:
results_file: results.sarif
results_format: sarif
publish_results: true
- name: Upload artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: scorecard-sarif
path: results.sarif
retention-days: 5
- name: Upload to code scanning
uses: github/codeql-action/upload-sarif@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
with:
sarif_file: results.sarif
Loading
Loading