Skip to content
CAI
Software that uses CAICheck a score

mtrudel/bandit

68.5

Adequate · 13 November 2026

7.5k

lines of production code

Elixir

primary language

8

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add project configuration and documentation files

The repository now includes essential project infrastructure files: a \.credo.exs\ configuration for code linting, a \.dialyzer\_ignore.exs\ file to suppress specific Dialyzer warnings, an \.ackrc\ file to configure search tool exclusions, and a \.gitignore\ update to exclude dialyzer cache directories. Additionally, standard project documentation and legal files have been added, including a \CHANGELOG.md\, \CODE\_OF\_CONDUCT.md\, \LICENSE\, \SECURITY.md\, and a significantly expanded \README.md\ that replaces the placeholder text with comprehensive usage instructions, project goals, and performance benchmarks.

(repo-wide) · high confidence

Comprehensive API documentation and configuration type definitions for Bandit

The main Bandit module now includes extensive @moduledoc, @typedoc, and @type definitions that document all available configuration options for the HTTP server, including top-level server settings (scheme, port, IP, SSL), HTTP/1 and HTTP/2 specific options (such as request limits, process dictionary clearing, and garbage collection frequency), and WebSocket configuration. This provides users with clear, type-safe guidance on how to configure Bandit's behavior, compression, logging, and connection handling directly in the codebase.

lib · high confidence

Introduce Bandit HTTP server with Phoenix adapter and WebSocket support

This change introduces the Bandit HTTP server library, providing a new adapter for Phoenix applications that supports HTTP/1.1, HTTP/2, and WebSockets. The implementation includes a Plug.Conn.Adapter for handling request/response cycles, a delegating handler for protocol selection (ALPN and sniffing), and a Phoenix-specific adapter for seamless integration. Key features include automatic content negotiation for compression (deflate, gzip, zstd), RFC-compliant header validation, and comprehensive telemetry spans for request and WebSocket metrics.

lib/bandit · high confidence

Introduce dedicated HTTP/1 handler and socket implementation

Bandit now includes a dedicated HTTP/1 handler (\Bandit.HTTP1.Handler\) and socket implementation (\Bandit.HTTP1.Socket\) located in \lib/bandit/http1\. This change introduces a specific process model where each HTTP/1 connection is handled by a single process, supporting keep-alive requests, WebSocket upgrades, and configurable limits such as \max\_requests\ and \gc\_every\_n\_keepalive\_requests\. The implementation enforces RFC 9112 compliance, including strict validation of header field values and chunk-size grammar, while providing configuration options to control process dictionary clearing and logging of unknown messages.

lib/bandit/http1 · high confidence

Introduce new HTTP/2 handler implementation

The \lib/bandit/http2\ directory now contains a complete, RFC 9113-compliant HTTP/2 handler implementation. This includes the core \Bandit.HTTP2.Handler\ for managing connection lifecycle and frame parsing, \Bandit.HTTP2.Connection\ for state management, and \Bandit.HTTP2.Stream\ for individual stream processing. The update adds support for all standard HTTP/2 frames (HEADERS, DATA, SETTINGS, PING, GOAWAY, WINDOW\_UPDATE, RST\_STREAM, CONTINUATION), implements HPACK compression via the HPAX library, and enforces flow control and header validation. It also introduces a dedicated process model where each stream runs in its own \Bandit.HTTP2.StreamProcess\ supervised by the connection process.

lib/bandit/http2 · high confidence

Introduce new RFC 6455-compliant WebSocket handler

Bandit now includes a complete WebSocket implementation in \lib/bandit/websocket\ that conforms to RFC 6455. This new handler supports the standard HTTP upgrade mechanism, permessage-deflate compression (RFC 7692), and fragmented message handling. It integrates with the \WebSock\ behavior for application-level message handling and provides detailed telemetry metrics for received and sent frames. The implementation includes strict validation of upgrade requests, UTF-8 enforcement for text frames, and configurable limits for fragmented message sizes.

lib/bandit/websocket · high confidence

Behavioural changes

HTTP/2 frame serialization and validation implementation

The HTTP/2 frame handling in \lib/bandit/http2/frame\ has been refactored to include explicit modules for parsing and serializing all standard HTTP/2 frame types (DATA, HEADERS, CONTINUATION, SETTINGS, PUSH\_PROMISE, PRIORITY, RST\_STREAM, WINDOW\_UPDATE, GOAWAY, and PING). This change introduces strict validation of frame structures against RFC 9113, including checks for zero stream IDs, invalid padding, and out-of-bounds settings values. Additionally, large frames are now automatically split to respect the configured maximum frame size during serialization, and unknown frame types are handled gracefully via a generic \Frame.Unknown\ struct.

lib/bandit/http2/frame · high confidence

Introduce structured WebSocket frame parsing and serialization

