@akasecurity/ai-tc-codex 0.9.4

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.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: aka-audit
3
+ description: Show AKA's recent enforcement decisions
4
+ ---
5
+
6
+ # AKA audit
7
+
8
+ Run the read script and show the user its output **exactly as printed**. The
9
+ script already prints its content inside a Markdown code fence — reproduce that
10
+ verbatim and do **not** add another code fence, strip the fence, or reformat it.
11
+ The fence is required: it is a space-aligned monospace table that Markdown would
12
+ otherwise collapse. Do not reformat or re-narrate the rows.
13
+
14
+ ```bash
15
+ node "${PLUGIN_ROOT}/scripts/query.js" audit
16
+ ```
17
+
18
+ This is the decision log: the most recent detections from `~/.aka/data/aka.db`
19
+ with the action AKA took (block / redact / warn / allow), the rule, and where it
20
+ fired (source tool + event kind). It is read-only.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: aka-dashboard
3
+ description: Launch the AKA web dashboard in your browser (reads your local store)
4
+ ---
5
+
6
+ # AKA dashboard
7
+
8
+ Launch the AKA web dashboard and relay the short status the script prints **as-is**.
9
+ The command returns immediately: it starts the dashboard server in the background
10
+ and it opens in the browser once ready, so a lack of further output is **not** an
11
+ error — do not wait on it or re-run it. If the script prints install guidance (the
12
+ `aka` CLI isn't installed), relay that verbatim.
13
+
14
+ If the user asked for a specific port, pass `--port <N>` through unchanged;
15
+ otherwise run it with no arguments.
16
+
17
+ ```bash
18
+ node "${PLUGIN_ROOT}/scripts/dashboard.js" [--port <N>]
19
+ ```
20
+
21
+ This mirrors the `aka dashboard` CLI command: it serves the OSS web-ui against
22
+ your local store at `~/.aka/data` (no backend) and opens
23
+ `http://localhost:4319/security`. The web server is bundled in the
24
+ `@akasecurity/cli` package — the plugin ships no server of its own — so the
25
+ launcher delegates to the `aka` CLI and, if it isn't installed, prints how to get
26
+ it. For the terminal-only read surfaces, use the aka-health, aka-findings,
27
+ aka-recommend, aka-audit, or aka-tokens skills instead.
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: aka-detections
3
+ description: List installed AKA detection packs, versions, and available updates
4
+ ---
5
+
6
+ # AKA detections
7
+
8
+ Run the read script and show the user its output **exactly as printed**. The
9
+ script already prints its content inside a Markdown code fence — reproduce that
10
+ verbatim and do **not** add another code fence, strip the fence, or reformat it.
11
+ The fence is required: it is a space-aligned monospace table that Markdown would
12
+ otherwise collapse. Do not reformat the columns or restate each row.
13
+
14
+ ```bash
15
+ node "${PLUGIN_ROOT}/scripts/query.js" detections
16
+ ```
17
+
18
+ This lists the detection packs installed in `~/.aka/data/aka.db` — one row per
19
+ pack with its installed version, the latest version this plugin ships, rule
20
+ count, enabled state, assigned enforcement policy, and whether an update is
21
+ available. These packs are what the plugin actually scans with.
22
+
23
+ Detection updates are **never applied automatically** — a plugin upgrade only
24
+ records what's newly available; the installed packs keep running unchanged
25
+ until the user updates them. This skill is strictly **read-only**: do not
26
+ apply, enable, disable, or re-policy a detection from here. If the user wants
27
+ to update, tell them to run one of these themselves in a terminal:
28
+
29
+ - `aka detections update --all` — update every pack
30
+ - `aka detections update <pack-id>` — update one pack
31
+ - `aka dashboard` → Detections → **Update** — review and apply in the dashboard
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: aka-exceptions
3
+ description: List active AKA detection exceptions (masked) from the local store
4
+ ---
5
+
6
+ # AKA exceptions
7
+
8
+ Run the read script and show the user its output **exactly as printed**. The
9
+ script already prints its content inside a Markdown code fence — reproduce that
10
+ verbatim and do **not** add another code fence, strip the fence, or reformat it.
11
+ The fence is required: it is a space-aligned monospace table that Markdown would
12
+ otherwise collapse. Do not reformat the columns or restate each row.
13
+
14
+ ```bash
15
+ node "${PLUGIN_ROOT}/scripts/query.js" exceptions
16
+ ```
17
+
18
+ This lists the **active** detection exceptions from `~/.aka/data/aka.db` — the
19
+ masked value, rule, scope, relative expiry, use count, and who granted it. The
20
+ approved value is never stored, only a keyed fingerprint and a masked preview.
21
+
22
+ This skill is strictly **read-only**. Do not offer to create, approve, or
23
+ revoke an exception from here — creation and revocation happen only in a
24
+ terminal, out-of-band, via the `aka` CLI (`aka exception approve`,
25
+ `aka exception revoke <id>`; see `aka exception --help`). If the user asks you
26
+ to grant or revoke one, tell them to run those commands themselves in a
27
+ terminal instead.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: aka-findings
3
+ description: List recent AKA findings (masked) from the local store
4
+ ---
5
+
6
+ # AKA findings
7
+
8
+ Run the read script and show the user its output **exactly as printed**. The
9
+ script already prints its content inside a Markdown code fence — reproduce that
10
+ verbatim and do **not** add another code fence, strip the fence, or reformat it.
11
+ The fence is required: it is a space-aligned monospace table that Markdown would
12
+ otherwise collapse. Do not reformat the columns or restate each row.
13
+
14
+ If the user asked to filter by severity — e.g. `--critical`, `--high`,
15
+ `--medium`, `--low`, or `--severity <level>` — pass that flag through to the
16
+ script unchanged. Otherwise run it with no flag.
17
+
18
+ ```bash
19
+ node "${PLUGIN_ROOT}/scripts/query.js" findings [--severity <critical|high|medium|low>]
20
+ ```
21
+
22
+ This lists the most recent findings from `~/.aka/data/aka.db` with their rule,
23
+ category, severity, action taken, and the **masked** match (raw secrets are
24
+ never stored), narrowed to one severity when a filter is given. It is read-only.
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: aka-health
3
+ description: Show AKA detection activity and local security posture
4
+ ---
5
+
6
+ # AKA health
7
+
8
+ Run the read script and show the user its output **exactly as printed**. The
9
+ script already prints its content inside a Markdown code fence — reproduce that
10
+ verbatim and do **not** add another code fence, strip the fence, or reformat it.
11
+ The fence is required: it is space-aligned monospace (gauges, bars, a 7-day chart)
12
+ that Markdown would otherwise collapse. Do not reformat or summarize the table;
13
+ you may add at most one short sentence of context after it.
14
+
15
+ ```bash
16
+ node "${PLUGIN_ROOT}/scripts/query.js" health
17
+ ```
18
+
19
+ This reads the local store at `~/.aka/data/aka.db` (detection activity, action
20
+ breakdown, category coverage, last 7 days). It is read-only. If the store is
21
+ empty, the script says so — relay that as-is; nothing is wrong.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: aka-recommend
3
+ description: Surface AKA's top recommendations from recent findings
4
+ ---
5
+
6
+ # AKA recommend
7
+
8
+ Run the read script and show the user its output **exactly as printed**. The
9
+ script already prints its content inside a Markdown code fence — reproduce that
10
+ verbatim and do **not** add another code fence, strip the fence, or reformat it.
11
+ The fence is required: the output is space-aligned monospace whose lines start
12
+ with characters like `1.` and `●`; shown unfenced, Markdown collapses the
13
+ indentation and turns those into auto-numbered lists and bullets. You may expand
14
+ on the suggested next steps if the user asks, but lead with the output as-is.
15
+
16
+ ```bash
17
+ node "${PLUGIN_ROOT}/scripts/query.js" recommend
18
+ ```
19
+
20
+ This groups recent findings by category (ranked by severity, then frequency) and
21
+ prints a plain-language next step for each. It is read-only over
22
+ `~/.aka/data/aka.db`.
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: aka-scan
3
+ description: Scan working-tree source files for code security flaws
4
+ ---
5
+
6
+ # AKA scan
7
+
8
+ ## Single-repo scan (default)
9
+
10
+ Run the worktree scan script and show the user its output **exactly as printed**.
11
+ The script already prints its content inside a Markdown code fence — reproduce
12
+ that verbatim and do **not** add another code fence, strip the fence, or reformat it.
13
+ The fence is required: it is space-aligned monospace that Markdown would otherwise
14
+ collapse.
15
+
16
+ ```bash
17
+ node "${PLUGIN_ROOT}/scripts/filescan.js" --dir "${PWD}"
18
+ ```
19
+
20
+ This scans all source files (`.ts`, `.js`, `.py`, `.java`, `.rb`, `.cs`, `.go`,
21
+ `.rs`, `.php`, and more) under the current project directory for insecure code
22
+ patterns — SQL injection, command injection, XSS, insecure deserialization, weak
23
+ cryptography, hardcoded credentials, dev-mode configuration leaks, and other
24
+ OWASP Top 10 issues.
25
+
26
+ Results are recorded to the local store (`~/.aka/data/aka.db`) and are visible
27
+ via the aka-findings skill. Re-running this scan is safe — files whose content
28
+ has already been recorded are skipped.
29
+
30
+ Files excluded by the repo's `.gitignore` are **still scanned** — local scratch
31
+ and generated files are a common place for real secrets to hide — but their
32
+ findings are marked as coming from gitignored content and reported as
33
+ informational in the summary.
34
+
35
+ To exclude paths from scanning entirely, add a `.akaignore` file (gitignore
36
+ syntax, any directory level). Unlike `.gitignore`, `.akaignore` is a **hard
37
+ skip**: matching files are never read and produce no findings. A negation also
38
+ re-includes a directory the scanner skips by default — e.g. `!vendor/` scans
39
+ first-party code living under `vendor/`.
40
+
41
+ ## Multi-repo scan (opt-in)
42
+
43
+ To scan **all git repositories** found under the current directory (up to 4
44
+ directory levels deep), use the `--discover` flag:
45
+
46
+ ```bash
47
+ node "${PLUGIN_ROOT}/scripts/filescan.js" --discover
48
+ ```
49
+
50
+ To search from a different directory, pass `--root` (and optionally `--depth`):
51
+
52
+ ```bash
53
+ node "${PLUGIN_ROOT}/scripts/filescan.js" --discover --root ~/projects --depth 3
54
+ ```
55
+
56
+ Discovery walks the filesystem from the search root looking for `.git`
57
+ directories. It skips large system directories (`Library`, `node_modules`, etc.)
58
+ and stops recursing once a repo root is found (submodules are not separately
59
+ enumerated). The output shows a per-repository breakdown in addition to the
60
+ aggregate totals.
61
+
62
+ **Scope confirmation:** `--discover` never sweeps the home directory implicitly —
63
+ the default root is the current directory. Before passing a `--root` outside the
64
+ current project (especially `--root ~`, the whole-machine sweep), tell the user
65
+ what will be read and ask for explicit confirmation. Do not assume consent from
66
+ a generic "scan everything" phrasing without naming the scope.
67
+
68
+ Deduplication is global across all repos in a single `--discover` run — a file
69
+ whose content hash is already recorded (from a previous scan or a live hook
70
+ capture) is skipped regardless of which repo it lives in.