Skip to main content

tungsten-security-audit

A security health check for your Tungsten panel. Press Run audit and get a score out of 100, a grade, and a plain tip to fix each problem. It also keeps a login log and locks out repeated wrong passwords.

It only checks your own app. It never scans or attacks other sites.

What it checks

  • Settings: login required, a strong secret key, debug mode off, HTTPS-only session cookie, app_url set, two-factor login, roles, open sign-up, CORS, public API docs, activity log.
  • Accounts: how many users have full access, admins with common passwords, old password hashes, admin accounts nobody uses.
  • Logins: lockout on, failed logins in the last 24 hours (and from which IPs), logins locked right now.
  • Website (your own address): HTTPS, HSTS, Content Security Policy, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, server versions in headers, CORS headers, session cookie flags (Secure, HttpOnly, SameSite), HTTP to HTTPS redirect, certificate expiry.
  • AI access: MCP tokens nobody used for a long time (with tungsten-mcp).
  • Packages: Python version still getting security fixes, and (when you tick it) installed packages with known holes from osv.dev.

Every audit is saved, so Audit history shows how your score changes.

Login log and lockout

Every login try is logged: email, IP, browser, and the result (logged in, wrong password, unknown email, locked out...). After 5 wrong passwords for one email from one IP, that login is locked for 15 minutes. Unlock it early from the Login log screen.

Install

pip install tungsten-security-audit
from tungsten_security_audit import SecurityAuditPlugin

panel = Panel(..., app_url="https://admin.example.com")
panel.plugin(SecurityAuditPlugin())
panel.create_tables(engine)
panel.mount(app)

This adds Security audit, Audit history and Login log under a Security group. It needs tungsten-admin 0.1.4 or newer.

Options

SecurityAuditPlugin(
    lockout=True,            # lock a login after too many wrong passwords
    max_failures=5,          # wrong passwords before the lock
    lockout_minutes=15,      # how long the lock lasts
    keep_login_days=90,      # delete login log rows older than this (0 keeps them)
    trust_proxy=False,       # read the IP from X-Forwarded-For (only behind your own proxy)
    max_superusers=3,        # warn when more users have full access
    idle_days=90,            # warn about admins and AI tokens unused this long
    check_passwords=True,    # try common passwords against admin password hashes
    allowed_hosts=[],        # more host names the website check may open
    checks=[],               # your own checks
)

With roles on, only users with the Open Security audit permission see the audit, and See the login log for the log. Super admins see both.

Your own checks

from tungsten_security_audit import Result

def check_backups(audit):
    ok = Path("/backups/latest.sql.gz").exists()
    return Result("backups", "Settings", "Database backups exist", "pass" if ok else "fail", "high",
                  "Found today's backup." if ok else "No backup found.",
                  "" if ok else "Set up a daily backup job.")

panel.plugin(SecurityAuditPlugin(checks=[check_backups]))

License

MIT

More Tungsten plugins

Package What it adds Docs
tungsten-leads Leads list, stages, timeline and your own lead form fields README
tungsten-meta-leads Facebook and Instagram lead form leads, with one-click setup Guide
tungsten-whatsapp WhatsApp for leads: click-to-chat, Cloud API or WhatsApp Web Guide
tungsten-mcp MCP server, so AI assistants like Claude can read and change your data Guide
tungsten-tickets Help desk: tickets, replies, notes, SLA and a customer support page Guide
tungsten-blog Blog built for SEO, GEO and AEO, with a live score, sitemap and llms.txt Guide
tungsten-seo-audit SEO audit of your website: score, fix tips, AI search checks, history Guide
tungsten-finance Accounts like Tally or Zoho Books: GST invoices, bills, ledger, stock, P&L, balance sheet, GSTR-1/3B Guide

Core package: tungsten-admin. Website and docs: https://tungsten.prisminfoways.com/

Metadata

Release files for tungsten-security-audit 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tungsten-security-audit 0.1.1
File Size Uploaded
tungsten_security_audit-0.1.1.tar.gz 25.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tungsten-security-audit 0.1.1
File Interpreter ABI Platform
tungsten_security_audit-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 50.0 kB

Release files / tungsten_security_audit-0.1.1.tar.gz

Download URL tungsten_security_audit-0.1.1.tar.gz
Size 25.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9c8d2201acee3082ce6b294850203c2288c6989173f34e72610e64c905ad10a3
BLAKE2b-256 checksum
How to use checksums
e1f191f5ba0122ef260bf94643336f7c66d826f8bb16515868d76db0f60dd309
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tungsten_security_audit-0.1.1-py3-none-any.whl

Download URL tungsten_security_audit-0.1.1-py3-none-any.whl
Size 24.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f3a19ce74d6ec6120e8dc5ab2bf047f19b666523ac144428e98a632094fd069f
BLAKE2b-256 checksum
How to use checksums
10f305506955fcd44d7920af998682949e98e536e86f15273c4348dc5526a302
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page