Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
zappzarapp-php-security — PHP 8.4+ security library (mirror) | Kitploit
도구/GitLabGitLab/marcstraube/zappzarapp-php-security
Authentication & AuthorizationEncryption/Decryption ToolsVulnerability AnalysisCode AnalysisConfiguration AuditingWeb SecurityDevSecOpsAPI SecurityLog Analysis
GitLabmarcstraube/zappzarapp-php-security

zappzarapp-php-security

PHP 8.4+ security library (mirror)

4일 전아직 검토되지 않음

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유
저장소 보기
요청한 언어로 콘텐츠를 사용할 수 없습니다. 영어 버전을 표시합니다.

⚡ zappzarapp/security

Latest Version PHP Version License CI Socket Badge

Comprehensive PHP security library providing CSP, Security Headers, CSRF protection, Secure Cookies, Password Validation, Input Sanitization, Rate Limiting, SRI, Secrets Loading, Encryption, Session Security, TOTP two-factor authentication, Signed URLs, and Security Event Logging.

Highlights

  • All-in-one — 17 security modules in a single, composable package
  • Secure by default — strict CSP, no unsafe-*, HTTPS-first
  • Framework-agnostic — works with any PHP 8.4+ application
  • Immutable & type-safe — readonly classes, enums, with*() API
  • Quality-backed — PHPStan Level 8, Psalm Level 1, 100% Mutation Score, Deptrac architecture enforcement
  • PSR-compatible — PSR-3 (Logging), PSR-15 (Middleware), PSR-18 (HTTP Client)

Modules

Requirements

  • PHP ^8.4
  • ext-dom
  • ext-libxml
  • ext-sodium

Installation

root@kitploit:~
composer require zappzarapp/security

Quick Start

Security Headers

root@kitploit:~
use Zappzarapp\Security\Headers\Builder\SecurityHeadersBuilder;

$headers = SecurityHeadersBuilder::recommended()->build();
foreach ($headers as $name => $value) {
    header("{$name}: {$value}");
}

CSP with Nonces

root@kitploit:~
use Zappzarapp\Security\Csp\HeaderBuilder;
use Zappzarapp\Security\Csp\Directive\CspDirectives;
use Zappzarapp\Security\Csp\Nonce\NonceGenerator;

$generator = new NonceGenerator();
$csp = HeaderBuilder::build(CspDirectives::strict(), $generator);
header("Content-Security-Policy: {$csp}");

$nonce = $generator->get();
echo "<script nonce=\"{$nonce}\">console.log('Safe!');</script>";

CSRF Protection

root@kitploit:~
use Zappzarapp\Security\Csrf\CsrfProtection;
use Zappzarapp\Security\Csrf\Storage\SessionCsrfStorage;

$csrf = new CsrfProtection(new SessionCsrfStorage());

// Generate token for form
$token = $csrf->generateToken();
echo '<input type="hidden" name="_token" value="' . $token->value() . '">';

// Validate on submission
if (!$csrf->validateToken($_POST['_token'])) {
    throw new Exception('CSRF validation failed');
}

Input Sanitization

root@kitploit:~
use Zappzarapp\Security\Sanitization\Html\HtmlSanitizer;
use Zappzarapp\Security\Sanitization\Path\PathValidationConfig;
use Zappzarapp\Security\Sanitization\Path\PathValidator;

// Sanitize HTML (removes dangerous tags/attributes)
$sanitizer = new HtmlSanitizer();
$safe = $sanitizer->sanitize($userInput);

// Validate file paths (prevent directory traversal)
$validator = new PathValidator(new PathValidationConfig(basePath: '/var/www/uploads'));
if (!$validator->isSafe($userPath)) {
    throw new Exception('Invalid path');
}

See the documentation for detailed examples of all modules.

Documentation

Each module has detailed API documentation with class references, configuration options, and code examples:

Versioning

This library follows Semantic Versioning 2.0.0.

All classes, interfaces, and methods in the Zappzarapp\Security namespace are considered public API unless marked with @internal. Breaking changes only happen in major versions, with deprecation warnings at least one minor version before removal.

Releases are automated via release-please and GPG-signed. See CHANGELOG.md for release history.

Security

See SECURITY.md for vulnerability reporting and security considerations.

Contributing

See CONTRIBUTING.md for development setup and contribution guidelines.

License

MIT License - see LICENSE file for details.

도구 다운로드
ModuleDescriptionKey Classes
CSPContent Security Policy header building and violation reportingCspDirectives, HeaderBuilder, NonceGenerator, CspReportParser
HeadersSecurity headers (HSTS, Permissions-Policy, etc.)SecurityHeaders, SecurityHeadersBuilder
CSRFCross-Site Request Forgery protectionCsrfProtection, CsrfConfig
CookieSecure cookie handlingSecureCookie, CookieBuilder, CookieOptions
EncryptionXChaCha20-Poly1305 authenticated encryptionSymmetricEncryptor, EnvelopeEncryptor, EncryptionKey, KeyRingEncryptor
PasswordPassword validation and hashingPasswordPolicy, PwnedPasswordChecker, PepperedPasswordHasher
SanitizationInput sanitization (HTML, SQL, URI, Path) and file upload validationHtmlSanitizer, UriSanitizer, PathValidator, UploadValidator
RateLimitingRate limiting with multiple algorithmsDefaultRateLimiter, RateLimitConfig
SRISubresource Integrity hash generationSriHashGenerator, IntegrityAttribute
SecretsDocker/file-based secret loadingSecretLoader, SecretValue, FileSecretSource
SessionSession hardening and fixation protectionSessionGuard, SessionConfig, SessionConfigurator
SignedUrlHMAC-signed URLs with mandatory expiryUrlSigner, SigningKey
TOTPTime-based one-time passwords (RFC 6238)TotpAuthenticator, TotpSecret, ProvisioningUri, RecoveryCodeGenerator
AnalyzerSecurity header analysis and auditingSecurityHeaderAnalyzer, AnalysisResult
ScannerCLI security header scannerScanCommand, StreamHeaderFetcher
MiddlewarePSR-15 middleware for drop-in framework integrationSecurityHeadersMiddleware, CspMiddleware, CspReportHandler, CsrfMiddleware, DoubleSubmitCsrfMiddleware, RateLimitMiddleware, CorsMiddleware
LoggingSecurity event loggingSecurityAuditLogger, SecurityEvent
ModuleDescription
CSPContent Security Policy with nonces and violation reporting
HeadersHSTS, COOP, COEP, CORP, Permissions
CSRFToken patterns and validation
CookieSecure cookie handling
EncryptionAuthenticated encryption, envelopes
PasswordHashing, policies, breach detection
SanitizationHTML, URI, path sanitization and file upload validation
Rate LimitingToken bucket, sliding window
SRISubresource integrity hashes
SecretsDocker/file-based secret loading
SessionSession hardening, fingerprinting
Signed URLsHMAC-signed URLs with expiry
TOTPOne-time passwords, recovery codes
AnalyzerSecurity header auditing
ScannerCLI header scanner for CI
MiddlewarePSR-15 middleware
LoggingSecurity event logging
GlossarySecurity terminology reference