← Back to scan
File as GitHub Issue repo: TurboGears/tg2

Push this scan report to TurboGears/tg2

Click the green button below to open GitHub’s new-issue form, pre-filled with the report title, summary table, top findings, and an embedded score-card image. No authentication needed — you review on GitHub before submitting. Repobility is credited as the scanner.

Embedded score card image

This image will render at the top of the issue body. Hosted on Repobility, refreshes automatically after re-scans.

Repobility score card

Issue title

Missing import: `mimetypes` used but not imported

Curate findings to include

Pick exactly which findings appear in the issue body. By default the top 5 are included. Uncheck noise, check what matters.

Top 5 (default)
Severity Rule Title File:line
CRIT MINED030 [MINED030] Python Pickle Loads: pickle.loads() can execute arbitrary code via __reduce__. tg/request_local.py:122
CRIT MINED018 [MINED018] Unsafe Deserialization Pickle: pickle.loads / yaml.load (without Loader=SafeLo… tg/request_local.py:122
CRIT SEC081 [SEC081] Python: pickle.loads / marshal.loads on untrusted data: pickle.load(s) and marsh… tg/request_local.py:122
CRIT MINED019 [MINED019] Ssti Jinja From String: jinja2.Environment().from_string(user_input) — full RC… tg/renderers/mako.py:293
CRIT MINED107 Missing import: `mimetypes` used but not imported tg/controllers/dispatcher.py:77
HIGH MINED004 [MINED004] Weak Crypto: MD5/SHA1/DES/RC4 used for security context (not just checksums). tg/request_local.py:6
HIGH MINED001 [MINED001] Bare Except Pass: except: pass or except Exception: pass — silently swallows e… tg/configuration/utils.py:8
HIGH MINED001 [MINED001] Bare Except Pass: except: pass or except Exception: pass — silently swallows e… tg/configuration/sqla/balanced_session.…:34
HIGH MINED001 [MINED001] Bare Except Pass: except: pass or except Exception: pass — silently swallows e… tg/configuration/auth/setup.py:161
HIGH SEC029 [SEC029] Server-Side Request Forgery (SSRF) — outbound HTTP from user input: Outbound HTT… tg/controllers/restcontroller.py:24
HIGH SEC029 [SEC029] Server-Side Request Forgery (SSRF) — outbound HTTP from user input: Outbound HTT… tg/controllers/dispatcher.py:174
HIGH SEC029 [SEC029] Server-Side Request Forgery (SSRF) — outbound HTTP from user input: Outbound HTT… tg/configuration/auth/fastform.py:85
HIGH SEC128 [SEC128] Async function without await — fire-and-forget Promise (AI mistake): Async call … tg/appwrappers/identity.py:31
HIGH SEC128 [SEC128] Async function without await — fire-and-forget Promise (AI mistake): Async call … tg/appwrappers/i18n.py:39
HIGH SEC128 [SEC128] Async function without await — fire-and-forget Promise (AI mistake): Async call … tg/appwrappers/errorpage.py:40
HIGH MINED108 `self.pop_payload` used but never assigned in __init__ tg/flash.py:155
HIGH MINED108 `self._render_static_version` used but never assigned in __init__ tg/flash.py:152
HIGH MINED108 `self._render_js_version` used but never assigned in __init__ tg/flash.py:150
HIGH MINED108 `self.allow_html` used but never assigned in __init__ tg/flash.py:138
HIGH MINED108 `self.default_status` used but never assigned in __init__ tg/flash.py:120
HIGH MINED108 `self.cookie_name` used but never assigned in __init__ tg/flash.py:129
HIGH MINED108 `self._prepare_payload` used but never assigned in __init__ tg/flash.py:119
HIGH MINED108 `self.allow_html` used but never assigned in __init__ tg/flash.py:112
HIGH MINED108 `self.js_template` used but never assigned in __init__ tg/flash.py:111
HIGH MINED108 `self.js_call` used but never assigned in __init__ tg/flash.py:110
HIGH MINED108 `self.static_template` used but never assigned in __init__ tg/flash.py:109
HIGH MINED108 `self.cookie_name` used but never assigned in __init__ tg/flash.py:108
HIGH MINED108 `self.default_status` used but never assigned in __init__ tg/flash.py:107
HIGH MINED108 `self.unmet` used but never assigned in __init__ tg/predicates.py:354
HIGH MINED108 `self.unmet` used but never assigned in __init__ tg/predicates.py:329
HIGH MINED108 `self.unmet` used but never assigned in __init__ tg/predicates.py:311
HIGH MINED108 `self.unmet` used but never assigned in __init__ tg/predicates.py:252
HIGH MINED108 `self.unmet` used but never assigned in __init__ tg/predicates.py:227
HIGH MINED108 `self.unmet` used but never assigned in __init__ tg/predicates.py:202
HIGH MINED108 `self.predicates` used but never assigned in __init__ tg/predicates.py:195
HIGH MINED108 `self.predicates` used but never assigned in __init__ tg/predicates.py:163
HIGH MINED108 `self.unmet` used but never assigned in __init__ tg/predicates.py:137
HIGH MINED108 `self.is_met` used but never assigned in __init__ tg/predicates.py:100
HIGH MINED108 `self.evaluate` used but never assigned in __init__ tg/predicates.py:94
HIGH MINED108 `self.evaluate` used but never assigned in __init__ tg/predicates.py:80
HIGH MINED115 Action `actions/setup-python` pinned to mutable ref `@v2` .github/workflows/run-tests.yml:28
HIGH MINED115 Action `astral-sh/ruff-action` pinned to mutable ref `@v3` .github/workflows/run-tests.yml:24
HIGH MINED115 Action `astral-sh/ruff-action` pinned to mutable ref `@v3` .github/workflows/run-tests.yml:22
HIGH MINED115 Action `actions/checkout` pinned to mutable ref `@v2` .github/workflows/run-tests.yml:20
MED SEC007 [SEC007] Unsafe Deserialization: Unsafe deserialization can execute arbitrary code. tg/request_local.py:122
MED SEC127 [SEC127] AI agent stub — TODO: implement / pass placeholder body: Function body left as T… tg/predicates.py:41
MED ERR001 [ERR001] Silent Exception Swallowing: Silently swallowing all exceptions hides bugs. Even… tg/jsonify.py:151
MED SEC045 [SEC045] eval()/exec() on stored or user-supplied data: eval() and exec() on data — even … tg/util/lazystring.py:15
MED SEC045 [SEC045] eval()/exec() on stored or user-supplied data: eval() and exec() on data — even … tg/flash.py:43
MED SEC015 [SEC015] Insecure Randomness for Security: Weak PRNG used in security-sensitive context. … tg/configuration/sqla/balanced_session.…:44
MED SEC015 [SEC015] Insecure Randomness for Security: Weak PRNG used in security-sensitive context. … tg/caching.py:151
MED MINED111 Bare except continues silently tg/appwrappers/errorpage.py:75
MED MINED111 Bare except continues silently tg/decorators/decoration.py:232
MED MINED111 Bare except continues silently tg/decorators/decoration.py:51
MED MINED111 Bare except continues silently tg/decorators/decorators.py:516
MED MINED111 Bare except continues silently tg/decorators/decorators.py:310
MED MINED111 Bare except continues silently tg/renderers/mako.py:76
MED MINED111 Bare except continues silently tg/i18n.py:262
MED COMP001 [COMP001] High cognitive complexity: Function `__call__` has cognitive complexity 19 (Son… tg/appwrappers/transaction_manager.py:66
MED AUC001 [AUC001] No Repobility access matrix policy found: The repository uses web/API frameworks…
MED WEB003 Public web service has no security.txt .well-known/security.txt
LOW COMP001 [COMP001] High cognitive complexity: Function `identify` has cognitive complexity 13 (Son… tg/configuration/auth/fastform.py:64
LOW COMP001 [COMP001] High cognitive complexity: Function `__call__` has cognitive complexity 10 (Son… tg/appwrappers/i18n.py:58
LOW AIC003 Duplicated implementation block across source files tg/decorators/decorators.py:582
LOW AIC003 Duplicated implementation block across source files tg/configurator/components/slow_request…:54
INFO MINED076 [MINED076] Catch And Reraise Noop: except X: raise X — adds no value, hides traceback if … tg/predicates.py:81
INFO MINED043 [MINED043] Http Not Https: Hardcoded http:// (not localhost) for endpoints that handle cr… tg/jsonify.py:63
INFO MINED043 [MINED043] Http Not Https: Hardcoded http:// (not localhost) for endpoints that handle cr… tg/i18n.py:34
INFO MINED072 [MINED072] Python Pass Only Class: class Foo: pass — stub waiting to be filled in. tg/renderers/genshi.py:24
INFO MINED072 [MINED072] Python Pass Only Class: class Foo: pass — stub waiting to be filled in. tg/predicates.py:32
INFO MINED072 [MINED072] Python Pass Only Class: class Foo: pass — stub waiting to be filled in. tg/configuration/utils.py:8
INFO MINED077 [MINED077] Python Open No Context: fp = open(path) outside with-block leaks file handles. tg/support/statics.py:123
INFO MINED077 [MINED077] Python Open No Context: fp = open(path) outside with-block leaks file handles. tg/renderers/jinja.py:174
INFO MINED077 [MINED077] Python Open No Context: fp = open(path) outside with-block leaks file handles. tg/configuration/auth/setup.py:209
INFO MINED050 [MINED050] Stub Only Function: Function declared but body is just pass, return None, rais… tg/configuration/auth/setup.py:52
INFO MINED050 [MINED050] Stub Only Function: Function declared but body is just pass, return None, rais… tg/configuration/app_config.py:94
INFO MINED050 [MINED050] Stub Only Function: Function declared but body is just pass, return None, rais… tg/appwrappers/base.py:71
Reset to top 5 77 findings available (after auto-suppression of test files + won't-fix)

Issue body (markdown)

## Code-quality scan: `TurboGears/tg2`

**Score: 88/100 (A-)**  ·  113 findings  ·  scanned 2026-06-05 22:31 UTC  ·  25,022 LOC

| Severity | Count |
|---|---|
| CRITICAL | 5 |
| HIGH | 39 |
| MEDIUM | 17 |
| LOW | 4 |

📊 [Full filterable report](https://repobility.com/scan/53ad27bb-970d-40e5-8f80-52565cc5dc38/)  ·  ![scorecard](https://repobility.com/scan/53ad27bb-970d-40e5-8f80-52565cc5dc38/report.png?v=1780698718-s2)

### Top findings

1. **CRITICAL** `MINED030` — Python Pickle Loads
   `tg/request_local.py:122` · CWE-502 · ✓ Repobility
2. **CRITICAL** `MINED018` — Unsafe Deserialization Pickle
   `tg/request_local.py:122` · CWE-502 · ✓ Repobility
3. **CRITICAL** `SEC081` — Python: pickle.loads / marshal.loads on untrusted data
   `tg/request_local.py:122` · A05:2021 Security Misconfiguration
4. **CRITICAL** `MINED019` — Ssti Jinja From String
   `tg/renderers/mako.py:293` · CWE-94 · ✓ Repobility
5. **CRITICAL** `MINED107` — Missing import: `mimetypes` used but not imported
   `tg/controllers/dispatcher.py:77` · ✓ Repobility

---

**Security note**: this issue is public. If any flagged finding is a real, exploitable vulnerability, please redirect to your `SECURITY.md` policy or open a [private security advisory](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability) instead. We're happy to close this and re-submit privately.

---

_Filed automatically. Close this issue if not useful — we won't refile. Full report: https://repobility.com/scan/53ad27bb-970d-40e5-8f80-52565cc5dc38/_
Megaproject â high spam risk
Could not determine 'TurboGears/tg2' star count (GitHub API rate-limited or unreachable). When in doubt about repo size, prefer opening a focused PR or a discussion rather than an issue.
Already filed
44/119 findings (37%) on this scan are already flagged as test-file, won't-fix, or suppressed. The scan is too noisy to file as a single issue. Curate down to specific actionable findings, or address the FP source first.

The button opens GitHubâs new-issue page in a new tab. You will see the title + body pre-filled â review, edit if you want, then click GitHubâs "Submit new issue" button. Repobility never posts anything on your behalf.

For real security findings on big repos: use the project's SECURITY.md or private advisory flow instead of a public issue.