Merged
Conversation
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.
Contributor
There was a problem hiding this comment.
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-secretheader - 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding Rust Compute integration for NGWAF Interface