@fabriziosalmi/slopless 1.11.0 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/engine/api.js +1 -1
  2. package/dist/index.js +2 -2
  3. package/package.json +1 -1
  4. package/rules/VBC-001.yaml +1 -0
  5. package/rules/VBC-004.yaml +1 -0
  6. package/rules/VBC-005.yaml +8 -1
  7. package/rules/VBC-007.yaml +1 -0
  8. package/rules/VBC-008.yaml +1 -0
  9. package/rules/VBC-009.yaml +1 -0
  10. package/rules/VBC-010.yaml +1 -0
  11. package/rules/VBC-011.yaml +1 -0
  12. package/rules/VBC-012.yaml +1 -0
  13. package/rules/VBC-015.yaml +1 -0
  14. package/rules/VBC-016.yaml +1 -0
  15. package/rules/VBC-017-B.yaml +1 -0
  16. package/rules/VBC-017.yaml +1 -0
  17. package/rules/VBC-018.yaml +1 -0
  18. package/rules/VBC-019.yaml +1 -0
  19. package/rules/VBC-023.yaml +1 -0
  20. package/rules/VBC-024.yaml +1 -0
  21. package/rules/VBC-027.yaml +1 -0
  22. package/rules/VBC-030.yaml +1 -0
  23. package/rules/VBC-033.yaml +1 -0
  24. package/rules/VBC-034.yaml +1 -0
  25. package/rules/VBC-035.yaml +1 -0
  26. package/rules/VBC-039.yaml +1 -0
  27. package/rules/VBC-042.yaml +1 -0
  28. package/rules/VBC-048.yaml +1 -0
  29. package/rules/VBC-049.yaml +1 -0
  30. package/rules/VBC-051.yaml +1 -0
  31. package/rules/VBC-052.yaml +1 -0
  32. package/rules/VBC-053.yaml +1 -0
  33. package/rules/VBC-054.yaml +1 -0
  34. package/rules/VBC-056.yaml +1 -0
  35. package/rules/VBC-057.yaml +1 -0
  36. package/rules/VBC-058.yaml +1 -0
  37. package/rules/VBC-063.yaml +1 -0
  38. package/rules/VBC-068.yaml +1 -0
  39. package/rules/VBC-070.yaml +1 -0
  40. package/rules/VBC-079.yaml +1 -0
  41. package/rules/VBC-080.yaml +1 -0
  42. package/rules/VBC-084.yaml +1 -0
  43. package/rules/VBC-086.yaml +1 -0
  44. package/rules/VBC-090.yaml +1 -0
  45. package/rules/VBC-096.yaml +1 -0
  46. package/rules/VBC-097.yaml +1 -0
  47. package/rules/VBC-101.yaml +1 -0
  48. package/rules/VBC-103.yaml +1 -0
  49. package/rules/VBC-104.yaml +1 -0
  50. package/rules/VBC-112.yaml +1 -0
  51. package/rules/VBC-113.yaml +1 -0
  52. package/rules/VBC-117.yaml +1 -0
  53. package/rules/VBC-123.yaml +1 -0
  54. package/rules/VBC-131.yaml +1 -0
  55. package/rules/VBC-150.yaml +1 -0
  56. package/rules/VBC-215.yaml +1 -0
  57. package/rules/VBC-334.yaml +1 -0
  58. package/rules/VBC-338.yaml +1 -0
  59. package/rules/VBC-385.yaml +1 -0
  60. package/rules/VBC-901.yaml +1 -0
  61. package/rules/VBC-902.yaml +1 -0
  62. package/rules/VBC-903.yaml +1 -0
  63. package/rules/VBC-904.yaml +1 -0
  64. package/rules/VBC-905.yaml +1 -0
  65. package/rules/VBC-906.yaml +1 -0
  66. package/rules/VBC-907.yaml +1 -0
  67. package/rules/VBC-908.yaml +1 -0
  68. package/rules/VBC-910.yaml +1 -0
  69. package/rules/VBC-911.yaml +1 -0
  70. package/rules/VBC-916.yaml +1 -0
  71. package/rules/VBC-917.yaml +1 -0
  72. package/rules/VBC-927.yaml +1 -0
  73. package/rules/VBC-928.yaml +1 -0
  74. package/rules/VBC-937.yaml +1 -0
  75. package/rules/VBC-938.yaml +1 -0
  76. package/rules/VBC-939.yaml +1 -0
  77. package/rules/VBC-940.yaml +1 -0
  78. package/rules/VBC-941.yaml +1 -0
  79. package/rules/VBC-942.yaml +1 -0
  80. package/rules/VBC-943.yaml +1 -0
  81. package/rules/VBC-944.yaml +10 -1
  82. package/rules/VBC-945.yaml +1 -0
  83. package/rules/VBC-946.yaml +1 -0
  84. package/rules/VBC-947.yaml +1 -0
@@ -12,6 +12,7 @@ match:
12
12
  - html
13
13
  - tsx
14
14
  - jsx
15
+ - astro
15
16
  message: >-
