Minor improvements to pass psecio-parse's scan
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
Research direction
Run psecio-parse scan against c3.php and inspect the reported lines in tests/c3.php. Address the five findings for header concatenation, logical operators, in_array type checks, and readfile, then rerun the scan to confirm that these findings are gone.
Written by the indexing model from the issue text.
Description
To run report:
composer global require psecio/parse
~/.composer/vendor/bin/psecio-parse scan c3.php
And its results:
- /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'
- /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'
- /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'
- /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'
- /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'
- Dominant language
- PHP
- Stars
- 73
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Codeception/c3
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Codeception/c3#93 · 5 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
Codeception/c3#76 · 1 comment · 1 reaction ·
-
Could not write error to log filePossibly taken @marcovtwout claimed this 2017 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Codeception/c3#41 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Codeception/c3#40 · 5 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
Codeception/c3#37 · 3 comments · 4 reactions ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
taskforcesh/bullmq#5238 ·
Maintainers usually reply within 1 day
-
[Bug] v-change-database-password reports success but doesn't change the password when MySQL validate_password rejects itPossibly taken @bfs2021 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Automattic/jetpack#55517 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
area/import type/enhancement when/later
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day