fleetlint Policy for a fleet of repositories
v0.8
Getting started

slop/insecure-patterns

No disabled TLS verification or similar shortcuts

Severitywarning
Tiersall
Stacksany
Scoperoot
Kindexpr
Sourcelibrary v0.5.0
Selected byfleetlint-slop@v0.5.0

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]\*')
false

Fix

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.

Sources


Generated by fleetlint docs from catalog v0.5.0.