armor-agent-plugin 6.0.0__py3-none-any.whl

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.

Potentially problematic release.


This version of armor-agent-plugin might be problematic. Click here for more details.

Files changed (50) hide show
  1. armor/__init__.py +9 -0
  2. armor/__main__.py +3 -0
  3. armor/cli.py +209 -0
  4. armor/data/ai_standards/_catalog/latest.json +7 -0
  5. armor/data/ai_standards/_catalog/versions/2026-05-14__b1ed6db3/guardrail_catalog.json +1517 -0
  6. armor/data/ai_standards/_catalog/versions/2026-05-14__b1ed6db3/guardrail_catalog.md +345 -0
  7. armor/data/ai_standards/_catalog/versions/2026-05-14__b1ed6db3/guardrail_matrix.csv +54 -0
  8. armor/data/ai_standards/_catalog/versions/2026-05-14__b1ed6db3/guardrail_matrix.json +1446 -0
  9. armor/data/ai_standards/_catalog/versions/2026-05-14__b1ed6db3/guardrail_matrix.md +57 -0
  10. armor/data/ai_standards/_catalog/versions/2026-05-14__b1ed6db3/manifest.json +29 -0
  11. armor/data/ai_standards/_catalog/versions/2026-05-14__b1ed6db3/source_coverage.json +360 -0
  12. armor/data/ai_standards/eu-ai-act/history.jsonl +1 -0
  13. armor/data/ai_standards/eu-ai-act/latest.json +7 -0
  14. armor/data/ai_standards/eu-ai-act/versions/2026-06-04__e1a1c700/manifest.json +5 -0
  15. armor/data/ai_standards/mitre-atlas/history.jsonl +1 -0
  16. armor/data/ai_standards/mitre-atlas/latest.json +7 -0
  17. armor/data/ai_standards/mitre-atlas/versions/2026-06-04__32346fb3/manifest.json +5 -0
  18. armor/data/ai_standards/nist-ai-rmf/history.jsonl +1 -0
  19. armor/data/ai_standards/nist-ai-rmf/latest.json +7 -0
  20. armor/data/ai_standards/nist-ai-rmf/versions/2026-06-04__b157a100/manifest.json +5 -0
  21. armor/data/ai_standards/owasp-llm-top10/history.jsonl +1 -0
  22. armor/data/ai_standards/owasp-llm-top10/latest.json +7 -0
  23. armor/data/ai_standards/owasp-llm-top10/versions/2026-06-04__0a592025/manifest.json +5 -0
  24. armor/file_lock.py +114 -0
  25. armor/pipeline/__init__.py +17 -0
  26. armor/pipeline/adversary.py +140 -0
  27. armor/pipeline/conform.py +259 -0
  28. armor/pipeline/conform_audit.py +192 -0
  29. armor/pipeline/load.py +94 -0
  30. armor/pipeline/report.py +357 -0
  31. armor/pipeline/schema.py +113 -0
  32. armor/pipeline/schemas/posture_report.schema.json +400 -0
  33. armor/pipeline/state.py +182 -0
  34. armor/pipeline/triage.py +225 -0
  35. armor/pipeline/triage_audit.py +153 -0
  36. armor_agent_plugin-6.0.0.dist-info/METADATA +574 -0
  37. armor_agent_plugin-6.0.0.dist-info/RECORD +50 -0
  38. armor_agent_plugin-6.0.0.dist-info/WHEEL +5 -0
  39. armor_agent_plugin-6.0.0.dist-info/entry_points.txt +2 -0
  40. armor_agent_plugin-6.0.0.dist-info/licenses/LICENSE +21 -0
  41. armor_agent_plugin-6.0.0.dist-info/top_level.txt +2 -0
  42. catalog/__init__.py +1 -0
  43. catalog/ai_standards_versioning.py +114 -0
  44. catalog/download_aiid_slim.py +90 -0
  45. catalog/download_eu_ai_act_cellar.py +86 -0
  46. catalog/download_mitre_atlas.py +78 -0
  47. catalog/download_nist_ai_rmf.py +77 -0
  48. catalog/download_owasp_llm_top10.py +71 -0
  49. catalog/generate_guardrail_catalog.py +990 -0
  50. catalog/refresh_catalog.py +77 -0