The WebSocket implementation now uses dedicated modules to parse and serialize individual frame types (binary, text, continuation, ping, pong, and connection close). This change enforces stricter protocol compliance, including rejecting compressed control frames, validating UTF-8 encoding in close frames, and ensuring proper payload sizes for ping/pong messages, which improves reliability and security for WebSocket connections.

lib/bandit/websocket/frame · high confidence

Optimized WebSocket masking implementation

The WebSocket masking logic in Bandit has been replaced with a new implementation that processes data in 32-byte blocks. This change improves performance by unrolling the masking operation, allowing for more efficient bitwise XOR operations on larger chunks of payload data rather than processing byte-by-byte or in smaller segments.

_lib/bandit/primitive\ops · high confidence

Test coverage

Added HTTP/1 test suite for logging, plug handling, protocol compliance, and telemetry; Added HTTP/2 protocol and frame-level test coverage; Added comprehensive test suite for WebSocket frame handling and protocol compliance; Added test coverage for adapter, headers, and server components; Added tests for WebSocket masking logic; New test support infrastructure for HTTP/2, WebSocket, and TLS verification; Refactor test configuration and remove obsolete unit test.

Dependencies

Bandit 1.12.5: Production-ready release with Elixir 1.13+ requirement and Hex packaging

This release bumps the version to 1.12.5 and raises the minimum Elixir requirement to 1.13, ensuring compatibility with modern Elixir features. The project is now fully configured for Hex packaging, including metadata such as maintainers, licenses, and changelog links, along with explicit file inclusions. Key dependencies are updated to stable versions: Thousand Island to \~\> 1.5, Plug to \~\> 1.18, WebSock to \~\> 0.5, and HPAX to \~\> 1.0. Development tooling is also refined, with Finch pinned to \< 0.22.0 to avoid upstream issues, and documentation setup expanded to include implementation notes for HTTP/1, HTTP/2, and WebSocket. Dialyzer configuration is added to improve type checking during development.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 67 → 69 (+2.0)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.

Lenses

  • Code Health 97 → 97 (-0.5)
  • Architecture 98 → 98 (+0.1)
  • Maturity 54 → 60 (+6.2)
  • Readiness 65 → 65 (-0.1)
  • Security 83 → 77 (-6.3)

Resolved (1)

  • TooManyFunctions: Socket (lib/bandit/http1/socket.ex)

New (8)

  • Edited copy of a member (11 corresponding lines) (lib/bandit/websocket/connection.ex)
  • Edited copy of a member (16 corresponding lines) (lib/bandit/http2/frame/continuation.ex)
  • Edited copy of a member (3 corresponding lines) (lib/bandit/headers.ex)
  • Edited copy of a member (3 corresponding lines) (lib/bandit/headers.ex)
  • Edited copy of a member (4 corresponding lines) (lib/bandit/http1/socket.ex)
  • FileTooLong: http1/socket.ex (lib/bandit/http1/socket.ex)
  • FileTooLong: http2/connection.ex (lib/bandit/http2/connection.ex)
  • Outdated: dialyxir

Changes since last survey

  • 32 commits — 29 feature/other, 3 fixes

By area

  • lib/bandit — 20 commits
  • (root) — 4 commits
  • .github/workflows — 4 commits
  • test/bandit — 2 commits
  • assets/bandit-sticker.svg — 1 commit
  • lib/bandit.ex — 1 commit

Notable commits

  • fix: Bug fix: Bound Accept-Encoding q-values to the RFC9110§12.4.2 grammar before parsing (#733)
  • fix: Fix 500 that goes out as HTTP/1.0 on an HTTP/1.1 request (#734)
  • fix: Support validate_utf8 option as sourced from websock. Fixes https://github.com/phoenixframework/websock_adapter/issues/31 (#744)
  • change: Add files via upload (#728)
  • change: Apply max_fragmented_message_size to the first fragment of a message (#739)
  • change: Bump elixir-ci-actions to pinned-actions commit (#732)
  • change: Bump getplumber/plumber from 0.7.0 to 0.7.11 (#727)
  • change: Bump getplumber/plumber from 0.7.11 to 0.7.17 (#737)
  • change: Bump getplumber/plumber from 0.7.17 to 0.7.22 (#745)
  • change: Bump machete from 0.3.12 to 0.3.13 (#736)
  • change: Close HTTP/1 connections after successful CONNECT responses (#729)
  • change: Hibernate connection processes after 15 seconds idle (#743)
  • change: Logo updates
  • change: Merge commit from fork
  • change: Merge commit from fork
  • change: Merge commit from fork
  • change: Merge commit from fork
  • change: Quiet websocket protocol errors found after deserialization (#746)
  • change: Read chunked trailers with the body read_timeout and the configured header limits (#738)
  • change: Reject IPv6 authority ports without a colon (#730)
  • …and 12 more

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

mtrudel/bandit was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 13 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 2a611b30fc2833088080ab9aa2c5a5c71ee2b286 — the exact code this score is about.
  • Scored under rubric-2026.11.3 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.57+preprod-8ebfb01cf4c0.