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 .clusterfuzzlite/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2025-2026 PQCrypta <contact@pqcrypta.com>
#
# SPDX-License-Identifier: MIT OR Apache-2.0

# OSS-Fuzz's Rust builder (nightly and cargo-fuzz), pinned by digest
FROM gcr.io/oss-fuzz-base/base-builder-rust@sha256:99ce521d18330119973205ac941a46f3aa5a1b13eb41d193127d1a1321e95c84
COPY . $SRC/pqcrypta-proxy
Expand Down
5 changes: 5 additions & 0 deletions .clusterfuzzlite/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/bash -eu

# SPDX-FileCopyrightText: 2025-2026 PQCrypta <contact@pqcrypta.com>
#
# SPDX-License-Identifier: MIT OR Apache-2.0

# Every target in fuzz/, built with the sanitizer ClusterFuzzLite asks for,
# each with its seeds (fuzz/seeds/<target>/) as its starting corpus
cd "$SRC/pqcrypta-proxy/fuzz"
Expand Down
13 changes: 9 additions & 4 deletions .github/actions/setup-openssl-linux/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ runs:
steps:
- name: Cache OpenSSL ${{ inputs.version }}
id: cache
uses: actions/cache@v4
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/openssl-${{ inputs.version }}
key: openssl-${{ inputs.version }}-${{ inputs.sha256 }}-${{ runner.os }}-${{ runner.arch }}-v2
Expand All @@ -43,15 +43,18 @@ runs:
- name: Build OpenSSL ${{ inputs.version }} (cache miss)
if: steps.cache.outputs.cache-hit != 'true'
shell: bash
# The inputs reach the script as its environment, never as its text
env:
V: ${{ inputs.version }}
SHA256: ${{ inputs.sha256 }}
run: |
set -euxo pipefail
V="${{ inputs.version }}"
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends zlib1g-dev libbrotli-dev libzstd-dev
cd "$(mktemp -d)"
curl -fsSL "https://github.com/openssl/openssl/releases/download/openssl-${V}/openssl-${V}.tar.gz" -o openssl.tar.gz
# Checked before it is built: what it holds is linked into the release binary
echo "${{ inputs.sha256 }} openssl.tar.gz" | sha256sum -c -
echo "${SHA256} openssl.tar.gz" | sha256sum -c -
tar xf openssl.tar.gz
cd "openssl-${V}"
# The configuration directory is the distribution's, where a downloaded
Expand All @@ -66,8 +69,10 @@ runs:

