septr 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. septr-0.1.0/LICENSE +21 -0
  2. septr-0.1.0/PKG-INFO +90 -0
  3. septr-0.1.0/README.md +73 -0
  4. septr-0.1.0/pyproject.toml +24 -0
  5. septr-0.1.0/septr/__init__.py +0 -0
  6. septr-0.1.0/septr/adapters/__init__.py +0 -0
  7. septr-0.1.0/septr/adapters/fastapi.py +619 -0
  8. septr-0.1.0/septr/adapters/flask.py +433 -0
  9. septr-0.1.0/septr/core/__init__.py +0 -0
  10. septr-0.1.0/septr/core/ai_rate_limit.py +62 -0
  11. septr-0.1.0/septr/core/bola.py +155 -0
  12. septr-0.1.0/septr/core/config_pull.py +128 -0
  13. septr-0.1.0/septr/core/env_check.py +104 -0
  14. septr-0.1.0/septr/core/headers.py +35 -0
  15. septr-0.1.0/septr/core/labels.py +84 -0
  16. septr-0.1.0/septr/core/missing_auth.py +49 -0
  17. septr-0.1.0/septr/core/prompt_injection.py +52 -0
  18. septr-0.1.0/septr/core/rate_limit.py +34 -0
  19. septr-0.1.0/septr/core/sanitize.py +188 -0
  20. septr-0.1.0/septr/core/secrets.py +236 -0
  21. septr-0.1.0/septr/core/ssrf.py +43 -0
  22. septr-0.1.0/septr/core/strip.py +47 -0
  23. septr-0.1.0/septr/core/tamper.py +260 -0
  24. septr-0.1.0/septr/core/telemetry.py +479 -0
  25. septr-0.1.0/septr/core/tenant_aware.py +67 -0
  26. septr-0.1.0/septr.egg-info/PKG-INFO +90 -0
  27. septr-0.1.0/septr.egg-info/SOURCES.txt +41 -0
  28. septr-0.1.0/septr.egg-info/dependency_links.txt +1 -0
  29. septr-0.1.0/septr.egg-info/requires.txt +7 -0
  30. septr-0.1.0/septr.egg-info/top_level.txt +1 -0
  31. septr-0.1.0/setup.cfg +4 -0
  32. septr-0.1.0/tests/test_bola.py +120 -0
  33. septr-0.1.0/tests/test_config_pull.py +153 -0
  34. septr-0.1.0/tests/test_env_check.py +106 -0
  35. septr-0.1.0/tests/test_fastapi.py +340 -0
  36. septr-0.1.0/tests/test_flask.py +173 -0
  37. septr-0.1.0/tests/test_missing_auth.py +27 -0
  38. septr-0.1.0/tests/test_rate_limit.py +45 -0
  39. septr-0.1.0/tests/test_sanitize.py +137 -0
  40. septr-0.1.0/tests/test_secrets.py +249 -0
  41. septr-0.1.0/tests/test_self_test.py +93 -0
  42. septr-0.1.0/tests/test_strip.py +50 -0
  43. septr-0.1.0/tests/test_telemetry.py +214 -0
