penthera 1.6.1 → 1.7.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/CHANGELOG.md +58 -0
- package/README.md +158 -301
- package/bin/scan.js +2 -2
- package/docs/METHODOLOGY.md +236 -182
- package/docs/commands/README.md +2 -1
- package/docs/commands/init.md +114 -0
- package/docs/commands/scan.md +1 -1
- package/docs/compare/github.md +1 -1
- package/docs/dashboard.md +95 -152
- package/docs/examples/github-actions-scan.yml +1 -1
- package/docs/internal-audit.md +1 -1
- package/docs/plan.md +3 -2
- package/docs/references.bib +43 -33
- package/docs/references.md +92 -51
- package/lib/whitebox/frameworks.js +36 -0
- package/package.json +1 -1
- package/skills/penthera/SKILL.md +19 -5
- package/src/cli/deps.js +1 -1
- package/src/cli/detect.js +125 -0
- package/src/cli/onboarding.js +428 -6
- package/src/cli/prompt.js +42 -0
- package/src/cli.js +18 -5
- package/src/ui/api/data.js +30 -0
- package/src/ui/api/demo.js +13 -0
- package/src/ui/api/routes.js +1 -0
- package/src/ui/static/app.css +286 -560
- package/src/ui/static/index.html +8 -39
- package/src/ui/static/js/app.js +105 -107
- package/src/ui/static/js/center.js +388 -0
- package/src/ui/static/js/copy.js +36 -62
- package/src/ui/static/js/dom.js +0 -38
- package/src/ui/static/js/left.js +83 -0
- package/src/ui/static/js/right.js +270 -0
- package/src/ui/static/js/state.js +35 -0
- package/src/ui/static/js/views/ai.js +0 -68
- package/src/ui/static/js/views/deps.js +0 -96
- package/src/ui/static/js/views/evidence.js +0 -115
- package/src/ui/static/js/views/findings.js +0 -165
- package/src/ui/static/js/views/history.js +0 -92
- package/src/ui/static/js/views/overview.js +0 -184
- package/src/ui/static/js/views/run.js +0 -349
- package/src/ui/static/js/views/settings.js +0 -67
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Set up in one command: `penthera init`
|
|
2
|
+
|
|
3
|
+
## Start here
|
|
4
|
+
|
|
5
|
+
New to Penthera? Run it with no arguments in your project folder:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx penthera # in a terminal, with no arguments: the setup wizard
|
|
9
|
+
penthera init # the same wizard, by name (also works with piped answers)
|
|
10
|
+
penthera init --yes # accept every safe default, ask nothing
|
|
11
|
+
penthera init --dry-run # show what would run and be written, change nothing
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The wizard finds what your project has, asks one question about what to check,
|
|
15
|
+
runs those checks offline, shows one summary, and then offers to set up the
|
|
16
|
+
hook, the CI workflow and the rest, one yes/no at a time. Press Enter to accept
|
|
17
|
+
a default.
|
|
18
|
+
|
|
19
|
+
## What it does
|
|
20
|
+
|
|
21
|
+
**1. Detect.** Offline, read-only:
|
|
22
|
+
|
|
23
|
+
- whether this is a git repository (and which branch);
|
|
24
|
+
- the web framework, from `package.json`, `requirements.txt` or `pyproject.toml`;
|
|
25
|
+
- lockfiles: `package-lock.json`, `npm-shrinkwrap.json`, `uv.lock`,
|
|
26
|
+
`poetry.lock`, `pdm.lock`, `Pipfile.lock`, `requirements.txt`;
|
|
27
|
+
- agent config: `.mcp.json`, `.claude/`, `.cursor/`, `CLAUDE.md`, `AGENTS.md`, `skills/`;
|
|
28
|
+
- a dev server on localhost ports 3000, 5173, 8000 or 8080 (a TCP connect to
|
|
29
|
+
127.0.0.1 and ::1, nothing else);
|
|
30
|
+
- whether the Penthera pre-commit hook or a Penthera GitHub workflow is already there.
|
|
31
|
+
|
|
32
|
+
**2. Ask what to check.** One checklist, with defaults from what was found.
|
|
33
|
+
Type numbers to toggle items (`2,4`), or press Enter:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
What should Penthera check?
|
|
37
|
+
1. [x] Code: secrets and risky API routes in ./ penthera --repo .
|
|
38
|
+
2. [x] Dependencies: what your npm and Python packages can do penthera deps
|
|
39
|
+
3. [x] AI tooling: skills, MCP servers, hooks, agent instructions penthera agents
|
|
40
|
+
4. [ ] The running app at http://localhost:3000 only if it is yours
|
|
41
|
+
5. [x] Offline mode: nothing leaves this machine recommended
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
- AI tooling then asks whether to include `~/.claude` and `~/.cursor` too (default no).
|
|
45
|
+
- The running app is only listed when a dev server answered, is never
|
|
46
|
+
preselected, and is only scanned after you confirm it is yours (default no).
|
|
47
|
+
It runs the standard safe checks: no attack payloads.
|
|
48
|
+
- With offline mode off, `deps` also reads npm registry metadata and the URL
|
|
49
|
+
scan may download the Retire.js database. Nothing else changes.
|
|
50
|
+
|
|
51
|
+
**3. Run and summarize.** One line per check, then the grade per area (A to F,
|
|
52
|
+
the same scale as `penthera agents`), the three things to fix first in plain
|
|
53
|
+
language, and the report folder:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
Running 3 checks (offline)
|
|
57
|
+
✓ Code B 1 high 0.1s
|
|
58
|
+
✓ Dependencies A no issues 0.0s
|
|
59
|
+
✓ AI tooling A 1 medium 0.0s
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Every report lands in `reports/penthera-<date>/`: `code`, `deps`, `agents` and
|
|
63
|
+
`app` as JSON and Markdown, plus `summary.md` and `summary.json`.
|
|
64
|
+
|
|
65
|
+
**4. Set up.** Each step is a yes/no:
|
|
66
|
+
|
|
67
|
+
| Step | Default | What it does |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| Pre-commit hook | yes | `penthera hook install`: blocks staged secrets, risky agent config and lockfile changes ([hook.md](hook.md)). Git repos only |
|
|
70
|
+
| GitHub workflow | yes | Writes `.github/workflows/penthera.yml` from [the PR dependency review example](../examples/pr-dependency-review.yml), with the action pinned to the release commit SHA. Shown as a diff first. Needs a git repo and `package-lock.json` |
|
|
71
|
+
| `.gitignore` | yes | Appends `reports/` so scan output is never committed |
|
|
72
|
+
| Fix loop | no | `penthera agent --loop` on a local `penthera/fix-<date>` branch; every diff asks first ([fix.md](fix.md)) |
|
|
73
|
+
| Dashboard | yes | `penthera ui --open` on this run's reports ([dashboard.md](../dashboard.md)). Runs until Ctrl-C |
|
|
74
|
+
|
|
75
|
+
Steps that are already done (a hook or workflow that exists, `reports/` already
|
|
76
|
+
ignored) are skipped and say so.
|
|
77
|
+
|
|
78
|
+
**5. What next.** The commands to rerun each check, check staged changes, run
|
|
79
|
+
the fix loop or open the dashboard.
|
|
80
|
+
|
|
81
|
+
## `--yes` and `--dry-run`
|
|
82
|
+
|
|
83
|
+
`--yes` answers every question with its safe default: the code, dependency and
|
|
84
|
+
AI tooling checks that apply, offline, then the hook, the workflow and
|
|
85
|
+
`.gitignore`. It never scans a URL, never runs the fix loop and never opens the
|
|
86
|
+
dashboard, even when a dev server is running.
|
|
87
|
+
|
|
88
|
+
`--dry-run` runs detection and asks the questions, then prints what it would
|
|
89
|
+
run and write instead of doing it. Combine them for a plan with no prompts:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
penthera init --yes --dry-run
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
`penthera --yes` and `penthera --dry-run` (no other arguments) are the same as
|
|
96
|
+
`penthera init --yes` and `penthera init --dry-run`.
|
|
97
|
+
|
|
98
|
+
## What it never does
|
|
99
|
+
|
|
100
|
+
- Commit, push, open a pull request, or touch a remote. The workflow file is
|
|
101
|
+
written for you to review and commit yourself.
|
|
102
|
+
- Write outside the project: reports, `.gitignore` and the workflow go under
|
|
103
|
+
the project root (the git top level when there is one), the hook into the
|
|
104
|
+
repository's hooks folder.
|
|
105
|
+
- Contact anything but localhost, unless you turn offline mode off or confirm
|
|
106
|
+
the running app.
|
|
107
|
+
|
|
108
|
+
Exit code: 0 when the wizard finishes (whatever the grades), 2 for a bad flag.
|
|
109
|
+
For a gate in CI, use the commands themselves (`penthera --repo .`, `penthera deps`):
|
|
110
|
+
they exit 1 on high or critical findings.
|
|
111
|
+
|
|
112
|
+
The pinned SHA is the last release tagged before this version
|
|
113
|
+
(`ACTION_PIN` in `src/cli/onboarding.js`); Dependabot's `github-actions`
|
|
114
|
+
updates keep it current in your repo.
|
package/docs/commands/scan.md
CHANGED
|
@@ -72,7 +72,7 @@ next to it. Reports are gitignored by default.
|
|
|
72
72
|
|
|
73
73
|
```yaml
|
|
74
74
|
# Scan a staging URL on a schedule and upload results to GitHub Security.
|
|
75
|
-
- run: npx penthera@1.
|
|
75
|
+
- run: npx penthera@1.7.0 "$PENTEST_URL" --profile standard --sarif reports/scan.sarif
|
|
76
76
|
- uses: github/codeql-action/upload-sarif@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0
|
|
77
77
|
with:
|
|
78
78
|
sarif_file: reports/scan.sarif
|
package/docs/compare/github.md
CHANGED
|
@@ -48,7 +48,7 @@ Keep Dependabot and code scanning on. Add Penthera's action for the capability
|
|
|
48
48
|
diff ([docs/commands/action.md](../commands/action.md)) and upload its SARIF:
|
|
49
49
|
|
|
50
50
|
```yaml
|
|
51
|
-
- run: npx penthera@1.
|
|
51
|
+
- run: npx penthera@1.7.0 "$PREVIEW_URL" --sarif reports/scan.sarif
|
|
52
52
|
- uses: github/codeql-action/upload-sarif@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0
|
|
53
53
|
with:
|
|
54
54
|
sarif_file: reports/scan.sarif
|
package/docs/dashboard.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# The local dashboard: `penthera ui`
|
|
2
2
|
|
|
3
|
-
`penthera ui` opens
|
|
4
|
-
your projects
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
`penthera ui` opens one view in your browser for what Penthera knows about
|
|
4
|
+
your projects, laid out like the Claude Code desktop app: projects and runs on
|
|
5
|
+
the left, the selected project or run in the middle, and details on the right.
|
|
6
|
+
It can also run scans and the fix loop for you, stopping at every diff. It runs
|
|
7
|
+
on `127.0.0.1` only, reads only the folders you give it and `~/.penthera`, and
|
|
8
|
+
never contacts the network.
|
|
9
9
|
|
|
10
10
|
| Dark | Light |
|
|
11
11
|
|---|---|
|
|
12
|
-
|  |  |
|
|
13
13
|
|
|
14
14
|
## Start it
|
|
15
15
|
|
|
@@ -32,123 +32,76 @@ a session cookie and stops working, so a second browser (or a link that leaked
|
|
|
32
32
|
into history) gets a 403. Restart `penthera ui` for a new link. Ctrl-C stops
|
|
33
33
|
the server.
|
|
34
34
|
|
|
35
|
+
## The view
|
|
36
|
+
|
|
37
|
+
**Left sidebar** (`[` to hide or show). "+ New scan" on top. Then every
|
|
38
|
+
project with its A to F grade, open findings and last scan, with "All
|
|
39
|
+
projects" first; project folders you passed with `--project` show up even
|
|
40
|
+
before their first scan. Below them, recent runs grouped by project, like the
|
|
41
|
+
session list in Claude Code: live runs from this session (a green dot while
|
|
42
|
+
running) and past fix-loop runs from the reports folder. The gear in the
|
|
43
|
+
footer opens settings; the half-moon switches the theme.
|
|
44
|
+
|
|
45
|
+
**Centre.** One scrolling stream for what you selected:
|
|
46
|
+
|
|
47
|
+
- a project (or all of them): a compact header with the grade, a severity bar
|
|
48
|
+
drawn in 1-bit shades, the trend sparkline and open vs fixed; what changed
|
|
49
|
+
since the last scan (new and fixed); then the findings, "Fix first"
|
|
50
|
+
(critical and high) before the rest. `/` searches, `j` and `k` move through
|
|
51
|
+
findings and open each one on the right.
|
|
52
|
+
- a run: its output streams in as a transcript, typed out as it arrives. Each
|
|
53
|
+
diff of the fix loop appears inline as a small dialog: the recipe, the files,
|
|
54
|
+
what memory knows about the recipe, the diff, and Apply (`y`), Skip (`n`) or
|
|
55
|
+
Stop (`q`).
|
|
56
|
+
- a past fix-loop run: rebuilt from its `loopRun` file, round by round, with
|
|
57
|
+
each fix's decision, result and commit.
|
|
58
|
+
|
|
59
|
+
At the bottom, a prompt-style bar starts things: **Scan** (with an optional
|
|
60
|
+
URL), **Deps**, **AI tooling** or **Fix loop**, always for the selected
|
|
61
|
+
project's folder. These are plain controls, not a chat: there is no model
|
|
62
|
+
behind them. There is one primary button on screen at a time; while a run is
|
|
63
|
+
going, its dialog owns it and the bar waits.
|
|
64
|
+
|
|
65
|
+
**Right panel** (`]` to hide or show). Stacked cards, each one collapsible:
|
|
66
|
+
|
|
67
|
+
| Card | What it shows |
|
|
68
|
+
|---|---|
|
|
69
|
+
| Environment | Offline or online for scans started here (switch it here), the project folder, its git branch and HEAD, and the hosts the last scan contacted (and the ones offline mode blocked) |
|
|
70
|
+
| Memory | Chain status, events, verified and failed fixes, median time to fix, recipe success rates |
|
|
71
|
+
| Dependencies | Package count and ecosystem, the capability diff against your base, typosquats, capabilities in the tree, install firewall decisions |
|
|
72
|
+
| AI tooling | The A to F grade and its history, `penthera.lock` drift, inventory, hidden-content hits |
|
|
73
|
+
| Evidence | Create a bundle from the latest scan, download the auditor, owner or developer report, verify any bundle in one click |
|
|
74
|
+
| Changes | Fixes the loop committed, with their local commits, and the `penthera/fix-*` branches in the folder |
|
|
75
|
+
|
|
76
|
+
Picking a finding replaces the cards with its detail: "In plain words" (how
|
|
77
|
+
serious, how sure and what that means, what to do, the OWASP mapping), what
|
|
78
|
+
was seen, the evidence, sources, and the exact fix-recipe diff with a button
|
|
79
|
+
that starts the fix loop on that project. `Esc` goes back to the cards.
|
|
80
|
+
|
|
81
|
+
Below 1180px the right panel becomes a drawer; below 760px the sidebar does
|
|
82
|
+
too. A tap outside closes them.
|
|
83
|
+
|
|
84
|
+
| Narrow, dark | Narrow, light, a finding open |
|
|
85
|
+
|---|---|
|
|
86
|
+
| <img src="../assets/dashboard/narrow-dark.jpg" alt="The view at 390px, dark" width="280"> | <img src="../assets/dashboard/narrow-light.jpg" alt="A finding in the drawer at 390px, light" width="280"> |
|
|
87
|
+
|
|
35
88
|
## User stories
|
|
36
89
|
|
|
37
|
-
|
|
38
|
-
feature in the dashboard and a screenshot from `penthera ui --demo`.
|
|
39
|
-
|
|
40
|
-
**1. First run, nothing scanned yet.** *As a solo founder the week before
|
|
41
|
-
launch, I want the dashboard to tell me what to do first when there is no
|
|
42
|
-
data yet, so that I am not staring at empty charts.* The overview turns into
|
|
43
|
-
a three-step start: scan your app, check your dependencies, audit your AI
|
|
44
|
-
tooling. Each step opens Run with the right mode and your project folder
|
|
45
|
-
filled in.
|
|
46
|
-
|
|
47
|
-

