slop/insecure-patterns
No disabled TLS verification or similar shortcuts
| Severity | warning |
| Tiers | all |
| Stacks | any |
| Scope | root |
| Kind | expr |
| Source | library v0.3.1 |
| Selected by | fleetlint-slop@v0.3.1 |
Requirement
No globally disabled certificate verification (a callback that accepts every certificate, InsecureSkipVerify, verify=False, rejectUnauthorized: false, VERIFY_NONE), bare eval(, chmod 777 or wildcard CORS origin in non-test code. Method calls named eval (model.eval(), redis.eval() and certificate callbacks that check the certificate are not findings.
Why
Each one was added to make something work once and removes a protection for every user afterwards.
Check
For each item in:
codegrep("nontest", r'badCertificateCallback\s*=\s*\([^)]*\)\s*=>\s*true|ServerCertificateCustomValidationCallback\s*=.*=>\s*true|InsecureSkipVerify:\s*true|verify\s*=\s*False|rejectUnauthorized:\s*false|NODE_TLS_REJECT_UNAUTHORIZED|danger_accept_invalid_certs|CURLOPT_SSL_VERIFYPEER,\s*(false|0)\b|VERIFY_NONE\b|(^|[^.\w$])eval\(|chmod\s+(-R\s+)?777|Allow-Origin[\x22\x27]?\s*[:,]\s*[\x22\x27]\*')falseFix
Scope the exception to one host or one path with explicit opt-in, or remove it.
Agent instruction: Report each occurrence with what it disables; replace only when the secure equivalent is evident.
See: https://fleetlint.org/baseline/#slop, https://fleetlint.org/slop/#errors-types-and-robustness
Generated by fleetlint docs from catalog v0.3.1.