Skip to content

Commit 6e6056d

Browse files
committed
chore: update audit report and technical specifications
- Enhance AUDIT_REPORT.md with package publishing safeguards and npm dry-run details. - Add npm audit and publish dry-run checks to TECHNICAL_SPEC.md. feat: improve package.json configuration - Set sideEffects to false for better tree-shaking. - Include prepack and prepublishOnly scripts for build and verification. - Add publishConfig for public access and registry. docs: add CHANGELOG, CONTRIBUTING, LICENSE, SECURITY, and PUBLISHING documentation - Create CHANGELOG.md to document notable changes. - Establish CONTRIBUTING.md for local setup and development rules. - Add LICENSE file with MIT License terms. - Introduce SECURITY.md for reporting vulnerabilities and security notes. - Create PUBLISHING.md checklist for npm publication and distribution.
1 parent 3b8b2a6 commit 6e6056d

10 files changed

Lines changed: 172 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Changelog
2+
3+
All notable changes to FingerprintJS by BotBlocker are documented here.
4+
5+
## 0.1.0 - 2026-05-14
6+
7+
### Added
8+
9+
- Stable visitor identity with identity/report-only component separation.
10+
- Browser, collector, policy, storage, and server package entry points for ESM and CommonJS.
11+
- Script-tag browser builds with `FingerprintJSBotBlocker` global.
12+
- Bot evidence, private-mode indicators, tamper evidence, and browser capability reporting.
13+
- Replay protection, server-only hash mode, backend verifier, and pluggable network risk adapter.
14+
- Stability/drift monitor and use-case presets for privacy-first, analytics, login risk, checkout risk, bot defense, and fraud defense workflows.
15+
- Explainable report and dense ID analysis report formats.
16+
- Browser demo, debug inspector, Node example, technical spec, audit report, and version policy.
17+
- Full verification gate with build, typecheck, 100% Node coverage, Playwright browser tests, and bundle size check.

CONTRIBUTING.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Contributing
2+
3+
## Local Setup
4+
5+
```bash
6+
npm ci
7+
npm run verify
8+
```
9+
10+
`npm run verify` is the required quality gate before a change is submitted. It builds all package entry points, validates declarations, runs Node tests with 100% coverage, runs Playwright browser tests, and checks the browser bundle size budget.
11+
12+
## Development Rules
13+
14+
- Keep browser runtime code dependency-free.
15+
- Keep server-only verification code out of the browser entry point.
16+
- Do not add volatile or risk-only signals to the default visitor ID hash unless the version policy is updated.
17+
- Prefer adding report-only evidence over changing identity inputs.
18+
- Update TypeScript declarations, docs, tests, and generated `dist/` artifacts when public APIs change.
19+
- Keep examples in English and runnable from a local checkout.
20+
21+
## Release Readiness
22+
23+
Before publishing, run:
24+
25+
```bash
26+
npm run verify
27+
npm pack --dry-run
28+
npm publish --dry-run
29+
```
30+
31+
Review the dry-run file list and confirm that no local-only files are included in the package.

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Yevhen Leonidov
4+
Copyright (c) 2026 BotBlocker
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ The debug inspector in [examples/inspector.html](examples/inspector.html) accept
224224
225225
Additional docs:
226226
227+
- [CHANGELOG.md](CHANGELOG.md)
228+
- [CONTRIBUTING.md](CONTRIBUTING.md)
229+
- [SECURITY.md](SECURITY.md)
227230
- [docs/TECHNICAL_SPEC.md](docs/TECHNICAL_SPEC.md)
228231
- [docs/VERSION_POLICY.md](docs/VERSION_POLICY.md)
229-
- [docs/AUDIT_REPORT.md](docs/AUDIT_REPORT.md)
232+
- [docs/AUDIT_REPORT.md](docs/AUDIT_REPORT.md)
233+
- [docs/PUBLISHING.md](docs/PUBLISHING.md)

SECURITY.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
Security fixes are provided for the latest published minor version of `@botblocker/fingerprintjs`.
6+
7+
## Reporting A Vulnerability
8+
9+
Do not open a public issue for a suspected vulnerability. Report security concerns through the private contact channel published at https://botblocker.top.
10+
11+
Please include:
12+
13+
- affected package version;
14+
- affected runtime or browser;
15+
- minimal reproduction steps;
16+
- expected and observed behavior;
17+
- whether the issue affects client identity, replay protection, server verification, or report integrity.
18+
19+
## Security Notes
20+
21+
FingerprintJS by BotBlocker is a client signal and backend verification SDK. Browser-collected signals are evidence, not proof. Production enforcement should combine client results with backend replay checks, server hash mode, rate limits, account state, and network intelligence.
22+
23+
Replay protection and server hash mode require a private server secret. Do not expose that secret to browser code, client bundles, logs, or analytics events.

