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

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

Metadata

Release files for tungsten-security-audit 0.1.0

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.0
File Size Uploaded
tungsten_security_audit-0.1.0.tar.gz 25.3 kB Details

Built distribution (wheel)

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

Total release size: 49.8 kB

Release files / tungsten_security_audit-0.1.0.tar.gz

Download URL tungsten_security_audit-0.1.0.tar.gz
Size 25.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a93feff5526d0149057110a3f353c69c00fc4bf8afa425a0c4e91b6ddef2f744
BLAKE2b-256 checksum
How to use checksums
0bc548eb350e77c433b2b945de27a7aa67757e102fae46dd01cbbfb76cf0f92b
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.0-py3-none-any.whl

Download URL tungsten_security_audit-0.1.0-py3-none-any.whl
Size 24.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3203c9bf89f7b96a0da34dee2d05bd1700c8336d457db4e6b86c0af04e76b67b
BLAKE2b-256 checksum
How to use checksums
9f036284d27ddaf2fb5f6e3bbb7d4e308f46fea9d91959b70dba624f1f868926
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

0.1.1

2 release files

This release

0.1.0 This release

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