@ashishjain15491/tapcheck 0.1.0 → 0.1.2
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/CHANGELOG.md +29 -5
- package/README.md +131 -184
- package/dist/auth.js +1 -1
- package/dist/coverage.js +1 -1
- package/dist/routes.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.2 (2026-11-25)
|
|
4
|
+
|
|
5
|
+
- **GitHub Marketplace.** The Action is named "tapcheck audit", since the Marketplace needs a name no GitHub account
|
|
6
|
+
uses. It is still used as `ashishjain15491/tapcheck@<tag>`.
|
|
7
|
+
- **Escaping fixes** (from CodeQL). A backslash in a coverage row no longer breaks its `COVERAGE.md` table cell, and a
|
|
8
|
+
`login.form` field name with a backslash in it finds its field.
|
|
9
|
+
|
|
10
|
+
## 0.1.1 (2026-11-25)
|
|
11
|
+
|
|
12
|
+
No change to what tapcheck checks or how it runs.
|
|
13
|
+
|
|
14
|
+
- **README and logo.** A shorter README in the usual layout, with the tapcheck logo (light and dark), a report
|
|
15
|
+
screenshot and badges, and setup steps for each way to run it: writing `tapcheck.yml`, the Jev key, sign-in
|
|
16
|
+
variables, then the plugin, npm, the Action and Docker. The logo kit and the social preview are in `assets/`; the
|
|
17
|
+
Codex plugin and the Action use the brand colour.
|
|
18
|
+
- **GitHub Marketplace.** The Action's description fits the Marketplace's 125 characters.
|
|
19
|
+
- **Action.** It runs on the current `actions/setup-node` and `actions/upload-artifact` (v7).
|
|
20
|
+
- **Releases from GitHub.** `.github/workflows/publish.yml` publishes to npm when a release is published, through npm
|
|
21
|
+
trusted publishing with provenance; the release steps are in `CONTRIBUTING.md`.
|
|
22
|
+
- **Repository.** Dependabot updates, a security policy, issue forms, a pull request template and a code of conduct.
|
|
23
|
+
|
|
3
24
|
## 0.1.0 (2026-11-25)
|
|
4
25
|
|
|
5
|
-
The first release: on npm as `@ashishjain15491/tapcheck` (the CLI is still `tapcheck`), and as the GitHub Action
|
|
26
|
+
The first release: on npm as `@ashishjain15491/tapcheck` (the CLI is still `tapcheck`), and as the GitHub Action
|
|
27
|
+
`ashishjain15491/tapcheck@v0.1.0`.
|
|
6
28
|
|
|
7
29
|
- **Core harness.** One `tapcheck.yml` describes the app: how to start, stop and reset it, its sides and how each
|
|
8
30
|
signs in (`none`, `manual`, `form` with optional TOTP, `command`), screens, tasks and viewports. `$NAME` values come
|
|
@@ -49,9 +71,10 @@ The first release: on npm as `@ashishjain15491/tapcheck` (the CLI is still `tapc
|
|
|
49
71
|
only pages it actually crawled count toward `crawl.max` (a long route list used to crowd the links out). The
|
|
50
72
|
signed-out check follows redirects, so `/` → `/admin` → `/login` counts as refused. A CSRF token cookie
|
|
51
73
|
(`XSRF-TOKEN`, `csrftoken`) may be readable by script. The CSRF probe goes to the sides that sign in (every side
|
|
52
|
-
when none does), and a side can have its own `csrf`. Flows get `t.note(name, detail, 'warn' | 'info')` and a
|
|
53
|
-
|
|
54
|
-
`
|
|
74
|
+
when none does), and a side can have its own `csrf`. Flows get `t.note(name, detail, 'warn' | 'info')` and a
|
|
75
|
+
`timeout` (default 3600 s), so a flow that hangs fails instead of stalling the run. A step that returns
|
|
76
|
+
`{ warn: '…' }` is recorded as a warning, and `t.mail` has `count()` and `all()`, with each message's `id` and
|
|
77
|
+
`headers` (for checks such as List-Unsubscribe on every email of a send).
|
|
55
78
|
`t.jev()` waits for the page to settle and looks again when the page reloads under it. The crawl takes a link to a
|
|
56
79
|
file (a PDF download) for what it is, not a page that answered 0, and a signed-out side skips the routes the list
|
|
57
80
|
marks `auth`. Stopping the app stops what `app.start` left running in the background too, and `app.stop` runs only
|
|
@@ -68,7 +91,8 @@ The first release: on npm as `@ashishjain15491/tapcheck` (the CLI is still `tapc
|
|
|
68
91
|
answer's status and skips refused ones; Mailpit and stub calls give up after 30 s or at the timeout;
|
|
69
92
|
`t.mail.all({ limit })`; a form POST with `_method` is reached as that method.
|
|
70
93
|
`browser.args` passes extra switches to the run's Chromium (an app on localhost whose sandboxed preview frames load
|
|
71
|
-
its own files needs `--disable-features=LocalNetworkAccessChecks`). A side whose sign-in fails says so in the
|
|
94
|
+
its own files needs `--disable-features=LocalNetworkAccessChecks`). A side whose sign-in fails says so in the
|
|
95
|
+
terminal, not only in the report.
|
|
72
96
|
Waiting for a page to settle is capped outside the page, so a page whose own timers never fire (one
|
|
73
97
|
sandboxed by its CSP without `allow-scripts`, such as an email preview) can't hang the run.
|
|
74
98
|
`t.page({ viewport: 'mobile' })` hands a flow a page at any of the config's viewports (the first one by default), so
|
package/README.md
CHANGED
|
@@ -1,244 +1,191 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ashishjain15491/tapcheck/main/assets/tapcheck-primary-dark.svg">
|
|
4
|
+
<img alt="tapcheck" src="https://raw.githubusercontent.com/ashishjain15491/tapcheck/main/assets/tapcheck-primary.svg" width="360">
|
|
5
|
+
</picture>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p align="center">
|
|
9
|
+
<a href="https://www.npmjs.com/package/@ashishjain15491/tapcheck"><img alt="npm" src="https://img.shields.io/npm/v/@ashishjain15491/tapcheck"></a>
|
|
10
|
+
<a href="https://github.com/ashishjain15491/tapcheck/actions/workflows/ci.yml"><img alt="ci" src="https://github.com/ashishjain15491/tapcheck/actions/workflows/ci.yml/badge.svg"></a>
|
|
11
|
+
<a href="https://github.com/ashishjain15491/tapcheck/blob/main/LICENSE"><img alt="license" src="https://img.shields.io/github/license/ashishjain15491/tapcheck"></a>
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
End-to-end and UI audit for any web app, whatever its language or stack. tapcheck drives the running app in a real
|
|
4
15
|
browser, measures what code can measure, and asks Jev to judge what needs a human eye. One file, `tapcheck.yml`,
|
|
5
16
|
describes the app; one run writes one report.
|
|
6
17
|
|
|
7
|
-
Status: **0.1.0.** It runs from a checkout, as a plugin, from npm (`npx @ashishjain15491/tapcheck@0.1.0`), as the GitHub Action
|
|
8
|
-
(`ashishjain15491/tapcheck@v0.1.0`) and as a Docker image you build from the checkout.
|
|
9
|
-
|
|
10
18
|
## What it checks
|
|
11
19
|
|
|
12
|
-
Every suite runs once per side (each kind of person who sees a different app: `public`, `customer`, `admin`).
|
|
13
|
-
|
|
14
20
|
| Suite | Judged by | What it reports |
|
|
15
21
|
|---|---|---|
|
|
16
|
-
| `crawl` | code |
|
|
17
|
-
| `contract` | code | API calls
|
|
18
|
-
| `security` | code | missing
|
|
19
|
-
| `a11y` | code | axe-core WCAG 2.2 A/AA violations
|
|
20
|
-
| `interact` | code | every safe control
|
|
21
|
-
| `audit` | code
|
|
22
|
-
| `code` | code | your own linters
|
|
22
|
+
| `crawl` | code | 4xx/5xx and slow pages, console errors, broken images and links, unlabelled fields |
|
|
23
|
+
| `contract` | code | failing or slow API calls, unparsable JSON, responses that changed shape |
|
|
24
|
+
| `security` | code | missing headers, weak cookie flags, pages open when signed out, CSRF, leaked secrets |
|
|
25
|
+
| `a11y` | code | axe-core WCAG 2.2 A/AA violations, keyboard focus, page language |
|
|
26
|
+
| `interact` | code | clicks every safe control: errors, controls that do nothing, broken dialogs and tables |
|
|
27
|
+
| `audit` | code and Jev | the UI on desktop, dark mode, tablet and phone; inconsistent components and design tokens |
|
|
28
|
+
| `code` | code | your own linters and checks (`gates:`) |
|
|
23
29
|
| `flow-<name>` | code | your own journeys (`flows:`), one finding per step |
|
|
24
|
-
| `ux` | Jev | visual QA
|
|
25
|
-
| `usability` | Jev | a simulated first-time user tries each task
|
|
30
|
+
| `ux` | Jev | visual QA, design, usability heuristics, a five-second test |
|
|
31
|
+
| `usability` | Jev | a simulated first-time user tries each task |
|
|
26
32
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
everything else runs.
|
|
33
|
+
Each suite runs once per side (`public`, `customer`, `admin`: each kind of person who sees a different app). Jev answers
|
|
34
|
+
with probabilities and code decides: a clear answer passes or fails, an unsure one is a warning. Without a Jev key the
|
|
35
|
+
Jev parts are skipped and everything else runs.
|
|
30
36
|
|
|
31
|
-
##
|
|
37
|
+
## Install
|
|
32
38
|
|
|
33
|
-
|
|
34
|
-
variables (`ONLY=a11y`, `SKIP=jev`, `CHANGED=1`, `CHANGED=origin/main`, `PARALLEL=4`, `JEV=off`, `LIST=1`; the full list is in
|
|
35
|
-
[CONFIG.md](skills/tapcheck-setup/references/CONFIG.md#environment-variables-for-a-run)).
|
|
39
|
+
Pick one. Each runs the same CLI.
|
|
36
40
|
|
|
37
|
-
|
|
41
|
+
**Claude Code or Codex plugin.** Three skills set tapcheck up for your app, run it and fix what it finds. In Claude
|
|
42
|
+
Code:
|
|
38
43
|
|
|
39
44
|
```
|
|
40
|
-
/plugin
|
|
41
|
-
|
|
45
|
+
/plugin marketplace add ashishjain15491/tapcheck
|
|
46
|
+
/plugin install tapcheck@tapcheck
|
|
42
47
|
```
|
|
43
48
|
|
|
44
|
-
|
|
45
|
-
("Set up tapcheck for this app"); **tapcheck-run** picks the parts, runs them and reports ("Run tapcheck on what I
|
|
46
|
-
changed"); **tapcheck-fix** fixes failing findings in your code and reruns each part until it passes, without
|
|
47
|
-
loosening any check ("Fix the tapcheck failures"). They call `bin/tapcheck` in the plugin's own folder (Node.js 23.6
|
|
48
|
-
or newer; the first run installs its dependencies and Chromium). Any other agent can follow the same files: see
|
|
49
|
-
[AGENTS.md](AGENTS.md).
|
|
50
|
-
|
|
51
|
-
### 2. From npm
|
|
49
|
+
In Codex:
|
|
52
50
|
|
|
53
51
|
```bash
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
npx tapcheck # in the folder with tapcheck.yml
|
|
52
|
+
codex plugin marketplace add ashishjain15491/tapcheck
|
|
53
|
+
codex plugin add tapcheck@tapcheck
|
|
57
54
|
```
|
|
58
55
|
|
|
59
|
-
|
|
56
|
+
Any other agent can follow the same steps from [AGENTS.md](AGENTS.md). The plugin needs Node.js 23.6 or newer; its
|
|
57
|
+
first run installs its own dependencies and Chromium.
|
|
58
|
+
|
|
59
|
+
**npm.** Node.js 22.18 or newer:
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
npm install --save-dev tapcheck@npm:@ashishjain15491/tapcheck
|
|
63
|
+
npx playwright install chromium # once
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
Or run it without installing: `npx @ashishjain15491/tapcheck@0.1.2`.
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
- **The app runs on the same machine, macOS or Windows:** `--network host` doesn't reach the host there. Use
|
|
70
|
-
`baseUrl: http://host.docker.internal:<port>` and no `--network` flag.
|
|
71
|
-
- **The app starts inside the container:** only when `app.start` needs nothing but Node.js or Python 3 (a static
|
|
72
|
-
site, as in `examples/static-site`).
|
|
68
|
+
**GitHub Action** and **Docker**: see [Run it](#3-run-it) below.
|
|
73
69
|
|
|
74
|
-
|
|
75
|
-
app already answers). A `stub:` listens inside the container, so an app on the host reaches it only with
|
|
76
|
-
`--network host`. Options go in with `-e`: `docker run --rm -e ONLY=a11y -e TYPESAFE_API_KEY …`.
|
|
70
|
+
## Set up
|
|
77
71
|
|
|
78
|
-
###
|
|
72
|
+
### 1. Write tapcheck.yml
|
|
79
73
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
steps:
|
|
85
|
-
- uses: actions/checkout@v4
|
|
86
|
-
# …install what app.start needs (your language, dependencies, a test database)…
|
|
87
|
-
- uses: ashishjain15491/tapcheck@v0.1.0
|
|
88
|
-
with:
|
|
89
|
-
skip: flow # optional; also: config, only, changed, jev-budget, working-directory, node-version
|
|
90
|
-
env:
|
|
91
|
-
TYPESAFE_API_KEY: ${{ secrets.TYPESAFE_API_KEY }} # optional; without it the Jev suites are skipped
|
|
92
|
-
```
|
|
74
|
+
**With the plugin**, ask your agent to *"Set up tapcheck for this app"*. The `tapcheck-setup` skill detects the
|
|
75
|
+
stack, writes `tapcheck.yml` (how to start the app, who signs in, the screens and tasks that matter, your linters as
|
|
76
|
+
gates), adds `.tapcheck/` and `.env` to `.gitignore`, and gets a first run through. It tells you which variables to
|
|
77
|
+
set; it never asks for a password or key in chat.
|
|
93
78
|
|
|
94
|
-
|
|
95
|
-
the artifact `tapcheck-report`, and fails the step when a check fails. It doesn't comment on the pull request: that
|
|
96
|
-
needs write permissions, and the summary and artifact need none. `changed: true` needs `.tapcheck/state.json` from
|
|
97
|
-
an earlier run (restore it with `actions/cache`) and a checkout with history. `changed: base` is QA for one pull
|
|
98
|
-
request: it runs only the parts whose files (by `changes:` in `tapcheck.yml`) the pull request changed, compared with
|
|
99
|
-
its base branch, and needs `actions/checkout` with `fetch-depth: 0`. Locally the same is
|
|
100
|
-
`gh pr checkout <number> && CHANGED=origin/main tapcheck`. Inputs are described in [action.yml](action.yml).
|
|
101
|
-
|
|
102
|
-
## A minimal tapcheck.yml
|
|
79
|
+
**By hand**, put `tapcheck.yml` in the project root. Only `baseUrl` is required:
|
|
103
80
|
|
|
104
81
|
```yaml
|
|
105
|
-
# yaml-language-server: $schema=https://raw.githubusercontent.com/ashishjain15491/tapcheck/main/schema/tapcheck.schema.json
|
|
106
82
|
baseUrl: http://127.0.0.1:8000
|
|
107
83
|
app:
|
|
108
84
|
start: npm start # skipped when the app already answers; stopped after the run
|
|
109
85
|
audience: a shop owner who is not technical
|
|
110
|
-
screens:
|
|
86
|
+
screens: # what Jev looks at; the crawl finds the rest
|
|
111
87
|
- { name: Home, path: /, purpose: see what the shop sells }
|
|
112
|
-
tasks:
|
|
88
|
+
tasks: # what the simulated first-time user tries
|
|
113
89
|
- name: Find the opening hours
|
|
114
90
|
from: /
|
|
115
91
|
goal: Find when the shop is open on Saturday.
|
|
116
92
|
done: A page showing the opening hours is open.
|
|
117
93
|
notDone: It shows the home page, another page, or an error.
|
|
118
|
-
optimal: 1
|
|
94
|
+
optimal: 1 # the fewest clicks that reach it
|
|
119
95
|
```
|
|
120
96
|
|
|
121
|
-
|
|
122
|
-
[
|
|
123
|
-
|
|
124
|
-
|
|
97
|
+
Then add `.tapcheck/` (reports, screenshots, signed-in sessions) and `.env` to `.gitignore`. Every key is in
|
|
98
|
+
[CONFIG.md](skills/tapcheck-setup/references/CONFIG.md), with
|
|
99
|
+
[recipes per stack](skills/tapcheck-setup/references/stacks) (Laravel, Django, Rails, Express and Next.js, Go, static
|
|
100
|
+
sites) and a [working example](examples/static-site).
|
|
125
101
|
|
|
126
|
-
-
|
|
127
|
-
|
|
128
|
-
[Laravel](skills/tapcheck-setup/references/stacks/LARAVEL.md),
|
|
129
|
-
[Django](skills/tapcheck-setup/references/stacks/DJANGO.md),
|
|
130
|
-
[Rails](skills/tapcheck-setup/references/stacks/RAILS.md),
|
|
131
|
-
[Express and Next.js](skills/tapcheck-setup/references/stacks/EXPRESS-NEXT.md),
|
|
132
|
-
[Go](skills/tapcheck-setup/references/stacks/GO.md),
|
|
133
|
-
[static sites](skills/tapcheck-setup/references/stacks/STATIC.md).
|
|
134
|
-
- A working example with gates, routes, a stub and a flow: [examples/static-site](examples/static-site).
|
|
102
|
+
**Signed-in pages.** Give each kind of user a side with a `login`, and keep credentials out of the file: write
|
|
103
|
+
`$NAME` and set the variable when you run. A missing one stops the run.
|
|
135
104
|
|
|
136
|
-
|
|
105
|
+
```yaml
|
|
106
|
+
sides:
|
|
107
|
+
public: {}
|
|
108
|
+
customer:
|
|
109
|
+
login:
|
|
110
|
+
form: { url: /login, fields: { email: $TAPCHECK_EMAIL, password: $TAPCHECK_PASSWORD } }
|
|
111
|
+
```
|
|
137
112
|
|
|
138
|
-
|
|
113
|
+
### 2. Add the Jev key (optional)
|
|
139
114
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
`crawl.json`, `network.json`, `axe.json`, `interact.json`, `audit.json`, `clickstream.json`, `hits.json`, `payloads.json`). Exit code 0: no failing check; 1: at
|
|
143
|
-
least one; 2: the run couldn't start (a config mistake, the app not answering, Chromium missing).
|
|
115
|
+
`ux`, `usability` and `audit`'s look at each screen ask Jev, a paid model from [TypeSafe](https://docs.typesafe.ai).
|
|
116
|
+
Without a key those are skipped and everything else runs. With one:
|
|
144
117
|
|
|
145
|
-
|
|
118
|
+
| Where you run | Put the key |
|
|
119
|
+
|---|---|
|
|
120
|
+
| your machine, the plugin or npm | `TYPESAFE_API_KEY=…` in `.env` next to `tapcheck.yml` (git-ignored), or `export TYPESAFE_API_KEY=…` |
|
|
121
|
+
| GitHub Actions | a repository secret `TYPESAFE_API_KEY`, passed as `env:` on the step (below) |
|
|
122
|
+
| Docker | `-e TYPESAFE_API_KEY` on `docker run`, with the variable set in your shell |
|
|
146
123
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
- `RECORD=1` keeps a video and a Playwright trace of every browser context (suites and flows) under the side's
|
|
150
|
-
`videos/` and `traces/`; the report links them. Open a trace with `npx playwright show-trace <file>`. Off by default,
|
|
151
|
-
to keep runs light.
|
|
152
|
-
- `COVERAGE=1 tapcheck` runs nothing: it merges the `hits.json` of every run so far into `COVERAGE.md` next to
|
|
153
|
-
`tapcheck.yml` (`coverage.file`), each route of `routes:` with the part or flow step that reached it or **GAP**, plus
|
|
154
|
-
the dialogs and table controls seen. `coverage.reasons: [{match, why}]` marks the gaps that are there on purpose.
|
|
124
|
+
A run stops asking once it has spent `jev.budget` US dollars (default 1; `JEV_BUDGET=0.25` for one run), and
|
|
125
|
+
`JEV=off` turns Jev off. Only the key is read from `.env`; sign-in variables come from the environment.
|
|
155
126
|
|
|
156
|
-
|
|
127
|
+
### 3. Run it
|
|
128
|
+
|
|
129
|
+
**Plugin:** ask *"Run tapcheck on what I changed"*, or *"Fix the tapcheck failures"* to have it fix your code and
|
|
130
|
+
rerun until each check passes.
|
|
131
|
+
|
|
132
|
+
**npm:** from the folder with `tapcheck.yml`:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
npx tapcheck # everything
|
|
136
|
+
ONLY=a11y,security npx tapcheck # some parts
|
|
137
|
+
CHANGED=origin/main npx tapcheck # only what this branch changed
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**GitHub Action:** the job has to install what `app.start` needs first. It adds the report to the job summary,
|
|
141
|
+
uploads the run folder and fails the step when a check fails; inputs are in [action.yml](action.yml).
|
|
157
142
|
|
|
158
143
|
```yaml
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
#
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
flows: tests/tapcheck/*.ts
|
|
178
|
-
mail: { mailpit: http://127.0.0.1:8025 } # for t.mail in flows
|
|
179
|
-
|
|
180
|
-
# Interact and audit: how far they go, and the design tokens the audit holds computed styles to.
|
|
181
|
-
interact: { max: 40, submit: false } # submit: true also sends valid input in dialog forms: throwaway database only
|
|
182
|
-
audit: { max: 0, skip: "/(editor|canvas)(/|$)" } # max: crawled pages audited on top of the screens
|
|
183
|
-
design: { colors: ["#1f2937", "#ffffff"], fonts: [Inter], radii: [0, 4, 8], spacing: [4, 8, 16, 24] }
|
|
144
|
+
- uses: actions/checkout@v4
|
|
145
|
+
with: { fetch-depth: 0 } # for changed: base
|
|
146
|
+
# …install your app's language, dependencies and a test database…
|
|
147
|
+
- uses: ashishjain15491/tapcheck@v0.1.2
|
|
148
|
+
with:
|
|
149
|
+
changed: base # optional: only what the pull request changed
|
|
150
|
+
env:
|
|
151
|
+
TYPESAFE_API_KEY: ${{ secrets.TYPESAFE_API_KEY }} # optional
|
|
152
|
+
TAPCHECK_EMAIL: ${{ secrets.TAPCHECK_EMAIL }} # whatever your tapcheck.yml asks for
|
|
153
|
+
TAPCHECK_PASSWORD: ${{ secrets.TAPCHECK_PASSWORD }}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Docker:** the image has Node.js, Chromium and tapcheck but not your app's runtime, so start the app outside it and
|
|
157
|
+
point `baseUrl` at `host.docker.internal` (macOS, Windows) or add `--network host` (Linux):
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
git clone https://github.com/ashishjain15491/tapcheck && docker build -t tapcheck tapcheck
|
|
161
|
+
docker run --rm --ipc=host -e TYPESAFE_API_KEY -v "$PWD:/work" -w /work tapcheck
|
|
184
162
|
```
|
|
185
163
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
- **Audit** checks the configured screens. With `design:`, a computed colour, font, radius or spacing that isn't one
|
|
203
|
-
of the tokens is a warning, the most used first; a list you leave out isn't checked.
|
|
204
|
-
|
|
205
|
-
## Jev: the key, the budget, and what is sent
|
|
206
|
-
|
|
207
|
-
`ux` and `usability` ask Jev, a paid model from TypeSafe, and `audit` asks it to look at each screen and each menu
|
|
208
|
-
or dialog it opens. Put `TYPESAFE_API_KEY` in the environment, or in a `.env` file next to `tapcheck.yml`
|
|
209
|
-
(git-ignored). `JEV=off`, or no key, skips both suites and `audit`'s looks (its measured checks still run).
|
|
210
|
-
|
|
211
|
-
- **Budget:** a run stops asking once it has spent `jev.budget` US dollars (default 1); `JEV_BUDGET=0.25` sets it
|
|
212
|
-
for one run. The part that reaches it stops with a failing "suite ran to the end" finding, the Jev parts after it
|
|
213
|
-
are listed as skipped in the report, and the run exits 1, since not every check ran; the measured parts still run.
|
|
214
|
-
The budget is checked before each request, so a run can go over it by the cost of one request. The spend is
|
|
215
|
-
printed at the end.
|
|
216
|
-
- **What goes to TypeSafe:** screenshots of the screens and task steps you configured and of the menus and dialogs
|
|
217
|
-
`audit` opens on them, and with them the text of the
|
|
218
|
-
questions: the screen's name and `purpose`, your `audience`, each task's `goal`, `done` and `notDone`, and the
|
|
219
|
-
labels of the controls visible on the page. Nothing else: no page source, cookies, sessions, request bodies or
|
|
220
|
-
environment variables. `payloads.json` in the run folder holds every request as sent (images as file paths).
|
|
221
|
-
- Screenshots show whatever the signed-in test user sees, so run against test data, not real customers' data.
|
|
164
|
+
Options are environment variables (`ONLY`, `SKIP`, `CHANGED`, `PARALLEL=4` for flows at once, `LIST=1` to list the
|
|
165
|
+
parts); the full list is in [CONFIG.md](skills/tapcheck-setup/references/CONFIG.md#environment-variables-for-a-run).
|
|
166
|
+
|
|
167
|
+
## Output
|
|
168
|
+
|
|
169
|
+
<img alt="A tapcheck report: one card per suite, then each finding with its evidence" src="https://raw.githubusercontent.com/ashishjain15491/tapcheck/main/assets/report.png">
|
|
170
|
+
|
|
171
|
+
Each run writes `.tapcheck/run-<time>/` (git-ignore it): `report.html`, `REPORT.md` for a pull request,
|
|
172
|
+
`findings.json` for tools and agents, and the screenshots and evidence. The exit code is 0 when no check fails, 1 when
|
|
173
|
+
one does, and 2 when the run couldn't start.
|
|
174
|
+
|
|
175
|
+
## Jev and your data
|
|
176
|
+
|
|
177
|
+
Jev is sent screenshots of the configured screens, tasks, menus and dialogs, with the screen names, purposes, tasks and
|
|
178
|
+
visible control labels. No page source, cookies, sessions or environment variables. `payloads.json` in the run folder
|
|
179
|
+
holds every request as sent. Run against test data, since screenshots show whatever the test user sees.
|
|
222
180
|
|
|
223
181
|
## Safety
|
|
224
182
|
|
|
225
|
-
- The built-in suites only read
|
|
226
|
-
|
|
227
|
-
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
test data. `interact.submit: true` goes further: dialog forms are submitted with invalid and then valid input,
|
|
231
|
-
which changes data. Like `app.reset` it is for a throwaway database, and it is ignored unless the app is local
|
|
232
|
-
(or `app.allowRemoteReset` is set).
|
|
233
|
-
- **Flows may change data.** They are your code and click what you tell them to: run them against a copy you can
|
|
234
|
-
reset, or leave them out with `SKIP=flow`.
|
|
235
|
-
- `RESET=1` runs `app.reset` first, and refuses unless `baseUrl` is `localhost`, `127.0.0.1`, `*.localhost` or
|
|
236
|
-
`*.test` (`app.allowRemoteReset: true` lifts that, for a remote throwaway copy only). With
|
|
237
|
-
`app.resetWhen: ["database/**"]` the reset also runs by itself, under the same rule, when a matching file changed
|
|
238
|
-
since the last reset (and on first use); it needs git.
|
|
239
|
-
- `RECORD=1` videos and traces show everything on screen, test data included: share them as carefully as screenshots.
|
|
240
|
-
- Signed-in sessions are saved under `out`; keep that folder out of git and out of artifacts you share.
|
|
183
|
+
- The built-in suites only read, except `interact`, which clicks controls but never one labelled delete, send, pay,
|
|
184
|
+
sign out and the like, nor a form's submit. Run it against test data.
|
|
185
|
+
- Flows are your own code and may change data; leave them out with `SKIP=flow`.
|
|
186
|
+
- `RESET=1` (`app.reset`) and `interact.submit: true` only run when the app is local.
|
|
187
|
+
- Signed-in sessions are saved under `.tapcheck`; keep it out of git and shared artifacts.
|
|
241
188
|
|
|
242
189
|
## Contributing
|
|
243
190
|
|
|
244
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md) and [
|
|
191
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) and the [changelog](CHANGELOG.md). MIT licensed.
|
package/dist/auth.js
CHANGED
|
@@ -30,7 +30,7 @@ export function totp(secret, at = Date.now()) {
|
|
|
30
30
|
async function field(page, key) {
|
|
31
31
|
if (/^[#.[]|[\s=>]/.test(key))
|
|
32
32
|
return page.locator(key).first();
|
|
33
|
-
const byName = page.locator(`[name="${key.replace(/"/g, '
|
|
33
|
+
const byName = page.locator(`[name="${key.replace(/[\\"]/g, '\\$&')}"]`);
|
|
34
34
|
return (await byName.count()) ? byName.first() : page.getByLabel(key, { exact: false }).first();
|
|
35
35
|
}
|
|
36
36
|
const off = (cfg, u) => !cfg.loginPaths.test(new URL(u).pathname);
|
package/dist/coverage.js
CHANGED
|
@@ -18,7 +18,7 @@ export function hits(out) {
|
|
|
18
18
|
}
|
|
19
19
|
/** The coverage map as Markdown, and its counts. `reasons` are matched against "GET /path", "dialog <name>" and "table <headers>: <control>". */
|
|
20
20
|
export function coverage(all, runs, routes, reasons) {
|
|
21
|
-
const cell = (s) => s.replace(
|
|
21
|
+
const cell = (s) => s.replace(/[\\|]/g, '\\$&').replace(/\s+/g, ' '); // a backslash first, so `a\|b` stays one cell
|
|
22
22
|
const by = (ok) => [...new Set(all.filter((h) => ok(h.what)).map((h) => (h.step ? `${h.part}: ${h.step}` : h.part)))];
|
|
23
23
|
const who = (w) => cell(w.slice(0, 2).join(', ') + (w.length > 2 ? ` (+${w.length - 2})` : ''));
|
|
24
24
|
const kind = (prefix) => [...new Set(all.filter((h) => h.what.startsWith(prefix)).map((h) => h.what))].sort().map((what) => `| ${cell(what.slice(prefix.length))} | ${who(by((w) => w === what))} |`);
|
package/dist/routes.js
CHANGED
|
@@ -16,7 +16,7 @@ export function matcher(path) {
|
|
|
16
16
|
return '.+';
|
|
17
17
|
if (t.length > 1)
|
|
18
18
|
return '[^/]+'; // {id}, <int:pk>, <pk>, :id
|
|
19
|
-
return t === '(' ? '(?:' : t === ')' ? ')?' : t.replace(/[.+?^$|[\]\\]
|
|
19
|
+
return t === '(' ? '(?:' : t === ')' ? ')?' : t.replace(/[.+?^$|[\]\\]/g, '\\$&');
|
|
20
20
|
});
|
|
21
21
|
return new RegExp(`^${src}/?$`);
|
|
22
22
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ashishjain15491/tapcheck",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "End-to-end and UI audit harness for any web app, whatever its stack: crawl, API contract, security, accessibility, and Jev judgments of what people see.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ashishjain15491 (https://github.com/ashishjain15491)",
|