|
|
48
|
-
|
|
49
|
-
**2. Run a scan from the UI.** *As a developer who does not live in the
|
|
50
|
-
terminal, I want to start a scan from the page and watch it work, so that I
|
|
51
|
-
know it ran and where the report went.* Run has four modes: scan app, check
|
|
52
|
-
dependencies, audit AI tooling, fix loop. A URL that is not on this machine
|
|
53
|
-
needs its hostname typed back first. Output streams into a terminal window;
|
|
54
|
-
when it finishes, "What next?" offers the obvious next steps.
|
|
55
|
-
|
|
56
|
-

|
|
57
|
-
|
|
58
|
-
**3. Let the agent fix things, one approved diff at a time.** *As a founder
|
|
59
|
-
with no security engineer, I want Penthera to propose fixes and apply only the
|
|
60
|
-
ones I approve, so that nothing changes in my code without me seeing it.* The
|
|
61
|
-
fix loop stops at every diff with a dialog: the recipe, the files, what the
|
|
62
|
-
fix closes, what memory knows about this recipe, and the diff itself. Apply
|
|
63
|
-
(`y`), Skip (`n`) or Stop the loop (`q`). Verified fixes are committed on a
|
|
64
|
-
local branch; failed ones are reverted. Nothing is pushed.
|
|
65
|
-
|
|
66
|
-

