aegis

module
v0.0.0-...-4ed06ba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2026 License: MIT

README

AEGIS

CI Security Scan Known Vulnerabilities Go Report Card

AEGIS - The divine shield that validates your API contracts.

A high-performance API contract testing platform that validates real API responses against OpenAPI specifications. Designed for CI/CD integration, AEGIS ensures API contract compliance through automated testing, detailed reporting, and actionable feedback.

Features

  • OpenAPI 3.0/3.1 Support - Validate against the latest OpenAPI specifications
  • Multi-Protocol Support - OpenAPI, GraphQL, gRPC, AsyncAPI, and WebSocket testing
  • Real API Testing - Test against live endpoints, not just mock data
  • Parallel Execution - Fast validation with configurable concurrency
  • Multiple Output Formats - Table, JSON, HTML, JUnit, TAP, and Jest reports
  • CI/CD Ready - GitHub Actions integration with status checks
  • Detailed Error Messages - Clear, actionable feedback on contract violations
  • Cross-Platform - Works on Linux, macOS, and Windows

Quick Start

Installation
Homebrew (macOS/Linux)
brew tap klismannb/aegis
brew install aegis
Go Install
go install github.com/klismannb/aegis/cmd/aegis@latest
Download Binary

Download the latest release from the releases page.

Usage
Basic Validation
# Validate a spec against a live API
aegis validate --spec ./openapi.yaml --base-url https://api.example.com
Output Formats

AEGIS supports multiple output formats for different use cases:

# Human-readable table (default)
aegis validate --spec ./openapi.yaml --base-url https://api.example.com

# JSON for programmatic use
aegis validate --spec ./openapi.yaml --base-url https://api.example.com --format json --output results.json

# HTML report
aegis validate --spec ./openapi.yaml --base-url https://api.example.com --format html --output report.html

# JUnit XML for CI/CD integration (Jenkins, GitLab, etc.)
aegis validate --spec ./openapi.yaml --base-url https://api.example.com --format junit --output junit.xml

# TAP (Test Anything Protocol)
aegis validate --spec ./openapi.yaml --base-url https://api.example.com --format tap

# Jest-like output
aegis validate --spec ./openapi.yaml --base-url https://api.example.com --format jest
GitHub Actions
name: API Validation

on: [pull_request]

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      
      - name: Validate API
        uses: klismannb/aegis/validate-action@v1
        with:
          spec: './openapi.yaml'
          base-url: 'https://api.staging.example.com'

Documentation

Architecture

┌─────────────┐     ┌──────────────┐     ┌─────────────┐
│   OpenAPI   │────▶│   Validator  │────▶│   Report    │
│    Spec     │     │    Engine    │     │   Output    │
└─────────────┘     └──────────────┘     └─────────────┘
                            │
                            ▼
                     ┌──────────────┐
                     │   Live API   │
                     └──────────────┘

Development

Prerequisites
  • Go 1.21 or later
  • Make
  • golangci-lint (optional but recommended)
Setup
# Clone the repository
git clone https://github.com/klismannb/aegis.git
cd aegis

# Download dependencies
make deps

# Build
make build

# Run tests
make test

# Run linter
make lint
Project Structure
aegis/
├── cmd/
│   ├── aegis/          # CLI entry point
│   └── lsp/            # Language Server Protocol implementation
├── internal/           # Internal packages
│   ├── commands/       # CLI commands
│   ├── config/         # Configuration
│   └── output/         # Output formatters
├── pkg/                # Public packages
│   ├── openapi/        # OpenAPI parsing
│   ├── graphql/        # GraphQL schema validation
│   ├── grpc/           # gRPC/Protocol Buffer testing
│   ├── asyncapi/       # AsyncAPI specification support
│   ├── websocket/      # WebSocket testing
│   ├── serverless/     # Serverless/API Gateway testing (AWS Lambda, Azure, GCP)
│   ├── validator/      # Validation engine
│   ├── testrunner/     # Test execution
│   ├── reporter/       # Report generation
│   ├── diff/           # Schema diff visualization
│   └── repository/     # Community rule repository client
├── api/                # SaaS API server
│   ├── cmd/server/     # API server entry point
│   └── internal/       # API internal code
├── editors/            # IDE/Editor extensions
│   ├── vscode/         # VS Code extension
│   ├── intellij/       # IntelliJ/WebStorm plugin
│   ├── vim/            # Vim/Neovim plugin
│   └── emacs/          # Emacs integration
├── integrations/       # CI/CD integrations
│   ├── gitlab-ci/      # GitLab CI templates
│   ├── jenkins/        # Jenkins shared library
│   ├── circleci/       # CircleCI orb
│   ├── azure-devops/   # Azure DevOps extension
│   └── bitbucket-pipelines/  # Bitbucket Pipes
└── tests/              # Test suites

Roadmap

See ROADMAP.md for a detailed project roadmap including:

  • Current development phase and milestones
  • Upcoming features and timelines
  • Version planning and release schedule
  • Success metrics and risk assessment
Quick Overview
  • Phase 1 (MVP): Core CLI with validation, reporting, and GitHub Actions
  • Phase 2: Enhanced developer experience with additional output formats
  • Phase 3: Advanced validation rules and performance testing
  • Phase 4: SaaS platform foundation with API, database, and RBAC
  • 🚧 Phase 5: Ecosystem expansion (GraphQL, gRPC, AsyncAPI, WebSocket)
  • 📋 Phase 6+: Enterprise features and AI-powered capabilities

