@bugb-technologies/bravos 1.4.2 → 1.5.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 +1 -0
- package/dist/account.js +2 -11
- package/dist/cli.js +38 -14
- package/dist/codegraph.js +25 -0
- package/dist/dashboard.js +283 -0
- package/dist/guide.js +2 -1
- package/dist/help.js +11 -0
- package/dist/install.js +2 -2
- package/dist/licence.js +11 -4
- package/dist/omp.js +2 -1
- package/dist/open.js +22 -0
- package/dist/opencode.js +2 -1
- package/dist/skills.js +8 -0
- package/dist/watch.js +8 -24
- package/docs/GUIDE.md +7 -1
- package/docs/UPGRADING.md +27 -0
- package/hooks/lib/briefing.mjs +109 -27
- package/hooks/lib/licence.mjs +13 -0
- package/hooks/lib/setup.mjs +1 -1
- package/package.json +1 -1
- package/skills/bravos/SKILL.md +3 -2
- package/skills/bravos-annotate/SKILL.md +2 -1
- package/skills/bravos-annotate/scripts/lib/pick.mjs +1 -1
- package/skills/bravos-annotate/scripts/slice.mjs +1 -1
- package/skills/bravos-codegraph/SKILL.md +1 -1
- package/skills/bravos-context/SKILL.md +5 -4
- package/skills/bravos-recheck/SKILL.md +1 -0
- package/skills/bravos-report/SKILL.md +1 -0
- package/skills/bravos-ship/SKILL.md +1 -0
- package/skills/bravos-templatize/SKILL.md +1 -1
- package/templates/dashboard/codegraph-pages.css +279 -0
- package/templates/dashboard/codegraph-pages.js +6230 -0
- package/templates/dashboard/codegraph-pages.json +11 -0
- package/templates/dashboard/dashboard.html +273 -0
|
@@ -13,14 +13,14 @@ description: "Learn what the software intends before judging its code: for a pro
|
|
|
13
13
|
## Do
|
|
14
14
|
|
|
15
15
|
1. Decide the perspective. **Researcher** (the default): the repo is software being studied, such as an open-source project or a vendor's code; its intent is upstream's to state. **Owner**: the repo is the user's own product; it is theirs. Use what the user said, the origin remote and the README; ask in one line only if it is unclear.
|
|
16
|
-
2. Read before you suggest. Researcher: upstream's security docs, deployment and hardening guides, SECURITY.md and docs/, each with its URL or path, then the auth and role code. Owner: the README, route table, auth and role code, data models, anything touching money or other users' data. Both: `.guardlink/definitions.*`, and `.guardlink/intent.md` if it exists (you are refreshing, not starting over).
|
|
16
|
+
2. Read before you suggest. Researcher: upstream's security docs, deployment and hardening guides, SECURITY.md and docs/, each with its URL or path, then the auth and role code. Owner: the README, route table, auth and role code, data models, anything touching money or other users' data. Both: `.guardlink/definitions.*`, and `.guardlink/intent.md` if it exists (you are refreshing, not starting over). On the Team plan (the briefing's `Plan:` line), build the code graph first when there is none or it is diverged: `bravos graph build . --scip no-exec` (no tokens, a few minutes; bravos-codegraph step 2). On the Free plan there is no code graph: read the route table and the auth code instead, and don't offer to build it. With the code graph (its MCP tools, or `bravos graph <question> --json` — same answers; see bravos-codegraph) (briefing `Code graph:` says `current`): `codegraph_routes`, `codegraph_attack_surface` and `codegraph_auth_boundary` give the real public surface — which routes answer unauthenticated callers, which need a tenant, which are admin-only; cite "code graph" as the source of each fact, suggestion and candidate INT item they produce ("these N APIs answer unauthenticated callers; upstream documents M of them"). Without it, say "code graph unavailable; surface read from the route table" and read the routes and auth code.
|
|
17
17
|
3. Suggest every answer yourself. Researcher, the open decisions (5 to 8, each `mustTouch: true`): which configuration to rate against (shipped defaults, upstream's recommended hardened setup, or both); single organisation or multi-tenant; which attackers are in scope (`multi`: unauthenticated network, authenticated low-privilege tenant, malicious client or worker, compromised peer or replica, internal network, operator, suggesting the last two out unless upstream says otherwise); each intended-looking behaviour upstream does not clearly document ("upstream is silent"); which invariants to test first. Everything else is a fact with `folded: true` and its source: actors, crown jewels, boundaries, behaviours upstream documents as intended (cite where), and invariants worded as the properties upstream claims. Owner: purpose, users and roles, crown jewels, two to five must-never rules, intended-by-design powers and boundaries; open by default, the rule and intended items `mustTouch`. Give every question a `suggested` answer, a one-line `reason`, its `sources` and a `confidence`; mark `low` and `mustTouch` anything you are unsure of.
|
|
18
18
|
4. Write it to `.guardlink/intent-draft.json` (schema `bravos.review/v1`, `perspective` set; question types `choice`, `multi`, `item`, `text`) and run `bravos review intent`. Tell the user: "the page that just opened has my suggestions filled in; change what is wrong, make the calls marked 'needs your call', then Confirm. Teammates run `bravos review intent` after pulling; say done when everyone has." If they prefer chat, or no browser can open, ask the same open decisions in one message. If they ask to share it on claude.ai and this is Claude Code, run `bravos review intent --share`, say first that their security intent will sit on claude.ai, publish the page it writes with the Artifact tool and `capabilities: {db: {}}`, and give them the link.
|
|
19
19
|
5. Wait for "done". Run `bravos review intent --summary` (for a shared page, first copy each document in its `answers` collection to `.guardlink/intent-answers/<name>.json` with ArtifactData). Settle each DISAGREE with the people involved; take EDITED answers as given. If the user is away on an unattended campaign, record your suggestions marked `— draft` and carry on; never record a decision nobody made.
|
|
20
|
-
6. Write `.guardlink/intent.md` from `{{SKILL_DIR}}/intent.example.md`. Researcher: an `## Assumptions` section first, with the configuration baseline, deployment and attackers in scope, each ending `— set by <names>, <date>`. Then purpose, actors, crown jewels, invariants `INV-1`…, intended-by-design `INT-1`… (researcher items carry `(upstream: <url or path>)`, or `(upstream is silent)`), and boundaries. End each item with how it was decided: `— suggested by bravos, accepted by <names>`, `— edited by <names>`, `— chosen by <names>`, or `— draft`.
|
|
21
|
-
7. Put the structured facts in the threat model. In `.guardlink/definitions.*`, reusing ids and never redefining one: `@actor` per role, `@asset` per crown jewel, and one `@threat` per invariant, e.g. `@threat Cross-tenant read (#inv-tenant-isolation) [high] -- "INV-2: a user reads only their own tenant's orders"`.
|
|
20
|
+
6. Write `.guardlink/intent.md` from `{{SKILL_DIR}}/intent.example.md`. Researcher: an `## Assumptions` section first, with the configuration baseline, deployment and attackers in scope, each ending `— set by <names>, <date>`. Then purpose, actors, crown jewels, invariants `INV-1`…, intended-by-design `INT-1`… (researcher items carry `(upstream: <url or path>)`, or `(upstream is silent)`), and boundaries. End each item with how it was decided: `— suggested by bravos, accepted by <names>`, `— edited by <names>`, `— chosen by <names>`, or `— draft`.
|
|
21
|
+
7. Put the structured facts in the threat model. In `.guardlink/definitions.*`, reusing ids and never redefining one: `@actor` per role, `@asset` per crown jewel, and one `@threat` per invariant, e.g. `@threat Cross-tenant read (#inv-tenant-isolation) [high] -- "INV-2: a user reads only their own tenant's orders"`. Then `@handles <class> on <Asset>` for each crown jewel's data and `@boundary` for each boundary, placed where this repository keeps annotations (the briefing's `Annotations:` line, or `annotation_mode` in `.guardlink/config.json`): in external mode in the file's `.guardlink/annotations/<source-path>.gal` sidecar, never in the source file; in inline mode in a comment directly above the code (bravos-annotate step 7).
|
|
22
22
|
8. Run `guardlink validate .` and fix what it reports in the lines you wrote.
|
|
23
|
-
9. Commit `.guardlink/intent.md
|
|
23
|
+
9. Ask before you commit: "Commit the intent and the definitions now, or leave them for you to review?" Skip the question only when the person already asked for commits in this session (a campaign, a schedule). On yes, commit `.guardlink/intent.md`, the draft and answers files and the definitions together, message `context: intent and invariants`. Otherwise name the files and leave them uncommitted.
|
|
24
24
|
10. Hand the invariant threat ids, the Assumptions and the intended-by-design list to bravos-annotate.
|
|
25
25
|
|
|
26
26
|
## Never
|
|
@@ -33,6 +33,7 @@ description: "Learn what the software intends before judging its code: for a pro
|
|
|
33
33
|
- Rewrite a confirmed line in `.guardlink/intent.md`; append a dated change beneath it instead.
|
|
34
34
|
- Treat an intended-by-design item as an accepted risk: write `@accepts`, `@entitles` or `@confirmed`, or remove an existing claim because of it.
|
|
35
35
|
- Redefine an id that already exists in `.guardlink/definitions.*`.
|
|
36
|
+
- Commit, push or stash without the person's go-ahead, or write an annotation into a source file when the repository keeps them in sidecars.
|
|
36
37
|
|
|
37
38
|
## Done when
|
|
38
39
|
|
|
@@ -36,6 +36,7 @@ description: "Keep findings from going stale after code changes: list the claims
|
|
|
36
36
|
- Every confirmed threat on a changed path was replayed, or you said why it was not.
|
|
37
37
|
- `guardlink diff <base> --fail-on-new --markdown` exits 0, or each new exposure it lists is reported as open.
|
|
38
38
|
- You named the three states for each claim you touched and what was not tested.
|
|
39
|
+
- If a dashboard was built earlier (the briefing's `Dashboard:` line, or one you opened this session), you said it is now behind these changes and offered to rebuild it with `bravos dashboard`.
|
|
39
40
|
|
|
40
41
|
## What it leaves for the next skill
|
|
41
42
|
|
|
@@ -39,6 +39,7 @@ description: "Write a crisp, evidence-bound white-box VAPT write-up in this sess
|
|
|
39
39
|
- `bravos report check <id>` passes for the report.
|
|
40
40
|
- The exports the user asked for exist beside `report.md`, and you named them.
|
|
41
41
|
- The user knows what is reproduced, what is code-review only, what is suspected, and what was not tested.
|
|
42
|
+
- When the reader also wants the live picture, you offered `bravos dashboard --no-blame --out <file>`: one shareable page without git names, a snapshot of the commit it was built at.
|
|
42
43
|
|
|
43
44
|
## What it leaves for the next skill
|
|
44
45
|
|
|
@@ -50,6 +50,7 @@ description: "The no-mistakes security gate before a pull request: validate the
|
|
|
50
50
|
## What it leaves for the next skill
|
|
51
51
|
|
|
52
52
|
- The Security gate section (in the PR body if one was asked for), the open exposures for the human to decide on, and the undefended-path count for the next bravos-annotate round.
|
|
53
|
+
- For a person who wants to see the change, `bravos dashboard` rebuilds one page showing what changed since the base; a dashboard saved before this check is out of date.
|
|
53
54
|
|
|
54
55
|
## Go deeper
|
|
55
56
|
|
|
@@ -20,7 +20,7 @@ description: "Turn the threat model's open exposures into correct, testable cxg
|
|
|
20
20
|
6. Record repo context for the probes you write. Copy `{{SKILL_DIR}}/operator-guidance.md` to `.guardlink/operator-guidance.md` if it is not there, and fill each section from the code: framework, auth shape, test identities, known false positives, out-of-bounds routes. Read it before writing each kit; cxg never generates probes for this repository.
|
|
21
21
|
7. For a first test or regression kit, write a single JavaScript probe in .guardlink/cxg-replay/. Include an exact `// @guardlink_threat: threat@logical/file:line`, `// @attach_scheme: path`, the required identity names, and a precise test with a positive control. Run `bravos hook replay bind <kit.js>` before executing it. The binding command associates the kit with the key of the current GuardLink exposure. Review that mapping when the claim is edited or moved. Leave native CXG identity stamps to the engine.
|
|
22
22
|
8. Apply the oracle rule: a vulnerability class cxg cannot judge from a response has no oracle. Record it in `.guardlink/cxg-templates/README.md` as unsupported, with the threat id and why, instead of writing a template that pretends to prove it. An invariant threat (`#inv-…`, from intent.md) maps to the cxg class that can judge it: another user's or tenant's data → `idor`; a role or permission gained → `privilege_escalation`; a field the caller should not set → `mass_assignment`; a check bypassed by concurrent requests → `race_condition`; a workflow step skipped or reordered → `business_logic`. Record each invariant's class in the README.
|
|
23
|
-
9.
|
|
23
|
+
9. With the person's go-ahead (ask once per session unless they already asked for commits), commit the templates, the README and the filled guidance together, and hand the template ids and threat ids to bravos-prove.
|
|
24
24
|
|
|
25
25
|
## Never
|
|
26
26
|
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
/* bravos (vendored by scripts/vendor-codegraph-pages.mjs; do not edit here): siete@4eab40738b98 clients/vscode/media/pages.css */
|
|
2
|
+
/*
|
|
3
|
+
* The code-graph pages (Map, Owners & History, Coupling, Trust).
|
|
4
|
+
*
|
|
5
|
+
* Layout and chrome only. Every colour is a VS Code theme token or a Workbench token that
|
|
6
|
+
* `src/webview/pages/palette.ts` writes onto :root from the VS Code theme — `--bg-panel`,
|
|
7
|
+
* `--sev-medium` and the rest — so the pages follow the reader's theme, light, dark or high
|
|
8
|
+
* contrast, and no colour is chosen here.
|
|
9
|
+
*/
|
|
10
|
+
:root {
|
|
11
|
+
color-scheme: light dark;
|
|
12
|
+
}
|
|
13
|
+
body {
|
|
14
|
+
margin: 0;
|
|
15
|
+
padding: 0;
|
|
16
|
+
background: var(--vscode-editor-background);
|
|
17
|
+
color: var(--vscode-foreground);
|
|
18
|
+
font-family: var(--vscode-font-family);
|
|
19
|
+
font-size: var(--vscode-font-size, 13px);
|
|
20
|
+
}
|
|
21
|
+
button {
|
|
22
|
+
font: inherit;
|
|
23
|
+
color: inherit;
|
|
24
|
+
background: none;
|
|
25
|
+
border: 0;
|
|
26
|
+
padding: 0;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
}
|
|
29
|
+
button:focus-visible,
|
|
30
|
+
.map-host canvas:focus-visible {
|
|
31
|
+
outline: 1px solid var(--vscode-focusBorder);
|
|
32
|
+
outline-offset: 1px;
|
|
33
|
+
}
|
|
34
|
+
code,
|
|
35
|
+
.mono {
|
|
36
|
+
font-family: var(--vscode-editor-font-family);
|
|
37
|
+
font-size: 0.92em;
|
|
38
|
+
}
|
|
39
|
+
.quiet { color: var(--vscode-descriptionForeground); }
|
|
40
|
+
.ghost { color: var(--vscode-disabledForeground); }
|
|
41
|
+
.small { font-size: 0.85em; }
|
|
42
|
+
.big { font-size: 1.15em; }
|
|
43
|
+
.num { font-variant-numeric: tabular-nums; }
|
|
44
|
+
.warn-ink { color: var(--sev-medium); }
|
|
45
|
+
.sev { color: var(--sev-high); }
|
|
46
|
+
.link { text-decoration: underline; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
|
|
47
|
+
.stack { display: flex; flex-direction: column; gap: 8px; }
|
|
48
|
+
.stack.tight { gap: 3px; }
|
|
49
|
+
.indent { margin: 2px 0 0 12px; padding: 0; list-style: none; }
|
|
50
|
+
|
|
51
|
+
/* ── the strip, the title row ───────────────────────────────────────────── */
|
|
52
|
+
.page-strip {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-wrap: wrap;
|
|
55
|
+
gap: 2px;
|
|
56
|
+
padding: 0 12px;
|
|
57
|
+
border-bottom: 1px solid var(--vscode-panel-border);
|
|
58
|
+
position: sticky;
|
|
59
|
+
top: 0;
|
|
60
|
+
z-index: 5;
|
|
61
|
+
background: var(--vscode-editor-background);
|
|
62
|
+
}
|
|
63
|
+
.strip-tab {
|
|
64
|
+
padding: 7px 12px;
|
|
65
|
+
color: var(--vscode-descriptionForeground);
|
|
66
|
+
border-bottom: 2px solid transparent;
|
|
67
|
+
margin-bottom: -1px;
|
|
68
|
+
}
|
|
69
|
+
.strip-tab:hover { color: var(--vscode-foreground); }
|
|
70
|
+
.strip-tab.on { color: var(--vscode-foreground); border-bottom-color: var(--vscode-focusBorder); }
|
|
71
|
+
.page-head {
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-wrap: wrap;
|
|
74
|
+
align-items: baseline;
|
|
75
|
+
gap: 4px 12px;
|
|
76
|
+
padding: 8px 12px;
|
|
77
|
+
border-bottom: 1px solid var(--vscode-panel-border);
|
|
78
|
+
background: var(--bg-panel);
|
|
79
|
+
}
|
|
80
|
+
.page-title { font-weight: 600; }
|
|
81
|
+
.page-question { color: var(--vscode-descriptionForeground); font-size: 0.9em; }
|
|
82
|
+
.icon-button { margin-left: auto; padding: 0 6px; border: 1px solid var(--border-2); border-radius: 3px; color: var(--vscode-descriptionForeground); }
|
|
83
|
+
.asked { flex-basis: 100%; font-size: 0.85em; color: var(--vscode-descriptionForeground); }
|
|
84
|
+
.asked summary { cursor: pointer; }
|
|
85
|
+
.asked code { display: block; margin-top: 2px; white-space: pre-wrap; word-break: break-all; }
|
|
86
|
+
.page-content { padding: 12px; }
|
|
87
|
+
.page-body { display: flex; flex-direction: column; gap: 12px; max-width: 1280px; margin: 0 auto; }
|
|
88
|
+
.page-subhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-top: 8px; }
|
|
89
|
+
.page-subhead h2 { margin: 0; font-size: 1.05em; }
|
|
90
|
+
.loading, .refused { padding: 48px 12px; text-align: center; color: var(--vscode-descriptionForeground); }
|
|
91
|
+
.refused-title { color: var(--vscode-foreground); font-weight: 600; margin-bottom: 6px; }
|
|
92
|
+
|
|
93
|
+
/* ── grids and cards ────────────────────────────────────────────────────── */
|
|
94
|
+
.grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
|
|
95
|
+
@media (min-width: 900px) {
|
|
96
|
+
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
97
|
+
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
98
|
+
.grid.wide-left { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
|
|
99
|
+
.grid.wide-right { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
|
|
100
|
+
}
|
|
101
|
+
.grid.facts { display: grid; gap: 2px 24px; }
|
|
102
|
+
.card {
|
|
103
|
+
border: 1px solid var(--vscode-panel-border);
|
|
104
|
+
border-radius: 6px;
|
|
105
|
+
padding: 12px;
|
|
106
|
+
background: var(--bg-panel);
|
|
107
|
+
min-width: 0;
|
|
108
|
+
}
|
|
109
|
+
.card-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
|
|
110
|
+
.card-head h3, .band-card h3 {
|
|
111
|
+
margin: 0;
|
|
112
|
+
font-size: 0.78em;
|
|
113
|
+
font-weight: 600;
|
|
114
|
+
letter-spacing: 0.05em;
|
|
115
|
+
text-transform: uppercase;
|
|
116
|
+
color: var(--vscode-descriptionForeground);
|
|
117
|
+
}
|
|
118
|
+
.aside { margin-left: auto; font-size: 0.8em; color: var(--vscode-disabledForeground); }
|
|
119
|
+
.subsection { margin-top: 12px; }
|
|
120
|
+
.subhead { display: flex; gap: 8px; font-size: 0.8em; color: var(--vscode-descriptionForeground); margin-bottom: 4px; text-transform: uppercase; }
|
|
121
|
+
.facts { display: flex; flex-direction: column; gap: 2px; }
|
|
122
|
+
.fact { display: flex; align-items: baseline; gap: 8px; font-size: 0.92em; }
|
|
123
|
+
.fact-label { color: var(--vscode-descriptionForeground); }
|
|
124
|
+
.fact-value { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; }
|
|
125
|
+
.warn { display: flex; gap: 6px; margin: 4px 0; font-size: 0.92em; color: var(--sev-medium); line-height: 1.45; }
|
|
126
|
+
.warn-mark { font-size: 0.7em; margin-top: 3px; }
|
|
127
|
+
.note { margin: 4px 0; font-size: 0.92em; color: var(--vscode-descriptionForeground); line-height: 1.45; }
|
|
128
|
+
.blank { border: 1px dashed var(--border-2); border-radius: 6px; padding: 28px 16px; text-align: center; }
|
|
129
|
+
.blank-title { font-weight: 500; color: var(--vscode-descriptionForeground); margin-bottom: 6px; }
|
|
130
|
+
.blank-body { max-width: 56em; margin: 0 auto; font-size: 0.92em; color: var(--vscode-disabledForeground); line-height: 1.45; }
|
|
131
|
+
.footer { border: 1px solid var(--vscode-panel-border); border-radius: 6px; padding: 8px 12px; background: var(--bg-panel); font-size: 0.9em; color: var(--vscode-descriptionForeground); line-height: 1.5; }
|
|
132
|
+
.headline { display: flex; flex-wrap: wrap; gap: 4px 20px; border: 1px solid var(--vscode-panel-border); border-radius: 6px; padding: 8px 12px; background: var(--bg-panel); font-size: 0.92em; color: var(--vscode-descriptionForeground); }
|
|
133
|
+
.headline .num { color: var(--vscode-foreground); }
|
|
134
|
+
.examples summary { cursor: pointer; font-size: 0.85em; color: var(--vscode-descriptionForeground); }
|
|
135
|
+
.examples ul, .card ul.mono { margin: 4px 0 0; padding: 0; list-style: none; font-size: 0.85em; color: var(--vscode-descriptionForeground); }
|
|
136
|
+
.card ul.mono li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
137
|
+
.drift { display: inline-block; width: 5em; color: var(--vscode-disabledForeground); }
|
|
138
|
+
.lens-row { display: flex; gap: 8px; font-size: 0.92em; }
|
|
139
|
+
.lens-name { width: 7em; color: var(--vscode-descriptionForeground); }
|
|
140
|
+
|
|
141
|
+
/* ── bars ───────────────────────────────────────────────────────────────── */
|
|
142
|
+
.bars { display: flex; flex-direction: column; gap: 4px; }
|
|
143
|
+
.bar-row { display: flex; align-items: center; gap: 8px; }
|
|
144
|
+
.bar-label { flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.92em; color: var(--vscode-descriptionForeground); }
|
|
145
|
+
.bar { flex: 1; min-width: 0; }
|
|
146
|
+
.bar-track { fill: var(--bg-panel-2, var(--vscode-input-background)); }
|
|
147
|
+
.bar-value { width: 5em; flex-shrink: 0; text-align: right; font-variant-numeric: tabular-nums; font-size: 0.92em; }
|
|
148
|
+
.bar-trailing { width: 1.2em; flex-shrink: 0; text-align: center; color: var(--vscode-descriptionForeground); }
|
|
149
|
+
|
|
150
|
+
/* ── chips, legends, plots ─────────────────────────────────────────────── */
|
|
151
|
+
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 8px; }
|
|
152
|
+
.chip { border: 1px solid var(--border-2); border-radius: 3px; padding: 1px 7px; font-size: 0.85em; color: var(--vscode-descriptionForeground); }
|
|
153
|
+
.chip.on { border-color: var(--vscode-focusBorder); color: var(--vscode-foreground); }
|
|
154
|
+
.chip.ghost { color: var(--vscode-disabledForeground); }
|
|
155
|
+
.chip[disabled] { opacity: 0.5; cursor: not-allowed; }
|
|
156
|
+
.search { margin-left: 4px; padding: 1px 6px; border: 1px solid var(--border-2); border-radius: 3px; background: var(--vscode-input-background); color: var(--vscode-input-foreground); font: inherit; font-size: 0.85em; }
|
|
157
|
+
.plot { display: block; width: 100%; height: auto; }
|
|
158
|
+
.plot.ribbons, .plot.lanes { width: 100%; height: auto; }
|
|
159
|
+
.ribbons-host, .lanes-host { min-width: 0; }
|
|
160
|
+
.ribbon-name { font-family: var(--vscode-editor-font-family); font-size: 10.5px; }
|
|
161
|
+
.ribbon-layer { font-size: 10.5px; font-weight: 650; letter-spacing: 0.06em; }
|
|
162
|
+
.ribbon-count { font-weight: 400; letter-spacing: 0; }
|
|
163
|
+
.ribbon-pill { cursor: pointer; }
|
|
164
|
+
.ribbon-pill text { font-variant-numeric: tabular-nums; }
|
|
165
|
+
.ribbon-index { margin: 0; padding: 0; list-style: none; }
|
|
166
|
+
.chip-sep { margin: 0 2px 0 8px; font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.05em; color: var(--vscode-descriptionForeground); }
|
|
167
|
+
.mix-bar { display: flex; gap: 2px; height: 18px; width: 100%; max-width: 760px; }
|
|
168
|
+
.mix-bar > div { min-width: 2px; border-radius: 2px; }
|
|
169
|
+
.mix-labels { display: flex; gap: 2px; width: 100%; max-width: 760px; font-size: 0.8em; color: var(--vscode-foreground); }
|
|
170
|
+
.mix-labels > span { min-width: 2px; overflow: hidden; white-space: nowrap; }
|
|
171
|
+
.plot.pulse { width: 100%; height: auto; }
|
|
172
|
+
.plot .mark { cursor: pointer; }
|
|
173
|
+
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 8px; font-size: 0.8em; color: var(--vscode-descriptionForeground); }
|
|
174
|
+
.legend span { display: inline-flex; align-items: center; gap: 4px; }
|
|
175
|
+
.swatch { display: inline-block; width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }
|
|
176
|
+
.spread { display: flex; height: 12px; width: 100%; overflow: hidden; border-radius: 2px; background: var(--bg-panel-2, var(--vscode-input-background)); }
|
|
177
|
+
.spread.thin { height: 9px; flex: 1; min-width: 0; }
|
|
178
|
+
.spread > div { border-right: 1px solid var(--bg-panel); }
|
|
179
|
+
.who { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
|
|
180
|
+
.category-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; font-size: 0.92em; min-width: 12em; }
|
|
181
|
+
.category-list li { display: flex; align-items: center; gap: 8px; color: var(--vscode-descriptionForeground); }
|
|
182
|
+
.category-name { width: 7em; flex-shrink: 0; }
|
|
183
|
+
.category-list .num { width: 3.5em; text-align: right; }
|
|
184
|
+
.spark-row { display: flex; align-items: center; gap: 8px; font-size: 0.92em; color: var(--vscode-descriptionForeground); }
|
|
185
|
+
.spark-row .num { width: 3em; text-align: right; color: var(--vscode-foreground); }
|
|
186
|
+
.author-row { display: flex; align-items: center; gap: 8px; font-size: 0.92em; }
|
|
187
|
+
.author-name { width: 12em; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
188
|
+
.author-row .num { width: 3em; text-align: right; }
|
|
189
|
+
.earned { width: 11em; flex-shrink: 0; text-align: center; border: 1px solid var(--border-2); border-radius: 3px; font-size: 0.8em; padding: 0 4px; }
|
|
190
|
+
.earned.none { border-color: transparent; color: var(--vscode-disabledForeground); }
|
|
191
|
+
table.pairs { width: 100%; border-collapse: collapse; font-size: 0.9em; }
|
|
192
|
+
table.pairs th { text-align: left; font-weight: 500; font-size: 0.8em; text-transform: uppercase; color: var(--vscode-descriptionForeground); padding: 3px 6px; }
|
|
193
|
+
table.pairs td { padding: 3px 6px; border-top: 1px solid var(--vscode-panel-border); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
194
|
+
table.pairs td.num { text-align: right; }
|
|
195
|
+
table.pairs tbody tr { cursor: pointer; }
|
|
196
|
+
table.pairs tbody tr:hover { background: var(--vscode-list-hoverBackground); }
|
|
197
|
+
table.pairs tbody tr.on td { box-shadow: inset 0 1px 0 var(--vscode-focusBorder), inset 0 -1px 0 var(--vscode-focusBorder); }
|
|
198
|
+
|
|
199
|
+
/* ── the Map ────────────────────────────────────────────────────────────── */
|
|
200
|
+
.map-page { display: flex; flex-direction: column; height: calc(100vh - 110px); min-height: 420px; }
|
|
201
|
+
.map-bar, .map-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px 0; font-size: 0.9em; }
|
|
202
|
+
.bar-title { text-transform: uppercase; font-size: 0.78em; letter-spacing: 0.05em; color: var(--vscode-descriptionForeground); margin-right: 4px; }
|
|
203
|
+
.crumb { padding: 1px 4px; color: var(--vscode-descriptionForeground); }
|
|
204
|
+
.crumb.on { color: var(--vscode-focusBorder); }
|
|
205
|
+
.crumb-sep { color: var(--vscode-disabledForeground); }
|
|
206
|
+
.map-host { position: relative; flex: 1; min-height: 280px; overflow: hidden; border: 1px solid var(--vscode-panel-border); border-radius: 6px; }
|
|
207
|
+
.map-host canvas { position: absolute; inset: 0; touch-action: none; }
|
|
208
|
+
.map-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
|
|
209
|
+
/* Names sit in a slab's header strip (baseline clear of the 2 px gauge under it) or at a file's top. */
|
|
210
|
+
.card-label { position: absolute; overflow: hidden; display: flex; align-items: flex-end; gap: 6px; padding: 0 5px 3px; box-sizing: border-box; line-height: 1; white-space: nowrap; }
|
|
211
|
+
.card-label .card-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
212
|
+
.card-label .card-count { flex: none; font-variant-numeric: tabular-nums; font-size: 0.95em; }
|
|
213
|
+
.card-label.layer { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
|
|
214
|
+
.card-label.folder, .card-label.file { font-family: var(--vscode-editor-font-family); font-size: 10.5px; }
|
|
215
|
+
.card-label.file { align-items: flex-start; padding: 3px 4px 0; font-size: 10px; }
|
|
216
|
+
.map-hover { position: absolute; z-index: 10; display: none; max-width: 17rem; pointer-events: none; border: 1px solid var(--border-2); border-radius: 6px; padding: 6px 10px; background: var(--bg-elevated, var(--vscode-editorHoverWidget-background)); font-size: 0.8em; box-shadow: 0 4px 14px var(--vscode-widget-shadow); }
|
|
217
|
+
.hover-kind { text-transform: uppercase; letter-spacing: 0.04em; color: var(--vscode-disabledForeground); font-size: 0.9em; }
|
|
218
|
+
.hover-name { font-weight: 600; font-size: 1.1em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
219
|
+
.hover-path { font-family: var(--vscode-editor-font-family); color: var(--vscode-descriptionForeground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
220
|
+
.hover-read { margin-top: 4px; color: var(--vscode-descriptionForeground); line-height: 1.4; }
|
|
221
|
+
.hover-read b { color: var(--vscode-focusBorder); margin-right: 4px; }
|
|
222
|
+
.hover-links { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--vscode-panel-border); color: var(--vscode-descriptionForeground); }
|
|
223
|
+
.hover-hint { margin-top: 2px; color: var(--vscode-disabledForeground); }
|
|
224
|
+
.map-foot { position: absolute; left: 8px; right: 8px; bottom: 6px; display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 0.78em; color: var(--vscode-descriptionForeground); pointer-events: none; }
|
|
225
|
+
.map-band { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
|
|
226
|
+
.band-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
|
|
227
|
+
.band-name { font-family: var(--vscode-editor-font-family); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
|
|
228
|
+
.actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
|
|
229
|
+
.button { background: var(--vscode-button-background); color: var(--vscode-button-foreground); border-radius: 2px; padding: 3px 10px; font-size: 0.9em; }
|
|
230
|
+
.button:hover { background: var(--vscode-button-hoverBackground); }
|
|
231
|
+
.button.secondary { background: var(--vscode-button-secondaryBackground); color: var(--vscode-button-secondaryForeground); }
|
|
232
|
+
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
|
|
233
|
+
.tile { border: 1px solid var(--vscode-panel-border); border-radius: 6px; padding: 6px 10px; background: var(--bg-panel); }
|
|
234
|
+
.tile-value { font-size: 1.3em; font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
235
|
+
.tile-label { font-size: 0.85em; }
|
|
236
|
+
.tile-sub { font-size: 0.78em; color: var(--vscode-disabledForeground); }
|
|
237
|
+
.band-card { border: 1px solid var(--vscode-panel-border); border-radius: 6px; padding: 10px; background: var(--bg-panel); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
|
|
238
|
+
.band-card h3 { margin-bottom: 4px; }
|
|
239
|
+
.owner-row { display: flex; align-items: center; gap: 8px; font-size: 0.9em; }
|
|
240
|
+
.owner-name { width: 9em; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
241
|
+
.owner-bar { flex: 1; height: 6px; border-radius: 2px; background: var(--bg-panel-2, var(--vscode-input-background)); overflow: hidden; }
|
|
242
|
+
.owner-bar i { display: block; height: 100%; background: var(--vscode-focusBorder); }
|
|
243
|
+
.churn { margin-top: 6px; }
|
|
244
|
+
|
|
245
|
+
/* ── the plot readout (Owners & History) ────────────────────────────────── */
|
|
246
|
+
.readable { cursor: default; }
|
|
247
|
+
.plot .mark.readable { cursor: pointer; }
|
|
248
|
+
.readable:focus { outline: none; }
|
|
249
|
+
.readable:focus-visible { outline: 1px solid var(--vscode-focusBorder); outline-offset: 1px; }
|
|
250
|
+
.readable:hover { opacity: 0.85; }
|
|
251
|
+
.spark-hit { fill: transparent; }
|
|
252
|
+
.spark-hit:hover, .spark-hit:focus-visible { fill: var(--vscode-focusBorder); fill-opacity: 0.18; opacity: 1; outline: none; }
|
|
253
|
+
.plot-tip { position: fixed; z-index: 20; display: none; max-width: 22rem; pointer-events: none; border: 1px solid var(--border-2, var(--vscode-editorHoverWidget-border)); border-radius: 6px; padding: 6px 10px; background: var(--bg-elevated, var(--vscode-editorHoverWidget-background)); color: var(--vscode-editorHoverWidget-foreground, var(--vscode-foreground)); font-size: 0.8em; box-shadow: 0 4px 14px var(--vscode-widget-shadow); }
|
|
254
|
+
.tip-head { font-weight: 600; margin-bottom: 3px; overflow-wrap: anywhere; }
|
|
255
|
+
.tip-row { display: flex; justify-content: space-between; gap: 14px; line-height: 1.45; }
|
|
256
|
+
.tip-label { color: var(--vscode-descriptionForeground); }
|
|
257
|
+
.tip-value { font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
|
|
258
|
+
|
|
259
|
+
/* ── Attack surface, Entry points, Links (SAST reporting P6) ───────────── */
|
|
260
|
+
.verdict { display: flex; flex-direction: column; gap: 4px; }
|
|
261
|
+
.verdict-word { font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85em; }
|
|
262
|
+
.surface-plot { overflow-x: auto; }
|
|
263
|
+
.surface-plot svg { min-width: 640px; }
|
|
264
|
+
.plot-head { font-size: 11px; }
|
|
265
|
+
.plot-sub { font-size: 10px; }
|
|
266
|
+
.plot-row { font-size: 11.5px; }
|
|
267
|
+
.row-hit { cursor: pointer; }
|
|
268
|
+
.row-hit:focus { outline: none; }
|
|
269
|
+
.row-hit:focus-visible { stroke: var(--vscode-focusBorder); stroke-width: 1; }
|
|
270
|
+
.strip-host { overflow-x: auto; padding-bottom: 4px; }
|
|
271
|
+
.strip { display: block; margin: 4px 0; }
|
|
272
|
+
.strip-name { font-size: 11.5px; }
|
|
273
|
+
.strip-at { font-size: 10px; }
|
|
274
|
+
.sub-head { margin: 10px 0 4px; font-size: 0.8em; font-weight: 500; text-transform: uppercase; color: var(--vscode-descriptionForeground); }
|
|
275
|
+
.pins { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
|
|
276
|
+
.pins li { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
|
|
277
|
+
.pins .tier { flex-shrink: 0; color: var(--sev-high); }
|
|
278
|
+
table.pairs tbody tr.on td { background: var(--vscode-list-inactiveSelectionBackground); }
|
|
279
|
+
details.more summary { cursor: pointer; font-size: 0.85em; color: var(--vscode-descriptionForeground); }
|