|
|
67
|
-
|
|
68
|
-
**4. Understand one finding.** *As a product owner who is not a security
|
|
69
|
-
expert, I want one finding explained in plain words, so that I can decide
|
|
70
|
-
whether it matters today.* The detail panel opens with "In plain words": how
|
|
71
|
-
serious it is, how sure Penthera is (and what that confidence level means),
|
|
72
|
-
what to do, and the OWASP mapping. Below it: what was seen, the evidence, the
|
|
73
|
-
sources, and the exact fix diff.
|
|
74
|
-
|
|
75
|
-

|
|
76
|
-
|
|
77
|
-
**5. Compare over time.** *As a tech lead after a release, I want to compare
|
|
78
|
-
two scans of the same project, so that I can see what got fixed and what is
|
|
79
|
-
new.* History picks the most interesting project by default, compares the
|
|
80
|
-
previous scan with the latest (or any two you choose), and lists new, fixed
|
|
81
|
-
and still-open findings in three columns. Below them, a timeline draws every
|
|
82
|
-
finding as a bar across the scans (S1, S2, ...): hatched while it is still
|
|
83
|
-
open, an outline once it was fixed.
|
|
84
|
-
|
|
85
|
-

|
|
86
|
-
|
|
87
|
-
**6. Export evidence for an auditor.** *As the person who answers the NIS2
|
|
88
|
-
questionnaire, I want a package an auditor can check without trusting me, so
|
|
89
|
-
that the evidence holds up.* Evidence creates a bundle from the latest scan
|
|
90
|
-
of a project (JSON, Markdown, SARIF, the auditor, owner and developer reports,
|
|
91
|
-
and a manifest with a SHA-256 per file), verifies it straight away, and lets
|
|
92
|
-
you download the auditor report as Markdown.
|
|
93
|
-
|
|
94
|
-

