PHPackages                             dzentota/dns-resolver - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. dzentota/dns-resolver

ActiveLibrary[Security](/categories/security)

dzentota/dns-resolver
=====================

A secure DNS resolver library that prevents Time-of-Check to Time-of-Use (TOCTOU) and DNS Rebinding attacks following the AppSec Manifesto principles

016PHP

Since Jul 7Pushed 10mo agoCompare

[ Source](https://github.com/dzentota/dns-resolver)[ Packagist](https://packagist.org/packages/dzentota/dns-resolver)[ RSS](/packages/dzentota-dns-resolver/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

dzentota/dns-resolver
=====================

[](#dzentotadns-resolver)

A secure DNS resolver library that prevents Time-of-Check to Time-of-Use (TOCTOU) and DNS Rebinding attacks, following the [AppSec Manifesto](https://github.com/dzentota/AppSecManifesto) principles.

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![PHP Version](https://camo.githubusercontent.com/0f16581d1180dbfd4c0e13166ec1267d4ad2f2fab8281ea6d6b284cf5c65d921/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d626c75652e737667)](https://www.php.net/releases/8.2/en.php)

Features
--------

[](#features)

- **TOCTOU Prevention**: Uses immutable value objects to prevent Time-of-Check to Time-of-Use vulnerabilities
- **DNS Rebinding Protection**: Implements security policies to prevent DNS rebinding attacks
- **Immutable Design**: All resolved data is stored in read-only value objects
- **Security-First**: Validates all inputs at construction time (Parse, don't validate)
- **Type Safety**: Full PHP 8.2+ type declarations with strict mode
- **AppSec Manifesto Compliance**: Follows all 12 rules of the AppSec Manifesto

Installation
------------

[](#installation)

```
composer require dzentota/dns-resolver
```

Quick Start
-----------

[](#quick-start)

```
