Skip to content

chore(deps): bump the rust-deps group across 1 directory with 3 updates #97

chore(deps): bump the rust-deps group across 1 directory with 3 updates

chore(deps): bump the rust-deps group across 1 directory with 3 updates #97

Workflow file for this run

name: CI
on:
push:
branches: [main]
paths-ignore:
- "**.md"
- "docs/**"
- "LICENSE"
- "assets/**"
pull_request:
branches: [main]
paths-ignore:
- "**.md"
- "docs/**"
- "LICENSE"
- "assets/**"
permissions: {}
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings
jobs:
check:
name: Check
runs-on: ubuntu-latest
permissions:
contents: read # checkout
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- run: rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- run: cargo check --workspace --all-targets --all-features --locked
fmt:
name: Format
runs-on: ubuntu-latest
permissions:
contents: read # checkout
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- run: rustup toolchain install stable --profile minimal --component rustfmt
- run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
permissions:
contents: read # checkout
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- run: rustup toolchain install stable --profile minimal --component clippy
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
test-rust:
name: Test Rust (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
permissions:
contents: read # checkout
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- run: rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- run: cargo test --workspace --all-features --locked
build-wasm:
name: Build WASM
runs-on: ubuntu-latest
permissions:
contents: write # push updated core.wasm
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.head_ref || github.ref_name }}
persist-credentials: true # needed for git push in commit step
- run: rustup toolchain install stable --profile minimal --target wasm32-wasip1
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- name: Install wasm-opt
run: |
curl -fsSL https://github.com/WebAssembly/binaryen/releases/download/version_129/binaryen-version_129-x86_64-linux.tar.gz \
| sudo tar -xz -C /usr/local --strip-components=1
- name: Install wasm-tools
run: cargo install wasm-tools --locked
- name: Rebuild core.wasm
run: bash go/ressrf/build_wasm.sh
- name: Copy core.wasm to node/
run: cp go/ressrf/core.wasm node/core.wasm
- name: Commit if changed
run: |
if git diff --quiet go/ressrf/core.wasm node/core.wasm; then
echo "core.wasm is up to date"
else
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add go/ressrf/core.wasm node/core.wasm
git commit -m "chore: rebuild core.wasm [ci]"
git push
fi
test-go:
needs: [build-wasm]
name: Test Go (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
permissions:
contents: read # checkout
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.head_ref || github.ref_name }}
persist-credentials: false
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.0.2
with:
go-version-file: go/ressrf/go.mod
cache-dependency-path: go/ressrf/go.sum
- name: Test
working-directory: go/ressrf
run: go test -count=1 -race ./...
- name: Vet
working-directory: go/ressrf
run: go vet ./...
lint-go:
needs: [build-wasm]
name: Lint Go
runs-on: ubuntu-latest
permissions:
contents: read # checkout
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.head_ref || github.ref_name }}
persist-credentials: false
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.0.2
with:
go-version-file: go/ressrf/go.mod
cache-dependency-path: go/ressrf/go.sum
- uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
version: latest
working-directory: go/ressrf
test-python:
name: Test Python (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
permissions:
contents: read # checkout
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
cache-dependency-glob: python/uv.lock
- run: rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
workspaces: python
- name: Install and test
working-directory: python
run: |
uv venv
uv pip install maturin pytest
uv run maturin develop
uv run pytest tests/ -v
lint-python:
name: Lint Python
runs-on: ubuntu-latest
permissions:
contents: read # checkout
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- name: Ruff format check
working-directory: python
run: uvx ruff format --check .
- name: Ruff lint
working-directory: python
run: uvx ruff check .
- name: Type check (ty)
working-directory: python
run: uvx ty check
test-node:
needs: [build-wasm]
name: Test Node.js (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
permissions:
contents: read # checkout
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.head_ref || github.ref_name }}
persist-credentials: false
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "22"
cache: npm
cache-dependency-path: node/package-lock.json
- name: Install
working-directory: node
run: npm ci
- name: Test
working-directory: node
run: npx tsx --test tests/*.test.ts
lint-node:
needs: [build-wasm]
name: Lint Node.js
runs-on: ubuntu-latest
permissions:
contents: read # checkout
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.head_ref || github.ref_name }}
persist-credentials: false
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "22"
cache: npm
cache-dependency-path: node/package-lock.json
- name: Install
working-directory: node
run: npm ci
- name: Type check
working-directory: node
run: npx tsc --noEmit
e2e-tests:
name: SSRF E2E (Tier 2, Docker)
runs-on: ubuntu-latest
permissions:
contents: read # checkout
# Linux only because the regular GitHub-hosted macOS/Windows runners
# lack a Docker daemon. The Tier 2 SSRF tests spin up CoreDNS and
# WireMock containers via testcontainers-rs to verify DNS-based and
# redirect-based bypasses end-to-end. The `e2e` Cargo feature is
# off by default so the standard test-rust matrix above stays
# hermetic on macOS / Windows.
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- run: rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
# Different feature set than the main test-rust job; cache key
# is namespaced so the e2e build artifacts do not pollute or
# invalidate the default-feature cache.
key: e2e
- name: Pre-pull container images
# Pulling up front avoids per-test pull races and surfaces
# registry / network failures as a single explicit step.
run: |
docker pull coredns/coredns:1.11.3
docker pull wiremock/wiremock:3.9.1
- name: Run Tier 2 e2e tests
run: cargo test --features e2e -p ressrf-tcp --test ssrf_e2e --locked
test-go-native:
# Native Go port at go-native/ressrf/. No WASM runtime, no Rust
# toolchain; depends on neither the build-wasm step nor the wazero
# binding.
name: Test Go native (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
permissions:
contents: read # checkout
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.0.2
with:
go-version-file: go-native/ressrf/go.mod
cache-dependency-path: go-native/ressrf/go.sum
- name: Test
working-directory: go-native/ressrf
run: go test -count=1 -race ./...
- name: Vet
working-directory: go-native/ressrf
run: go vet ./...
lint-go-native:
name: Lint Go native
runs-on: ubuntu-latest
permissions:
contents: read # checkout
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.0.2
with:
go-version-file: go-native/ressrf/go.mod
cache-dependency-path: go-native/ressrf/go.sum
- uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
version: latest
working-directory: go-native/ressrf
generated-up-to-date:
# Drift check: if a contributor edits crates/ressrf-core/config/*.json
# without re-running `go generate ./...` from the native Go module,
# the baked-in tables under go-native/ressrf/internal/engine/ go
# stale. `make check-generated` regenerates and fails on diff.
name: Generated Go files up to date
runs-on: ubuntu-latest
permissions:
contents: read # checkout
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.0.2
with:
go-version-file: go-native/ressrf/go.mod
cache-dependency-path: go-native/ressrf/go.sum
- name: Check generated files
working-directory: go-native/ressrf
run: make check-generated