|
|
95
|
-
|
|
96
|
-
**7. Check what a dependency change can do.** *As a developer reviewing a
|
|
97
|
-
pull request that bumps the lockfile, I want to see which packages gained new
|
|
98
|
-
capabilities, so that I catch a malicious update before it runs.* Dependencies
|
|
99
|
-
shows the capabilities in the tree, the capability diff against your base,
|
|
100
|
-
typosquats, and every install firewall decision.
|
|
101
|
-
|
|
102
|
-

|
|
103
|
-
|
|
104
|
-
**8. Trust my AI tooling.** *As someone who installs skills and MCP servers
|
|
105
|
-
into Claude Code and Cursor, I want to know whether any of them hide
|
|
106
|
-
instructions or changed since I reviewed them, so that my agent is not working
|
|
107
|
-
for someone else.* AI tooling shows the A to F grade, hidden content with the
|
|
108
|
-
decoded text, and drift against `penthera.lock`.
|
|
109
|
-
|
|
110
|
-

|
|
111
|
-
|
|
112
|
-
**9. Know where to start this week.** *As a solo founder on a Monday morning,
|
|
113
|
-
I want one place that says what to fix first and what changed since the last
|
|
114
|
-
scan, so that I do not have to read every report.* The overview opens with a
|
|
115
|
-
"This week" window: fix first (every critical and high), new since the last
|
|
116
|
-
scan, and fixed since the last scan, across all projects. Each line opens the
|
|
117
|
-
finding.
|
|
118
|
-
|
|
119
|
-