- name: Export OpenSSL environment
shell: bash
env:
V: ${{ inputs.version }}
run: |
P="$HOME/openssl-${{ inputs.version }}"
P="$HOME/openssl-${V}"
{
echo "OPENSSL_DIR=$P"
echo "OPENSSL_LIB_DIR=$P/lib"
Expand Down
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
version: 2
# A release is taken a week after it is published, not the day it appears:
# a compromised version is usually caught and pulled within days, and a
# regression reported by its first users. Security updates are not delayed.
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
cooldown:
default-days: 7
commit-message:
prefix: "ci"
groups:
Expand All @@ -20,6 +25,8 @@ updates:
schedule:
interval: "weekly"
day: "monday"
cooldown:
default-days: 7
commit-message:
prefix: "chore"
ignore:
Expand All @@ -36,8 +43,12 @@ updates:
directory: "/fuzz"
schedule:
interval: "weekly"
cooldown:
default-days: 7

- package-ecosystem: "docker"
directory: "/.clusterfuzzlite"
schedule:
interval: "weekly"
cooldown:
default-days: 7
96 changes: 87 additions & 9 deletions .github/workflows/cargo-deny.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
name: Cargo Deny
name: Dependencies

# Every dependency, the vendored forks included, against RustSec's advisories,
# the licence policy and the allowed sources: on each change, and every day,
# since an advisory is published whether or not anything here changes. Any
# finding fails the run (SECURITY.md, "Dependency and code scanning").
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
schedule:
- cron: '0 3 * * 2' # Tuesday 03:00 UTC
- cron: '0 3 * * *' # 03:00 UTC daily
workflow_dispatch:

# Read only unless a job asks for more
permissions:
contents: read

# One run per workflow and ref: a newer push to a pull request cancels the run
# it supersedes; on main every run completes
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
deny:
name: ${{ matrix.checks }}
Expand All @@ -22,16 +33,83 @@ jobs:
checks:
- advisories
- bans licenses sources
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

# F-04: All checks are hard failures. Known-safe advisory exceptions are
# documented in deny.toml [advisories].ignore with rationale and are
# reviewed before each release. Setting continue-on-error = false ensures
# newly-published CVEs against our TLS/crypto dependencies block CI.
continue-on-error: false
- uses: EmbarkStudios/cargo-deny-action@bb119f768ea239e765aeaef5769558d4f21213aa # v2.1.5
with:
command: check ${{ matrix.checks }}

# Every lockfile, the vendored forks' too (their standalone tests build from
# them; cargo-deny reads the proxy's alone), and warnings (unsound,
# unmaintained, yanked) as failures
audit:
name: cargo audit, each lockfile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: taiki-e/install-action@073e1fd0bc889c9aee68dbaaa927cde1b5653a83 # v2.90.11
with:
tool: cargo-audit
- name: cargo audit, each lockfile
run: |
status=0
while IFS= read -r lock; do
echo "::group::$lock"
cargo audit --deny warnings --file "$lock" || status=1
echo "::endgroup::"
done < <(find . -name Cargo.lock -not -path './target/*' | sort)
exit $status

- uses: EmbarkStudios/cargo-deny-action@81891abc19297b21343b15ef67dc61e4aea74fda # v2
# The forks under vendor/ are path dependencies, which an audit of a
# lockfile passes over: it matches advisories to crates.io packages. Each
# fork is audited here as the upstream crate and version it carries, so an
# advisory against that release fails the run until the fork takes the fix
# (or VENDORED.md and an OpenVEX statement in .vex/ say why it does not
# apply). Yanked status is the upstream release's, not the fork's.
vendored:
name: cargo audit, vendored forks as their upstream releases
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
command: check ${{ matrix.checks }}
persist-credentials: false
- uses: taiki-e/install-action@073e1fd0bc889c9aee68dbaaa927cde1b5653a83 # v2.90.11
with:
tool: cargo-audit
- name: The forks, as crates.io packages
run: |
{
printf 'version = 4\n\n'
cargo metadata --format-version 1 --locked |
jq -r '.packages[] | select(.manifest_path | test("/vendor/"))
| "[[package]]\nname = \"\(.name)\"\nversion = \"\(.version)\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\n"'
} > "$RUNNER_TEMP/vendored.lock"
grep -c '^\[\[package\]\]' "$RUNNER_TEMP/vendored.lock"
cargo audit --deny warnings --no-yanked --file "$RUNNER_TEMP/vendored.lock"

# The software bill of materials the release attaches, made on every change
# so the release step's command is known to work before a release needs it
sbom:
name: SBOM (CycloneDX)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: taiki-e/install-action@073e1fd0bc889c9aee68dbaaa927cde1b5653a83 # v2.90.11
with:
tool: cargo-cyclonedx
- name: Bill of materials
run: |
cargo cyclonedx --format json --spec-version 1.5 --override-filename pqcrypta-proxy.cdx
jq -e '.components | length > 0' pqcrypta-proxy.cdx.json
jq -r '"\(.components | length) components, CycloneDX \(.specVersion)"' pqcrypta-proxy.cdx.json
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: sbom
path: pqcrypta-proxy.cdx.json
6 changes: 6 additions & 0 deletions .github/workflows/cflite-batch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ on:
permissions:
contents: read

# One run per workflow and ref at a time; a later one waits rather than
# cancelling it: a release is never cut short
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
fuzz:
name: Fuzz (${{ matrix.sanitizer }})
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/cflite-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ on:
permissions:
contents: read

# One run per workflow and ref: a newer push to a pull request cancels the run
# it supersedes; on main every run completes
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
fuzz:
name: Fuzz (${{ matrix.sanitizer }})
Expand Down
Loading
Loading