attest-it 0.0.1
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/README.md +124 -0
- package/dist/bin/attest-it.js +6 -0
- package/dist/bin/attest-it.js.map +1 -0
- package/dist/index.cjs +14 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/package.json +59 -0
package/README.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# attest-it
|
|
2
|
+
|
|
3
|
+
Human-gated test attestation system with cryptographic signing.
|
|
4
|
+
|
|
5
|
+
## Why attest-it?
|
|
6
|
+
|
|
7
|
+
Some tests can't run in CI:
|
|
8
|
+
|
|
9
|
+
- Tests requiring desktop applications (Cursor, VS Code)
|
|
10
|
+
- Tests requiring OAuth flows with real browsers
|
|
11
|
+
- Tests requiring AI assistants (Claude Code, GitHub Copilot)
|
|
12
|
+
- Tests requiring human verification of visual correctness
|
|
13
|
+
|
|
14
|
+
These tests still need to be on the critical path. `attest-it` enforces that a human ran them by requiring cryptographically signed attestations.
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install attest-it
|
|
20
|
+
# or
|
|
21
|
+
pnpm add attest-it
|
|
22
|
+
# or
|
|
23
|
+
yarn add attest-it
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Quick Start
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Initialize configuration
|
|
30
|
+
npx attest-it init
|
|
31
|
+
|
|
32
|
+
# Generate signing keys
|
|
33
|
+
npx attest-it keygen
|
|
34
|
+
|
|
35
|
+
# Run tests and create attestation
|
|
36
|
+
npx attest-it run --suite my-suite
|
|
37
|
+
|
|
38
|
+
# Verify attestations (in CI)
|
|
39
|
+
npx attest-it verify
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Package Contents
|
|
43
|
+
|
|
44
|
+
This umbrella package includes:
|
|
45
|
+
|
|
46
|
+
- **CLI**: Full command-line interface (`npx attest-it <command>`)
|
|
47
|
+
- **Core API**: Programmatic access to all functionality via `@attest-it/core`
|
|
48
|
+
|
|
49
|
+
### CLI Commands
|
|
50
|
+
|
|
51
|
+
| Command | Description |
|
|
52
|
+
| -------- | -------------------------------- |
|
|
53
|
+
| `init` | Initialize configuration |
|
|
54
|
+
| `keygen` | Generate signing keypair |
|
|
55
|
+
| `status` | Show attestation status |
|
|
56
|
+
| `run` | Run tests and create attestation |
|
|
57
|
+
| `verify` | Verify attestations (for CI) |
|
|
58
|
+
| `prune` | Remove stale attestations |
|
|
59
|
+
|
|
60
|
+
### Programmatic API
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
import { loadConfig, computeFingerprint, verifyAttestations, generateKeyPair } from 'attest-it'
|
|
64
|
+
|
|
65
|
+
// Load configuration
|
|
66
|
+
const config = await loadConfig('.attest-it/config.yaml')
|
|
67
|
+
|
|
68
|
+
// Compute fingerprint for a suite
|
|
69
|
+
const result = await computeFingerprint({
|
|
70
|
+
packages: config.suites['my-suite'].packages,
|
|
71
|
+
basedir: process.cwd(),
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
// Verify all attestations
|
|
75
|
+
const verification = await verifyAttestations({
|
|
76
|
+
config,
|
|
77
|
+
repoRoot: process.cwd(),
|
|
78
|
+
})
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Configuration
|
|
82
|
+
|
|
83
|
+
Create `.attest-it/config.yaml`:
|
|
84
|
+
|
|
85
|
+
```yaml
|
|
86
|
+
version: 1
|
|
87
|
+
|
|
88
|
+
settings:
|
|
89
|
+
maxAgeDays: 30
|
|
90
|
+
algorithm: ed25519
|
|
91
|
+
publicKeyPath: .attest-it/pubkey.pem
|
|
92
|
+
attestationsPath: .attest-it/attestations.json
|
|
93
|
+
|
|
94
|
+
suites:
|
|
95
|
+
desktop-tests:
|
|
96
|
+
description: Tests requiring desktop application
|
|
97
|
+
packages:
|
|
98
|
+
- packages/my-app
|
|
99
|
+
command: pnpm vitest --project desktop
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Documentation
|
|
103
|
+
|
|
104
|
+
- [Getting Started](../../docs/getting-started.md) - Complete setup guide
|
|
105
|
+
- [Configuration](../../docs/configuration.md) - All configuration options
|
|
106
|
+
- [GitHub Integration](../../docs/github-integration.md) - CI setup
|
|
107
|
+
- [API Documentation](../../docs/api/attest-it.md) - Full API reference
|
|
108
|
+
|
|
109
|
+
## Related Packages
|
|
110
|
+
|
|
111
|
+
| Package | Description |
|
|
112
|
+
| -------------------------- | ----------------------------- |
|
|
113
|
+
| `@attest-it/core` | Core library (included) |
|
|
114
|
+
| `@attest-it/cli` | CLI implementation (included) |
|
|
115
|
+
| `@attest-it/github-action` | GitHub Actions integration |
|
|
116
|
+
|
|
117
|
+
## Requirements
|
|
118
|
+
|
|
119
|
+
- Node.js 20+
|
|
120
|
+
- OpenSSL (for key generation and signing)
|
|
121
|
+
|
|
122
|
+
## License
|
|
123
|
+
|
|
124
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../bin/attest-it.ts"],"names":[],"mappings":";;;AAEA,GAAA,EAAI","file":"attest-it.js","sourcesContent":["import { run } from '@attest-it/cli'\n\nrun()\n"]}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@attest-it/core');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.keys(core).forEach(function (k) {
|
|
8
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return core[k]; }
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=index.cjs.map
|
|
14
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs","sourcesContent":[]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@attest-it/core';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@attest-it/core';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js","sourcesContent":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "attest-it",
|
|
3
|
+
"description": "Human-gated test attestation system with cryptographic signing",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"author": "Mike North <michael.l.north@gmail.com>",
|
|
6
|
+
"bin": {
|
|
7
|
+
"attest-it": "./dist/bin/attest-it.js"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@attest-it/cli": "workspace:*",
|
|
11
|
+
"@attest-it/core": "workspace:*"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@microsoft/api-extractor": "^7.55.2",
|
|
15
|
+
"@types/node": "~22.19.3",
|
|
16
|
+
"tsup": "^8.3.5",
|
|
17
|
+
"typescript": "5.8.3"
|
|
18
|
+
},
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=20.0.0"
|
|
21
|
+
},
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"import": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"default": "./dist/index.js"
|
|
27
|
+
},
|
|
28
|
+
"require": {
|
|
29
|
+
"types": "./dist/index.d.cts",
|
|
30
|
+
"default": "./dist/index.cjs"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist"
|
|
36
|
+
],
|
|
37
|
+
"keywords": [
|
|
38
|
+
"attestation",
|
|
39
|
+
"ci",
|
|
40
|
+
"cryptographic-signing",
|
|
41
|
+
"human-in-the-loop",
|
|
42
|
+
"testing",
|
|
43
|
+
"verification"
|
|
44
|
+
],
|
|
45
|
+
"license": "MIT",
|
|
46
|
+
"main": "./dist/index.js",
|
|
47
|
+
"repository": "attest-it/attest-it",
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "tsup && declaration-file-normalizer dist/index.d.ts",
|
|
50
|
+
"check": "pnpm run check:api-report && pnpm run check:eslint && pnpm run check:types",
|
|
51
|
+
"check:api-report": "api-extractor run",
|
|
52
|
+
"check:eslint": "eslint src bin",
|
|
53
|
+
"check:types": "tsc --noEmit",
|
|
54
|
+
"generate:api-report": "api-extractor run --local",
|
|
55
|
+
"prepublishOnly": "pnpm run build"
|
|
56
|
+
},
|
|
57
|
+
"type": "module",
|
|
58
|
+
"types": "./dist/index.d.ts"
|
|
59
|
+
}
|