chore: add SPDX copyright headers and update license year

Add `// Copyright Sunbeam Studios 2026` and `// SPDX-License-Identifier:
Apache-2.0` headers to all source files missing them. Update LICENSE
copyright year, Dockerfile copyright header, and .dockerignore for new
project structure (lean4/, docs/, training artifacts).

Signed-off-by: Sienna Meridian Satterwhite <sienna@sunbeam.pt>
This commit is contained in:
2026-03-10 23:38:21 +00:00
parent 982cf5755d
commit 385e9d4c59
40 changed files with 143 additions and 2 deletions

View File

@@ -2,4 +2,31 @@ target/
.git/ .git/
.gitignore .gitignore
*.md *.md
# Lean 4 proofs
lean4/
# Paper / docs
docs/
# Training data, datasets, artifacts
*.bin
*.jsonl
models/
.fastembed_cache/
# burn training artifacts (checkpoints, experiment logs)
src/ensemble/gen/scanner_artifacts/
src/ensemble/gen/ddos_artifacts/
# Dev / CI files
certs/ certs/
.github/
.vscode/
.idea/
.claude/
scripts/
infrastructure/
*.swp
*.swo
*~

View File

@@ -1,3 +1,6 @@
# Copyright Sunbeam Studios 2026
# SPDX-License-Identifier: Apache-2.0
# ── Stage 1: build ────────────────────────────────────────────── # ── Stage 1: build ──────────────────────────────────────────────
FROM rust:slim AS builder FROM rust:slim AS builder
@@ -23,6 +26,7 @@ COPY Cargo.toml Cargo.lock ./
RUN mkdir -p src benches && \ RUN mkdir -p src benches && \
echo 'fn main() {}' > src/main.rs && \ echo 'fn main() {}' > src/main.rs && \
echo 'fn main() {}' > benches/scanner_bench.rs && \ echo 'fn main() {}' > benches/scanner_bench.rs && \
echo 'fn main() {}' > benches/ddos_bench.rs && \
cargo build --release --target "$(cat /rust-target)" ; \ cargo build --release --target "$(cat /rust-target)" ; \
rm -rf src benches rm -rf src benches
@@ -46,7 +50,6 @@ FROM cgr.dev/chainguard/static:latest
COPY --from=builder /tini /tini COPY --from=builder /tini /tini
COPY --from=builder /sunbeam-proxy /usr/local/bin/sunbeam-proxy COPY --from=builder /sunbeam-proxy /usr/local/bin/sunbeam-proxy
COPY models/ /models/
EXPOSE 80 443 EXPOSE 80 443

View File

@@ -184,7 +184,7 @@
comment syntax for the file format. Please also get (or round off) comment syntax for the file format. Please also get (or round off)
your own UID and put it after the copyright sign. your own UID and put it after the copyright sign.
Copyright 2025-2026 Sunbeam Studios Copyright 2026 Sunbeam Studios
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use criterion::{black_box, criterion_group, criterion_main, Criterion}; use criterion::{black_box, criterion_group, criterion_main, Criterion};
use sunbeam_proxy::ensemble::ddos::ddos_ensemble_predict; use sunbeam_proxy::ensemble::ddos::ddos_ensemble_predict;
use sunbeam_proxy::ensemble::gen::ddos_weights; use sunbeam_proxy::ensemble::gen::ddos_weights;

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use futures::StreamExt; use futures::StreamExt;
use k8s_openapi::api::networking::v1::Ingress; use k8s_openapi::api::networking::v1::Ingress;
use kube::{runtime::watcher, Api, Client}; use kube::{runtime::watcher, Api, Client};

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
/// Gaussian Process surrogate with RBF kernel and Cholesky solver. /// Gaussian Process surrogate with RBF kernel and Cholesky solver.
/// Designed for <200 observations in 4-10 dimensions. /// Designed for <200 observations in 4-10 dimensions.

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
pub mod ddos; pub mod ddos;
pub mod gp; pub mod gp;
pub mod optimizer; pub mod optimizer;

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use crate::autotune::gp::GaussianProcess; use crate::autotune::gp::GaussianProcess;
use crate::autotune::params::ParamSpace; use crate::autotune::params::ParamSpace;
use serde::Serialize; use serde::Serialize;

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use rand::Rng; use rand::Rng;
#[derive(Debug, Clone)] #[derive(Debug, Clone)]

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use pingora_cache::MemCache; use pingora_cache::MemCache;
use std::sync::LazyLock; use std::sync::LazyLock;

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use anyhow::{Context, Result}; use anyhow::{Context, Result};
use k8s_openapi::api::core::v1::Secret; use k8s_openapi::api::core::v1::Secret;
use kube::{Api, Client}; use kube::{Api, Client};

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use rustc_hash::FxHashMap; use rustc_hash::FxHashMap;
use std::collections::VecDeque; use std::collections::VecDeque;
use std::sync::atomic::{AtomicU64, Ordering}; use std::sync::atomic::{AtomicU64, Ordering};

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
/// Envelope for all cluster gossip messages. /// Envelope for all cluster gossip messages.

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
pub mod bandwidth; pub mod bandwidth;
pub mod messages; pub mod messages;
pub mod node; pub mod node;

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use std::net::SocketAddr; use std::net::SocketAddr;
use std::path::Path; use std::path::Path;
use std::sync::Arc; use std::sync::Arc;

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
pub mod sample; pub mod sample;
pub mod modsec; pub mod modsec;
pub mod cicids; pub mod cicids;

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use std::collections::HashMap; use std::collections::HashMap;
use std::path::Path; use std::path::Path;

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
//! Synthetic data generation for DDoS and scanner training samples. //! Synthetic data generation for DDoS and scanner training samples.
//! //!
//! DDoS synthetic samples are generated by sampling from CIC-IDS2017 timing //! DDoS synthetic samples are generated by sampling from CIC-IDS2017 timing

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use rustc_hash::FxHashSet; use rustc_hash::FxHashSet;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use std::time::Instant; use std::time::Instant;

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
//! Dual-stack TCP listener implementation inspired by `tokio_dual_stack`. //! Dual-stack TCP listener implementation inspired by `tokio_dual_stack`.
//! //!
//! This module provides a `DualStackTcpListener` that can listen on both IPv4 and IPv6 //! This module provides a `DualStackTcpListener` that can listen on both IPv4 and IPv6