16
17
  Vague button label '{match}' detected at line {line}. Use action-oriented labels (e.g.,
17
18
  'Save Changes', 'Create Account').
@@ -44,6 +44,7 @@ match:
44
44
  - kt
45
45
  - swift
46
46
  - rb
47
+ - astro
47
48
  message: >-
48
49
  Placeholder text 'Lorem ipsum' detected at line {line}. Replace with real content before
49
50
  committing.
@@ -13,6 +13,7 @@ match:
13
13
  - ts
14
14
  - jsx
15
15
  - tsx
16
+ - astro
16
17
  message: >-
17
18
  Authentication token or role stored/read from browser storage at line {line}. Client-side
18
19
  auth logic is trivially bypassable. Validate identity server-side on every request. Never
@@ -12,6 +12,7 @@ match:
12
12
  - js
13
13
  - ts
14
14
  - py
15
+ - astro
15
16
  message: >-
16
17
  Potential command injection at line {line}. Shell commands constructed with string interpolation
17
18
  or concatenation allow attackers to execute arbitrary commands. Use parameterized commands
@@ -11,6 +11,7 @@ match:
11
11
  file_types:
12
12
  - js
13
13
  - ts
14
+ - astro
14
15
  message: >-
15
16
  File upload handler at line {line} may lack type/size restrictions. Without validating MIME
16
17
  type, file extension, and size, attackers can upload malicious executables or exhaust disk
@@ -13,6 +13,7 @@ match:
13
13
  - js
14
14
  - ts
15
15
  - py
16
+ - astro
16
17
  supersedes:
17
18
  - VBC-007
18
19
  message: >-
@@ -13,6 +13,7 @@ match:
13
13
  - ts
14
14
  - jsx
15
15
  - tsx
16
+ - astro
16
17
  supersedes:
17
18
  - VBC-070
18
19
  message: >-
@@ -11,6 +11,7 @@ match:
11
11
  file_types:
12
12
  - js
13
13
  - ts
14
+ - astro
14
15
  message: >-
15
16
  Route handler at line {line} may be missing authentication middleware. AI-generated route
16
17
  handlers frequently omit auth guards. Ensure every non-public endpoint is protected with
@@ -10,6 +10,7 @@ match:
10
10
  file_types:
11
11
  - js
12
12
  - ts
13
+ - astro
13
14
  message: >-
14
15
  Catch clause with ignored error variable at line {line}. Using '_' as the catch binding
15
16
  signals the exception is intentionally discarded. AI-generated code often silently suppresses
@@ -6,8 +6,12 @@ tags:
6
6
  - security
7
7
  - ai-error
8
8
  match:
9
+ # The hazard is an interpolation that decides the scheme. A literal prefix
10
+ # settles it first: `mailto:${addr}` and `/blog/${slug}` cannot become
11
+ # `javascript:` whatever the value is, and that is how a template builds
12
+ # every ordinary link.
9
13
  regex: >-
10
- href\s*=\s*\{[^}]*\+|href\s*=\s*[`'"][^`'"]*\$\{|href\s*=\s*\{\s*`[^`]*\$\{
14
+ href\s*=\s*\{[^}]*\+|href\s*=\s*[`'"]\s*\$\{|href\s*=\s*\{\s*[`'"]\s*\$\{
11
15
  scan: all
12
16
  file_types:
13
17
  - js
@@ -15,6 +19,7 @@ match:
15
19
  - jsx
16
20
  - tsx
17
21
  - html
22
+ - astro
18
23
  message: >-
19
24
  Dynamic href constructed with string interpolation at line {line}. If the value originates
20
25
  from user input or an untrusted source, this is a javascript: URL injection vector. Validate
@@ -23,4 +28,8 @@ tests:
23
28
  fire:
24
29
  - const link = `href="${untrusted}"`;
25
30
  quiet:
31
+ # A literal prefix settles the scheme before the value arrives.
32
+ - '<a href={`mailto:${contact.email}`}>write to us</a>'
33
+ - '<a href={`/blog/${slug}`}>read on</a>'
34
+ - '<a href={`https://example.org/u/${user}`}>profile</a>'
26
35
  - <a href="/static/page">page</a>
@@ -18,6 +18,7 @@ match:
18
18
  - py
19
19
  - go
20
20
  - java
21
+ - astro
21
22
  supersedes:
22
23
  - VBC-907
23
24
  - VBC-150
@@ -12,6 +12,7 @@ match:
12
12
  file_types:
13
13
  - js
14
14
  - ts
15
+ - astro
15
16
  message: >-
16
17
  Destructive async operation at line {line} with no verification of success. AI agents frequently
17
18
  execute irreversible actions (delete, drop, rm) based on assumed success without checking
@@ -11,6 +11,7 @@ match:
11
11
  file_types:
12
12
  - js
13
13
  - ts
14
+ - astro
14
15
  message: >-
15
16
  Merging untrusted request body directly at line {line}. This pattern enables prototype pollution:
16
17
  an attacker can inject __proto__ or constructor.prototype to corrupt the application object