Skip to content
Draft
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
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
version: 2
updates:
- package-ecosystem: cargo
directory: /
schedule:
interval: weekly
- package-ecosystem: docker
directory: /
schedule:
interval: weekly
- package-ecosystem: github-actions
directory: /
schedule:
Expand Down
51 changes: 27 additions & 24 deletions .github/workflows/release-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ permissions:

env:
CARGO_TERM_COLOR: always
RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.event.release.tag_name }}

jobs:
build:
Expand Down Expand Up @@ -42,6 +43,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v4
with:
persist-credentials: false
fetch-depth: 0

- name: Validate release tag and source
id: version
shell: bash
run: bash scripts/release-version.sh

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@e2a55d2ffb04f378e9626c28d38b36d230d1e12f # stable (pinned)
Expand Down Expand Up @@ -69,26 +78,17 @@ jobs:
# Thin LTO for cross builds to avoid OOM during linking
export CARGO_PROFILE_RELEASE_LTO=thin
export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=4
cross build --release --target ${{ matrix.target }} -p agentsniff -j2
cross build --locked --release --target ${{ matrix.target }} -p agentsniff -j2
else
cargo build --release --target ${{ matrix.target }} -p agentsniff -j2
fi

- name: Determine version
id: version
shell: bash
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "version=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
else
echo "version=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
cargo build --locked --release --target ${{ matrix.target }} -p agentsniff -j2
fi

- name: Package (Unix)
if: runner.os != 'Windows'
shell: bash
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
VERSION="${{ steps.version.outputs.version }}"
ARCHIVE="agentsniff-${VERSION}-${{ matrix.target }}.tar.gz"
mkdir -p staging
cp target/${{ matrix.target }}/release/agentsniff staging/
Expand All @@ -101,8 +101,9 @@ jobs:
- name: Package (Windows)
if: runner.os == 'Windows'
shell: bash
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
VERSION="${{ steps.version.outputs.version }}"
ARCHIVE="agentsniff-${VERSION}-${{ matrix.target }}.zip"
mkdir -p staging
cp target/${{ matrix.target }}/release/agentsniff.exe staging/
Expand All @@ -122,10 +123,21 @@ jobs:
name: Checksums, signatures, and upload
needs: build
runs-on: ubuntu-latest
environment: release
permissions:
contents: write
id-token: write
steps:
- name: Checkout release source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v4
with:
persist-credentials: false
fetch-depth: 0

- name: Validate release tag and source
id: tag
run: bash scripts/release-version.sh

- name: Download all artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
Expand Down Expand Up @@ -161,19 +173,10 @@ jobs:
env:
COSIGN_EXPERIMENTAL: "1"

- name: Determine tag
id: tag
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "tag=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
else
echo "tag=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
fi

- name: Upload to GitHub Release
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
with:
tag_name: ${{ steps.tag.outputs.tag }}
tag_name: ${{ steps.tag.outputs.version }}
files: artifacts/*
body: |
## Pre-Built Binaries
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Rust security checks

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 20
env:
CARGO_PROFILE_DEV_DEBUG: "0"
CARGO_PROFILE_TEST_DEBUG: "0"
CARGO_INCREMENTAL: "0"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- run: rustup toolchain install stable --profile minimal --component rustfmt --component clippy
- run: cargo fmt --all -- --check
- run: cargo test --workspace --locked
- run: cargo clippy --workspace --locked --lib --bins -- -D warnings
- run: cargo install cargo-audit --version 0.22.2 --locked
- run: cargo audit --deny warnings
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## Unreleased

### Security and reliability

- Replace unmaintained libyaml parsing with bounded safe-Rust YAML parsing and
secret-safe diagnostics; preserve numeric port keys, aliases, and defaults.
- Upgrade P-256 cryptography and require the compatible AgentPin 0.3.1 security
backport; preserve existing signed datasets, identity signatures, and pins.

- Reject DNS-rebinding/cross-origin management requests; deny framing and MIME sniffing.
- Validate release tags as data and bind packaging/signing to the checked-out tag commit.
- Bound passive event retention, aggregate MCP evidence, scan storage, API pages, and backups.
- Cancel detector child tasks promptly and finish scans independently of slow notification servers.
- Restrict Unix SQLite database and sidecar permissions; preserve existing history on quota failure.
- Update TLS/runtime dependencies, lock release builds, pin container images, and schedule dependency updates.
- Honor YAML/environment/explicit CLI precedence, passive DNS duration, and container detector toggles.

Release maintainers should configure the GitHub `release` environment with
required reviewers and protected release-tag rules. Dispatch releases from the
matching tag ref; branch-dispatched releases are rejected.

## 2.4.0

### Added
Expand Down
Loading
Loading