Bump github/codeql-action from 3.25.12 to 3.25.15 (#89) #170
Annotations
10 warnings
Execute Infection:
src/Algorithm/Mac/HS256.php#L28
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
}
protected function getSignatureLength(): int
{
- return 256;
+ return 257;
}
}
|
Execute Infection:
src/Algorithm/Mac/HS256Truncated64.php#L28
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
}
protected function getSignatureLength(): int
{
- return 64;
+ return 65;
}
}
|
Execute Infection:
src/Algorithm/Mac/HS384.php#L28
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
}
protected function getSignatureLength(): int
{
- return 384;
+ return 385;
}
}
|
Execute Infection:
src/Algorithm/Mac/HS512.php#L28
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
}
protected function getSignatureLength(): int
{
- return 512;
+ return 513;
}
}
|
Execute Infection:
src/Algorithm/Mac/Hmac.php#L19
Escaped Mutant for Mutator "CastString":
@@ @@
public function hash(string $data, Key $key): string
{
$this->checKey($key);
- $signature = hash_hmac($this->getHashAlgorithm(), $data, (string) $key->get(SymmetricKey::DATA_K), true);
+ $signature = hash_hmac($this->getHashAlgorithm(), $data, $key->get(SymmetricKey::DATA_K), true);
return substr($signature, 0, intdiv($this->getSignatureLength(), 8));
}
public function verify(string $data, Key $key, string $signature): bool
|
Execute Infection:
src/Algorithm/Signature/ECDSA/ECSignature.php#L51
Escaped Mutant for Mutator "GreaterThan":
@@ @@
$lengthR = self::octetLength($pointR);
$lengthS = self::octetLength($pointS);
$totalLength = $lengthR + $lengthS + self::BYTE_SIZE + self::BYTE_SIZE;
- $lengthPrefix = $totalLength > self::ASN1_MAX_SINGLE_BYTE ? self::ASN1_LENGTH_2BYTES : '';
+ $lengthPrefix = $totalLength >= self::ASN1_MAX_SINGLE_BYTE ? self::ASN1_LENGTH_2BYTES : '';
return hex2bin(self::ASN1_SEQUENCE . $lengthPrefix . dechex($totalLength) . self::ASN1_INTEGER . dechex($lengthR) . $pointR . self::ASN1_INTEGER . dechex($lengthS) . $pointS);
}
public static function fromAsn1(string $signature, int $length): string
|
Execute Infection:
src/Algorithm/Signature/ECDSA/ECSignature.php#L88
Escaped Mutant for Mutator "UnwrapSubstr":
@@ @@
}
private static function preparePositiveInteger(string $data): string
{
- if (substr($data, 0, self::BYTE_SIZE) > self::ASN1_BIG_INTEGER_LIMIT) {
+ if ($data > self::ASN1_BIG_INTEGER_LIMIT) {
return self::ASN1_NEGATIVE_INTEGER . $data;
}
while (str_starts_with($data, self::ASN1_NEGATIVE_INTEGER) && substr($data, 2, self::BYTE_SIZE) <= self::ASN1_BIG_INTEGER_LIMIT) {
|
Execute Infection:
src/Algorithm/Signature/ECDSA/ECSignature.php#L88
Escaped Mutant for Mutator "GreaterThan":
@@ @@
}
private static function preparePositiveInteger(string $data): string
{
- if (substr($data, 0, self::BYTE_SIZE) > self::ASN1_BIG_INTEGER_LIMIT) {
+ if (substr($data, 0, self::BYTE_SIZE) >= self::ASN1_BIG_INTEGER_LIMIT) {
return self::ASN1_NEGATIVE_INTEGER . $data;
}
while (str_starts_with($data, self::ASN1_NEGATIVE_INTEGER) && substr($data, 2, self::BYTE_SIZE) <= self::ASN1_BIG_INTEGER_LIMIT) {
|
Execute Infection:
src/Algorithm/Signature/ECDSA/ECSignature.php#L94
Escaped Mutant for Mutator "LessThanOrEqualTo":
@@ @@
if (substr($data, 0, self::BYTE_SIZE) > self::ASN1_BIG_INTEGER_LIMIT) {
return self::ASN1_NEGATIVE_INTEGER . $data;
}
- while (str_starts_with($data, self::ASN1_NEGATIVE_INTEGER) && substr($data, 2, self::BYTE_SIZE) <= self::ASN1_BIG_INTEGER_LIMIT) {
+ while (str_starts_with($data, self::ASN1_NEGATIVE_INTEGER) && substr($data, 2, self::BYTE_SIZE) < self::ASN1_BIG_INTEGER_LIMIT) {
$data = substr($data, 2, null);
}
return $data;
|
Execute Infection:
src/Algorithm/Signature/ECDSA/ECSignature.php#L116
Escaped Mutant for Mutator "CastInt":
@@ @@
if (self::readAsn1Content($message, $position, self::BYTE_SIZE) !== self::ASN1_INTEGER) {
throw new InvalidArgumentException('Invalid data. Should contain an integer.');
}
- $length = (int) hexdec(self::readAsn1Content($message, $position, self::BYTE_SIZE));
+ $length = hexdec(self::readAsn1Content($message, $position, self::BYTE_SIZE));
return self::readAsn1Content($message, $position, $length * self::BYTE_SIZE);
}
private static function retrievePositiveInteger(string $data): string
|
Loading