|
|
120
|
-
|
|
121
|
-
**10. Work in daylight.** *As someone who reads reports on a bright screen, I
|
|
122
|
-
want a light theme, so that the dashboard is comfortable outside a dark room.*
|
|
123
|
-
The `◐` button in the menu bar (and Settings) switches between the black
|
|
124
|
-
terminal and the white paper theme. The first visit follows your system
|
|
125
|
-
setting; the choice is remembered in this browser.
|
|
126
|
-
|
|
127
|
-
| Narrow, dark | Narrow, light |
|
|
90
|
+
| Story | Where it lives |
|
|
128
91
|
|---|---|
|
|
129
|
-
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
|
134
|
-
|
|
135
|
-
|
|
|
136
|
-
|
|
|
137
|
-
|
|
|
138
|
-
| History | Every scan report of one project in the reports folder |
|
|
139
|
-
| Dependencies | `penthera deps -o reports/deps.json` and `penthera install <pkg> --dry-run --json > reports/install.json` (or Run → Check dependencies) |
|
|
140
|
-
| AI tooling | `penthera agents . -o reports/agents.json` (or Run → Audit AI tooling) |
|
|
141
|
-
| Evidence | Bundles below the reports folder, written with `--evidence` or from this screen |
|
|
142
|
-
| Settings | Theme, egress mode for scans started here, data locations, memory chain status |
|
|
143
|
-
|
|
144
|
-
The reports folder is read one level deep for `*.json` (anything that is not
|
|
145
|
-
a Penthera report is ignored) and two levels deep for evidence bundles.
|
|
146
|
-
Symlinks are skipped. A memory chain that does not verify is shown as broken
|
|
147
|
-
and its contents are not used, the same rule scans follow.
|
|
92
|
+
| *As a solo founder before launch, I want to know what to do first when there is no data yet.* | With no reports, the centre shows the wordmark and three steps (scan, dependencies, AI tooling); each focuses the bar on that action.  |
|
|
93
|
+
| *As a developer who does not live in the terminal, I want to start a scan from the page and watch it work.* | The bar at the bottom; the run streams into the centre and appears in the sidebar. |
|
|
94
|
+
| *As a founder with no security engineer, I want fixes applied only when I approve them.* | The fix loop's inline dialog: Apply, Skip or Stop on every diff; verified fixes land as local commits, failed ones are reverted, nothing is pushed.  |
|
|
95
|
+
| *As a product owner, I want one finding explained in plain words.* | Pick it: the right panel opens with "In plain words", the evidence, sources and the fix diff. |
|
|
96
|
+
| *As a tech lead after a release, I want to see what changed.* | The project header's sparkline, "Since the last scan" (new, fixed), and the runs in the sidebar. |
|
|
97
|
+
| *As the person answering the NIS2 questionnaire, I want evidence an auditor can check.* | The Evidence card: create a bundle, verify it, download the auditor report. |
|
|
98
|
+
| *As a developer reviewing a lockfile bump, I want to see what packages gained.* | The Dependencies card: the capability diff and install firewall decisions. |
|
|
99
|
+
| *As someone who installs skills and MCP servers, I want to know if any hide instructions or drifted.* | The AI tooling card: grade, hidden content, `penthera.lock` drift. |
|
|
100
|
+
| *As someone on a bright screen, I want a light theme.* | The half-moon in the sidebar footer, or Settings; the first visit follows your system. |
|
|
148
101
|
|
|
149
102
|
## Running things from the page
|
|
150
103
|
|
|
151
|
-
|
|
104
|
+
The bar calls the same functions as the CLI (`executeScan`, `scanDeps`,
|
|
152
105
|
`scanAgents`, `runLoop`) with the same rules. The fix loop needs a clean git
|
|
153
106
|
tree on a branch, works on a local `penthera/fix-<yyyymmdd-hhmm>` branch, runs
|
|
154
107
|
only allow-listed local git commands with hooks off, is always offline with
|
|
@@ -158,8 +111,8 @@ egress limited to the URL's host, and never pushes. On top of that:
|
|
|
158
111
|
- A URL that is not on this machine (anything but `localhost`, `127.x.x.x`,
|
|
159
112
|
`[::1]` and `*.localhost`) needs its hostname typed back before the run
|
|
160
113
|
starts. Only scan what you own or have written permission to test.
|
|
161
|
-
- One run at a time. Closing the tab does not stop a run;
|
|
162
|
-
|
|
114
|
+
- One run at a time. Closing the tab does not stop a run; pick it in the
|
|
115
|
+
sidebar and its transcript replays and continues. Stop finishes the current step, and the fix branch holds only
|
|
163
116
|
verified commits.
|
|
164
117
|
- Reports land in the reports folder (`loop-<timestamp>.json`,
|
|
165
118
|
`deps_<timestamp>.json`, and so on), so every screen picks them up.
|
|
@@ -210,35 +163,25 @@ path traversal.
|
|
|
210
163
|
|
|
211
164
|
## Design
|
|
212
165
|
|
|
213
|
-
|
|
214
|
-
of
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
- **
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
- **Both themes pass WCAG AA** for every text node on every screen (measured in
|
|
236
|
-
the browser, composited). Light text uses a 0.6 ink step where the dark
|
|
237
|
-
theme uses 0.5, because 0.5 measures 3.6:1 on paper.
|
|
238
|
-
- **Motion.** The output types itself out and the cursor blinks. With
|
|
239
|
-
`prefers-reduced-motion`, both stop and output appears whole. Screens switch
|
|
240
|
-
with `1`-`8` and have no transition.
|
|
241
|
-
- **Keyboard.** `1`-`8` screens, `/` filter findings, `j`/`k` move through
|
|
242
|
-
findings, `y`/`n`/`q` answer a diff. Every control is a real button or link;
|
|
243
|
-
the approval dialog takes focus when a diff arrives; screen readers get each
|
|
244
|
-
log line whole, never letter by letter.
|
|
166
|
+
Calm, terminal-native, and close to the Claude Code desktop app: hairlines
|
|
167
|
+
instead of boxes, one stream in the middle, details on the side. The 1-bit
|
|
168
|
+
register from earlier versions stays in the details: severity as a word plus a
|
|
169
|
+
pattern swatch (solid, hatched, half-tone, dotted, empty), bars drawn with the
|
|
170
|
+
shade characters `█ ▓ ▒ ░`, the pinstriped title bar on the approval dialog,
|
|
171
|
+
and the CLI's `#0000ed` block-letter wordmark on the empty state.
|
|
172
|
+
|
|
173
|
+
- **One accent.** `#0000ed` marks the primary button, the selected finding,
|
|
174
|
+
links and chart lines. On black it measures 2.2:1, so there it is only a fill
|
|
175
|
+
with white on it (9.5:1), a frame or a glow; text in that hue uses `#7a7aff`
|
|
176
|
+
(6.1:1). On white, `#0000ed` is text-safe (9.3:1). Green is kept for the
|
|
177
|
+
cursor, the prompt and "OK".
|
|
178
|
+
- **Both themes pass WCAG AA** for every text node in every state (all
|
|
179
|
+
projects with every card open, a project with a finding open, settings, a
|
|
180
|
+
past run), measured in the browser, composited.
|
|
181
|
+
- **Motion.** Run output types itself out and the cursor blinks; with
|
|
182
|
+
`prefers-reduced-motion` both stop and output appears whole. Nothing else
|
|
183
|
+
animates.
|
|
184
|
+
- **Keyboard.** `/` search, `j`/`k` findings, `[`/`]` side panels, `y`/`n`/`q`
|
|
185
|
+
answer a diff, `Esc` closes the detail, clears the search or closes a
|
|
186
|
+
drawer. Every control is a real button or link; the approval dialog takes
|
|
187
|
+
focus when a diff arrives; screen readers get each log line whole.
|
package/docs/internal-audit.md
CHANGED
|
@@ -25,7 +25,7 @@ so drift shows up between releases.
|
|
|
25
25
|
| Packaging | `npm pack --dry-run` | A file outside the allow-list ships, anything that looks like tests, fixtures, reports or secrets ships, or the package exceeds its size budget |
|
|
26
26
|
| Offline | A full `--all --adaptive --offline` scan of the mock server | The report's `egress` field shows any third-party host |
|
|
27
27
|
| Supply chain | `npm audit --omit=dev`; sha512 integrity for every lockfile entry; install scripts in runtime dependencies (via `penthera deps --prod`); every `uses:` in `.github/workflows`, `action.yml` and `docs/examples` | Any vulnerability, missing integrity, runtime install script, typosquat, action not pinned by commit SHA, or workflow without top-level `permissions:` |
|
|
28
|
-
| Versions and docs | The version in `package.json`, the lockfile, the plugin manifests, `SKILL.md` and `
|
|
28
|
+
| Versions and docs | The version in `package.json`, the lockfile, the plugin manifests, `SKILL.md`, `CITATION.cff` and the "How to cite" block in `docs/METHODOLOGY.md`; a `CHANGELOG.md` section for it; every relative link in `README.md` and `docs/` | Any mismatch or broken link |
|
|
29
29
|
|
|
30
30
|
Everything runs on this machine against this repo or `127.0.0.1`. The only
|
|
31
31
|
network use is `npm audit` (the npm registry) and, with `--with-docker`,
|
package/docs/plan.md
CHANGED
|
@@ -29,8 +29,9 @@ these three moments is out of scope.
|
|
|
29
29
|
|---------|-------|-----------|
|
|
30
30
|
| v1.5.0 | AI apps and compliance | Tagged with the pre-commit hook, license policy, CRA helper and AI-BOM; held back from npm and shipped inside 1.6.0 |
|
|
31
31
|
| v1.6.0 | Hardening and the rest of AI apps | Released with the 360 security review fixes, Python `deps`, the internal audit gate and the dashboard. Signed rule packs follow once the maintainer's key is set up |
|
|
32
|
-
| v1.7.0 |
|
|
33
|
-
|
|
|
32
|
+
| v1.7.0 | One view, one command | The single-view dashboard, the `npx penthera` setup wizard, and an APA-cited methodology. Released |
|
|
33
|
+
| Next | Before you deploy | `penthera ship` and preview-deployment scanning work on a real Vercel and Netlify project |
|
|
34
|
+
| After that | After you ship | `penthera watch` runs weekly on three real production apps for a month without a false alarm anyone complained about |
|
|
34
35
|
| v2.0.0 | Stable | Public interfaces frozen (CLI flags, JSON report schema, policy file, rule-pack format), documented, and covered by compatibility tests |
|
|
35
36
|
|
|
36
37
|
## What "perfect" means, concretely
|