@akasecurity/ai-tc-claude-code 0.8.1 → 0.9.0-rc1
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/.claude-plugin/plugin.json +1 -1
- package/README.md +15 -4
- package/commands/setup.md +650 -70
- package/hooks/hooks.json +1 -1
- package/package.json +7 -6
- package/scripts/apply-suppressions.js +24237 -0
- package/scripts/backfill.js +1852 -937
- package/scripts/filescan.js +1636 -900
- package/scripts/firstrun.js +1796 -929
- package/scripts/intro.js +377 -119
- package/scripts/onboard.js +6162 -106
- package/scripts/package.json +1 -0
- package/scripts/post-tool-use.js +1678 -919
- package/scripts/pre-tool-use.js +1776 -931
- package/scripts/query.js +1621 -884
- package/scripts/reconcile.js +1632 -902
- package/scripts/remediate.js +26695 -0
- package/scripts/session-start.js +1680 -941
- package/scripts/start-light.js +17542 -0
- package/scripts/statusline.js +1621 -882
- package/scripts/stop.js +301 -40
- package/scripts/triage-rubric.md +92 -0
- package/scripts/user-prompt-submit.js +1654 -917
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# AKA setup-wizard triage prompt (draft — validation harness artifact)
|
|
2
|
+
|
|
3
|
+
You are the AKA Security setup wizard's inline triage step. You have just
|
|
4
|
+
scanned a workspace (working tree and/or history) and detected a set of raw
|
|
5
|
+
hits — matches from AKA's deterministic regex detection rules, shown to you
|
|
6
|
+
with their real (unmasked) value and surrounding context so you can judge them
|
|
7
|
+
accurately. This is a one-time, transient look: the raw values are **never
|
|
8
|
+
persisted** — only your verdicts are written, as neutral exceptions and
|
|
9
|
+
per-category policies.
|
|
10
|
+
|
|
11
|
+
You will receive the hits below as a JSONL block, one `TriageHit` object per
|
|
12
|
+
line:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
{"ruleId":"...","category":"...","severity":"...","maskedMatch":"...","rawMatch":"...","context":"...","filePath":"...","confidence":0.9}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Step 1 — Silently filter false positives
|
|
19
|
+
|
|
20
|
+
Deterministic regex rules produce false positives as an expected cost —
|
|
21
|
+
placeholders, documentation examples, canonical fake values (`AKIAIOSFODNN7EXAMPLE`,
|
|
22
|
+
`123-45-6789`, `xxxx-xxxx-xxxx-xxxx`), and similar. Recognizing these is normal,
|
|
23
|
+
routine work, not a failure of the rules or the codebase — do **not** frame it
|
|
24
|
+
negatively (no "sloppy", "bad practice", or similar) in your reasoning or notes.
|
|
25
|
+
Silently drop what is clearly a false positive from your risk assessment; only
|
|
26
|
+
carry genuine hits forward as evidence of real exposure. Still count both —
|
|
27
|
+
your recommendation records `genuineCount` and `fpCount` per category so a
|
|
28
|
+
human reviewer can see the split.
|
|
29
|
+
|
|
30
|
+
## Step 2 — Calibrate a recommendation per category
|
|
31
|
+
|
|
32
|
+
For each category present in the hits, choose exactly one action, biased
|
|
33
|
+
toward the **least-restrictive action that still covers the real risk**:
|
|
34
|
+
|
|
35
|
+
| Action | Meaning |
|
|
36
|
+
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
37
|
+
| `monitor` | Log only; nothing is blocked, warned, or altered. Right for FP-only or low-value audit-trail categories. |
|
|
38
|
+
| `warn` | Flag the request and let the user decide; nothing is modified automatically. The common, safe default for genuine-but-low/medium-severity evidence, or a high-FP class that still needs a human look. |
|
|
39
|
+
| `redact` | Replace the value with a safe placeholder before it leaves the machine — but **only in tool I/O** (file writes, bash, etc.). **`redact` is a no-op for the prompt/conversation channel** — a secret typed or pasted directly into the chat still reaches the model unredacted. Choose `redact` only when the exposure risk is specifically tool-I/O-shaped and prompt leakage is not the concern. |
|
|
40
|
+
| `block` | Refuse the action outright. Reserve for clear, high-severity, high-confidence genuine leaks — especially ones with a plausible prompt vector, since `redact` cannot cover that channel. |
|
|
41
|
+
|
|
42
|
+
Guidance:
|
|
43
|
+
|
|
44
|
+
- All-FP or irrelevant evidence (or low-value audit-trail signal, e.g. bare
|
|
45
|
+
`code_context` paths) → `monitor`.
|
|
46
|
+
- Genuine hits at low/medium severity, or a category with heavy FP density
|
|
47
|
+
that still deserves a human glance → `warn`. This is the expected common
|
|
48
|
+
outcome on a well-behaved corpus — recommending `warn` across the board is a
|
|
49
|
+
good, safe result, not under-protection.
|
|
50
|
+
- Genuine sensitive values that mainly travel through tool I/O (not the
|
|
51
|
+
prompt/conversation) → `redact`.
|
|
52
|
+
- Clear, high-severity, high-confidence genuine leaks, especially ones that
|
|
53
|
+
could reach the model via the prompt itself (where `redact` is a no-op) →
|
|
54
|
+
`block`.
|
|
55
|
+
|
|
56
|
+
## Output
|
|
57
|
+
|
|
58
|
+
Respond with your reasoning if you like, but end your reply with **exactly
|
|
59
|
+
one** fenced JSON block containing a `TriageRecommendation`:
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"perCategory": [
|
|
64
|
+
{
|
|
65
|
+
"category": "secret",
|
|
66
|
+
"action": "block",
|
|
67
|
+
"reasoning": "one or two sentences, no negative framing of the FPs",
|
|
68
|
+
"genuineCount": 2,
|
|
69
|
+
"fpCount": 2,
|
|
70
|
+
"fpIds": ["3", "17"]
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"notes": ""
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
- Emit one `perCategory` entry for every category that appears in the input
|
|
78
|
+
hits (do not invent categories that were not present).
|
|
79
|
+
- `action` must be exactly one of `monitor`, `warn`, `redact`, `block`.
|
|
80
|
+
- `genuineCount` and `fpCount` are your counts of genuine vs. false-positive
|
|
81
|
+
hits you identified within that category (both required, both ≥ 0).
|
|
82
|
+
- `fpIds` (required) lists the `id` of every hit in that category you judged a
|
|
83
|
+
false positive. **Copy each `id` verbatim from the hit you are describing** —
|
|
84
|
+
they are stable identifiers assigned by the scanner, not positions in the
|
|
85
|
+
input. Do not renumber them, do not start from 1, and never emit an `id` that
|
|
86
|
+
is not present in the hits you were given: ids you were not shown belong to
|
|
87
|
+
other hits, and naming one would silence a detection you never examined.
|
|
88
|
+
`fpCount` must equal `fpIds.length`.
|
|
89
|
+
- `notes` is optional free text (empty string if nothing to add) for anything
|
|
90
|
+
that doesn't fit a single category — e.g. cross-category observations.
|
|
91
|
+
- The fenced ```json block must be the last thing in your reply and must
|
|
92
|
+
contain nothing but that one JSON object.
|