Current Status: Phase 5 in progress (v2.0.0 released)

Completed Features:

  • ✅ Multi-protocol support (OpenAPI, GraphQL, gRPC, AsyncAPI, WebSocket)
  • ✅ 6 CI/CD integrations (GitHub Actions, GitLab CI, Jenkins, CircleCI, Azure DevOps, Bitbucket)
  • ✅ Advanced validation with custom rules
  • ✅ AI-powered test generation and anomaly detection
  • ✅ Enterprise integrations (Slack, Teams, Jira, ServiceNow)

Security

AEGIS takes security seriously. We employ multiple layers of security scanning:

Snyk Integration

Known Vulnerabilities

We use Snyk to continuously monitor for vulnerabilities in:

  • Dependencies - Go modules and third-party packages
  • Code - Static code analysis for security issues
  • Licenses - License compliance checking
Security Scanning

Our CI/CD pipeline includes automated security scanning:

# Security scans run on every PR and daily
- Snyk dependency vulnerability scan
- Snyk static code analysis (SAST)
- Gosec security scanner
- Dependency review for PRs
Reporting Security Issues

If you discover a security vulnerability, please:

  1. DO NOT open a public issue
  2. Email security concerns to: security@aegis.dev
  3. Include detailed information about the vulnerability
  4. Allow time for the issue to be addressed before public disclosure

We follow responsible disclosure practices and will:

  • Acknowledge receipt within 48 hours
  • Provide regular updates on the fix progress
  • Credit you in the security advisory (if desired)
Security Best Practices

When using AEGIS:

  • Always use the latest version
  • Regularly run go mod tidy and go mod verify
  • Review the Snyk vulnerability report
  • Enable security scanning in your CI/CD pipeline
  • Use environment variables for sensitive configuration (API keys, tokens)
  • Follow the principle of least privilege for API testing

Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • kin-openapi - OpenAPI validation library
  • Cobra - CLI framework
  • All contributors who have helped shape AEGIS

AEGIS - Guarding your API boundaries with precision. ⚔️🛡️

Directories

Path Synopsis
api
cmd/server command
Package main provides the AEGIS API server entry point.
Package main provides the AEGIS API server entry point.
internal/config
Package config provides configuration types for the AEGIS API server.
Package config provides configuration types for the AEGIS API server.
internal/domain/models
Package models provides domain models for the AEGIS API.
Package models provides domain models for the AEGIS API.
internal/infrastructure/cache
Package cache provides Redis caching functionality.
Package cache provides Redis caching functionality.
internal/infrastructure/database
Package database provides database connection and migration utilities.
Package database provides database connection and migration utilities.
internal/infrastructure/http/handlers
Package handlers provides HTTP request handlers for the AEGIS API.
Package handlers provides HTTP request handlers for the AEGIS API.
internal/infrastructure/http/middleware
Package middleware provides HTTP middleware for the AEGIS API.
Package middleware provides HTTP middleware for the AEGIS API.
internal/infrastructure/http/routers
Package routers provides HTTP route registration for the AEGIS API.
Package routers provides HTTP route registration for the AEGIS API.
internal/infrastructure/integrations
Package integrations provides external service integrations (Slack, Teams, Jira).
Package integrations provides external service integrations (Slack, Teams, Jira).
internal/infrastructure/middleware
Package middleware provides HTTP middleware components for the AEGIS API server.
Package middleware provides HTTP middleware components for the AEGIS API server.
internal/infrastructure/queue
Package queue provides job queue functionality.
Package queue provides job queue functionality.
cmd
aegis command
lsp command
Package main implements a Language Server Protocol (LSP) for AEGIS.
Package main implements a Language Server Protocol (LSP) for AEGIS.
internal
commands
Package commands provides CLI commands for AEGIS.
Package commands provides CLI commands for AEGIS.
config
Package config provides configuration management for AEGIS.
Package config provides configuration management for AEGIS.
output
Package output provides output formatting utilities.
Package output provides output formatting utilities.
pkg
asyncapi
Package asyncapi provides AsyncAPI specification parsing and validation capabilities for AEGIS.
Package asyncapi provides AsyncAPI specification parsing and validation capabilities for AEGIS.
diff
Package diff provides visualization and comparison utilities for API schema differences.
Package diff provides visualization and comparison utilities for API schema differences.
graphql
Package graphql provides GraphQL schema parsing and validation capabilities for AEGIS.
Package graphql provides GraphQL schema parsing and validation capabilities for AEGIS.
grpc
Package grpc provides Protocol Buffer and gRPC testing capabilities for AEGIS.
Package grpc provides Protocol Buffer and gRPC testing capabilities for AEGIS.
openapi
Package openapi provides OpenAPI specification parsing utilities.
Package openapi provides OpenAPI specification parsing utilities.
reporter
Package reporter provides test result reporting capabilities.
Package reporter provides test result reporting capabilities.
repository
Package repository provides a client for accessing the community rule repository.
Package repository provides a client for accessing the community rule repository.
serverless
Package serverless provides testing capabilities for serverless functions and API gateways.
Package serverless provides testing capabilities for serverless functions and API gateways.
testrunner
Package testrunner provides API test execution capabilities.
Package testrunner provides API test execution capabilities.
validator
Package validator provides validation utilities including request validation and diff detection.
Package validator provides validation utilities including request validation and diff detection.
websocket
Package websocket provides WebSocket testing capabilities for AEGIS.
Package websocket provides WebSocket testing capabilities for AEGIS.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL