-
Notifications
You must be signed in to change notification settings - Fork 0
/
lynter.yml
65 lines (58 loc) · 1.59 KB
/
lynter.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
rules:
- name: restrict-eval-function
rule: restrictFunction
matcher: exact
values:
- eval
message: "The use of '{value}' is prohibited due to security risks."
- name: restrict-dangerous-functions
rule: restrictFunction
matcher: exact
values:
- exec
- shell_exec
- system
- passthru
- popen
message: "The use of '{value}' is prohibited due to security risks."
- name: restrict-global-variables
rule: restrictVariable
matcher: exact
values:
- $_GET
- $_POST
- $_COOKIE
- $_REQUEST
- $_FILES
- $_ENV
- $_SESSION
message: "Direct access to superglobals '{value}' is discouraged. Use proper sanitization and validation methods."
- name: restrict-deprecated-functions
rule: restrictFunction
matcher: exact
values:
- mysql_query
- ereg
message: "The use of deprecated function '{value}' is prohibited. Use modern alternatives."
- name: restrict-raw-sql
rule: restrictFunction
matcher: pattern
values:
- '/^query/'
message: "The use of raw SQL queries via '{value}' is discouraged. Use prepared statements or ORM instead."
- name: restrict-output-debugging
rule: restrictFunction
matcher: exact
values:
- var_dump
- print_r
message: "Debugging output function '{value}' is not allowed in production code."
- name: enforce-psr-standards
rule: restrictFunction
matcher: exact
values:
- extract
message: "Avoid using '{value}'. Adhere to PSR coding standards."
exclude:
- vendor/
- tests/