Created
March 16, 2018 02:45
-
-
Save sumyapp/ba82406b94715b018a4c502db9928964 to your computer and use it in GitHub Desktop.
Goodcheck Config exmaple for PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rules: | |
- id: com.example.mysql | |
pattern: mysql_* | |
message: | | |
Do not use mysql_* functions. | |
Please use PDO or Framework's ORM. | |
MySQL Functions (PDO_MYSQL) | |
http://php.net/manual/en/ref.pdo-mysql.php | |
glob: | |
- "**/*.php" | |
- id: com.example.crypt | |
pattern: crypt | |
message: | | |
Do not use crypt. | |
Please use password_hash. | |
Reference: https://secure.php.net/manual/function.password-hash.php | |
glob: | |
- "**/*.php" | |
pass: | |
- $password = crypt('secret text', generate_salt()); | |
fail: | |
- $password = password_hash('secret text', PASSWORD_DEFAULT); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment