Bump actions/upload-artifact from 4.4.0 to 4.4.3 #181
integrate.yml
on: pull_request
3️⃣ Static Analysis
25s
4️⃣ Coding Standards
15s
5️⃣ Mutation Testing
39s
6️⃣ Rector Checkstyle
31s
7️⃣ Exported files
3s
Matrix: 2️⃣ Unit and functional tests
Annotations
3 errors and 10 warnings
4️⃣ Coding Standards
Process completed with exit code 2.
|
3️⃣ Static Analysis:
src/Key/Ec2Key.php#L1
Ignored error pattern #^Cannot cast mixed to string\.$# in path /home/runner/work/cose-lib/cose-lib/src/Key/Ec2Key.php was not matched in reported errors.
|
3️⃣ Static Analysis
Process completed with exit code 2.
|
5️⃣ Mutation Testing:
src/Algorithm/Mac/HS256.php#L28
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
}
protected function getSignatureLength(): int
{
- return 256;
+ return 257;
}
}
|
5️⃣ Mutation Testing:
src/Algorithm/Mac/HS256Truncated64.php#L28
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
}
protected function getSignatureLength(): int
{
- return 64;
+ return 65;
}
}
|
5️⃣ Mutation Testing:
src/Algorithm/Mac/HS384.php#L28
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
}
protected function getSignatureLength(): int
{
- return 384;
+ return 385;
}
}
|
5️⃣ Mutation Testing:
src/Algorithm/Mac/HS512.php#L28
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
}
protected function getSignatureLength(): int
{
- return 512;
+ return 513;
}
}
|
5️⃣ Mutation Testing:
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
|
5️⃣ Mutation Testing:
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
|
5️⃣ Mutation Testing:
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) {
|
5️⃣ Mutation Testing:
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) {
|
5️⃣ Mutation Testing:
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;
|
5️⃣ Mutation Testing:
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
|