frappex-client v0.1.1

Going further

Security model#

frappex-client holds credentials that can read and change business data. Its security rules are not options: there is no setting that turns them off.

Guarantees#

Guarantee Prevents
http:// is refused unless explicitly allowed Credentials sent in clear text
TLS certificate checks cannot be disabled Man-in-the-middle reading or changing traffic
Redirects are never followed A redirect forwarding your Authorization header or session cookie to another host
Document, DocType and method names are encoded or rejected A crafted name such as ../../method/frappe.client.delete reaching another endpoint
Downloads accept only site-relative paths A file_url sending your credentials to an attacker's server
Secrets are masked in repr, logs and errors Keys leaking into log aggregators and error trackers
Credentials and headers cannot contain line breaks HTTP header injection
Writes are never retried after a failure Duplicate payments, invoices or stock entries
Every request has a timeout and a size limit A slow or hostile server hanging or exhausting your program
Server tracebacks stay out of str(error) Internal paths and data leaking through logged exceptions
Uploads are private by default Documents becoming downloadable by anyone with the URL

How the guarantees are tested#

Each guarantee has a property-based test that uses Hypothesis to generate a wide range of hostile inputs (names, paths, URLs, headers, server replies) and checks the promise still holds. For example, for any generated document name the test asserts the request still targets the configured host and the same endpoint.

On every change, CI also runs:

Check What it looks for
CodeQL and Semgrep Vulnerable code patterns
Gitleaks and GitHub secret scanning Committed credentials, across the whole history
pip-audit and dependency review Dependencies with known vulnerabilities
zizmor and OpenSSF Scorecard Weaknesses in the CI pipeline and supply chain

Releases are published to PyPI through Trusted Publishing with signed provenance attestations, so no long-lived upload token exists.

Your part#

frappex-client cannot protect what it never sees. When you use it:

  • Keep secrets out of code. Use environment variables or a secret manager.
  • Use least privilege. Give each integration its own user with only the roles it needs. Avoid Administrator keys.
  • Escape server data. Document fields and server_messages can contain HTML typed by other users. Escape them before rendering in a page.
  • Treat a failed write as unknown. After a TransportError on a write, check before repeating it.
  • Keep frappex-client updated so you receive security fixes.

Reporting a vulnerability#

Please report security problems privately, not in a public issue: report a vulnerability on GitHub. Include the version, what an attacker can do, and steps to reproduce. A fix is released before details are published. Only the latest release receives security fixes.

This website#

This documentation site is static: no server-side code, no cookies, no analytics and no third-party scripts, fonts or trackers. Every asset is served from this origin under a strict Content Security Policy.

Found a mistake? Open an issue.