Lint rule: weak TLS version (weak-tls-version)
Security rule, ON: a weak protocol constant (SSL 2 / SSL 3 / TLS 1.0 / TLS 1.1) used as a TLS version.
Read this to see which constants weak-tls-version reports and what it cannot see (a weak protocol held in a variable).
How to run it
drag-lint lint <path> [--profile <name>] [--target-compiler <ver|auto>] [--rule <id>|help] [--disable id1,id2] [--rules-dir <dir>] [--json] [--labels] [--no-preprocess] [--library-db <lib.sqlite>] [--build-config <name>] [--no-budget]
Example:
drag-lint lint <file.pas> --rule weak-tls-version
Full flag list: lint in the CLI reference.
Where to click
No IDE surface: this feature runs from the CLI (see How to run it).
Details
Two security rules, ON by default, severity warning.
sql-injection-format
A string built with Format(..) whose %s is substituted into SQL text. A %s in an identifier position
is NOT reported (a sequence name in GEN_ID(%s, 1), a name after FROM / INTO / UPDATE / JOIN /
TABLE, a select list, an ORDER BY / GROUP BY list): those cannot be parameters. It does not follow a
Format result through a variable (S := Format(..); Q.SQL.Text := S). It is a new id; it does not extend
sql-injection-concat. CWE-89.
weak-tls-version
A weak protocol constant (SSL 2 / SSL 3 / TLS 1.0 / TLS 1.1) assigned or passed as a TLS version. A weak protocol held in a variable is not seen. CWE-327.
drag-lint lint <file.pas> --rule sql-injection-format
drag-lint lint-all --db <project.sqlite> --rule weak-tls-version