You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: catch disabled TLS checks in session calls #500
proTES's semgrep rules (.semgrep/pro-tes.yml) are an early subset of FOCA's shared rules: they lack jwt-decode-unsafe-algorithms, yaml-unsafe-load and tls-verification-disabled, and have no rule tests. The shared rules also miss disabled certificate verification in calls on sessions (e.g., session.get(url, verify=False); ruff's S501 only checks calls of the requests module), and proTES talks to its TES backends through a session. Two JWT gaps came up as well: verify_signature set to None, and the header's alg reaching algorithms through a variable.
The ast-grep rules have the same gaps as before elixir-cloud-aai/prowes#147: string-status-code misses returned tuples in parentheses, and root-logger-call is missing.
Take over FOCA's shared semgrep rules, as widened in fix: catch disabled TLS checks in session calls foca#783, with their tests (.semgrep/pro-tes.py, .semgrep/pro-tes.test.yaml), identical apart from paths, and run the rule tests in pre-commit.
Port string-status-code and root-logger-call from proWES, with their tests.
Fix or suppress (with a reason) whatever the rules find.
Done when
session.get(url, verify=False) and the two JWT cases are flagged, and the rule files match FOCA's apart from paths.
Activity