sealbox 0.3.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.
- sealbox-0.3.0/LICENSE +105 -0
- sealbox-0.3.0/PKG-INFO +307 -0
- sealbox-0.3.0/README.md +265 -0
- sealbox-0.3.0/pyproject.toml +114 -0
- sealbox-0.3.0/sealbox/__init__.py +3 -0
- sealbox-0.3.0/sealbox/__main__.py +907 -0
- sealbox-0.3.0/sealbox/approval.py +316 -0
- sealbox-0.3.0/sealbox/changes.py +193 -0
- sealbox-0.3.0/sealbox/cli_help.py +78 -0
- sealbox-0.3.0/sealbox/config.py +132 -0
- sealbox-0.3.0/sealbox/core/__init__.py +0 -0
- sealbox-0.3.0/sealbox/core/crypto.py +80 -0
- sealbox-0.3.0/sealbox/core/envelope.py +225 -0
- sealbox-0.3.0/sealbox/core/errors.py +61 -0
- sealbox-0.3.0/sealbox/core/fsutil.py +21 -0
- sealbox-0.3.0/sealbox/core/key_sharing.py +109 -0
- sealbox-0.3.0/sealbox/core/leak_guard.py +98 -0
- sealbox-0.3.0/sealbox/core/names.py +23 -0
- sealbox-0.3.0/sealbox/core/redaction.py +12 -0
- sealbox-0.3.0/sealbox/core/scanner.py +308 -0
- sealbox-0.3.0/sealbox/core/tokenization.py +197 -0
- sealbox-0.3.0/sealbox/core/validators.py +101 -0
- sealbox-0.3.0/sealbox/history.py +234 -0
- sealbox-0.3.0/sealbox/i18n.py +81 -0
- sealbox-0.3.0/sealbox/i18n_en.py +698 -0
- sealbox-0.3.0/sealbox/models/__init__.py +0 -0
- sealbox-0.3.0/sealbox/models/enums.py +17 -0
- sealbox-0.3.0/sealbox/py.typed +0 -0
- sealbox-0.3.0/sealbox/recovery.py +408 -0
- sealbox-0.3.0/sealbox/runner.py +291 -0
- sealbox-0.3.0/sealbox/sealing/__init__.py +1 -0
- sealbox-0.3.0/sealbox/sealing/file_operations.py +284 -0
- sealbox-0.3.0/sealbox/sealing/rewriters.py +155 -0
- sealbox-0.3.0/sealbox/sealing/sealer.py +484 -0
- sealbox-0.3.0/sealbox/status.py +137 -0
- sealbox-0.3.0/sealbox/team.py +565 -0
- sealbox-0.3.0/sealbox/vaultstore.py +322 -0
- sealbox-0.3.0/sealbox.egg-info/PKG-INFO +307 -0
- sealbox-0.3.0/sealbox.egg-info/SOURCES.txt +58 -0
- sealbox-0.3.0/sealbox.egg-info/dependency_links.txt +1 -0
- sealbox-0.3.0/sealbox.egg-info/entry_points.txt +2 -0
- sealbox-0.3.0/sealbox.egg-info/requires.txt +11 -0
- sealbox-0.3.0/sealbox.egg-info/top_level.txt +1 -0
- sealbox-0.3.0/setup.cfg +4 -0
- sealbox-0.3.0/tests/test_changes.py +104 -0
- sealbox-0.3.0/tests/test_cli.py +167 -0
- sealbox-0.3.0/tests/test_crypto.py +79 -0
- sealbox-0.3.0/tests/test_envelope.py +89 -0
- sealbox-0.3.0/tests/test_file_operations.py +152 -0
- sealbox-0.3.0/tests/test_history.py +203 -0
- sealbox-0.3.0/tests/test_i18n.py +99 -0
- sealbox-0.3.0/tests/test_key_sharing.py +92 -0
- sealbox-0.3.0/tests/test_leak_guard.py +56 -0
- sealbox-0.3.0/tests/test_names.py +44 -0
- sealbox-0.3.0/tests/test_recovery.py +182 -0
- sealbox-0.3.0/tests/test_scanner.py +130 -0
- sealbox-0.3.0/tests/test_sealing.py +491 -0
- sealbox-0.3.0/tests/test_team.py +215 -0
- sealbox-0.3.0/tests/test_tokenization.py +36 -0
- sealbox-0.3.0/tests/test_validators.py +68 -0
sealbox-0.3.0/LICENSE
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Functional Source License, Version 1.1, ALv2 Future License
|
|
2
|
+
|
|
3
|
+
## Abbreviation
|
|
4
|
+
|
|
5
|
+
FSL-1.1-ALv2
|
|
6
|
+
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 Gökhan Özdemir
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
+
the date we make the Software available. On or after that date, you may use the
|
|
92
|
+
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
+
will apply:
|
|
94
|
+
|
|
95
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
+
this file except in compliance with the License.
|
|
97
|
+
|
|
98
|
+
You may obtain a copy of the License at
|
|
99
|
+
|
|
100
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
+
|
|
102
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
+
specific language governing permissions and limitations under the License.
|
sealbox-0.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sealbox
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Keep passwords, API keys and personal data out of your source files, so AI coding agents never see them.
|
|
5
|
+
Author: Gökhan Özdemir
|
|
6
|
+
License-Expression: FSL-1.1-ALv2
|
|
7
|
+
Project-URL: Homepage, https://github.com/gokhanozdemir-git/SealBox
|
|
8
|
+
Project-URL: Documentation, https://github.com/gokhanozdemir-git/SealBox#readme
|
|
9
|
+
Project-URL: Source, https://github.com/gokhanozdemir-git/SealBox
|
|
10
|
+
Project-URL: Issues, https://github.com/gokhanozdemir-git/SealBox/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/gokhanozdemir-git/SealBox/blob/main/CHANGELOG.md
|
|
12
|
+
Project-URL: VS Code Extension, https://marketplace.visualstudio.com/items?itemName=gokhanozdemir.sealbox
|
|
13
|
+
Keywords: secrets,secret-scanner,vault,encryption,dotenv,credentials,api-keys,pii,security,ai-agents,copilot,claude-code,cursor,pre-commit
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
18
|
+
Classifier: Operating System :: MacOS
|
|
19
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
20
|
+
Classifier: Programming Language :: Python :: 3
|
|
21
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Topic :: Security
|
|
25
|
+
Classifier: Topic :: Security :: Cryptography
|
|
26
|
+
Classifier: Topic :: Software Development
|
|
27
|
+
Classifier: Typing :: Typed
|
|
28
|
+
Requires-Python: >=3.12
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
License-File: LICENSE
|
|
31
|
+
Requires-Dist: cryptography>=44
|
|
32
|
+
Requires-Dist: bcrypt>=4
|
|
33
|
+
Requires-Dist: pydantic<3,>=2.6
|
|
34
|
+
Requires-Dist: shamir-mnemonic<0.4,>=0.3
|
|
35
|
+
Requires-Dist: keyring>=24
|
|
36
|
+
Provides-Extra: dev
|
|
37
|
+
Requires-Dist: pytest==9.1.1; extra == "dev"
|
|
38
|
+
Requires-Dist: hypothesis==6.170.12; extra == "dev"
|
|
39
|
+
Requires-Dist: ruff==0.17.3; extra == "dev"
|
|
40
|
+
Requires-Dist: mypy==2.4.0; extra == "dev"
|
|
41
|
+
Dynamic: license-file
|
|
42
|
+
|
|
43
|
+
<p align="center">
|
|
44
|
+
<img src="https://raw.githubusercontent.com/gokhanozdemir-git/SealBox/main/docs/images/logo.png" alt="SealBox logo" width="120">
|
|
45
|
+
</p>
|
|
46
|
+
|
|
47
|
+
<h1 align="center">SealBox</h1>
|
|
48
|
+
|
|
49
|
+
<p align="center">
|
|
50
|
+
<strong>Keep passwords, API keys and personal data out of your source files,<br>so AI coding agents never see them.</strong>
|
|
51
|
+
</p>
|
|
52
|
+
|
|
53
|
+
<p align="center">
|
|
54
|
+
<a href="https://pypi.org/project/sealbox/"><img src="https://img.shields.io/pypi/v/sealbox?color=3E9E68" alt="PyPI"></a>
|
|
55
|
+
<a href="https://pypi.org/project/sealbox/"><img src="https://img.shields.io/pypi/pyversions/sealbox" alt="Python versions"></a>
|
|
56
|
+
<a href="https://marketplace.visualstudio.com/items?itemName=gokhanozdemir.sealbox"><img src="https://img.shields.io/visual-studio-marketplace/v/gokhanozdemir.sealbox?label=VS%20Code%20Marketplace&color=3E9E68" alt="VS Code Marketplace"></a>
|
|
57
|
+
<a href="https://open-vsx.org/extension/gokhanozdemir/sealbox"><img src="https://img.shields.io/open-vsx/v/gokhanozdemir/sealbox?label=Open%20VSX&color=3E9E68" alt="Open VSX"></a>
|
|
58
|
+
<a href="https://github.com/gokhanozdemir-git/SealBox/actions/workflows/ci.yml"><img src="https://github.com/gokhanozdemir-git/SealBox/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
59
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-FSL--1.1--ALv2-blue" alt="License: FSL-1.1-ALv2"></a>
|
|
60
|
+
</p>
|
|
61
|
+
|
|
62
|
+
<p align="center"><b>English</b> · <a href="README.tr.md">Türkçe</a></p>
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
AI coding agents such as GitHub Copilot, Claude Code and Cursor read your files straight from
|
|
67
|
+
disk and send what they read to a cloud model. A `.env` file, a hard-coded database password
|
|
68
|
+
or a customer's e-mail address in a fixture goes along with it.
|
|
69
|
+
|
|
70
|
+
SealBox **takes those secrets out of your files for good**. Each value moves into an
|
|
71
|
+
encrypted, per-project vault, and the code is rewritten to read an environment variable. When
|
|
72
|
+
you run your program through SealBox, the values are handed over as environment variables,
|
|
73
|
+
only after you approve, and they are hidden again in the program's output.
|
|
74
|
+
|
|
75
|
+
<!-- Screenshot: docs/images/hero.gif (seal a file from the editor, end to end)
|
|
76
|
+
<p align="center"><img src="https://raw.githubusercontent.com/gokhanozdemir-git/SealBox/main/docs/images/hero.gif" alt="Sealing secrets in VS Code" width="800"></p>
|
|
77
|
+
-->
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
# before # after `sealbox seal`
|
|
81
|
+
DB_PASSWORD = "Tr0ub4dor&3" DB_PASSWORD = os.environ["DB_PASSWORD"]
|
|
82
|
+
ADMIN_EMAIL = "ayse@example.com" ADMIN_EMAIL = "__SECURE_EMAIL_9f2c…__"
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Features
|
|
86
|
+
|
|
87
|
+
- **Finds secrets** in Python, JavaScript/TypeScript, Java, `.env`, JSON/YAML/TOML and more:
|
|
88
|
+
passwords, tokens, API keys (OpenAI, Anthropic, AWS, GitHub, Stripe, Google, Slack…),
|
|
89
|
+
private keys, JWTs, credentials inside URLs, e-mail addresses, phone numbers, IBANs,
|
|
90
|
+
credit card numbers and Turkish national IDs. Matches are confirmed by checksums
|
|
91
|
+
(Luhn, IBAN mod-97, ID algorithm) to keep false positives low.
|
|
92
|
+
- **Moves them into an encrypted vault** (AES-256-GCM). The key lives in your OS credential
|
|
93
|
+
store (Windows Credential Manager, macOS Keychain, Linux Secret Service), never on disk.
|
|
94
|
+
- **Rewrites your code** to read environment variables, and redacts personal data with
|
|
95
|
+
placeholders. Works the same for every agent and every editor.
|
|
96
|
+
- **Runs your program with the secrets** after an approval dialog that also flags recently
|
|
97
|
+
changed lines that could leak a secret (network calls, file writes, encoded prints).
|
|
98
|
+
- **Hides secrets in program output**, including common encodings (base64, URL, JSON).
|
|
99
|
+
- **Shares the vault with your team** through their GitHub SSH keys; no extra server.
|
|
100
|
+
- **Recovers a lost key** with a one-time recovery code, optionally split into 2-of-3 shares.
|
|
101
|
+
- **Guards git**: scans history for values that were committed before sealing, and installs a
|
|
102
|
+
pre-commit hook that stops a vault value from being committed.
|
|
103
|
+
- **VS Code extension**: squiggles on exposed secrets, quick fixes, hovers, a status bar item
|
|
104
|
+
and a "Run with Vault" command. Also available for Cursor, Windsurf and VSCodium via Open VSX.
|
|
105
|
+
- English and Turkish interface.
|
|
106
|
+
|
|
107
|
+
## Install
|
|
108
|
+
|
|
109
|
+
SealBox needs **Python 3.12 or newer**.
|
|
110
|
+
|
|
111
|
+
```sh
|
|
112
|
+
pipx install sealbox # recommended: isolated install
|
|
113
|
+
# or
|
|
114
|
+
python -m pip install sealbox
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
On Linux, the approval dialog uses Tk: `sudo apt install python3-tk` (Debian/Ubuntu).
|
|
118
|
+
|
|
119
|
+
For the editor integration, install the extension from the
|
|
120
|
+
[VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=gokhanozdemir.sealbox)
|
|
121
|
+
or [Open VSX](https://open-vsx.org/extension/gokhanozdemir/sealbox).
|
|
122
|
+
|
|
123
|
+
## Quick start
|
|
124
|
+
|
|
125
|
+
```sh
|
|
126
|
+
cd my-project
|
|
127
|
+
sealbox init # checks the project and tells you what to do next
|
|
128
|
+
sealbox seal --check # list exposed secrets (changes nothing; exit code 1 if any)
|
|
129
|
+
sealbox seal # move them into the vault and rewrite the files
|
|
130
|
+
sealbox recovery setup # one-time recovery code, in case the key is ever lost
|
|
131
|
+
sealbox hook install # stop vault values from being committed by accident
|
|
132
|
+
sealbox exec -- python app.py # run with the secrets (an approval dialog opens)
|
|
133
|
+
git add .sealbox && git commit -m "Add SealBox vault"
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
`exec` works with any language, because every runtime reads environment variables:
|
|
137
|
+
|
|
138
|
+
```sh
|
|
139
|
+
sealbox exec -- npm start
|
|
140
|
+
sealbox exec -- java Main.java
|
|
141
|
+
sealbox exec -- mvn spring-boot:run
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Help is always one command away:
|
|
145
|
+
|
|
146
|
+
```sh
|
|
147
|
+
sealbox # grouped list of commands
|
|
148
|
+
sealbox help seal # details and examples for one command
|
|
149
|
+
sealbox status # vault, key, recovery and team health, with a fix for each problem
|
|
150
|
+
sealbox --lang tr ... # Turkish output (or SEALBOX_LANG=tr); default follows the OS language
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## How it works
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
file ──► SafeFS ──► Scanner ──► Sealer ──────────► file (os.environ["X"] / __SECURE_..__)
|
|
157
|
+
path and regex + move to vault / │
|
|
158
|
+
symlink validators redact ▼
|
|
159
|
+
checks .sealbox/project.vault (AES-256-GCM)
|
|
160
|
+
key: OS credential store / SSH / recovery code
|
|
161
|
+
exec ──► approval dialog ──► secrets as environment variables ──► program (output filtered)
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
| What was found | What SealBox does |
|
|
165
|
+
|---|---|
|
|
166
|
+
| Password, token or API key that is a whole string literal (`.py`, `.js`, `.ts`, `.java`…) | Moved to the vault; becomes `os.environ["DB_PASSWORD"]`, `process.env.DB_PASSWORD` or `System.getenv("DB_PASSWORD")` |
|
|
167
|
+
| The same value repeated in a comment | Replaced with a placeholder |
|
|
168
|
+
| E-mail, phone number, IBAN, national ID, listed person names | Replaced with a placeholder (not needed at run time). If the program does use it, `sealbox vault expose` turns it into an environment variable |
|
|
169
|
+
| `.env` | Secret lines move to the vault; `.env` is replaced by `.env.sealed`, which holds placeholders only |
|
|
170
|
+
| JSON / YAML / TOML config file | Redacted; the report tells you which environment variable the app should read |
|
|
171
|
+
| Part of a larger string (e.g. inside a URL) or an unsupported language | **Left untouched** and reported with `[!]`: move it by hand |
|
|
172
|
+
|
|
173
|
+
Sealing the same file again never duplicates vault entries: the same value always maps to the
|
|
174
|
+
same record. Run `seal` from the project root; from a subfolder it stops if a parent folder has
|
|
175
|
+
a `.env`, a `.git` or a vault, so nothing above it stays exposed (use `-w .` to override).
|
|
176
|
+
|
|
177
|
+
### Managing the vault
|
|
178
|
+
|
|
179
|
+
```sh
|
|
180
|
+
sealbox vault list # names and placeholders only, never values
|
|
181
|
+
sealbox vault reveal DB_PASSWORD # show a value (approval required)
|
|
182
|
+
sealbox vault set DB_PASSWORD # change or add a value (typed, not echoed)
|
|
183
|
+
sealbox vault expose __SECURE_EMAIL_…__ # pass redacted data to the program at run time
|
|
184
|
+
sealbox vault remove --unused # delete records no file references any more
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### The approval dialog
|
|
188
|
+
|
|
189
|
+
Every `exec` and `vault reveal` opens a dialog that shows the command and the variables it
|
|
190
|
+
will receive. It also lists **lines changed since your last approval that touch a secret and**:
|
|
191
|
+
|
|
192
|
+
- **send it out** (requests, fetch, curl…), which SealBox cannot hide;
|
|
193
|
+
- **write it to a file**, which SealBox cannot hide either;
|
|
194
|
+
- **print it transformed** (base64, reversed…), which the output filter may not recognise;
|
|
195
|
+
- **print it**: the known value is hidden on screen, but still flagged.
|
|
196
|
+
|
|
197
|
+
If any of the first three is present, **Allow** stays disabled for three seconds so it is not
|
|
198
|
+
clicked out of habit. Only short digests of lines are stored for this comparison, in
|
|
199
|
+
`.sealbox/last_run.json`, which is never committed. There is deliberately **no flag or
|
|
200
|
+
environment variable that skips approval**: an agent could use it too.
|
|
201
|
+
|
|
202
|
+
## Team sharing and recovery
|
|
203
|
+
|
|
204
|
+
If the vault key existed in only one place, losing that place (a Windows reset, a new laptop)
|
|
205
|
+
would make the vault impossible to open. So the key (DEK) has several independent locks:
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
recovery code (128 bits) ─Argon2id (64 MiB, t=3, p=4)─► recovery KEK = X25519 key ─┐
|
|
209
|
+
teammate's GitHub SSH key (ed25519 → X25519, or RSA-OAEP) ─────────────────────────┼─► DEK ─► vault
|
|
210
|
+
OS credential store (cache) ───────────────────────────────────────────────────────┘
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
```sh
|
|
214
|
+
# Team: the vault is committed; only team members' GitHub accounts can open it
|
|
215
|
+
sealbox team init --github my-name # this computer's SSH key must be on that account
|
|
216
|
+
sealbox team add teammate # fetches keys from github.com/teammate.keys
|
|
217
|
+
sealbox team add teammate --owner # owners can add and remove people too
|
|
218
|
+
sealbox team remove teammate # rotates the DEK; they cannot open the new vault
|
|
219
|
+
sealbox team list
|
|
220
|
+
|
|
221
|
+
# Recovery: the code is only ever shown in a dialog, never in the terminal
|
|
222
|
+
sealbox recovery setup # create the code (one per user)
|
|
223
|
+
sealbox recovery shares # split it into 2-of-3 Shamir shares
|
|
224
|
+
sealbox recovery restore # bring the key back with the code or 2 shares
|
|
225
|
+
sealbox recovery export D:\project.sealkit # kit: locked DEK + encrypted vault
|
|
226
|
+
sealbox recovery restore --kit D:\project.sealkit # when the vault folder is gone too
|
|
227
|
+
sealbox vault reset # last resort: new empty vault, old one kept aside
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
- **Unlock order:** OS credential store, then (with a team) your SSH key, then an error that
|
|
231
|
+
points to recovery. After a teammate pulls, the first open asks for their SSH passphrase and
|
|
232
|
+
caches the key.
|
|
233
|
+
- **Committed:** `project.vault`, `project.names`, `project.masked`, `team.json`. The vault's
|
|
234
|
+
own `.gitignore` keeps backups and locks out.
|
|
235
|
+
- **team.json** is protected by a MAC derived from the DEK: someone who can push but does not
|
|
236
|
+
know the DEK cannot add a fake member or role.
|
|
237
|
+
- **Unencrypted SSH keys are refused**, because any program (agents included) could read them.
|
|
238
|
+
|
|
239
|
+
## Git history and the commit hook
|
|
240
|
+
|
|
241
|
+
Cleaning a file does not clean history: a secret committed before sealing is still readable in
|
|
242
|
+
old commits.
|
|
243
|
+
|
|
244
|
+
```sh
|
|
245
|
+
sealbox history # search the whole git history for vault values
|
|
246
|
+
sealbox hook install # pre-commit hook: stop a commit that contains a vault value
|
|
247
|
+
sealbox hook uninstall
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
`history` searches added lines in `git log --all -p` for every vault value and its common
|
|
251
|
+
encodings, and reports the name, commit and file, never the value. If a commit also exists on
|
|
252
|
+
a remote branch, it is marked as pushed: that value may already be in someone else's hands, so
|
|
253
|
+
**rotate it at the provider**; rewriting history is not enough.
|
|
254
|
+
|
|
255
|
+
The hook checks `git diff --cached` and stops the commit with `file:line`. It is a seat belt
|
|
256
|
+
against accidents, not a policy: `git commit --no-verify` skips it.
|
|
257
|
+
|
|
258
|
+
## Configuration
|
|
259
|
+
|
|
260
|
+
Copy [`sealbox.example.toml`](sealbox.example.toml) to your project root as `sealbox.toml`
|
|
261
|
+
(or pass `--config`).
|
|
262
|
+
|
|
263
|
+
| Setting | Default | Description |
|
|
264
|
+
|---|---|---|
|
|
265
|
+
| `excludes` | `.env`, `*.pem`, `*.key`, `id_rsa*`, `.git/**`, `.venv/**`, `node_modules/**`, `.ssh/**`… | Sensitive or generated paths that are never scanned or written (`.env` is handled separately) |
|
|
266
|
+
| `explicit_includes` | `[]` | Opt back in to an excluded path |
|
|
267
|
+
| `max_file_bytes` | 512 KiB | Larger files are skipped |
|
|
268
|
+
| `scanner.person_names` | `[]` | Names to redact (names cannot be detected reliably with regex) |
|
|
269
|
+
| `scanner.custom_rules`, `disabled_rules`, `allow_values` | | Add rules, turn rules off, silence false positives |
|
|
270
|
+
|
|
271
|
+
## Security model
|
|
272
|
+
|
|
273
|
+
**SealBox protects against** the everyday leak it was built for: an agent (or a person, or a
|
|
274
|
+
screenshot) reading a file and sending its contents somewhere else. Secrets are not on disk,
|
|
275
|
+
and the vault is useless without its key.
|
|
276
|
+
|
|
277
|
+
**What SealBox shows:** file paths, categories and counts, line and column numbers, variable
|
|
278
|
+
names, placeholders and error types. **What it never shows:** secret values (except in the
|
|
279
|
+
approval-gated reveal dialog), the vault key, the recovery code and its shares (dialog only),
|
|
280
|
+
or messages of third-party exceptions (type name only).
|
|
281
|
+
|
|
282
|
+
**Known limits:**
|
|
283
|
+
|
|
284
|
+
- A deliberately malicious agent running under your user account could try to read the OS
|
|
285
|
+
credential store directly. The output filter does not catch reversed or split values; the
|
|
286
|
+
approval dialog is the real safeguard.
|
|
287
|
+
- Regular expressions cannot find every secret. Unusual formats, values split across strings
|
|
288
|
+
or encoded values may be missed. Review the report and add `custom_rules` where needed.
|
|
289
|
+
- Name detection only covers names you list.
|
|
290
|
+
- Python cannot guarantee that memory is wiped; keys are zeroed after use on a best-effort basis.
|
|
291
|
+
- Removing a teammate rotates the key, but they may remember values they have seen;
|
|
292
|
+
`team remove` lists them so you can rotate them.
|
|
293
|
+
|
|
294
|
+
Found a vulnerability? Please follow [SECURITY.md](SECURITY.md) instead of opening an issue.
|
|
295
|
+
|
|
296
|
+
## Contributing
|
|
297
|
+
|
|
298
|
+
Bug reports and pull requests are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for the
|
|
299
|
+
development setup, the project layout and how to add a translation.
|
|
300
|
+
|
|
301
|
+
## License
|
|
302
|
+
|
|
303
|
+
SealBox is licensed under the [Functional Source License, Version 1.1, ALv2 Future License](LICENSE)
|
|
304
|
+
(FSL-1.1-ALv2). You may use, modify and redistribute it for any purpose **except offering a
|
|
305
|
+
competing commercial product or service**. Internal use at your company, education and research
|
|
306
|
+
are explicitly allowed. Two years after each release, that release also becomes available under
|
|
307
|
+
the Apache License 2.0.
|