@ishizakahiroshi/doxguard-win32-arm64 0.1.0
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.
- package/LICENSE +21 -0
- package/README.md +228 -0
- package/bin/doxguard.exe +0 -0
- package/package.json +13 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Hiroshi Ishizaka (ishizakahiroshi)
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# doxguard
|
|
2
|
+
|
|
3
|
+
> Keep *you* out of your public repos — at native speed.
|
|
4
|
+
|
|
5
|
+
doxguard is a Rust-powered pre-commit and pre-publish gate that stops personal identity data from
|
|
6
|
+
leaking into public repositories: names, employers and customers, internal hostnames, private IPs,
|
|
7
|
+
personal filesystem paths, and non-public email addresses.
|
|
8
|
+
|
|
9
|
+
Credential scanners such as gitleaks and trufflehog look for API keys and tokens. doxguard looks
|
|
10
|
+
for **you**. Use both.
|
|
11
|
+
|
|
12
|
+
## Why it is fast
|
|
13
|
+
|
|
14
|
+
- Native Rust executable with no runtime dependency in the scanning path
|
|
15
|
+
- Aho–Corasick matches all watchlist terms in one pass instead of scanning once per term
|
|
16
|
+
- Files are scanned in parallel for repository-wide and package checks
|
|
17
|
+
- `doxguard install-hooks` caches the current native binary under the repository's git directory;
|
|
18
|
+
commits do not start Node, npm, or Cargo
|
|
19
|
+
|
|
20
|
+
The npm package is an installation and trial entry point. The scanner it launches is a
|
|
21
|
+
platform-specific native binary.
|
|
22
|
+
|
|
23
|
+
## Install
|
|
24
|
+
|
|
25
|
+
Try without keeping an installation:
|
|
26
|
+
|
|
27
|
+
```console
|
|
28
|
+
npx doxguard scan --all-tracked
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
For repeated use, install once and wire the native fast path:
|
|
32
|
+
|
|
33
|
+
```console
|
|
34
|
+
npm install --global doxguard
|
|
35
|
+
doxguard init
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`pnpm add --global doxguard` and `bun install --global doxguard` use the same npm registry package.
|
|
39
|
+
|
|
40
|
+
Supported v0.1.0 targets:
|
|
41
|
+
|
|
42
|
+
- Windows x64 and ARM64
|
|
43
|
+
- Linux x64 and ARM64
|
|
44
|
+
- macOS x64 and Apple Silicon
|
|
45
|
+
|
|
46
|
+
## Quick start
|
|
47
|
+
|
|
48
|
+
Create a private watchlist outside the repository:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
# One term per line
|
|
52
|
+
Northwind Harbor
|
|
53
|
+
Contoso Works
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Then initialize a git repository:
|
|
57
|
+
|
|
58
|
+
```console
|
|
59
|
+
doxguard init
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
This creates, without overwriting existing files:
|
|
63
|
+
|
|
64
|
+
- `doxguard.config.json`
|
|
65
|
+
- `.githooks/pre-commit` as a portable fallback
|
|
66
|
+
- a direct native `pre-commit` under the local git directory, selected by `core.hooksPath`
|
|
67
|
+
- `.github/workflows/doxguard.yml` for structural-only CI scanning
|
|
68
|
+
|
|
69
|
+
Set the environment variable referenced by the generated config. The path itself does not enter
|
|
70
|
+
the repository:
|
|
71
|
+
|
|
72
|
+
```powershell
|
|
73
|
+
$env:DOXGUARD_WATCHLIST_DIR = "D:/private/watchlists"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
export DOXGUARD_WATCHLIST_DIR="$HOME/private/watchlists"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
An unset variable skips that source with a warning. Built-in structural checks continue to run,
|
|
81
|
+
which is the expected CI behavior.
|
|
82
|
+
|
|
83
|
+
For a diagram-rich walkthrough of installation, watchlist setup, and the daily commit flow, see the
|
|
84
|
+
[visual user guide](https://ishizakahiroshi.github.io/doxguard/).
|
|
85
|
+
|
|
86
|
+
## Scan commands
|
|
87
|
+
|
|
88
|
+
```console
|
|
89
|
+
doxguard scan --staged --block
|
|
90
|
+
doxguard scan --diff --block
|
|
91
|
+
doxguard scan --all-tracked --dry-run
|
|
92
|
+
doxguard scan --packaged --block
|
|
93
|
+
doxguard scan --all-tracked --format json
|
|
94
|
+
doxguard scan --all-tracked --block --strict
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Exactly one mode is required:
|
|
98
|
+
|
|
99
|
+
- `--staged`: added, copied, renamed, or modified files in the git index (reads index blobs, not the worktree)
|
|
100
|
+
- `--diff`: working-tree changes compared with `HEAD`
|
|
101
|
+
- `--all-tracked`: all files returned by `git ls-files`
|
|
102
|
+
- `--packaged`: files returned by `npm pack --dry-run --json`
|
|
103
|
+
|
|
104
|
+
`--strict` (or config `allow.disallowBareAllow` + `failOnSkip`) turns on a harder gate: bare
|
|
105
|
+
`doxguard: allow` is ignored, and unscanned coverage skips (oversize / non-UTF-8 / symlink) fail
|
|
106
|
+
when combined with `--block`. Prefer `--strict` in CI.
|
|
107
|
+
|
|
108
|
+
Exit codes are stable: `0` means pass/report-only, `1` means a `--block` scan found matches (or
|
|
109
|
+
coverage skips under strict/`failOnSkip`), and `2` means usage or configuration error.
|
|
110
|
+
|
|
111
|
+
## Configuration
|
|
112
|
+
|
|
113
|
+
`doxguard.config.json` supports line lists and CSV columns. Numeric CSV columns are 1-based.
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"watchlists": [
|
|
118
|
+
{
|
|
119
|
+
"type": "lines",
|
|
120
|
+
"path": "${PRIVATE_LISTS}/names.txt",
|
|
121
|
+
"label": "private names"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"type": "csv",
|
|
125
|
+
"path": "${PRIVATE_LISTS}/systems.csv",
|
|
126
|
+
"column": "display_name",
|
|
127
|
+
"label": "internal systems",
|
|
128
|
+
"parenVariants": true
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"structural": {
|
|
132
|
+
"windowsPath": true,
|
|
133
|
+
"posixHome": true,
|
|
134
|
+
"privateIp": true,
|
|
135
|
+
"email": true,
|
|
136
|
+
"custom": [
|
|
137
|
+
{
|
|
138
|
+
"name": "Internal ticket",
|
|
139
|
+
"regex": "PRIVATE-[0-9]+",
|
|
140
|
+
"suggestion": "Replace the private ticket identifier"
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
"allow": {
|
|
145
|
+
"names": ["Public Product"],
|
|
146
|
+
"emails": ["public@example.com"],
|
|
147
|
+
"emailDomains": ["example.com", "users.noreply.github.com"],
|
|
148
|
+
"disallowBareAllow": false
|
|
149
|
+
},
|
|
150
|
+
"noise": {
|
|
151
|
+
"minNeedleLength": 2,
|
|
152
|
+
"skipShortKanaGivenNames": true,
|
|
153
|
+
"asciiCaseInsensitive": false
|
|
154
|
+
},
|
|
155
|
+
"exemptPaths": ["generated/"],
|
|
156
|
+
"maxFileSize": 1048576,
|
|
157
|
+
"failOnSkip": false
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Watchlist paths should use `${ENV_VAR}` expansion. Literal paths work but produce a warning so a
|
|
162
|
+
private path is not accidentally committed. `DOXGUARD_CONFIG` can point to an entirely local config
|
|
163
|
+
when even the source layout should stay out of the repository.
|
|
164
|
+
|
|
165
|
+
Built-in structural checks detect:
|
|
166
|
+
|
|
167
|
+
- personal Windows absolute-path prefixes
|
|
168
|
+
- POSIX user home paths
|
|
169
|
+
- RFC1918 private IPv4 addresses
|
|
170
|
+
- email addresses not covered by the public allowlist
|
|
171
|
+
|
|
172
|
+
## Inline exceptions
|
|
173
|
+
|
|
174
|
+
Use an exception only when the value is intentionally public:
|
|
175
|
+
|
|
176
|
+
```text
|
|
177
|
+
Public Product // doxguard: allow Public
|
|
178
|
+
fixture=192.168.50.9 # doxguard: allow 192.168.50.9
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
`doxguard: allow WORD` exempts matching values containing `WORD` (WORD must be at least 4 characters).
|
|
182
|
+
Bare `doxguard: allow` (no token) exempts all matches on that line unless `allow.disallowBareAllow`
|
|
183
|
+
or `--strict` is enabled. The former `secrets-scan: allow` spelling remains compatible for migration.
|
|
184
|
+
|
|
185
|
+
## Hook upgrades
|
|
186
|
+
|
|
187
|
+
Run this after upgrading doxguard:
|
|
188
|
+
|
|
189
|
+
```console
|
|
190
|
+
doxguard install-hooks
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
It refreshes the cached native binary in the local git directory. The cache is never tracked. If
|
|
194
|
+
Husky is detected, doxguard leaves it untouched and prints the command to add to the existing hook.
|
|
195
|
+
|
|
196
|
+
## Privacy and safety
|
|
197
|
+
|
|
198
|
+
- Watchlist contents are read locally and never sent anywhere.
|
|
199
|
+
- Repository config contains environment-variable references, not private absolute paths.
|
|
200
|
+
- CI normally runs structural patterns only because private watchlists are unavailable there.
|
|
201
|
+
- Scan commands are read-only: they report and return an exit code, but never edit or delete files.
|
|
202
|
+
- Binary, lock, oversized, and explicitly exempt files are skipped.
|
|
203
|
+
|
|
204
|
+
## 日本語
|
|
205
|
+
|
|
206
|
+
doxguard は、本名・家族名・勤務先・顧客名・社内ホスト名・私的パス・非公開メールなど、
|
|
207
|
+
「自分自身の情報」が公開リポジトリへ混入するのを止めるRust製スキャナです。
|
|
208
|
+
|
|
209
|
+
監視語はAho–Corasickで一括検索し、ファイルは並列走査します。`init` / `install-hooks` 後の
|
|
210
|
+
pre-commitは `.git` 内に保存したネイティブバイナリを直接起動するため、日常のコミットで
|
|
211
|
+
Node・npm・Cargoの起動待ちは発生しません。watchlistは手元から出ず、CIでは構造パターンだけが
|
|
212
|
+
動作します。APIキーを検知するgitleaks等とは競合せず、補完関係です。
|
|
213
|
+
|
|
214
|
+
## Development
|
|
215
|
+
|
|
216
|
+
```console
|
|
217
|
+
cargo fmt --all -- --check
|
|
218
|
+
cargo clippy --all-targets -- -D warnings
|
|
219
|
+
cargo test --all-targets
|
|
220
|
+
cargo build --release --locked
|
|
221
|
+
npm pack --dry-run --json --ignore-scripts
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
All fixtures must be synthetic. Never commit a real watchlist or a literal private path.
|
|
225
|
+
|
|
226
|
+
## License
|
|
227
|
+
|
|
228
|
+
MIT © Hiroshi Ishizaka (ishizakahiroshi)
|
package/bin/doxguard.exe
ADDED
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ishizakahiroshi/doxguard-win32-arm64",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "doxguard native binary for Windows ARM64",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": { "type": "git", "url": "git+https://github.com/ishizakahiroshi/doxguard.git" },
|
|
7
|
+
"homepage": "https://github.com/ishizakahiroshi/doxguard#readme",
|
|
8
|
+
"author": "Hiroshi Ishizaka (ishizakahiroshi)",
|
|
9
|
+
"os": ["win32"],
|
|
10
|
+
"cpu": ["arm64"],
|
|
11
|
+
"bin": { "doxguard": "bin/doxguard.exe" },
|
|
12
|
+
"files": ["bin/doxguard.exe", "README.md", "LICENSE"]
|
|
13
|
+
}
|