dist/browser/fingerprintjs-botblocker.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/AUDIT_REPORT.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ This audit covers FingerprintJS by BotBlocker source code, package metadata, gen
1414
- Browser tests run against Chromium, Firefox, and WebKit through Playwright.
1515
- The minified browser bundle is checked against a 65 KB budget.
1616
- CI runs install, browser setup, and `npm run verify` on push and pull request.
17+
- Package publishing is guarded by `prepack` build and `prepublishOnly` verification scripts.
18+
- npm package dry-run includes only intended package, build, docs, examples, security, license, and release files.
1719

1820
## Current Feature Coverage
1921

@@ -81,7 +83,7 @@ FingerprintJS by BotBlocker is suitable as a client-side signal layer for [BotBl
8183

8284
1. Calibrate bot and private-mode scoring against real product traffic before automated enforcement.
8385
2. Keep the 65 KB bundle budget under review as additional risk signals are added.
84-
3. Add release automation when publishing credentials and release policy are defined.
86+
3. Add release automation with npm provenance when publishing credentials and release policy are defined.
8587
4. Expand browser stability fixtures for product-specific flows and target browser versions.
8688
5. Run a production observation window before changing default identity collector membership.
8789
6. Connect the backend network adapter to a production IP intelligence provider before using proxy/VPN/datacenter evidence for enforcement.

docs/PUBLISHING.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Publishing Checklist
2+
3+
Use this checklist for npm publication and public distribution.
4+
5+
## One-Time Setup
6+
7+
1. Confirm package ownership for the `@botblocker` npm scope.
8+
2. Confirm the public repository URL and add it to `package.json` when available.
9+
3. Configure npm 2FA for publish operations.
10+
4. Prefer publishing from CI with npm provenance enabled when the release workflow is ready.
11+
5. Confirm the security contact channel at https://botblocker.top.
12+
13+
## Pre-Release Checks
14+
15+
```bash
16+
npm ci
17+
npm run verify
18+
npm audit --omit=dev
19+
npm pack --dry-run
20+
npm publish --dry-run
21+
```
22+
23+
Expected quality gate:
24+
25+
- build succeeds;
26+
- TypeScript declarations compile;
27+
- Node coverage is 100% for lines, branches, and functions;
28+
- Playwright tests pass in Chromium, Firefox, and WebKit;
29+
- minified browser bundle stays under the configured budget;
30+
- production dependency audit reports zero vulnerabilities;
31+
- package dry-run includes only intended files.
32+
33+
## Versioning
34+
35+
- Patch release: compatible API and no intentional default identity hash change.
36+
- Minor release: new API, new report-only signals, or documented identity hash changes.
37+
- Major release: breaking API, package export changes, or incompatible result schema changes.
38+
39+
If default identity inputs change, document the migration impact in `CHANGELOG.md` and `docs/VERSION_POLICY.md`.
40+
41+
## Publish
42+
43+
```bash
44+
npm version patch
45+
npm publish --access public
46+
```
47+
48+
Use `minor` or `major` instead of `patch` when the versioning rules require it.
49+
50+
## Post-Release
51+
52+
1. Install the package in a clean temporary project.
53+
2. Test ESM import, CommonJS require, and the `@botblocker/fingerprintjs/server` subpath.
54+
3. Download the browser bundle from the published package and run the browser demo.
55+
4. Tag the release in git and attach a short release note based on `CHANGELOG.md`.

docs/TECHNICAL_SPEC.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,4 +285,6 @@ Recommended backend payload:
285285
- TypeScript declaration validation;
286286
- Node tests with 100% line, branch, and function coverage for `src/**/*.js`;
287287
- Playwright tests in Chromium, Firefox, and WebKit;
288-
- minified browser bundle size check under 65 KB.
288+
- minified browser bundle size check under 65 KB.
289+
290+
Release readiness additionally uses `npm audit --omit=dev`, `npm pack --dry-run`, and `npm publish --dry-run`.

package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"productName": "FingerprintJS by BotBlocker",
66
"type": "module",
77
"license": "MIT",
8+
"sideEffects": false,
89
"main": "./dist/index.cjs",
910
"module": "./dist/index.mjs",
1011
"types": "./dist/index.d.ts",
@@ -39,14 +40,24 @@
3940
"./package.json": "./package.json"
4041
},
4142
"files": [
43+
"CHANGELOG.md",
44+
"CONTRIBUTING.md",
4245
"dist/",
4346
"docs/",
4447
"examples/",
48+
"LICENSE",
49+
"SECURITY.md",
4550
"README.md"
4651
],
52+
"publishConfig": {
53+
"access": "public",
54+
"registry": "https://registry.npmjs.org/"
55+
},
4756
"scripts": {
4857
"clean": "node scripts/clean.mjs",
4958
"build": "node scripts/build.mjs",
59+
"prepack": "npm run build",
60+
"prepublishOnly": "npm run verify",
5061
"test": "node --test tests/*.test.mjs",
5162
"test:browser": "playwright test",
5263
"test:coverage": "node --test --experimental-test-coverage --test-coverage-include=\"src/**/*.js\" --test-coverage-lines=100 --test-coverage-branches=100 --test-coverage-functions=100 tests/*.test.mjs",

0 commit comments

Comments
 (0)