septr-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 LintGRC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
septr-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,90 @@
1
+ Metadata-Version: 2.4
2
+ Name: septr
3
+ Version: 0.1.0
4
+ Summary: Runtime security middleware for vibe-coded apps
5
+ License: MIT
6
+ Project-URL: Homepage, https://github.com/LintGRC/septr
7
+ Project-URL: Repository, https://github.com/LintGRC/septr
8
+ Requires-Python: >=3.9
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE
11
+ Provides-Extra: flask
12
+ Requires-Dist: flask>=2.0; extra == "flask"
13
+ Provides-Extra: fastapi
14
+ Requires-Dist: fastapi>=0.100; extra == "fastapi"
15
+ Requires-Dist: uvicorn>=0.20; extra == "fastapi"
16
+ Dynamic: license-file
17
+
18
+ # septr — runtime security middleware for Python
19
+
20
+ Protects FastAPI and Flask apps at runtime: secrets leaking in responses,
21
+ BOLA/IDOR, missing auth, business-logic tampering, PII, prompt injection,
22
+ SSRF, and missing rate limits. Auto-verified against the Septr backend,
23
+ with per-engine SOC 2 evidence for your dashboard.
24
+
25
+ ## Install
26
+
27
+ ```bash
28
+ pip install septr
29
+ ```
30
+
31
+ Add your key to `.env`:
32
+
33
+ ```
34
+ SEPTR_API_KEY=septr_live_...
35
+ ```
36
+
37
+ ## FastAPI
38
+
39
+ ```python
40
+ from fastapi import FastAPI
41
+ from septr.adapters.fastapi import SeptrASGIMiddleware
42
+ import os
43
+
44
+ app = FastAPI()
45
+
46
+ app.add_middleware(
47
+ SeptrASGIMiddleware,
48
+ api_key=os.getenv("SEPTR_API_KEY"),
49
+ )
50
+ ```
51
+
52
+ ## Flask
53
+
54
+ ```python
55
+ from flask import Flask
56
+ from septr.adapters.flask import SeptrFlask
57
+ import os
58
+
59
+ app = Flask(__name__)
60
+ # ... your routes ...
61
+ app.wsgi_app = SeptrFlask(app.wsgi_app, {"apiKey": os.getenv("SEPTR_API_KEY")})
62
+ ```
63
+
64
+ ## Config
65
+
66
+ | Option | Type | Default | Description |
67
+ |---|---|---|---|
68
+ | `apiKey` | str | env `SEPTR_API_KEY` | Backend API key |
69
+ | `strictMode` | bool | `False` | Block instead of detect |
70
+ | `secrets` | bool | `True` | Secret/PII detection + response scrubbing |
71
+ | `bola` | bool | `True` | BOLA/IDOR detection |
72
+ | `rateLimit` | bool | `True` | Per-route rate limiting |
73
+ | `inputSanitize` | bool | `True` | SQLi/XSS/NoSQLi sanitization |
74
+ | `ssrf` | bool | `True` | SSRF heuristics |
75
+ | `promptInjection` | bool | `True` | Prompt-injection shielding |
76
+ | `aiRateLimit` | bool | `True` | Rate limiting for AI endpoints |
77
+ | `tamper` | bool | `True` | Business-logic tamper detection |
78
+ | `missingAuth` | bool | `True` | Missing-auth detection |
79
+ | `stripFields` | list[str] | `[]` | Fields to strip from responses |
80
+ | `telemetry_url` | str | `https://api.septr.com/v1/events` | Telemetry endpoint |
81
+
82
+ ## Environment variables
83
+
84
+ - `SEPTR_API_KEY` — your project key
85
+ - `SEPTR_SILENCE_ENV_WARNING` — set to `1` to silence the fail-loud
86
+ missing-key warning
87
+
88
+ ## License
89
+
90
+ MIT
septr-0.1.0/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # septr — runtime security middleware for Python
2
+
3
+ Protects FastAPI and Flask apps at runtime: secrets leaking in responses,
4
+ BOLA/IDOR, missing auth, business-logic tampering, PII, prompt injection,
5
+ SSRF, and missing rate limits. Auto-verified against the Septr backend,
6
+ with per-engine SOC 2 evidence for your dashboard.
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ pip install septr
12
+ ```
13
+
14
+ Add your key to `.env`:
15
+
16
+ ```
17
+ SEPTR_API_KEY=septr_live_...
18
+ ```
19
+
20
+ ## FastAPI
21
+
22
+ ```python
23
+ from fastapi import FastAPI
24
+ from septr.adapters.fastapi import SeptrASGIMiddleware
25
+ import os
26
+
27
+ app = FastAPI()
28
+
29
+ app.add_middleware(
30
+ SeptrASGIMiddleware,
31
+ api_key=os.getenv("SEPTR_API_KEY"),
32
+ )
33
+ ```
34
+
35
+ ## Flask
36
+
37
+ ```python
38
+ from flask import Flask
39
+ from septr.adapters.flask import SeptrFlask
40
+ import os
41
+
42
+ app = Flask(__name__)
43
+ # ... your routes ...
44
+ app.wsgi_app = SeptrFlask(app.wsgi_app, {"apiKey": os.getenv("SEPTR_API_KEY")})
45
+ ```
46
+
47
+ ## Config
48
+
49
+ | Option | Type | Default | Description |
50
+ |---|---|---|---|
51
+ | `apiKey` | str | env `SEPTR_API_KEY` | Backend API key |
52
+ | `strictMode` | bool | `False` | Block instead of detect |
53
+ | `secrets` | bool | `True` | Secret/PII detection + response scrubbing |
54
+ | `bola` | bool | `True` | BOLA/IDOR detection |
55
+ | `rateLimit` | bool | `True` | Per-route rate limiting |
56
+ | `inputSanitize` | bool | `True` | SQLi/XSS/NoSQLi sanitization |
57
+ | `ssrf` | bool | `True` | SSRF heuristics |
58
+ | `promptInjection` | bool | `True` | Prompt-injection shielding |
59
+ | `aiRateLimit` | bool | `True` | Rate limiting for AI endpoints |
60
+ | `tamper` | bool | `True` | Business-logic tamper detection |
61
+ | `missingAuth` | bool | `True` | Missing-auth detection |
62
+ | `stripFields` | list[str] | `[]` | Fields to strip from responses |
63
+ | `telemetry_url` | str | `https://api.septr.com/v1/events` | Telemetry endpoint |
64
+
65
+ ## Environment variables
66
+
67
+ - `SEPTR_API_KEY` — your project key
68
+ - `SEPTR_SILENCE_ENV_WARNING` — set to `1` to silence the fail-loud
69
+ missing-key warning
70
+
71
+ ## License
72
+
73
+ MIT
@@ -0,0 +1,24 @@
1
+ [project]
2
+ name = "septr"
3
+ version = "0.1.0"
4
+ description = "Runtime security middleware for vibe-coded apps"
5
+ readme = "README.md"
6
+ license = { text = "MIT" }
7
+ requires-python = ">=3.9"
8
+ dependencies = []
9
+ optional-dependencies = { flask = ["flask>=2.0"], fastapi = ["fastapi>=0.100", "uvicorn>=0.20"] }
10
+
11
+ [project.urls]
12
+ Homepage = "https://github.com/LintGRC/septr"
13
+ Repository = "https://github.com/LintGRC/septr"
14
+
15
+ [build-system]
16
+ requires = ["setuptools>=68.0"]
17
+ build-backend = "setuptools.build_meta"
18
+
19
+ [tool.setuptools.packages.find]
20
+ include = ["septr*"]
21
+
22
+ [tool.pytest.ini_options]
23
+ testpaths = ["tests"]
24
+ python_files = ["test_*.py"]
File without changes
File without changes