View File

@@ -1,2 +1,5 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
pub mod ddos_weights; pub mod ddos_weights;
pub mod scanner_weights; pub mod scanner_weights;

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
/// Two-layer MLP forward pass with a fixed hidden size of 32: /// Two-layer MLP forward pass with a fixed hidden size of 32:
/// ///
/// hidden = ReLU(W1 @ input + b1) /// hidden = ReLU(W1 @ input + b1)

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
pub mod ddos; pub mod ddos;
pub mod gen; pub mod gen;
pub mod mlp; pub mod mlp;

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
/// Decision from a tree leaf node. /// Decision from a tree leaf node.
#[derive(Debug, Clone, Copy, PartialEq, Eq)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum TreeDecision { pub enum TreeDecision {

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use prometheus::{ use prometheus::{
Encoder, Gauge, Histogram, HistogramOpts, IntCounterVec, Opts, Registry, TextEncoder, Encoder, Gauge, Histogram, HistogramOpts, IntCounterVec, Opts, Registry, TextEncoder,
}; };

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use std::net::IpAddr; use std::net::IpAddr;
/// A parsed CIDR block for allowlist matching. /// A parsed CIDR block for allowlist matching.

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use std::hash::{Hash, Hasher}; use std::hash::{Hash, Hasher};
use std::net::IpAddr; use std::net::IpAddr;

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use crate::config::{BucketConfig, RateLimitConfig}; use crate::config::{BucketConfig, RateLimitConfig};
use crate::rate_limit::cidr::{self, CidrBlock}; use crate::rate_limit::cidr::{self, CidrBlock};
use crate::rate_limit::key::RateLimitKey; use crate::rate_limit::key::RateLimitKey;

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
pub mod cidr; pub mod cidr;
pub mod key; pub mod key;
pub mod limiter; pub mod limiter;

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use crate::config::BotAllowlistRule; use crate::config::BotAllowlistRule;
use crate::rate_limit::cidr::CidrBlock; use crate::rate_limit::cidr::CidrBlock;
use rustc_hash::FxHashMap; use rustc_hash::FxHashMap;

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use rustc_hash::FxHashSet; use rustc_hash::FxHashSet;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use tokio::io::copy_bidirectional; use tokio::io::copy_bidirectional;
use tokio::net::TcpStream; use tokio::net::TcpStream;

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use pingora_http::ResponseHeader; use pingora_http::ResponseHeader;
use pingora_proxy::Session; use pingora_proxy::Session;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use opentelemetry::trace::TracerProvider as _; use opentelemetry::trace::TracerProvider as _;
use opentelemetry_otlp::WithExportConfig; use opentelemetry_otlp::WithExportConfig;
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter}; use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter};

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
//! CART decision tree trainer (pure Rust, no burn dependency). //! CART decision tree trainer (pure Rust, no burn dependency).
//! //!
//! Trains a binary classification tree using Gini impurity and outputs //! Trains a binary classification tree using Gini impurity and outputs

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use futures::StreamExt; use futures::StreamExt;
use k8s_openapi::api::core::v1::{ConfigMap, Secret}; use k8s_openapi::api::core::v1::{ConfigMap, Secret};
use kube::{runtime::watcher, Api, Client}; use kube::{runtime::watcher, Api, Client};

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
//! Integration test: spin up two gossip nodes with bootstrap discovery //! Integration test: spin up two gossip nodes with bootstrap discovery
//! and verify that bandwidth reports propagate between them. //! and verify that bandwidth reports propagate between them.

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
//! Integration test for dual-stack TCP listener functionality. //! Integration test for dual-stack TCP listener functionality.
use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4}; use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4};

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use bytes::Bytes; use bytes::Bytes;
use proptest::prelude::*; use proptest::prelude::*;
use std::collections::HashSet; use std::collections::HashSet;

View File

@@ -1,3 +1,6 @@
// Copyright Sunbeam Studios 2026
// SPDX-License-Identifier: Apache-2.0
use std::net::IpAddr; use std::net::IpAddr;
use sunbeam_proxy::config::{BucketConfig, RateLimitConfig}; use sunbeam_proxy::config::{BucketConfig, RateLimitConfig};
use sunbeam_proxy::rate_limit::key::{self, RateLimitKey}; use sunbeam_proxy::rate_limit::key::{self, RateLimitKey};