Skip to content

Ngwaf compute interface#22

Merged
BrooksCunningham merged 3 commits intomainfrom
ngwaf-compute-interface
Oct 31, 2025
Merged

Ngwaf compute interface#22
BrooksCunningham merged 3 commits intomainfrom
ngwaf-compute-interface

Conversation

@BrooksCunningham
Copy link
Copy Markdown
Collaborator

Adding Rust Compute integration for NGWAF Interface

c
c
Initial implementation of a Fastly Compute@Edge service for NGWAF inspection. Includes authentication via cdn-secret header, WAF inspection logic, custom client IP support, JSON response formatting, and header metadata. Adds README with setup and usage instructions, configuration files, Rust source code, and a test script.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new Fastly Compute@Edge NGWAF (Next-Gen WAF) interface service that performs WAF inspection on incoming requests and returns inspection results without forwarding to an origin backend.

  • Implements WAF inspection using Fastly's security inspection API with authentication via cdn-secret header
  • Adds comprehensive unit tests for core functionality including status code mapping, JSON response structure, IP parsing, and header formatting
  • Provides configuration setup with config store integration for NGWAF corp and workspace settings

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
ngwaf-compute-interface/src/main.rs Entry point implementing request authentication and WAF inspection orchestration
ngwaf-compute-interface/src/waf_inspection.rs Core WAF inspection logic with functions for inspection, header formatting, and response generation plus comprehensive test suite
ngwaf-compute-interface/Cargo.toml Rust project configuration with Fastly SDK and serde_json dependencies
ngwaf-compute-interface/fastly.toml Fastly service configuration with NGWAF config store setup
ngwaf-compute-interface/test.sh Test script for building and compiling tests for WASM target
ngwaf-compute-interface/README.md Comprehensive documentation covering features, configuration, setup, and usage examples
ngwaf-compute-interface/rust-toolchain.toml Rust toolchain configuration for wasm32-wasip1 target
ngwaf-compute-interface/.gitignore Git ignore patterns for Rust build artifacts
.gitignore Updated to ignore .DS_Store files and Cargo artifacts for the new interface

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@BrooksCunningham BrooksCunningham merged commit 7507153 into main Oct 31, 2025
6 checks passed
@BrooksCunningham BrooksCunningham deleted the ngwaf-compute-interface branch October 31, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants