Codeception / Codeception/c3

Minor improvements to pass psecio-parse's scan

Đang mở
#58 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
PHP
Star
73
Fork
46
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### To run report:
```
composer global require psecio/parse
~/.composer/vendor/bin/psecio-parse scan c3.php
```

### And its results:

1) /var/www/html/tests/c3.php on line 45
'header()' calls should not use concatenation directly
```
header('X-Codeception-CodeCoverage-Error: ' . str_replace("\n", ' ', $message), true, 500);
```
For more information execute 'psecio-parse rules SetHeaderWithInput'

2) /var/www/html/tests/c3.php on line 69
Avoid using AND, OR and XOR (in favor of || and &&) as they may cause subtle precedence bugs
```
if (!class_exists('PHP_CodeCoverage') and class_exists('SebastianBergmann\CodeCoverage\CodeCoverage')) {
```
For more information execute 'psecio-parse rules LogicalOperators'

3) /var/www/html/tests/c3.php on line 137
The third parameter should be set (and be true) on in_array to avoid type switching issues
```
if (in_array('GZ', Phar::getSupportedCompression())) {
```
For more information execute 'psecio-parse rules TypeSafeInArray'

4) /var/www/html/tests/c3.php on line 184
The third parameter should be set (and be true) on in_array to avoid type switching issues
```
if (in_array('GZ', Phar::getSupportedCompression())) {
```
For more information execute 'psecio-parse rules TypeSafeInArray'

5) /var/www/html/tests/c3.php on line 204
The readfile/readlink/readgzfile functions output content directly (possible injection)
```
readfile($filename);
```
For more information execute 'psecio-parse rules Readfile'

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.