@@ -0,0 +1,57 @@
1
+ # ARMOR Guardrail Matrix (53 Sub-Guardrails)
2
+
3
+ | SID | Category | Description | Verification Test | Applicability | Standard References |
4
+ | --- | --- | --- | --- | --- | --- |
5
+ | GR-01.1 | Risk & impact assessment | Classify AI system risk tier and intended purpose prior to deployment, documenting reasonably foreseeable misuse and affected populations. | Verify that a structured risk classification configuration or manifest exists and is validated before model or agent execution. | any system; pre-deployment | EU AI Act Art 6, 9, 27 | NIST GOVERN-1, MAP-1, MAP-3, MAP-5 | ATLAS AML.M0017 | MIT 7.3. Lack of capability or robustness; 5.1. Overreliance and unsafe use |
6
+ | GR-01.2 | Risk & impact assessment | Maintain a continuous risk register and iterative risk management lifecycle across design, development, and post-deployment changes. | Verify automated validation of risk register entries or policy checks tied to model/agent configuration updates. | any AI system | EU AI Act Art 9 | NIST GOVERN-1, MANAGE-1, MANAGE-2 | MIT 7.1. AI pursuing its own goals in conflict with human goals or values |
7
+ | GR-01.3 | Risk & impact assessment | Perform fundamental rights, safety, and downstream impact assessments for high-impact or customer-facing AI deployments. | Check for impact assessment gate logic or pre-flight validation prior to enabling high-impact workflows. | high-risk or customer-facing AI systems | EU AI Act Art 9, 27 | NIST MAP-2, MAP-5, MEASURE-2 | MIT 6.1. Power centralization and unfair distribution of benefits |
8
+ | GR-01.4 | Risk & impact assessment | Define explicit operational boundaries, capability limits, and refusal conditions for out-of-domain requests. | Verify input routing or domain boundary enforcement that rejects or deflects out-of-scope queries. | all LLM and generative AI systems | EU AI Act Art 9, 13 | NIST MAP-3, MANAGE-3 | OWASP LLM01, LLM09 | ATLAS AML.M0015 | MIT 5.1. Overreliance and unsafe use |
9
+ | GR-01.5 | Risk & impact assessment | Gate release and runtime activation on quantitative risk acceptance thresholds and sign-off controls. | Verify threshold-check functions that block execution or deployment when evaluation metrics fall below required bounds. | any production AI system | EU AI Act Art 9, 43 | NIST GOVERN-4, MEASURE-4, MANAGE-4 | MIT 7.3. Lack of capability or robustness |
10
+ | GR-02.1 | Data governance | Track dataset, corpus, and retrieval index provenance, lineage, and licensing metadata across ingestion pipelines. | Verify that ingestion and indexing functions record cryptographic hashes and provenance metadata per document. | systems ingesting training, fine-tuning, or RAG data | EU AI Act Art 10, 53 | NIST MAP-2, MEASURE-2 | OWASP LLM04, LLM08 | ATLAS AML.M0007 | MIT 4.3. Lack of transparency or interpretability |
11
+ | GR-02.2 | Data governance | Validate data quality, schema conformance, and completeness prior to indexing, embedding, or model consumption. | Confirm presence of schema validation and rejection handling in data loading and RAG ingestion paths. | systems ingesting external or structured data | EU AI Act Art 10 | NIST MEASURE-2, MANAGE-2 | OWASP LLM04, LLM08 | ATLAS AML.M0007, AML.M0014 | MIT 7.3. Lack of capability or robustness |
12
+ | GR-02.3 | Data governance | Scan training, fine-tuning, and RAG corpora for data poisoning, backdoor triggers, and anomalous payloads. | Verify sanitization and poisoning detection filters execute on untrusted corpus inputs prior to storage. | RAG, fine-tuning, and knowledge-grounded systems | EU AI Act Art 10, 15 | NIST MEASURE-2, MANAGE-3 | OWASP LLM04, LLM08 | ATLAS AML.M0006, AML.M0007, AML.M0014 | MIT 2.2. AI system security vulnerabilities and attacks |
13
+ | GR-02.4 | Data governance | Enforce tenant isolation and access-control filtering on vector stores, embeddings, and retrieved context chunks. | Verify that vector/document retrieval functions require and filter by caller authorization scope or tenant ID. | multi-tenant or access-controlled RAG systems | EU AI Act Art 10 | NIST GOVERN-6, MANAGE-3 | OWASP LLM02, LLM08 | ATLAS AML.M0018 | MIT 1.2. Privacy violations |
14
+ | GR-02.5 | Data governance | Implement retention schedules, right-to-erasure purge routines, and versioned snapshots for datasets and embeddings. | Verify existence of TTL/retention enforcement or document deletion routines in storage modules. | systems persisting user or enterprise data | EU AI Act Art 10 | NIST GOVERN-1, MANAGE-4 | OWASP LLM02 | MIT 1.2. Privacy violations |
15
+ | GR-03.1 | Transparency & disclosure | Disclose clearly to users and downstream consumers when they are interacting with an AI system or reading AI-generated content. | Verify response envelopes or UI rendering templates include an explicit AI-generated disclosure indicator. | user-facing AI and content generation systems | EU AI Act Art 13, 50 | NIST GOVERN-4, MAP-1, MEASURE-2 | OWASP LLM09 | MIT 4.3. Lack of transparency or interpretability; 3.1. Pollution of information ecosystem and loss of shared reality |
16
+ | GR-03.2 | Transparency & disclosure | Ground generated claims in verifiable source citations and cross-check citations against the underlying corpus or files. | Verify post-generation citation validation logic that checks cited sources exist and demotes or flags unverified claims. | RAG, coding, compliance, and analytical AI systems | EU AI Act Art 13 | NIST MEASURE-2, MANAGE-2 | OWASP LLM09 | MIT 3.2. False or misleading information; 4.3. Lack of transparency or interpretability |
17
+ | GR-03.3 | Transparency & disclosure | Provide model/system cards documenting model architecture, version, known limitations, and evaluation benchmarks. | Verify presence of structured system metadata, version identifiers, and documented limitations. | any AI system | EU AI Act Art 11, 13, 53 | NIST GOVERN-1, MAP-1, MEASURE-4 | MIT 4.3. Lack of transparency or interpretability |
18
+ | GR-03.4 | Transparency & disclosure | Expose interpretable reasoning traces, confidence indicators, or uncertainty warnings on automated assessments. | Verify output schemas require explicit reasoning and support inconclusive/uncertainty states rather than forced binary verdicts. | decision-support and analytical AI systems | EU AI Act Art 13, 14 | NIST MEASURE-2, MANAGE-1 | OWASP LLM09 | MIT 4.3. Lack of transparency or interpretability; 5.1. Overreliance and unsafe use |
19
+ | GR-04.1 | Human oversight | Require human-in-the-loop (HITL) approval before executing high-impact, irreversible, or state-mutating actions. | Verify that state-mutating or high-risk actions check for explicit user/operator approval before execution. | agentic and tool-using AI systems | EU AI Act Art 14 | NIST GOVERN-3, MAP-3, MANAGE-2 | OWASP LLM06 | ATLAS AML.M0018 | MIT 5.2. Loss of human agency and autonomy; 7.2. AI possessing dangerous capabilities |
20
+ | GR-04.2 | Human oversight | Provide an immediate stop, cancellation, or kill-switch mechanism to halt autonomous loops and background tasks. | Verify bounded loop counters (e.g., max revisions/steps) and clean abort handling in execution drivers. | autonomous and multi-step AI pipelines | EU AI Act Art 14 | NIST GOVERN-3, MANAGE-3 | OWASP LLM06, LLM10 | MIT 7.4. Lack of capability to control AI; 5.2. Loss of human agency and autonomy |
21
+ | GR-04.3 | Human oversight | Support human override, correction, and escalation queues for contested or ambiguous model verdicts. | Verify that unconverged or contested items are collected into an explicit open_questions or escalation structure. | decision-support and auditing AI systems | EU AI Act Art 14 | NIST GOVERN-3, MANAGE-1, MANAGE-4 | OWASP LLM09 | MIT 5.1. Overreliance and unsafe use |
22
+ | GR-04.4 | Human oversight | Prevent automation bias by presenting counter-evidence, adversarial critiques, and verification status alongside conclusions. | Verify presence of adversarial review/critique stages and explicit demotion markers in user-facing reports. | analytical, compliance, and recommendation AI systems | EU AI Act Art 14 | NIST MAP-3, MEASURE-2 | OWASP LLM09 | MIT 5.1. Overreliance and unsafe use |
23
+ | GR-05.1 | Robustness & accuracy | Validate all LLM outputs against strict structural and type schemas before downstream consumption or persistence. | Verify strict schema validation on LLM responses and final report artifacts prior to writing or acting on them. | all structured-output LLM and agentic systems | EU AI Act Art 15 | NIST MEASURE-2, MANAGE-2 | OWASP LLM05, LLM09 | ATLAS AML.M0015 | MIT 7.3. Lack of capability or robustness |
24
+ | GR-05.2 | Robustness & accuracy | Detect and mitigate hallucinations by cross-verifying model assertions against deterministic ground-truth sources. | Verify deterministic cross-verification of model citations/facts and automatic demotion + logging on failure. | all generative AI systems making factual or code assertions | EU AI Act Art 15 | NIST MEASURE-2, MANAGE-2 | OWASP LLM09 | MIT 3.2. False or misleading information; 7.3. Lack of capability or robustness |
25
+ | GR-05.3 | Robustness & accuracy | Handle malformed inputs, transient failures, and partial responses gracefully with deterministic error codes and recovery paths. | Verify deterministic validation error handling and non-zero exit codes when inputs or responses are missing or invalid. | all AI systems | EU AI Act Art 15 | NIST MEASURE-2, MANAGE-3 | OWASP LLM05, LLM10 | MIT 7.3. Lack of capability or robustness |
26
+ | GR-05.4 | Robustness & accuracy | Maintain an automated regression and unit test suite covering pipeline invariants, edge cases, and failure modes. | Verify existence of automated tests covering schema validation, citation verification, and pipeline phase transitions. | all AI systems | EU AI Act Art 15, 43 | NIST MEASURE-1, MEASURE-2, MEASURE-4 | MIT 7.3. Lack of capability or robustness |
27
+ | GR-05.5 | Robustness & accuracy | Enforce multi-agent or adversarial cross-checking to reduce single-pass model blind spots and drift. | Verify implementation of adversarial audit phases that critique and apply deltas to primary LLM outputs. | high-assurance analytical and agentic systems | EU AI Act Art 15 | NIST MEASURE-2, MANAGE-2 | OWASP LLM09 | ATLAS AML.M0003 | MIT 7.3. Lack of capability or robustness |
28
+ | GR-06.1 | Adversarial security | Defend against direct and indirect prompt injection by separating untrusted data from system instructions and constraining model outputs. | Verify that untrusted inputs are structured separately from instructions and responses are strictly validated as data. | all LLM and agentic systems processing untrusted inputs | EU AI Act Art 15 | NIST MAP-3, MEASURE-2, MANAGE-3 | OWASP LLM01, LLM08 | ATLAS AML.M0015, AML.M0019 | MIT 2.2. AI system security vulnerabilities and attacks |
29
+ | GR-06.2 | Adversarial security | Sanitize and validate all model-generated strings, paths, and parameters before passing them to OS, filesystem, shell, or database APIs. | Verify path traversal checks (relative_to project_root) and absence of unsanitized shell interpolation. | all AI systems interacting with filesystems, shells, or APIs | EU AI Act Art 15 | NIST MEASURE-2, MANAGE-3 | OWASP LLM05, LLM06 | ATLAS AML.M0015, AML.M0018 | MIT 2.2. AI system security vulnerabilities and attacks |
30
+ | GR-06.3 | Adversarial security | Enforce resource bounds, input size limits, and loop caps to prevent denial-of-service or unbounded token consumption. | Verify explicit character/file limits on context gathering and hard upper bounds on retry/revision loops. | all LLM and agentic systems | EU AI Act Art 15 | NIST MANAGE-3 | OWASP LLM10 | ATLAS AML.M0004 | MIT 2.2. AI system security vulnerabilities and attacks |
31
+ | GR-06.4 | Adversarial security | Prevent system prompt leakage and sensitive internal context exposure in user-facing or downstream outputs. | Verify that external output contracts exclude raw system prompts, credentials, and unrestricted source dumps. | all LLM systems | EU AI Act Art 15 | NIST MEASURE-2, MANAGE-3 | OWASP LLM02, LLM07 | ATLAS AML.M0002, AML.M0015 | MIT 2.2. AI system security vulnerabilities and attacks; 1.2. Privacy violations |
32
+ | GR-06.5 | Adversarial security | Conduct regular adversarial red-teaming against model verdicts and evidence claims under strict read-scope constraints. | Verify adversary instructions and delta application forbid inventing new IDs or expanding scope. | all high-assurance AI systems | EU AI Act Art 15, 55 | NIST MEASURE-2, MANAGE-2 | OWASP LLM01, LLM09 | ATLAS AML.M0003 | MIT 2.2. AI system security vulnerabilities and attacks |
33
+ | GR-07.1 | Privacy & data protection | Minimize sensitive and personal data exposure by restricting context collection to necessary manifests and bounded file excerpts. | Verify that context collection skips dotfiles/environments and enforces strict character and file count limits. | all AI systems accessing user or repository data | EU AI Act Art 10, 15 | NIST GOVERN-1, MAP-2, MANAGE-3 | OWASP LLM02 | ATLAS AML.M0012 | MIT 1.2. Privacy violations |
34
+ | GR-07.2 | Privacy & data protection | Prevent unauthorized outbound network exfiltration of codebase or user data during inference and pipeline execution. | Verify that runtime pipeline modules make zero network requests and never import or invoke external HTTP/LLM clients. | all enterprise and local-first AI tools | EU AI Act Art 15 | NIST GOVERN-6, MANAGE-3 | OWASP LLM02, LLM06 | ATLAS AML.M0018 | MIT 1.2. Privacy violations; 2.2. AI system security vulnerabilities and attacks |
35
+ | GR-07.3 | Privacy & data protection | Scrub or exclude secrets, API keys, and credentials from logs, artifacts, and model context windows. | Verify that .env and secret files are excluded from manifest candidate lists and no credentials appear in artifacts. | all AI systems | EU AI Act Art 10, 15 | NIST MANAGE-3 | OWASP LLM02 | MIT 1.2. Privacy violations |
36
+ | GR-07.4 | Privacy & data protection | Confine all runtime state, temporary files, and reports to a designated, git-ignorable workspace directory. | Verify that all runtime file writes target <project_root>/.armor/ (or atomic temp files in the same directory). | all local and repository-auditing AI tools | EU AI Act Art 10, 12 | NIST GOVERN-1, MANAGE-3 | OWASP LLM02 | MIT 1.2. Privacy violations |
37
+ | GR-08.1 | Fairness & non-discrimination | Evaluate and document affected user populations and potential disparate impacts during system profiling. | Verify that the triage system_profile schema requires explicit user_population profiling. | all AI systems | EU AI Act Art 10, 13, 27 | NIST MAP-1, MAP-2, MEASURE-2 | MIT 1.1. Unfair discrimination and misrepresentation |
38
+ | GR-08.2 | Fairness & non-discrimination | Apply consistent, deterministic scoring weights and evaluation criteria across all assessed components or subjects. | Verify that coverage and suggestion rankings are computed deterministically from a fixed weight map. | scoring, ranking, and auditing AI systems | EU AI Act Art 10, 15 | NIST MEASURE-1, MEASURE-2 | MIT 1.1. Unfair discrimination and misrepresentation |
39
+ | GR-08.3 | Fairness & non-discrimination | Exclude inapplicable criteria from scoring denominators so specialized systems are not unfairly penalized. | Verify that 'n/a' verdicts are excluded from the coverage denominator in report rollup calculations. | evaluation and compliance scoring systems | EU AI Act Art 9, 15 | NIST MEASURE-1, MEASURE-2 | MIT 1.1. Unfair discrimination and misrepresentation |
40
+ | GR-08.4 | Fairness & non-discrimination | Audit subjective classifications through an independent review pass to detect biased or unsubstantiated scoping decisions. | Verify that triage applicability decisions are audited by triage-audit before conformance scoring proceeds. | classification and triage AI systems | EU AI Act Art 10, 14 | NIST MEASURE-2, MANAGE-2 | MIT 1.1. Unfair discrimination and misrepresentation |
41
+ | GR-09.1 | Content safety | Enforce output content quality and forbid vague, boilerplate, or non-actionable safety/remediation advice. | Verify that conformance instructions mandate codebase-specific, action-leading remediations and list banned phrases. | advisory, code-review, and remediation-generating AI systems | EU AI Act Art 13, 15 | NIST MEASURE-2, MANAGE-2 | OWASP LLM05, LLM09 | MIT 5.1. Overreliance and unsafe use |
42
+ | GR-09.2 | Content safety | Escape and sanitize untrusted or model-generated strings before rendering them into Markdown tables or reports. | Verify Markdown rendering functions escape '|' and newlines in table cells. | systems generating Markdown or HTML reports from LLM outputs | EU AI Act Art 15 | NIST MANAGE-3 | OWASP LLM05 | MIT 2.2. AI system security vulnerabilities and attacks |
43
+ | GR-09.3 | Content safety | Provide safe, deterministic fallback guidance whenever model-generated remediation text is missing or inconclusive. | Verify report suggestion builder provides explicit fallback action strings when remediation is empty. | advisory and reporting AI systems | EU AI Act Art 13, 15 | NIST MANAGE-2, MANAGE-3 | OWASP LLM09 | MIT 5.1. Overreliance and unsafe use |
44
+ | GR-09.4 | Content safety | Constrain agent wrapper summaries to concise, bounded notes free of raw source code, citations, or prompt instructions. | Verify agent wrapper specification enforces bounded notes (<200 chars) with no source excerpts or prompts. | agent wrappers and automated CI/CD gates | EU AI Act Art 13, 15 | NIST GOVERN-4, MANAGE-3 | OWASP LLM02, LLM05 | MIT 1.2. Privacy violations |
45
+ | GR-10.1 | Logging, monitoring & incident response | Maintain an immutable, timestamped run directory recording the input/output artifact of every pipeline phase. | Verify that new_run creates UTC-timestamped run directories and each phase persists its numbered artifact. | all production and auditing AI pipelines | EU AI Act Art 12, 19 | NIST GOVERN-1, MEASURE-2, MANAGE-4 | ATLAS AML.M0016 | MIT 4.3. Lack of transparency or interpretability |
46
+ | GR-10.2 | Logging, monitoring & incident response | Log every detected model hallucination or rejected citation to an append-only structured incident log. | Verify that rejected citations in conform and conform-audit are appended to hallucination_log.jsonl. | all citation-backed generative AI systems | EU AI Act Art 12, 73 | NIST MEASURE-2, MANAGE-4 | OWASP LLM09 | ATLAS AML.M0016 | MIT 3.2. False or misleading information; 4.3. Lack of transparency or interpretability |
47
+ | GR-10.3 | Logging, monitoring & incident response | Record full multi-round adversarial audit trails capturing per-round verdict counts, critiques, and before/after row diffs. | Verify that audit phases record per-round verdict_counts and before/after diffs in audit_trail. | systems with multi-step or adversarial review loops | EU AI Act Art 12 | NIST MEASURE-2, MANAGE-4 | MIT 4.3. Lack of transparency or interpretability |
48
+ | GR-10.4 | Logging, monitoring & incident response | Enforce mandatory skill-usage telemetry tracking across parent skills and delegated sub-agents. | Verify that SKILL.md defines a mandatory telemetry gate before tool calls, sub-agents, and final responses. | marketplace skills and multi-agent plugins | EU AI Act Art 12 | NIST GOVERN-1, MANAGE-4 | ATLAS AML.M0016 | MIT 4.3. Lack of transparency or interpretability |
49
+ | GR-10.5 | Logging, monitoring & incident response | Expose a deterministic CLI status inspection command reporting live progress across all pipeline phases. | Verify that `pipeline <project> --status` reports the current run root and the state of every phase. | multi-phase AI pipelines | EU AI Act Art 12, 14 | NIST GOVERN-3, MANAGE-4 | MIT 4.3. Lack of transparency or interpretability |
50
+ | GR-11.1 | Supply-chain & component integrity | Version and content-address all external standards, catalogs, and reference artifacts using cryptographic SHA256 hashes. | Verify content-addressed SHA256 hashing and manifest/history tracking in ai_standards_versioning.py. | systems depending on external catalogs, standards, or model artifacts | EU AI Act Art 15, 53 | NIST GOVERN-6, MAP-2, MANAGE-3 | OWASP LLM03 | ATLAS AML.M0007, AML.M0014 | MIT 2.2. AI system security vulnerabilities and attacks |
51
+ | GR-11.2 | Supply-chain & component integrity | Compute deterministic source fingerprints of the target codebase to detect concurrent edits or environment drift. | Verify that project_fingerprint() produces a deterministic SHA256 prefix that changes whenever a source file is edited. | codebase analysis and auditing tools | EU AI Act Art 15 | NIST MEASURE-2, MANAGE-3 | OWASP LLM03 | ATLAS AML.M0014 | MIT 7.3. Lack of capability or robustness |
52
+ | GR-11.3 | Supply-chain & component integrity | Minimize third-party runtime dependencies and isolate network-fetching utilities from the core execution runtime. | Verify that core `armor/` runtime modules import only stdlib and pydantic. | all software and AI plugins | EU AI Act Art 15 | NIST GOVERN-6, MANAGE-3 | OWASP LLM03 | ATLAS AML.M0014 | MIT 2.2. AI system security vulnerabilities and attacks |
53
+ | GR-11.4 | Supply-chain & component integrity | Keep packaged JSON Schemas byte-synchronized with runtime data models and provide automated drift verification. | Verify `--write-schema` and test assertions that `posture_report.schema.json` byte-equals `PostureReport.model_json_schema()`. | all schema-driven AI pipelines | EU AI Act Art 15 | NIST MEASURE-2, MANAGE-3 | OWASP LLM03, LLM05 | MIT 7.3. Lack of capability or robustness |
54
+ | GR-12.1 | Agentic autonomy & action safety | Enforce strict phase ordering so downstream agent actions cannot execute before prerequisite artifacts are verified. | Verify that calling later phases before earlier phases raises SystemExit via `require_phase_done`. | multi-step agentic workflows | EU AI Act Art 14, 15 | NIST GOVERN-3, MANAGE-3 | OWASP LLM06 | ATLAS AML.M0018 | MIT 7.4. Lack of capability to control AI; 5.2. Loss of human agency and autonomy |
55
+ | GR-12.2 | Agentic autonomy & action safety | Prevent recursive self-auditing or runaway self-targeting in autonomous agent wrappers. | Verify that the agent wrapper specification mandates a self-targeting refusal returning `verdict: fail` and zeroed counts. | autonomous auditing and delegation agents | EU AI Act Art 14, 15 | NIST GOVERN-3, MANAGE-3 | OWASP LLM06, LLM10 | ATLAS AML.M0018 | MIT 7.4. Lack of capability to control AI; 7.1. AI pursuing its own goals in conflict with human goals or values |
56
+ | GR-12.3 | Agentic autonomy & action safety | Protect concurrent file mutations with cross-platform exclusive file locks and atomic write-and-replace primitives. | Verify cross-platform locking (`msvcrt` / `fcntl` + `threading.Lock`) and atomic `os.replace` writes in `file_lock.py`. | concurrent or multi-agent local workflows | EU AI Act Art 15 | NIST MANAGE-3 | OWASP LLM06 | MIT 7.3. Lack of capability or robustness |
57
+ | GR-12.4 | Agentic autonomy & action safety | Constrain red-team adversary agents to read-only verification of cited evidence without expanding scope or inventing findings. | Verify `apply_deltas` ignores unknown SIDs (recording them in `unknown_sids`) and preserves original row ordering. | multi-agent and adversarial AI systems | EU AI Act Art 14, 15 | NIST GOVERN-3, MEASURE-2, MANAGE-3 | OWASP LLM06 | ATLAS AML.M0018 | MIT 7.4. Lack of capability to control AI |
@@ -0,0 +1,29 @@
1
+ {
2
+ "generated_at": "2026-11-16T08:50:10Z",
3
+ "totals": {
4
+ "guardrails": 12,
5
+ "sub_guardrails": 53
6
+ },
7
+ "sources": {
8
+ "ai-incident-database": {
9
+ "version": "2026-05-12__pinned",
10
+ "sha": ""
11
+ },
12
+ "eu-ai-act": {
13
+ "version": "2026-05-12__pinned",
14
+ "sha": ""
15
+ },
16
+ "mitre-atlas": {
17
+ "version": "2026-05-12__pinned",
18
+ "sha": ""
19
+ },
20
+ "nist-ai-rmf": {
21
+ "version": "2026-05-12__pinned",
22
+ "sha": ""
23
+ },
24
+ "owasp-llm-top10": {
25
+ "version": "2026-05-12__pinned",
26
+ "sha": ""
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,360 @@
1
+ {
2
+ "totals": {
3
+ "guardrails": 12,
4
+ "sub_guardrails": 53
5
+ },
6
+ "by_family": {
7
+ "GR-01": {
8
+ "family_name": "Risk & impact assessment",
9
+ "sub_guardrail_count": 5,
10
+ "eu_ai_act_articles": [
11
+ 6,
12
+ 9,
13
+ 13,
14
+ 27,
15
+ 43
16
+ ],
17
+ "nist_ai_rmf_functions": [
18
+ "GOVERN-1",
19
+ "GOVERN-4",
20
+ "MANAGE-1",
21
+ "MANAGE-2",
22
+ "MANAGE-3",
23
+ "MANAGE-4",
24
+ "MAP-1",
25
+ "MAP-2",
26
+ "MAP-3",
27
+ "MAP-5",
28
+ "MEASURE-2",
29
+ "MEASURE-4"
30
+ ],
31
+ "owasp_llm_top10": [
32
+ "LLM01",
33
+ "LLM09"
34
+ ],
35
+ "atlas_mitigations": [
36
+ "AML.M0015",
37
+ "AML.M0017"
38
+ ],
39
+ "mit_subdomains": [
40
+ "5.1. Overreliance and unsafe use",
41
+ "6.1. Power centralization and unfair distribution of benefits",
42
+ "7.1. AI pursuing its own goals in conflict with human goals or values",
43
+ "7.3. Lack of capability or robustness"
44
+ ]
45
+ },
46
+ "GR-02": {
47
+ "family_name": "Data governance",
48
+ "sub_guardrail_count": 5,
49
+ "eu_ai_act_articles": [
50
+ 10,
51
+ 15,
52
+ 53
53
+ ],
54
+ "nist_ai_rmf_functions": [
55
+ "GOVERN-1",
56
+ "GOVERN-6",
57
+ "MANAGE-2",
58
+ "MANAGE-3",
59
+ "MANAGE-4",
60
+ "MAP-2",
61
+ "MEASURE-2"
62
+ ],
63
+ "owasp_llm_top10": [
64
+ "LLM02",
65
+ "LLM04",
66
+ "LLM08"
67
+ ],
68
+ "atlas_mitigations": [
69
+ "AML.M0006",
70
+ "AML.M0007",
71
+ "AML.M0014",
72
+ "AML.M0018"
73
+ ],
74
+ "mit_subdomains": [
75
+ "1.2. Privacy violations",
76
+ "2.2. AI system security vulnerabilities and attacks",
77
+ "4.3. Lack of transparency or interpretability",
78
+ "7.3. Lack of capability or robustness"
79
+ ]
80
+ },
81
+ "GR-03": {
82
+ "family_name": "Transparency & disclosure",
83
+ "sub_guardrail_count": 4,
84
+ "eu_ai_act_articles": [
85
+ 11,
86
+ 13,
87
+ 14,
88
+ 50,
89
+ 53
90
+ ],
91
+ "nist_ai_rmf_functions": [
92
+ "GOVERN-1",
93
+ "GOVERN-4",
94
+ "MANAGE-1",
95
+ "MANAGE-2",
96
+ "MAP-1",
97
+ "MEASURE-2",
98
+ "MEASURE-4"
99
+ ],
100
+ "owasp_llm_top10": [
101
+ "LLM09"
102
+ ],
103
+ "atlas_mitigations": [],
104
+ "mit_subdomains": [
105
+ "3.1. Pollution of information ecosystem and loss of shared reality",
106
+ "3.2. False or misleading information",
107
+ "4.3. Lack of transparency or interpretability",
108
+ "5.1. Overreliance and unsafe use"
109
+ ]
110
+ },
111
+ "GR-04": {
112
+ "family_name": "Human oversight",
113
+ "sub_guardrail_count": 4,
114
+ "eu_ai_act_articles": [
115
+ 14
116
+ ],
117
+ "nist_ai_rmf_functions": [
118
+ "GOVERN-3",
119
+ "MANAGE-1",
120
+ "MANAGE-2",
121
+ "MANAGE-3",
122
+ "MANAGE-4",
123
+ "MAP-3",
124
+ "MEASURE-2"
125
+ ],
126
+ "owasp_llm_top10": [
127
+ "LLM06",
128
+ "LLM09",
129
+ "LLM10"
130
+ ],
131
+ "atlas_mitigations": [
132
+ "AML.M0018"
133
+ ],
134
+ "mit_subdomains": [
135
+ "5.1. Overreliance and unsafe use",
136
+ "5.2. Loss of human agency and autonomy",
137
+ "7.2. AI possessing dangerous capabilities",
138
+ "7.4. Lack of capability to control AI"
139
+ ]
140
+ },
141
+ "GR-05": {
142
+ "family_name": "Robustness & accuracy",
143
+ "sub_guardrail_count": 5,
144
+ "eu_ai_act_articles": [
145
+ 15,
146
+ 43
147
+ ],
148
+ "nist_ai_rmf_functions": [
149
+ "MANAGE-2",
150
+ "MANAGE-3",
151
+ "MEASURE-1",
152
+ "MEASURE-2",
153
+ "MEASURE-4"
154
+ ],
155
+ "owasp_llm_top10": [
156
+ "LLM05",
157
+ "LLM09",
158
+ "LLM10"
159
+ ],
160
+ "atlas_mitigations": [
161
+ "AML.M0003",
162
+ "AML.M0015"
163
+ ],
164
+ "mit_subdomains": [
165
+ "3.2. False or misleading information",
166
+ "7.3. Lack of capability or robustness"
167
+ ]
168
+ },
169
+ "GR-06": {
170
+ "family_name": "Adversarial security",
171
+ "sub_guardrail_count": 5,
172
+ "eu_ai_act_articles": [
173
+ 15,
174
+ 55
175
+ ],
176
+ "nist_ai_rmf_functions": [
177
+ "MANAGE-2",
178
+ "MANAGE-3",
179
+ "MAP-3",
180
+ "MEASURE-2"
181
+ ],
182
+ "owasp_llm_top10": [
183
+ "LLM01",
184
+ "LLM02",
185
+ "LLM05",
186
+ "LLM06",
187
+ "LLM07",
188
+ "LLM08",
189
+ "LLM09",
190
+ "LLM10"
191
+ ],
192
+ "atlas_mitigations": [
193
+ "AML.M0002",
194
+ "AML.M0003",
195
+ "AML.M0004",
196
+ "AML.M0015",
197
+ "AML.M0018",
198
+ "AML.M0019"
199
+ ],
200
+ "mit_subdomains": [
201
+ "1.2. Privacy violations",
202
+ "2.2. AI system security vulnerabilities and attacks"
203
+ ]
204
+ },
205
+ "GR-07": {
206
+ "family_name": "Privacy & data protection",
207
+ "sub_guardrail_count": 4,
208
+ "eu_ai_act_articles": [
209
+ 10,
210
+ 12,
211
+ 15
212
+ ],
213
+ "nist_ai_rmf_functions": [
214
+ "GOVERN-1",
215
+ "GOVERN-6",
216
+ "MANAGE-3",
217
+ "MAP-2"
218
+ ],
219
+ "owasp_llm_top10": [
220
+ "LLM02",
221
+ "LLM06"
222
+ ],
223
+ "atlas_mitigations": [
224
+ "AML.M0012",
225
+ "AML.M0018"
226
+ ],
227
+ "mit_subdomains": [
228
+ "1.2. Privacy violations",
229
+ "2.2. AI system security vulnerabilities and attacks"
230
+ ]
231
+ },
232
+ "GR-08": {
233
+ "family_name": "Fairness & non-discrimination",
234
+ "sub_guardrail_count": 4,
235
+ "eu_ai_act_articles": [
236
+ 9,
237
+ 10,
238
+ 13,
239
+ 14,
240
+ 15,
241
+ 27
242
+ ],
243
+ "nist_ai_rmf_functions": [
244
+ "MANAGE-2",
245
+ "MAP-1",
246
+ "MAP-2",
247
+ "MEASURE-1",
248
+ "MEASURE-2"
249
+ ],
250
+ "owasp_llm_top10": [],
251
+ "atlas_mitigations": [],
252
+ "mit_subdomains": [
253
+ "1.1. Unfair discrimination and misrepresentation"
254
+ ]
255
+ },
256
+ "GR-09": {
257
+ "family_name": "Content safety",
258
+ "sub_guardrail_count": 4,
259
+ "eu_ai_act_articles": [
260
+ 13,
261
+ 15
262
+ ],
263
+ "nist_ai_rmf_functions": [
264
+ "GOVERN-4",
265
+ "MANAGE-2",
266
+ "MANAGE-3",
267
+ "MEASURE-2"
268
+ ],
269
+ "owasp_llm_top10": [
270
+ "LLM02",
271
+ "LLM05",
272
+ "LLM09"
273
+ ],
274
+ "atlas_mitigations": [],
275
+ "mit_subdomains": [
276
+ "1.2. Privacy violations",
277
+ "2.2. AI system security vulnerabilities and attacks",
278
+ "5.1. Overreliance and unsafe use"
279
+ ]
280
+ },
281
+ "GR-10": {
282
+ "family_name": "Logging, monitoring & incident response",
283
+ "sub_guardrail_count": 5,
284
+ "eu_ai_act_articles": [
285
+ 12,
286
+ 14,
287
+ 19,
288
+ 73
289
+ ],
290
+ "nist_ai_rmf_functions": [
291
+ "GOVERN-1",
292
+ "GOVERN-3",
293
+ "MANAGE-4",
294
+ "MEASURE-2"
295
+ ],
296
+ "owasp_llm_top10": [
297
+ "LLM09"
298
+ ],
299
+ "atlas_mitigations": [
300
+ "AML.M0016"
301
+ ],
302
+ "mit_subdomains": [
303
+ "3.2. False or misleading information",
304
+ "4.3. Lack of transparency or interpretability"
305
+ ]
306
+ },
307
+ "GR-11": {
308
+ "family_name": "Supply-chain & component integrity",
309
+ "sub_guardrail_count": 4,
310
+ "eu_ai_act_articles": [
311
+ 15,
312
+ 53
313
+ ],
314
+ "nist_ai_rmf_functions": [
315
+ "GOVERN-6",
316
+ "MANAGE-3",
317
+ "MAP-2",
318
+ "MEASURE-2"
319
+ ],
320
+ "owasp_llm_top10": [
321
+ "LLM03",
322
+ "LLM05"
323
+ ],
324
+ "atlas_mitigations": [
325
+ "AML.M0007",
326
+ "AML.M0014"
327
+ ],
328
+ "mit_subdomains": [
329
+ "2.2. AI system security vulnerabilities and attacks",
330
+ "7.3. Lack of capability or robustness"
331
+ ]
332
+ },
333
+ "GR-12": {
334
+ "family_name": "Agentic autonomy & action safety",
335
+ "sub_guardrail_count": 4,
336
+ "eu_ai_act_articles": [
337
+ 14,
338
+ 15
339
+ ],
340
+ "nist_ai_rmf_functions": [
341
+ "GOVERN-3",
342
+ "MANAGE-3",
343
+ "MEASURE-2"
344
+ ],
345
+ "owasp_llm_top10": [
346
+ "LLM06",
347
+ "LLM10"
348
+ ],
349
+ "atlas_mitigations": [
350
+ "AML.M0018"
351
+ ],
352
+ "mit_subdomains": [
353
+ "5.2. Loss of human agency and autonomy",
354
+ "7.1. AI pursuing its own goals in conflict with human goals or values",
355
+ "7.3. Lack of capability or robustness",
356
+ "7.4. Lack of capability to control AI"
357
+ ]
358
+ }
359
+ }
360
+ }
@@ -0,0 +1 @@
1
+ {"ts": "2026-06-04T00:00:00Z", "source": "eu-ai-act", "version": "2026-06-04__e1a1c700", "sha": "e1a1c700e1a1c700e1a1c700e1a1c700e1a1c700e1a1c700e1a1c700e1a1c700", "status": "new", "previous": null}
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": "2026-06-04__e1a1c700",
3
+ "sha": "e1a1c700e1a1c700e1a1c700e1a1c700e1a1c700e1a1c700e1a1c700e1a1c700",
4
+ "committed_at": "2026-06-04T00:00:00Z",
5
+ "source": "eu-ai-act",
6
+ "previous": null
7
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "source": "eu-ai-act",
3
+ "version": "2026-06-04__e1a1c700",
4
+ "fetched_at": "2026-06-04T00:00:00Z"
5
+ }
@@ -0,0 +1 @@
1
+ {"ts": "2026-06-04T00:00:00Z", "source": "mitre-atlas", "version": "2026-06-04__32346fb3", "sha": "32346fb332346fb332346fb332346fb332346fb332346fb332346fb332346fb3", "status": "new", "previous": null}
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": "2026-06-04__32346fb3",
3
+ "sha": "32346fb332346fb332346fb332346fb332346fb332346fb332346fb332346fb3",
4
+ "committed_at": "2026-06-04T00:00:00Z",
5
+ "source": "mitre-atlas",
6
+ "previous": null
7
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "source": "mitre-atlas",
3
+ "version": "2026-06-04__32346fb3",
4
+ "fetched_at": "2026-06-04T00:00:00Z"
5
+ }
@@ -0,0 +1 @@
1
+ {"ts": "2026-06-04T00:00:00Z", "source": "nist-ai-rmf", "version": "2026-06-04__b157a100", "sha": "b157a100b157a100b157a100b157a100b157a100b157a100b157a100b157a100", "status": "new", "previous": null}
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": "2026-06-04__b157a100",
3
+ "sha": "b157a100b157a100b157a100b157a100b157a100b157a100b157a100b157a100",
4
+ "committed_at": "2026-06-04T00:00:00Z",
5
+ "source": "nist-ai-rmf",
6
+ "previous": null
7
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "source": "nist-ai-rmf",
3
+ "version": "2026-06-04__b157a100",
4
+ "fetched_at": "2026-06-04T00:00:00Z"
5
+ }
@@ -0,0 +1 @@
1
+ {"ts": "2026-06-04T00:00:00Z", "source": "owasp-llm-top10", "version": "2026-06-04__0a592025", "sha": "0a5920250a5920250a5920250a5920250a5920250a5920250a5920250a592025", "status": "new", "previous": null}
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": "2026-06-04__0a592025",
3
+ "sha": "0a5920250a5920250a5920250a5920250a5920250a5920250a5920250a592025",
4
+ "committed_at": "2026-06-04T00:00:00Z",
5
+ "source": "owasp-llm-top10",
6
+ "previous": null
7
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "source": "owasp-llm-top10",
3
+ "version": "2026-06-04__0a592025",
4
+ "fetched_at": "2026-06-04T00:00:00Z"
5
+ }
armor/file_lock.py ADDED
@@ -0,0 +1,114 @@
1
+ """Stdlib-only cross-platform exclusive file locking and atomic write helpers."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import contextlib
6
+ import os
7
+ import tempfile
8
+ import threading
9
+ from pathlib import Path
10
+ from typing import Iterator
11
+
12
+ try:
13
+ import msvcrt # type: ignore[import-not-found]
14
+ except ImportError:
15
+ msvcrt = None # type: ignore[assignment]
16
+
17
+ try:
18
+ import fcntl # type: ignore[import-not-found]
19
+ except ImportError:
20
+ fcntl = None # type: ignore[assignment]
21
+
22
+ _INPROC_LOCK_REGISTRY: dict[str, threading.Lock] = {}
23
+ _REGISTRY_GUARD = threading.Lock()
24
+
25
+
26
+ def _inproc_lock(key: str) -> threading.Lock:
27
+ with _REGISTRY_GUARD:
28
+ lock = _INPROC_LOCK_REGISTRY.get(key)
29
+ if lock is None:
30
+ lock = threading.Lock()
31
+ _INPROC_LOCK_REGISTRY[key] = lock
32
+ return lock
33
+
34
+
35
+ def _lock_path_for(target: Path) -> Path:
36
+ resolved = target.resolve()
37
+ safe_name = resolved.name.replace(":", "_")
38
+ return resolved.parent / f"{safe_name}.lock"
39
+
40
+
41
+ @contextlib.contextmanager
42
+ def exclusive_lock(target: Path | str) -> Iterator[None]:
43
+ """Acquire an in-process and cross-process exclusive lock on a sibling .lock file."""
44
+ target_path = Path(target).resolve()
45
+ target_path.parent.mkdir(parents=True, exist_ok=True)
46
+ lock_file_path = _lock_path_for(target_path)
47
+ inproc = _inproc_lock(str(lock_file_path))
48
+
49
+ with inproc:
50
+ f = open(lock_file_path, "a+b")
51
+ try:
52
+ f.seek(0)
53
+ if f.tell() == 0:
54
+ f.write(b"\0")
55
+ f.flush()
56
+ f.seek(0)
57
+ if msvcrt is not None:
58
+ for attempt in range(600):
59
+ try:
60
+ f.seek(0)
61
+ msvcrt.locking(f.fileno(), msvcrt.LK_LOCK, 1)
62
+ break
63
+ except OSError:
64
+ if attempt == 599:
65
+ raise
66
+ elif fcntl is not None:
67
+ fcntl.flock(f.fileno(), fcntl.LOCK_EX)
68
+ try:
69
+ yield
70
+ finally:
71
+ if msvcrt is not None:
72
+ try:
73
+ f.seek(0)
74
+ msvcrt.locking(f.fileno(), msvcrt.LK_UNLCK, 1)
75
+ except OSError:
76
+ pass
77
+ elif fcntl is not None:
78
+ try:
79
+ fcntl.flock(f.fileno(), fcntl.LOCK_UN)
80
+ except OSError:
81
+ pass
82
+ finally:
83
+ f.close()
84
+
85
+
86
+ def locked_write(path: Path | str, text: str, encoding: str = "utf-8") -> None:
87
+ """Atomically write text to path under exclusive_lock."""
88
+ target = Path(path).resolve()
89
+ target.parent.mkdir(parents=True, exist_ok=True)
90
+ with exclusive_lock(target):
91
+ fd, tmp_name = tempfile.mkstemp(dir=str(target.parent), prefix=f".{target.name}.", suffix=".tmp")
92
+ try:
93
+ with os.fdopen(fd, "w", encoding=encoding) as tmp_file:
94
+ tmp_file.write(text)
95
+ tmp_file.flush()
96
+ os.fsync(tmp_file.fileno())
97
+ os.replace(tmp_name, target)
98
+ except BaseException:
99
+ try:
100
+ os.unlink(tmp_name)
101
+ except OSError:
102
+ pass
103
+ raise
104
+
105
+
106
+ def locked_append(path: Path | str, text: str, encoding: str = "utf-8") -> None:
107
+ """Append text to path under exclusive_lock and fsync."""
108
+ target = Path(path).resolve()
109
+ target.parent.mkdir(parents=True, exist_ok=True)
110
+ with exclusive_lock(target):
111
+ with open(target, "a", encoding=encoding) as f:
112
+ f.write(text)
113
+ f.flush()
114
+ os.fsync(f.fileno())