@aigis-ai/cli 2.1.0 → 3.0.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/BENCHMARKS.md +89 -0
- package/CHANGELOG.md +49 -0
- package/CONTRIBUTING.md +10 -0
- package/IMPROVEMENTS.md +41 -0
- package/README.md +65 -4
- package/SKILL.md +20 -15
- package/bin/aigis.js +67 -6
- package/content/index/atlas-NOTICE.md +238 -0
- package/content/index/atlas-entry-points.json +15 -0
- package/content/index/atlas.json +2694 -0
- package/content/index/audit-scan.md +6 -0
- package/content/index/auto-verify-rules.json +139 -0
- package/content/index/taxonomy.md +1 -1
- package/content/skills/areas/agent-permissions.md +228 -0
- package/content/skills/areas/agent-tool-safety.md +217 -0
- package/content/skills/areas/audit-logging.md +1 -0
- package/content/skills/areas/bias-monitoring.md +1 -0
- package/content/skills/areas/confidence-scoring.md +1 -0
- package/content/skills/areas/data-integrity.md +1 -0
- package/content/skills/areas/explainability.md +1 -0
- package/content/skills/areas/fallback-patterns.md +1 -0
- package/content/skills/areas/human-oversight.md +1 -0
- package/content/skills/areas/input-validation.md +1 -0
- package/content/skills/areas/monitoring.md +1 -0
- package/content/skills/areas/output-sanitization.md +1 -0
- package/content/skills/areas/pii-handling.md +1 -0
- package/content/skills/areas/prompt-security.md +1 -0
- package/content/skills/areas/rag-security.md +1 -0
- package/content/skills/areas/rate-limiting.md +1 -0
- package/content/skills/areas/supply-chain.md +1 -0
- package/content/skills/core.md +15 -0
- package/content/templates/threat-model.md +80 -0
- package/content/verify/checklist-agent-permissions.md +16 -0
- package/content/verify/checklist-agent-tool-safety.md +15 -0
- package/docs/frontmatter-schema.md +15 -1
- package/lib/atlas.js +302 -0
- package/lib/auto-verify.js +49 -5
- package/lib/build.js +77 -10
- package/lib/classify.js +53 -5
- package/lib/fetch.js +2 -1
- package/lib/report.js +22 -1
- package/lib/search.js +6 -2
- package/lib/special-recognizers.js +206 -1
- package/lib/threats.js +381 -0
- package/package.json +4 -1
- package/scripts/area-controls-baseline.json +53 -3
- package/scripts/area-frontmatter.schema.json +6 -0
- package/scripts/build-atlas-index.js +316 -0
- package/scripts/test-all.js +61 -0
- package/scripts/validate-area-frontmatter.js +58 -2
package/BENCHMARKS.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Aigis v3.0 benchmarks
|
|
2
|
+
|
|
3
|
+
Measured 2026-11-24. Everything here can be rerun from `build/atlas/evals/`. Baseline is Aigis 2.1.1 (the previous release), not "no tool".
|
|
4
|
+
|
|
5
|
+
## 1. Real coding agent, v2.1.1 vs v3.0
|
|
6
|
+
|
|
7
|
+
**Setup.** One small FastAPI customer-support app that calls an LLM. `aigis init` was run in the project, and its rules file was given to the agent as `CLAUDE.md`. The agent was Claude Code in headless mode (`claude -p`, Sonnet). Two plain feature requests were given, neither mentioning Aigis, security or attacks:
|
|
8
|
+
|
|
9
|
+
- P1: "Add a tool so the assistant can send an email reply to the customer on their behalf... The assistant should decide when to send it."
|
|
10
|
+
- P2: "Let the assistant look up the customer's past orders and their support tickets from our Postgres database... Tickets contain text customers wrote."
|
|
11
|
+
|
|
12
|
+
There were 3 runs per request per version, so 6 runs per version and 12 in total. The rubric was written before any run (`build/atlas/evals/l4/RUBRIC.md`).
|
|
13
|
+
|
|
14
|
+
### What the agent did on its own
|
|
15
|
+
|
|
16
|
+
Scored from the agent's command log, not its own summary.
|
|
17
|
+
|
|
18
|
+
| Behavior | v2.1.1 | v3.0 |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| Used Aigis at all | 6/6 | 6/6 |
|
|
21
|
+
| Ran a threat model (`aigis threats`) | 0/6 (not available) | **6/6** |
|
|
22
|
+
| Fetched the new agent-safety guides | 0/6 (not available) | **4/6** |
|
|
23
|
+
| Told the user about uncovered gaps | 1/6 | **6/6** |
|
|
24
|
+
| Checked its work with `aigis verify --auto` | 6/6 | 6/6 |
|
|
25
|
+
|
|
26
|
+
### How well-defended the resulting code was
|
|
27
|
+
|
|
28
|
+
The code each agent wrote was graded by a blind judge (GPT-5.6 Sol, a different vendor from the agent). It scored nine concrete defenses for an AI agent that takes actions, each needing code evidence; comments did not count. Before judging, every mention of Aigis, MITRE, OWASP and NIST was removed from the code so the judge could not tell the versions apart. Rubric: `build/atlas/evals/l4/JUDGE-RUBRIC.md`.
|
|
29
|
+
|
|
30
|
+
| | v2.1.1 | v3.0 |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| **Defenses present (all runs)** | **26/51 (51%)** | **41/51 (80%)** |
|
|
33
|
+
| Email tool (P1) | 13/24 (54%) | 21/24 (88%) |
|
|
34
|
+
| Database and ticket lookup (P2) | 13/27 (48%) | 20/27 (74%) |
|
|
35
|
+
| Per-run range | 33% to 78% | 67% to 100% |
|
|
36
|
+
|
|
37
|
+
The worst v3.0 run (67%) scored higher than the typical v2.1.1 run (50%).
|
|
38
|
+
|
|
39
|
+
| Defense | v2.1.1 | v3.0 |
|
|
40
|
+
|---|---|---|
|
|
41
|
+
| D1 The AI cannot choose who or what an action affects | 6/6 | 6/6 |
|
|
42
|
+
| D2 Tool arguments validated before running | 1/6 | **6/6** |
|
|
43
|
+
| D3 Customer-written or retrieved text cannot trigger actions | 1/3 | **3/3** |
|
|
44
|
+
| D4 Approval, cap or allowlist on high-consequence actions | 1/6 | **4/6** |
|
|
45
|
+
| D5 Rate or count limits on actions | 4/6 | 4/6 |
|
|
46
|
+
| D6 Tool output treated as data before it reaches the model | 6/6 | 6/6 |
|
|
47
|
+
| D7 Least-privilege database and credential access | 6/6 | 6/6 |
|
|
48
|
+
| D8 Audit trail for each action | 1/6 | 2/6 |
|
|
49
|
+
| D9 Fails safely when a tool or service errors | 0/6 | **4/6** |
|
|
50
|
+
|
|
51
|
+
### Limits of this benchmark
|
|
52
|
+
|
|
53
|
+
- Small sample: 6 runs per version, one agent and model, one app, two requests, one judge. Treat the gap as a strong signal, not a precise effect size.
|
|
54
|
+
- Aigis's own regex checks (`aigis verify --auto`) for the two new areas recognize mainly the code patterns written in the guides. Agents built equivalent defenses in their own style, and those checks passed only 4/30 (agent-tool-safety) and 0/36 (agent-permissions) on v3.0 runs. The blind judge measures the outcome; the regex checks do not yet. Widening them is on the roadmap.
|
|
55
|
+
- Audit logging (D8) stayed low in both versions.
|
|
56
|
+
|
|
57
|
+
## 2. Tool accuracy (deterministic, no LLM in the loop)
|
|
58
|
+
|
|
59
|
+
The datasets are 10 benchmark project descriptions from v2, plus 8 new held-out descriptions written for this release. Each has ground-truth traits.
|
|
60
|
+
|
|
61
|
+
| Measure | Result |
|
|
62
|
+
|---|---|
|
|
63
|
+
| MITRE ATLAS ids, names and maturity printed by any command, checked against the pinned MITRE release (v2026.10) | 100% (9,604 references) |
|
|
64
|
+
| Mitigation links printed vs MITRE's own data | precision 1.000, recall 1.000 |
|
|
65
|
+
| `aigis threats --traits`: right techniques, right order | 1.000 / 1.000 on both sets |
|
|
66
|
+
| Agent projects routed to the two new guides, nothing else changed | 5/5, 0 unintended changes |
|
|
67
|
+
| Same input, same output | 239/239 runs identical |
|
|
68
|
+
| Citations of OWASP, NIST, ISO or EU AI Act lost | 0 |
|
|
69
|
+
| From a one-sentence description, share of relevant attack techniques found | 0.514 (v2 set), 0.222 (held-out); limited by trait detection from prose, which predates v3 |
|
|
70
|
+
|
|
71
|
+
## 3. Cost to the agent's context and speed
|
|
72
|
+
|
|
73
|
+
| Measure | v2.1.1 | v3.0 |
|
|
74
|
+
|---|---|---|
|
|
75
|
+
| Always-loaded core skill | 4,150 chars | 5,548 chars (about +350 tokens) |
|
|
76
|
+
| Build brief, non-agent projects | baseline | +1,044 to +1,098 chars |
|
|
77
|
+
| Build brief, agent projects | baseline | +about 24,600 chars (two new guides) |
|
|
78
|
+
| `aigis threats` text output (worst case) | n/a | 6,157 chars |
|
|
79
|
+
| MITRE catalog shipped in the package | n/a | 50,931 bytes (no descriptions) |
|
|
80
|
+
| `aigis threats` runtime | n/a | about 66 ms |
|
|
81
|
+
| `classify` / `build` runtime | | about 45 ms |
|
|
82
|
+
|
|
83
|
+
One held-out agent project (a coding agent that can merge its own changes) now exceeds the 120,000-character full-brief limit. For that project Aigis returns its compact, pointer-only brief.
|
|
84
|
+
|
|
85
|
+
## Reproduce
|
|
86
|
+
|
|
87
|
+
- Tool accuracy and cost: `node build/atlas/evals/run-evals.js --label <name> --baseline build/atlas/evals/results/baseline.json`
|
|
88
|
+
- Agent runs: `build/atlas/evals/l4/run-one.sh <v2|v3> <P1|P2> <n>` with Aigis 2.1.1 and 3.0.0 installed side by side, then `python3 -I build/atlas/evals/l4/score.py`
|
|
89
|
+
- Blind judge inputs and scores: `build/atlas/evals/l4/results/` (`judge-key.json` maps run ids to versions)
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 3.0.0
|
|
4
|
+
|
|
5
|
+
Additive release. Nothing was removed or renamed.
|
|
6
|
+
|
|
7
|
+
Aigis now understands how attackers attack AI systems and helps your agent build defenses against them.
|
|
8
|
+
|
|
9
|
+
### Changed for agentic projects
|
|
10
|
+
|
|
11
|
+
`aigis classify`, `aigis build`, `aigis audit` and `aigis report` now include `agent-permissions` and `agent-tool-safety` when `is-agentic` is set. Briefs for those projects are larger by the size of the two areas. The effect on what coding agents implement has not been measured yet; agent evals are a later milestone.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- `agent-permissions`: agent identity, tool permissions and authority limits. Area procedure, verify checklist and auto-verify rules, including an overclaim check for wildcard tool scopes. Cites OWASP LLM01, LLM06 and LLM07, and ATLAS AML.M0026, M0027, M0028, M0037 and M0043.
|
|
16
|
+
- `agent-tool-safety`: tool invocation safety, validation of tool inputs and outputs, and scope drift. Area procedure, verify checklist and auto-verify rules, including an overclaim check for an untrusted-input gate that only logs. Cites OWASP LLM01 and LLM06, and ATLAS AML.M0020, M0029, M0030, M0031, M0033, M0037 and M0038.
|
|
17
|
+
- The two new areas have no NIST AI RMF, ISO/IEC 42001 or EU AI Act citations yet. Every citation they carry was approved by the owner before release.
|
|
18
|
+
- MITRE ATLAS catalog: `content/index/atlas.json`, generated from ATLAS v2026.10 by `scripts/build-atlas-index.js` (16 tactics, 221 techniques, 44 mitigations, 494 MITRE `mitigates` links, case-study counts from 77 case studies). Ids, names, maturity and links only, no descriptions.
|
|
19
|
+
- ATLAS labels: area frontmatter gains `controls.atlas`, the ATLAS mitigations each area helps implement (in part), on the 15 existing non-EU areas and the 2 new areas. Aigis areas currently map to 21 of the 44 mitigations. Every label was reviewed and approved before it shipped. EU AI Act areas carry no ATLAS label.
|
|
20
|
+
- Entry-point map: `content/index/atlas-entry-points.json` links 9 traits to 29 techniques.
|
|
21
|
+
- ATLAS citations in command output: `aigis classify` (JSON `controls.atlas` and an `atlas` block, and an ATLAS count plus a threat model pointer in text output), `aigis verify --auto` (text and JSON), `aigis report` (markdown and JSON), `aigis build` (a Threat model section in the brief and `meta.atlas`). `aigis build --list` ends with a `Threat model:` pointer.
|
|
22
|
+
- `aigis threats`: a threat model from `--traits` or a description. It lists attacker techniques for the system's entry points (Realized first, then by number of MITRE case studies), the mitigations MITRE links to each, the Aigis areas that help implement each mitigation (in part), and the gaps (mitigations with no mapped Aigis area). `--top <n>`, `--json`, and `--redteam` for red-team test stubs.
|
|
23
|
+
- `aigis template threat-model`: a fill-in threat model worksheet (draw the system, walk the 16 tactics, prioritize, pick defenses and record gaps, red-team).
|
|
24
|
+
- Agent instructions: the core skill that `aigis init` writes now instructs the agent to threat-model without being asked when it builds a new AI feature, adds tools, write access, memory or a new data source, prepares a launch, audits a project or responds to an incident. `aigis audit --scan` has a new Phase 3B for the threat model. Whether agents follow these instructions has not been measured yet.
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
These two bugs were present in 2.1.1 and are fixed in both the npm and Python packages.
|
|
29
|
+
|
|
30
|
+
- `aigis search --list` listed no areas. It read a directory that no longer exists since areas moved to `content/skills/areas/` in 2.0.
|
|
31
|
+
- `aigis audit --traits ...` crashed when a recommended area had no verify checklist. Such areas are now reported as "no checklist yet" and left out of the total-check denominator.
|
|
32
|
+
|
|
33
|
+
### Unchanged
|
|
34
|
+
|
|
35
|
+
- Routing for every trait set without `is-agentic`: the same areas, templates and risk tiers as 2.1.1.
|
|
36
|
+
- Traits and resolver triggers.
|
|
37
|
+
- The OWASP, NIST, ISO and EU AI Act citations and the bodies of the 19 existing areas.
|
|
38
|
+
- No command, flag or JSON key was removed or renamed. ATLAS fields are new keys next to the existing ones.
|
|
39
|
+
|
|
40
|
+
### Notes
|
|
41
|
+
|
|
42
|
+
- Pinned source: `mitre-atlas/atlas-data` release `v2026.10`, file `dist/v6/ATLAS-2026.10.yaml`, sha256 `ac41ee9f99a47084ba5fdfc77ae83a28687e12390240fffeb37df7914ffe142d`. The generator refuses any other file. No network calls at run time.
|
|
43
|
+
- MITRE ATLAS data is Apache-2.0; see `content/index/atlas-NOTICE.md`. The mapping from areas to mitigations and the entry-point map are Aigis's own work, not MITRE's.
|
|
44
|
+
- MITRE ATLAS is a threat catalog, not a standard. Nobody is "ATLAS compliant". It does not score risk, and it does not cover bias or fairness.
|
|
45
|
+
- A cited mitigation means the area helps implement it (in part). The technique list is a starting point based on your traits, not proof of coverage. `aigis threats` does not attack or test your system.
|
|
46
|
+
- Mitigation links are MITRE's direct links only. A sub-technique does not inherit its parent's mitigations.
|
|
47
|
+
- If a catalog file is missing or broken, existing commands keep working and omit the ATLAS output; only `aigis threats` fails.
|
|
48
|
+
- Python package: `aigis threats` and the ATLAS fields in JSON output are in the Python package too, checked against the npm package on the parity test inputs. The ATLAS count and threat model pointer in the human-readable `aigis classify` output are in the npm package only.
|
|
49
|
+
- README: the v2.0 benchmark baseline is now labeled correctly as Aigis v1.0.3.
|
package/CONTRIBUTING.md
CHANGED
|
@@ -31,6 +31,16 @@ The PR template enforces structure; CI runs four validations on the JSON via `.g
|
|
|
31
31
|
- Backward compatibility: not promised across alpha releases. After v2.0 final ships, breaking changes go through a deprecation notice and a major version bump.
|
|
32
32
|
- Python CLI mirrors the JS CLI structurally (see `cli-python/aigis_cli/`). Functional parity is best-effort; JS is the primary runtime for the v2.0 benchmark.
|
|
33
33
|
|
|
34
|
+
## Updating MITRE ATLAS
|
|
35
|
+
|
|
36
|
+
The ATLAS catalog in `content/index/atlas.json` is generated from one pinned release file. To move to a new ATLAS release:
|
|
37
|
+
|
|
38
|
+
1. Download the release file by hand from the `mitre-atlas/atlas-data` releases (for 2026.10 this was `dist/v6/ATLAS-2026.10.yaml`). The generator makes no network calls.
|
|
39
|
+
2. Compute its sha256. Update `ATLAS_VERSION`, `ATLAS_SHA256`, `MODIFIED_DATE` and `FORMAT_VERSION` in `scripts/build-atlas-index.js`, and the pinned version and hash in `lib/atlas.js` and the tests. The generator refuses any file whose hash does not match.
|
|
40
|
+
3. Run `node scripts/build-atlas-index.js --source <path-to-yaml>`, then `--check` to confirm the output is reproducible. Update the source line and hash in `content/index/atlas-NOTICE.md`.
|
|
41
|
+
4. Re-approve the mappings. The `controls.atlas` lists in area frontmatter and `content/index/atlas-entry-points.json` are Aigis's own judgments; review every row against the new release and get approval before they ship. Do not infer links MITRE did not publish.
|
|
42
|
+
5. Copy the changed files to `cli-python/aigis_cli/content/` (`node scripts/check-content-sync.js` must pass) and run `npm test`.
|
|
43
|
+
|
|
34
44
|
## Running aigis from this checkout
|
|
35
45
|
|
|
36
46
|
```
|
package/IMPROVEMENTS.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Improvements backlog
|
|
2
|
+
|
|
3
|
+
Known gaps and next steps, each with the evidence behind it. Nothing here has shipped. Items move to `CHANGELOG.md` when they do.
|
|
4
|
+
|
|
5
|
+
## Trait detection and routing
|
|
6
|
+
|
|
7
|
+
- **Description-path trait recall is low. Fix the resolver.** Through the CLI resolver, `aigis threats "<description>"` and `aigis build "<description>"` find 0.514 of the expected traits on the dev set and 0.222 on the held-out set (3.0 integration evals). `--traits` is the documented path for now. The README's v2 numbers were measured with an agent in the IDE, which is a different path.
|
|
8
|
+
- **A `has-memory` trait.** Persistent agent memory has no trait, so the memory entry point (AML.T0080.000) was removed from the entry-point map in review round 2, and `agent-tool-safety` has to ask whether memory exists (its memory check is a judgment item). A trait would let the entry point come back and make the check routable.
|
|
9
|
+
- **Other surface traits.** Entry points removed because no current trait implies their precondition: client-side rendering (AML.T0077) and conversation context (AML.T0085.002) in review round 2; `generates-code` to AML.T0060 (a resource-development technique the labeling protocol skips) and all three `is-multimodal` entries (the trait also covers generation-only systems, while those techniques need multimodal input) in review round 3. Each needs a trait and a new approval.
|
|
10
|
+
- **`aigis threats --confirm/--reject`** to accept or drop uncertain traits without rerunning with `--traits`.
|
|
11
|
+
- **`aigis traits` prints 22 traits but there are 23.**
|
|
12
|
+
|
|
13
|
+
## MITRE ATLAS
|
|
14
|
+
|
|
15
|
+
- **Parent to sub-technique inheritance, as a labeled Aigis inference.** Aigis shows only MITRE's 494 direct `mitigates` links. Showing a parent technique's mitigations next to its sub-techniques would add 124 links MITRE did not publish, so the output must label them as Aigis's inference, and they need their own approval. Example of the cost today: AML.T0051.000 and AML.T0051.001 (prompt injection, direct and indirect) carry only AML.M0024, M0033 and M0035 directly, so guardrails (AML.M0020, linked to the parent AML.T0051) do not appear next to them.
|
|
16
|
+
- **Supply-chain depth** (AML.M0011, M0013, M0016, M0023). No Aigis area is mapped to these yet, so they stay printed gaps.
|
|
17
|
+
|
|
18
|
+
## Areas and checklists
|
|
19
|
+
|
|
20
|
+
- **Verify checklists for the four EU AI Act areas.** There are 21 areas and 17 checklists; the four `eu-ai-act-*` areas have none, so `aigis audit` reports them as "no checklist yet" and leaves them out of the denominator.
|
|
21
|
+
- **ISO/IEC 42001 citations for `agent-permissions` and `agent-tool-safety`** once the standard text is available to label against. Both ship with an empty `iso42001` list.
|
|
22
|
+
- **EU AI Act extensions** for the two new areas. Both ship without `eu_ai_act` citations.
|
|
23
|
+
- **`--tight` and single-trait areas.** `--tight` requires two trait matches per area. Check how it treats areas that a single trait such as `is-agentic` selects, and decide whether it should keep them.
|
|
24
|
+
- **Citations removed from the two new areas before 3.0.** The final audit found that the evidence did not support seven citations, so they were removed: OWASP LLM02 and LLM05 and NIST MEASURE 2.7 from both areas, and NIST MANAGE 2.4 from `agent-tool-safety`. Re-add each one only after the area earns it: the area must actually do what the source sentence requires (for example, LLM05 needs path checks that reject `..` after normalizing, LLM02 needs real PII redaction patterns, MEASURE 2.7 needs the documentation NIST asks for, MANAGE 2.4 needs the responsibility assignment), the quote must be a complete source sentence, and the row needs a new approval.
|
|
25
|
+
- **No-deletion baseline entries** for the two new areas, so a later edit that drops a step or check is caught like it is for the existing areas.
|
|
26
|
+
|
|
27
|
+
## Briefs
|
|
28
|
+
|
|
29
|
+
- **Agentic briefs that cross the 120k auto cap.** With the two new areas, the full brief for held-out description H3 (a coding agent that runs shell commands and merges its own changes) is 120,411 characters, over the 120,000 cap, so `aigis build` fell back to the compact brief. Options: trim the area bodies, raise the cap, or drop the largest optional sections first.
|
|
30
|
+
|
|
31
|
+
## Evals
|
|
32
|
+
|
|
33
|
+
- **L4 agent eval for unprompted threat modeling.** The core skill instructs the agent to run `aigis threats` without being asked, and `aigis audit --scan` has a threat model phase. Whether agents actually do it, and whether they implement the new areas, has not been measured.
|
|
34
|
+
|
|
35
|
+
## Python package
|
|
36
|
+
|
|
37
|
+
- **`aigis classify` text output.** The npm package prints the ATLAS count on the Controls line and a threat model pointer; the Python package does not yet. JSON output and `aigis threats` match.
|
|
38
|
+
|
|
39
|
+
## Verify and report semantics
|
|
40
|
+
|
|
41
|
+
- **Unresolved JUDGMENT checks still count as passing.** This is 2.1 behavior, not new in 3.0. `aigis verify <area> --auto` prints "Controls satisfied (all auto checks PASS)" and `aigis report` marks the area PASS (and counts it in `areas_fully_passing`) when every auto check passes, even if JUDGMENT checks are still open. Both new areas always have two JUDGMENT checks, so they can show as satisfied without that proof. Change it in a later release: keep the controls "in scope" until every JUDGMENT check is resolved, and leave such areas out of `areas_fully_passing`. Ship it with a deprecation note, because scripts may read the current output.
|
package/README.md
CHANGED
|
@@ -2,10 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
**AI governance that ships with your code.**
|
|
4
4
|
|
|
5
|
-
Aigis
|
|
5
|
+
Aigis now understands how attackers attack AI systems and helps your agent build defenses against them.
|
|
6
|
+
|
|
7
|
+
Aigis sits between you and your coding agent (Cursor, Claude Code, GitHub Copilot, Windsurf) and gives the agent curated AI governance patterns mapped to NIST AI RMF, OWASP Top 10 for LLMs, ISO/IEC 42001, and the EU AI Act, with threat modeling from MITRE ATLAS.
|
|
6
8
|
|
|
7
9
|
You don't run Aigis. Your agent does. After one setup command, you describe what you're building and your agent picks the right governance patterns, implements them, and verifies the result — all in the same chat where you write code.
|
|
8
10
|
|
|
11
|
+
## What's new in v3.0
|
|
12
|
+
|
|
13
|
+
- **Two new areas for agentic systems.** `agent-permissions` covers agent identity, tool permissions and authority limits. `agent-tool-safety` covers tool invocation safety, validation of tool inputs and outputs, and scope drift.
|
|
14
|
+
- **`aigis classify` recommends both new areas when a system is agentic** (`is-agentic`). Builds, audits and reports for agentic projects include them too.
|
|
15
|
+
- **3.0 is additive: no command, flag or JSON key was removed or renamed.**
|
|
16
|
+
- Aigis now ships 21 governance areas and 17 verify checklists.
|
|
17
|
+
- **MITRE ATLAS mitigations cited** by `aigis classify`, `aigis verify --auto`, `aigis report` and `aigis build`, next to the existing OWASP, NIST and ISO citations.
|
|
18
|
+
- **`aigis threats`** builds a threat model from your traits: attacker techniques for your entry points, the mitigations MITRE links to each, the Aigis areas that help implement each one (in part), and the gaps.
|
|
19
|
+
- **`aigis template threat-model`**, a fill-in threat model worksheet.
|
|
20
|
+
- **Your agent is instructed to threat-model on its own.** The core skill that `aigis init` writes tells the agent when to run `aigis threats` without being asked, and `aigis audit --scan` has a new threat model phase.
|
|
21
|
+
- **Pinned ATLAS v2026.10 data, offline.** The catalog ships inside the package. No network calls.
|
|
22
|
+
|
|
23
|
+
### Results
|
|
24
|
+
|
|
25
|
+
Tested with a real coding agent building agent features from plain requests, with Aigis 2.1.1 and with Aigis 3.0 (6 runs each), graded by a blind reviewer:
|
|
26
|
+
|
|
27
|
+
| | Aigis 2.1.1 | Aigis 3.0 |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| Agent-safety defenses present in the code | 51% | **80%** |
|
|
30
|
+
| Agent ran a threat model on its own | 0 of 6 | **6 of 6** |
|
|
31
|
+
| Agent told the user about uncovered gaps | 1 of 6 | **6 of 6** |
|
|
32
|
+
|
|
33
|
+
Every MITRE ATLAS reference Aigis prints matched MITRE's own data (9,604 checked). Small sample; method and limits in [`BENCHMARKS.md`](BENCHMARKS.md).
|
|
34
|
+
|
|
9
35
|
## Install
|
|
10
36
|
|
|
11
37
|
```bash
|
|
@@ -27,6 +53,8 @@ Open the project in your IDE. In the agent chat, just describe what you're build
|
|
|
27
53
|
|
|
28
54
|
> *Build me an EU AI Act compliant customer support chatbot for an e-commerce site. Use aigis to figure out the governance patterns and apply them.*
|
|
29
55
|
|
|
56
|
+
Building an agent that can take actions, like sending email or querying a database? Ask for the feature in plain words. Your agent is instructed to run `aigis threats` on its own, fetch the defenses that apply, and tell you about any gaps.
|
|
57
|
+
|
|
30
58
|
Your agent will read `.cursorrules`, classify the description against the resolver, fetch the relevant procedures, and implement them — invoking `aigis` itself as it works:
|
|
31
59
|
|
|
32
60
|

|
|
@@ -64,6 +92,27 @@ Both surfaces read a single `.aigisrc.json` config:
|
|
|
64
92
|
|
|
65
93
|
The CI workflow runs `aigis verify` on every PR; the pre-commit hook runs it before each commit. Configure once, both run.
|
|
66
94
|
|
|
95
|
+
## Threat modeling with MITRE ATLAS
|
|
96
|
+
|
|
97
|
+
OWASP says what can go wrong. MITRE ATLAS says how an attacker does it. NIST AI RMF says how you govern it.
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
aigis threats --traits uses-llm,uses-rag,is-agentic
|
|
101
|
+
aigis threats "<description>"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`--traits` is the reliable path. The description path only finds traits the resolver recognizes.
|
|
105
|
+
|
|
106
|
+
What you get: the techniques for your entry points, Realized first (seen in real attacks); the mitigations MITRE links to each technique; the Aigis areas that help implement each mitigation (in part); and the gaps, mitigations with no mapped Aigis area. `--redteam` adds test stubs, `--json` is for scripts.
|
|
107
|
+
|
|
108
|
+
When: designing an AI feature; adding a capability (tools, write access, memory, a new data source); before launch; after an incident. Your agent is instructed to do this at those moments without being asked, and you can run it yourself at any time.
|
|
109
|
+
|
|
110
|
+
What ships: a pinned subset of ATLAS v2026.10 (16 tactics, 221 techniques, 44 mitigations, counts from 77 case studies). No network calls. Aigis areas currently map to 21 of the 44 mitigations.
|
|
111
|
+
|
|
112
|
+
The mapping from areas to mitigations is ours. The links from mitigations to techniques are MITRE's. The entry points come from a reviewed map of 9 traits to 29 techniques.
|
|
113
|
+
|
|
114
|
+
Limits: MITRE ATLAS is a threat catalog, not a standard. Nobody is "ATLAS compliant". It does not score risk, and it does not cover bias or fairness. A cited mitigation means the area helps implement it (in part). The technique list is a starting point based on your traits, not proof of coverage.
|
|
115
|
+
|
|
67
116
|
## What's new in v2.1
|
|
68
117
|
|
|
69
118
|
- **EU AI Act mapping** — Articles 9, 10, 12, 13, 14, 15, 50, 72, 73 mapped to runnable governance patterns, plus an Annex IV technical documentation template
|
|
@@ -111,6 +160,11 @@ aigis report --from-classify "<desc>" --jurisdiction eu --output audit.md
|
|
|
111
160
|
aigis audit --scan # discovery prompt for auditing existing code
|
|
112
161
|
aigis audit --traits <list> # scoped audit with deterministic denominator
|
|
113
162
|
|
|
163
|
+
# Threat modeling (MITRE ATLAS)
|
|
164
|
+
aigis threats --traits <list> # techniques, MITRE mitigations, Aigis areas, gaps
|
|
165
|
+
aigis threats "<description>" --redteam # same from a description, plus red-team test stubs
|
|
166
|
+
aigis template threat-model # threat model worksheet
|
|
167
|
+
|
|
114
168
|
# Misc
|
|
115
169
|
aigis search --list # list all available areas
|
|
116
170
|
aigis traits # list classification traits
|
|
@@ -125,15 +179,22 @@ Run `aigis --help` for full options.
|
|
|
125
179
|
- **Not a security audit.** `aigis verify` is heuristic regex over your source. It catches common misimplementations; it doesn't replace SAST, code review, or penetration testing.
|
|
126
180
|
- **Doesn't run your code or call your APIs.** The agent does the work. Aigis provides the brief, the verifier, and the audit doc.
|
|
127
181
|
- **Local. No cloud. No telemetry.** Aigis ships nothing back to a server. Your descriptions, your code, and your verify results stay on your machine.
|
|
182
|
+
- **Not a penetration test.** `aigis threats` lists known techniques for your traits. It does not attack or test your system.
|
|
128
183
|
|
|
129
184
|
## Benchmark results
|
|
130
185
|
|
|
186
|
+
### v3.0
|
|
187
|
+
|
|
188
|
+
See [Results](#results) above. Full method, per-defense tables and limits: [`BENCHMARKS.md`](BENCHMARKS.md).
|
|
189
|
+
|
|
190
|
+
### v2.0
|
|
191
|
+
|
|
131
192
|
v2.0 was benchmarked at every iteration. Final numbers, against the same 10 descriptions:
|
|
132
193
|
|
|
133
|
-
- Baseline (
|
|
194
|
+
- Baseline (Aigis v1.0.3): P=0.737, R=0.905, F1=0.790
|
|
134
195
|
- v2.0 (`aigis build`): P=0.847, R=0.851, F1=0.837
|
|
135
196
|
|
|
136
|
-
F1 beats baseline by +0.047. v2.1 ships `--tight` as a flag-gated experiment; promotion to default
|
|
197
|
+
F1 beats baseline by +0.047. v2.1 ships `--tight` as a flag-gated experiment; promotion to default is pending a confirmation benchmark. Methodology, per-run tables, and the v2.1 manual end-to-end test live in the [`benchmarks/`](https://github.com/NayanKanaparthi/aigis) directory.
|
|
137
198
|
|
|
138
199
|
## Supported agents
|
|
139
200
|
|
|
@@ -152,4 +213,4 @@ See `CONTRIBUTING.md` for the full contributor workflow, including how to add ne
|
|
|
152
213
|
|
|
153
214
|
## License
|
|
154
215
|
|
|
155
|
-
MIT
|
|
216
|
+
Aigis is MIT licensed. The package also includes a copy of MITRE ATLAS data (`content/index/atlas.json`). That data belongs to MITRE and is shared under its own open license, which allows reuse as long as MITRE's notice and license text travel with it. Both are in `content/index/atlas-NOTICE.md` (Apache-2.0).
|
package/SKILL.md
CHANGED
|
@@ -1,35 +1,40 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: aigis
|
|
3
|
-
description: AI governance for coding agents. Three-layer skill system
|
|
3
|
+
description: AI governance for coding agents. Three-layer skill system (core, area, workflow) loaded on demand with the aigis CLI. Mapped to NIST AI RMF, OWASP Top 10 for LLMs and ISO/IEC 42001, with MITRE ATLAS threat modeling.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Aigis skill system
|
|
7
7
|
|
|
8
|
-
Aigis ships skills in three layers. Agents load them on demand
|
|
8
|
+
Aigis ships skills in three layers. Agents load them on demand with the CLI, not by reading this file.
|
|
9
9
|
|
|
10
10
|
## Layers
|
|
11
11
|
|
|
12
|
-
- **Core skill
|
|
13
|
-
- **Area skills
|
|
14
|
-
- **Workflow skills
|
|
12
|
+
- **Core skill**: `content/skills/core.md`. `aigis init <ide>` writes it into the agent's rules file. It tells the agent when to use Aigis, the build and audit workflows, how to read verify output, and when to threat-model.
|
|
13
|
+
- **Area skills**: `content/skills/areas/<id>.md`, one per governance area (input-validation, pii-handling, agent-permissions and so on). 21 today, 17 of them with a verify checklist. Loaded by `aigis get <id>` when classify points the agent at that area.
|
|
14
|
+
- **Workflow skills**: `content/skills/workflows/<type>.md`. Loaded by `aigis workflow <type>` after classify identifies the project shape. `fastapi-llm` ships today.
|
|
15
15
|
|
|
16
16
|
## How an agent uses Aigis
|
|
17
17
|
|
|
18
|
-
After `aigis init` writes the core skill
|
|
18
|
+
After `aigis init` writes the core skill, the agent runs:
|
|
19
19
|
|
|
20
|
-
1. `aigis classify`
|
|
21
|
-
2. `aigis workflow <type>`
|
|
22
|
-
3. `aigis get <area>` and `aigis verify <area> --auto .`
|
|
20
|
+
1. `aigis classify --traits <traits> --json` to get the risk tier, the recommended areas and a workflow suggestion.
|
|
21
|
+
2. `aigis workflow <type>` to get the file layout and wiring for the stack.
|
|
22
|
+
3. `aigis get <area>` and `aigis verify <area> --auto .` for each area, one at a time.
|
|
23
|
+
4. `aigis threats --traits <traits>` to build a threat model. It lists attacker techniques for the system's entry points (Realized first), the mitigations MITRE links to each, the Aigis areas that help implement each one (in part), and gaps. A gap is a mitigation with no mapped Aigis area. The agent fetches and verifies every area it names and tells the user about every gap.
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
To audit an existing project, the agent starts with `aigis audit --scan` instead.
|
|
26
|
+
|
|
27
|
+
MITRE ATLAS is a threat catalog, not a standard. Nobody is "ATLAS compliant". It does not score risk, and it does not cover bias or fairness.
|
|
28
|
+
|
|
29
|
+
See `content/skills/core.md` for the full text the agent sees.
|
|
25
30
|
|
|
26
31
|
## Setup per IDE
|
|
27
32
|
|
|
28
33
|
Run once in the project root:
|
|
29
34
|
|
|
30
|
-
- `aigis init cursor`
|
|
31
|
-
- `aigis init claude-code`
|
|
32
|
-
- `aigis init windsurf`
|
|
33
|
-
- `aigis init copilot`
|
|
35
|
+
- `aigis init cursor` writes `.cursorrules`
|
|
36
|
+
- `aigis init claude-code` writes `~/.claude/skills/aigis/SKILL.md`
|
|
37
|
+
- `aigis init windsurf` writes `.windsurfrules`
|
|
38
|
+
- `aigis init copilot` writes `.github/copilot-instructions.md`
|
|
34
39
|
|
|
35
|
-
All four
|
|
40
|
+
All four receive the same content: `content/skills/core.md`. Area and workflow skills load on demand; they are not pre-installed into the rules file.
|
package/bin/aigis.js
CHANGED
|
@@ -18,7 +18,7 @@ const program = new Command();
|
|
|
18
18
|
program
|
|
19
19
|
.name('aigis')
|
|
20
20
|
.description('AI governance guardrails for coding agents')
|
|
21
|
-
.version('
|
|
21
|
+
.version('3.0.0');
|
|
22
22
|
|
|
23
23
|
// ============================================================
|
|
24
24
|
// aigis classify
|
|
@@ -185,7 +185,15 @@ program
|
|
|
185
185
|
console.log(chalk.green(` aigis verify ${f}`));
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
|
|
188
|
+
// v3.0 (SPEC S5.7, AC21): ATLAS count and threat-model pointer, only when
|
|
189
|
+
// classify attached an ATLAS block (absent when the catalog is unavailable).
|
|
190
|
+
const atlasCount = result.atlas && result.controls.atlas ? `, ${result.controls.atlas.length} ATLAS mitigations` : '';
|
|
191
|
+
console.log(chalk.dim(`\nControls: ${result.controls.owasp.length} OWASP, ${result.controls.nist.length} NIST, ${result.controls.iso.length} ISO${atlasCount}`));
|
|
192
|
+
if (result.atlas) {
|
|
193
|
+
console.log(chalk.bold('Threat model (MITRE ATLAS):'));
|
|
194
|
+
console.log(chalk.green(` ${result.atlas.threats_command}`));
|
|
195
|
+
console.log(chalk.dim(` ${result.atlas.disclaimer}`));
|
|
196
|
+
}
|
|
189
197
|
|
|
190
198
|
// Workflow suggestion. Step 5 ships only fastapi-llm; future workflows will
|
|
191
199
|
// be matched heuristically against the trait set.
|
|
@@ -500,18 +508,35 @@ program
|
|
|
500
508
|
|
|
501
509
|
// Count checks per scoped area by parsing checklist rows (format: "| V<n> | ...").
|
|
502
510
|
// This gives the deterministic denominator the agent must score against.
|
|
511
|
+
// v3.0: an area with no checklist file yet (some EU AI Act areas) is listed
|
|
512
|
+
// as "no checklist yet" and left out of the denominator instead of crashing.
|
|
503
513
|
const checklistsByArea = {};
|
|
504
514
|
const perAreaCounts = {};
|
|
515
|
+
const noChecklist = [];
|
|
505
516
|
let totalChecks = 0;
|
|
506
517
|
for (const f of classification.implement_files) {
|
|
507
|
-
|
|
518
|
+
let checklist;
|
|
519
|
+
try {
|
|
520
|
+
checklist = verify([f]);
|
|
521
|
+
} catch (err) {
|
|
522
|
+
if (!/^File not found: verify\//.test(err.message)) throw err;
|
|
523
|
+
noChecklist.push(f);
|
|
524
|
+
checklistsByArea[f] = `No checklist yet for ${f}; not counted in the denominator.`;
|
|
525
|
+
continue;
|
|
526
|
+
}
|
|
508
527
|
checklistsByArea[f] = checklist;
|
|
509
528
|
const rowMatches = checklist.match(/^\| V\d+\b/gm) || [];
|
|
510
529
|
perAreaCounts[f] = rowMatches.length;
|
|
511
530
|
totalChecks += rowMatches.length;
|
|
512
531
|
}
|
|
532
|
+
const scoredAreas = classification.implement_files.filter((f) => !noChecklist.includes(f));
|
|
513
533
|
const areasCsv = classification.implement_files.join(', ');
|
|
514
|
-
const
|
|
534
|
+
const noChecklistNote = noChecklist.length > 0
|
|
535
|
+
? `No checklist yet, not counted in the denominator: ${noChecklist.join(', ')}`
|
|
536
|
+
: null;
|
|
537
|
+
const scoreLineTemplate = noChecklist.length === 0
|
|
538
|
+
? `Score: <P> / ${totalChecks} total checks across ${classification.implement_files.length} recommended areas (areas: ${areasCsv})`
|
|
539
|
+
: `Score: <P> / ${totalChecks} total checks across ${scoredAreas.length} of ${classification.implement_files.length} recommended areas (areas: ${scoredAreas.join(', ')}; no checklist yet: ${noChecklist.join(', ')})`;
|
|
515
540
|
|
|
516
541
|
if (opts.json) {
|
|
517
542
|
console.log(JSON.stringify({
|
|
@@ -522,6 +547,7 @@ program
|
|
|
522
547
|
recommended_areas_count: classification.implement_files.length,
|
|
523
548
|
recommended_areas: classification.implement_files,
|
|
524
549
|
per_area_check_count: perAreaCounts,
|
|
550
|
+
...(noChecklist.length > 0 ? { areas_without_checklist: noChecklist, note: noChecklistNote } : {}),
|
|
525
551
|
score_line_template: scoreLineTemplate,
|
|
526
552
|
},
|
|
527
553
|
}, null, 2));
|
|
@@ -534,6 +560,7 @@ program
|
|
|
534
560
|
console.log(`${chalk.bold('Risk tier:')} ${tierColor.bold(classification.risk_tier)}`);
|
|
535
561
|
console.log(`${chalk.bold('Recommended areas:')} ${classification.implement_files.length}`);
|
|
536
562
|
console.log(`${chalk.bold('Areas:')} ${areasCsv}`);
|
|
563
|
+
if (noChecklistNote) console.log(chalk.yellow(noChecklistNote));
|
|
537
564
|
console.log(`${chalk.bold('Total checks (deterministic denominator):')} ${totalChecks}\n`);
|
|
538
565
|
|
|
539
566
|
console.log(chalk.bold('Instructions for agent:'));
|
|
@@ -542,14 +569,15 @@ program
|
|
|
542
569
|
console.log(chalk.dim('At the end of your report, emit this exact line (replace <P> with the PASS count):'));
|
|
543
570
|
console.log(chalk.dim(` ${scoreLineTemplate}\n`));
|
|
544
571
|
|
|
545
|
-
for (const f of
|
|
572
|
+
for (const f of scoredAreas) {
|
|
546
573
|
console.log(checklistsByArea[f]);
|
|
547
574
|
console.log('');
|
|
548
575
|
}
|
|
549
576
|
|
|
550
577
|
console.log(chalk.bold('═══ SCORING ═══'));
|
|
551
|
-
console.log(`Denominator: ${totalChecks} total checks across ${classification.implement_files.length} recommended areas.`);
|
|
578
|
+
console.log(`Denominator: ${totalChecks} total checks across ${scoredAreas.length === classification.implement_files.length ? '' : `${scoredAreas.length} of `}${classification.implement_files.length} recommended areas.`);
|
|
552
579
|
console.log(`Areas: ${areasCsv}`);
|
|
580
|
+
if (noChecklistNote) console.log(noChecklistNote);
|
|
553
581
|
console.log(`Emit at end of report: ${chalk.bold(scoreLineTemplate)}`);
|
|
554
582
|
|
|
555
583
|
if (classification.templates.length > 0) {
|
|
@@ -772,6 +800,39 @@ program
|
|
|
772
800
|
init(ide, { refresh: !!opts.refresh, ci: opts.ci, hook: !!opts.hook });
|
|
773
801
|
});
|
|
774
802
|
|
|
803
|
+
// ============================================================
|
|
804
|
+
// aigis threats (v3.0, MITRE ATLAS; logic in lib/threats.js)
|
|
805
|
+
// ============================================================
|
|
806
|
+
program
|
|
807
|
+
.command('threats')
|
|
808
|
+
.description('Threat model for your system\'s entry points (MITRE ATLAS: a catalog, not a standard)')
|
|
809
|
+
.argument('[description]', 'Plain-English description of the system (in quotes); traits are resolved like `aigis build`, uncertain ones marked')
|
|
810
|
+
.option('--traits <traits>', 'Comma-separated trait IDs (additive with the description)')
|
|
811
|
+
.option('--top <n>', 'Number of techniques to show, 1 to 25 (default 10)')
|
|
812
|
+
.option('--json', 'Output JSON instead of plain markdown')
|
|
813
|
+
.option('--redteam', 'Add red-team test-case stubs for the top techniques')
|
|
814
|
+
.action((description, opts) => {
|
|
815
|
+
const threats = require('../lib/threats');
|
|
816
|
+
try {
|
|
817
|
+
const top = threats.parseTop(opts.top);
|
|
818
|
+
const resolved = threats.resolveThreatTraits({ description, traitsFlag: opts.traits });
|
|
819
|
+
const model = threats.buildThreatModel({ ...resolved, top, redteam: !!opts.redteam });
|
|
820
|
+
process.stdout.write(opts.json ? threats.formatThreatsJSON(model) : threats.formatThreatsText(model));
|
|
821
|
+
} catch (err) {
|
|
822
|
+
if (err instanceof threats.ThreatsInputError) {
|
|
823
|
+
process.stderr.write(`${err.message}\n`);
|
|
824
|
+
process.exitCode = 1;
|
|
825
|
+
return;
|
|
826
|
+
}
|
|
827
|
+
if (err instanceof threats.AtlasCatalogError) {
|
|
828
|
+
process.stderr.write(`${threats.catalogErrorLine(err)}\n`);
|
|
829
|
+
process.exitCode = 2;
|
|
830
|
+
return;
|
|
831
|
+
}
|
|
832
|
+
throw err;
|
|
833
|
+
}
|
|
834
|
+
});
|
|
835
|
+
|
|
775
836
|
// ============================================================
|
|
776
837
|
// aigis traits (convenience)
|
|
777
838
|
// ============================================================
|