PHP Secure Communications Library
This report summarizes scanner evidence for phpseclib/phpseclib, a PHP project with 5,603 GitHub stars. SynthScan examined 89,542 lines of code across 618 source files, recording 167 pattern matches distributed across 4 syntactic categories. The legacy adjusted pattern signal is 2.0 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 163 finding(s).
Are imports declared and package/API names verified? 4 finding(s).
Are wrappers, guards, and repeated structures necessary? 148 finding(s).
Which changes need focused human review? 167 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 167 distinct pattern matches across 4 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | phpseclib/Net/SSH2.php | 1058 | public function sendIdentificationStringFirst(): void | CODE |
| LOW | phpseclib/Net/SSH2.php | 1072 | public function sendIdentificationStringLast(): void | CODE |
| LOW | phpseclib/Net/SSH2.php | 4493 | public function getRawServerIdentification(): string | CODE |
| LOW | phpseclib/Net/SSH2.php | 4530 | public static function getSupportedKEXAlgorithms(): array | CODE |
| LOW | phpseclib/Net/SSH2.php | 4564 | public static function getSupportedHostKeyAlgorithms(): array | CODE |
| LOW | phpseclib/Net/SSH2.php | 4581 | public static function getSupportedEncryptionAlgorithms(): array | CODE |
| LOW | phpseclib/Net/SSH2.php | 4702 | public static function getSupportedMACAlgorithms(): array | CODE |
| LOW | phpseclib/Net/SSH2.php | 4732 | public static function getSupportedCompressionAlgorithms(): array | CODE |
| LOW | phpseclib/Net/SSH2.php | 5068 | public static function getConnectionByResourceId(string $id): ?SSH2 | CODE |
| LOW | phpseclib/Net/SSH2.php | 5149 | public function setBytesUntilKeyReexchange(int $bytes): void | CODE |
| LOW | phpseclib/Net/SFTP.php | 551 | public function enablePathCanonicalization(): void | CODE |
| LOW⚡ | phpseclib/Net/SFTP.php | 563 | public function disablePathCanonicalization(): void | CODE |
| LOW⚡ | phpseclib/Net/SFTP.php | 573 | public function enableArbitraryLengthPackets(): void | CODE |
| LOW⚡ | phpseclib/Net/SFTP.php | 583 | public function disableArbitraryLengthPackets(): void | CODE |
| LOW | phpseclib/File/ASN1.php | 730 | public static function isBlobsOnBadDecodesEnabled(): bool | CODE |
| LOW | phpseclib/File/ASN1.php | 1506 | public static function convertTypeConstantToString(int $type): string | CODE |
| LOW | phpseclib/File/SPKAC.php | 210 | public function identifySignatureAlgorithm(PrivateKey $key): void | CODE |
| LOW | phpseclib/File/CRL.php | 369 | public static function listValidRevocationReasons(): array | CODE |
| LOW | phpseclib/File/CRL.php | 476 | public function identifySignatureAlgorithm(PrivateKey $key): void | CODE |
| LOW | phpseclib/File/CRL.php | 492 | public function setAuthorityKeyIdentifier(string|OctetString $value): void | CODE |
| LOW | phpseclib/File/CSR.php | 415 | public function identifySignatureAlgorithm(PrivateKey $key): void | CODE |
| LOW | phpseclib/File/X509.php | 256 | public static function isStrictDNComparisonEnabled(): bool | CODE |
| LOW | phpseclib/File/X509.php | 287 | public static function isCheckBasicConstraintsEnabled(): bool | CODE |
| LOW | phpseclib/File/X509.php | 709 | public function setAuthorityKeyIdentifier(string|OctetString $value): void | CODE |
| LOW | phpseclib/File/X509.php | 742 | public function createSubjectKeyIdentifier(int $method = 1): string | CODE |
| LOW | phpseclib/File/X509.php | 1088 | public function identifySignatureAlgorithm(PrivateKey $key): void | CODE |
| LOW | phpseclib/File/X509.php | 1326 | private function validateSignatureCountable(bool $caonly, int $count): bool | CODE |
| LOW | phpseclib/File/ASN1/Constructed.php | 110 | private function calculateIndefiniteLength(int &$offset, int $depth = 1): int | CODE |
| LOW | phpseclib/File/Common/Signable.php | 28 | public function identifySignatureAlgorithm(PrivateKey $key): void; | CODE |
| LOW | phpseclib/File/Common/Traits/ASN1Signature.php | 38 | private static function identifySignatureAlgorithmHelper(PrivateKey $key): array | CODE |
| LOW | phpseclib/File/Common/Traits/Extension.php | 322 | private static function getExtensionCriticalValue(string $name): bool | CODE |
| LOW | phpseclib/File/CMS/SignedData.php | 227 | public function identifySignatureAlgorithm(PrivateKey $key): void | CODE |
| LOW | phpseclib/File/CMS/SignedData.php | 339 | public function recalculateHashAlgorithms(): void | CODE |
| LOW | phpseclib/File/CMS/EncryptedData.php | 473 | public function createNewRecipientFromPassword(#[\SensitiveParameter] string $password, string $encryptionAlgorithm | CODE |
| LOW | phpseclib/File/CMS/EncryptedData.php | 526 | public function createNewRecipientFromKeyWithIdentifier( | CODE |
| LOW | phpseclib/File/CMS/SignedData/Signer.php | 531 | public function identifySignatureAlgorithm(PrivateKey $key): void | CODE |
| LOW | phpseclib/Crypt/RSA.php | 812 | public static function enableSaltLengthDiscovery(): void | CODE |
| LOW | phpseclib/Crypt/RSA.php | 817 | public static function disableSaltLengthDiscovery(): void | CODE |
| LOW | phpseclib/Crypt/EC/Formats/Keys/Common.php | 397 | private static function deriveMontgomeryPublicKey(array $components): array | CODE |
| LOW | phpseclib/Crypt/Common/SymmetricKey.php | 2276 | protected function createInlineCryptFunction(array $cipher_code): \Closure | CODE |
| LOW | phpseclib/Crypt/Common/Formats/Keys/PKCS8.php | 330 | public static function extractEncryptionAlgorithm(#[\SensitiveParameter] string $key): array | CODE |
| LOW | …seclib/Crypt/Common/Traits/ASN1AlgorithmIdentifier.php | 202 | private static function getCryptoObjectFromAlgorithmIdentifier( | CODE |
| LOW | …seclib/Crypt/Common/Traits/ASN1AlgorithmIdentifier.php | 310 | private static function getCryptoObjectFromParams(string $password, array $options): SymmetricKey | CODE |
| LOW | phpseclib/Math/BigInteger.php | 715 | public function createRecurringModuloFunction(): \Closure | CODE |
| LOW | phpseclib/Math/BinaryField/Integer.php | 87 | public static function setRecurringModuloFunction($instanceID, callable $function): void | CODE |
| LOW | phpseclib/Math/BinaryField/Integer.php | 182 | private static function regularPolynomialMultiply(string $x, string $y): string | CODE |
| LOW | phpseclib/Math/PrimeField/Integer.php | 112 | public static function setRecurringModuloFunction(int $instanceID, callable $function): void | CODE |
| LOW | phpseclib/Math/BigInteger/Engines/Engine.php | 1041 | public function createRecurringModuloFunction(): \Closure | CODE |
| LOW | phpseclib/Math/BigInteger/Engines/GMP.php | 539 | public function createRecurringModuloFunction(): \Closure | CODE |
| LOW | tests/PsalmBaselineTest.php | 11 | public function testErrorTypesAreNotBaselined(): void | CODE |
| LOW | tests/Unit/Net/SSH2UnitTest.php | 64 | public function testTripleDESCTRUsesCTRMode(): void | CODE |
| LOW | tests/Unit/Net/SSH2UnitTest.php | 99 | public function testGetExitStatusIfNotConnected(): void | CODE |
| LOW | tests/Unit/Net/SSH2UnitTest.php | 123 | public function testQuietModeDefaultValue(): void | CODE |
| LOW | tests/Unit/Net/SSH2UnitTest.php | 141 | public function testGetConnectionByResourceId(): void | CODE |
| LOW | tests/Unit/Net/SSH2UnitTest.php | 214 | public function testTimeoutCountdownEndingOnZero(): void | CODE |
| LOW | tests/Unit/Net/SSH2UnitTest.php | 274 | public function testSendChannelPacketNoBufferedData(): void | CODE |
| LOW | tests/Unit/Net/SSH2UnitTest.php | 299 | public function testSendChannelPacketBufferedData(): void | CODE |
| LOW | tests/Unit/Net/SSH2UnitTest.php | 325 | public function testSendChannelPacketTimeout(): void | CODE |
| LOW | tests/Unit/Net/SSH2UnitTest.php | 353 | public function testSendChannelPacketNoWindowAdjustment(): void | CODE |
| LOW | tests/Unit/Net/SFTPStreamUnitTest.php | 18 | public function testRegisterWithoutArgument(): void | CODE |
| 88 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | phpseclib/Crypt/Salsa20.php | 213 | // Salsa20 does not utilize this method | COMMENT |
| MEDIUM | phpseclib/Crypt/Salsa20.php | 264 | // Salsa20 does not utilize this method | COMMENT |
| MEDIUM | phpseclib/Crypt/Salsa20.php | 273 | // Salsa20 does not utilize this method | COMMENT |
| MEDIUM | phpseclib/Crypt/RC4.php | 177 | // RC4 does not utilize this method | COMMENT |
| MEDIUM | phpseclib/Crypt/RC4.php | 186 | // RC4 does not utilize this method | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | phpseclib/Net/SSH2.php | 4661 | // as you encrypt stuff. the only table lookups are made against this keystream and thus table | COMMENT |
| LOW | phpseclib/File/CMS/SignedData.php | 561 | //case isset($cert['extendedCertificate']): // obsolete | COMMENT |
| LOW | phpseclib/File/CMS/EncryptedData.php | 741 | { | COMMENT |
| LOW | phpseclib/File/CMS/EncryptedData.php | 761 | //case isset($cert['v1AttrCert']): // obsolete | COMMENT |
| LOW | phpseclib/File/CMS/SignedData/Signer.php | 341 | ]; | COMMENT |
| LOW | phpseclib/Crypt/RSA.php | 961 | } | COMMENT |
| LOW | phpseclib/Crypt/ChaCha20.php | 61 | $this->key_length == 32 && | COMMENT |
| LOW | …lib/Math/BigInteger/Engines/PHP/Reductions/Barrett.php | 121 | // note that these are upper bounds. let's say m.length is 2. then you'd be multiplying a | COMMENT |
| LOW | tests/Unit/Crypt/RC2Test.php | 61 | // whereas RC2 does. and technically, AES / Rijndael (and even Twofish) don't support arbitrary key lengths - th | COMMENT |
| LOW | tests/Unit/Crypt/EC/KeyTest.php | 581 | //////////////////////////////////////////////////////////////// | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/Unit/File/X509/X509Test.php | 1588 | 'John Doe', | CODE |
| LOW | tests/Unit/File/X509/CSRTest.php | 198 | $csr->addDNProp('id-at-emailAddress', 'admin@example.com'); | CODE |
| LOW | tests/Unit/File/CMS/SignedDataTest.php | 215 | 'John Doe', | CODE |
| LOW | tests/Unit/Crypt/RSA/LoadKeyTest.php | 57 | ['user@example.com'], | CODE |