@aigis-ai/cli 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -188
- package/aigis-ai-cli-2.0.1.tgz +0 -0
- package/package.json +1 -1
- package/cli-python/LICENSE +0 -21
- package/cli-python/README.md +0 -32
- package/cli-python/aigis_cli/SKILL.md +0 -70
- package/cli-python/aigis_cli/__init__.py +0 -3
- package/cli-python/aigis_cli/__pycache__/__init__.cpython-313.pyc +0 -0
- package/cli-python/aigis_cli/__pycache__/annotate.cpython-313.pyc +0 -0
- package/cli-python/aigis_cli/__pycache__/build.cpython-313.pyc +0 -0
- package/cli-python/aigis_cli/__pycache__/checksum.cpython-313.pyc +0 -0
- package/cli-python/aigis_cli/__pycache__/classify.cpython-313.pyc +0 -0
- package/cli-python/aigis_cli/__pycache__/cli.cpython-313.pyc +0 -0
- package/cli-python/aigis_cli/__pycache__/fetch.cpython-313.pyc +0 -0
- package/cli-python/aigis_cli/__pycache__/init_ide.cpython-313.pyc +0 -0
- package/cli-python/aigis_cli/__pycache__/keywords.cpython-313.pyc +0 -0
- package/cli-python/aigis_cli/__pycache__/search.cpython-313.pyc +0 -0
- package/cli-python/aigis_cli/annotate.py +0 -45
- package/cli-python/aigis_cli/auto_verify.py +0 -518
- package/cli-python/aigis_cli/build.py +0 -470
- package/cli-python/aigis_cli/checksum.py +0 -22
- package/cli-python/aigis_cli/classify.py +0 -192
- package/cli-python/aigis_cli/cli.py +0 -618
- package/cli-python/aigis_cli/content/index/audit-scan.md +0 -217
- package/cli-python/aigis_cli/content/index/auto-verify-rules.json +0 -439
- package/cli-python/aigis_cli/content/index/context-rules.json +0 -90
- package/cli-python/aigis_cli/content/index/frameworks.md +0 -82
- package/cli-python/aigis_cli/content/index/guardrails.json +0 -23
- package/cli-python/aigis_cli/content/index/taxonomy.md +0 -81
- package/cli-python/aigis_cli/content/resolvers/triggers.json +0 -229
- package/cli-python/aigis_cli/content/skills/areas/audit-logging.md +0 -176
- package/cli-python/aigis_cli/content/skills/areas/bias-monitoring.md +0 -172
- package/cli-python/aigis_cli/content/skills/areas/confidence-scoring.md +0 -180
- package/cli-python/aigis_cli/content/skills/areas/data-integrity.md +0 -257
- package/cli-python/aigis_cli/content/skills/areas/explainability.md +0 -174
- package/cli-python/aigis_cli/content/skills/areas/fallback-patterns.md +0 -200
- package/cli-python/aigis_cli/content/skills/areas/human-oversight.md +0 -220
- package/cli-python/aigis_cli/content/skills/areas/input-validation.md +0 -380
- package/cli-python/aigis_cli/content/skills/areas/monitoring.md +0 -207
- package/cli-python/aigis_cli/content/skills/areas/output-sanitization.md +0 -183
- package/cli-python/aigis_cli/content/skills/areas/pii-handling.md +0 -189
- package/cli-python/aigis_cli/content/skills/areas/prompt-security.md +0 -153
- package/cli-python/aigis_cli/content/skills/areas/rag-security.md +0 -230
- package/cli-python/aigis_cli/content/skills/areas/rate-limiting.md +0 -246
- package/cli-python/aigis_cli/content/skills/areas/supply-chain.md +0 -193
- package/cli-python/aigis_cli/content/skills/core.md +0 -62
- package/cli-python/aigis_cli/content/skills/infrastructure/logging.md +0 -202
- package/cli-python/aigis_cli/content/skills/infrastructure/rate-limiting.md +0 -169
- package/cli-python/aigis_cli/content/skills/infrastructure/secrets.md +0 -167
- package/cli-python/aigis_cli/content/skills/workflows/fastapi-llm.md +0 -86
- package/cli-python/aigis_cli/content/templates/ai-impact-assessment.md +0 -54
- package/cli-python/aigis_cli/content/templates/intended-purpose-doc.md +0 -39
- package/cli-python/aigis_cli/content/templates/risk-characterization.md +0 -34
- package/cli-python/aigis_cli/content/templates/third-party-assessment.md +0 -41
- package/cli-python/aigis_cli/content/verify/checklist-audit-logging.md +0 -13
- package/cli-python/aigis_cli/content/verify/checklist-bias-monitoring.md +0 -13
- package/cli-python/aigis_cli/content/verify/checklist-confidence-scoring.md +0 -13
- package/cli-python/aigis_cli/content/verify/checklist-data-integrity.md +0 -12
- package/cli-python/aigis_cli/content/verify/checklist-explainability.md +0 -13
- package/cli-python/aigis_cli/content/verify/checklist-fallback-patterns.md +0 -13
- package/cli-python/aigis_cli/content/verify/checklist-human-oversight.md +0 -14
- package/cli-python/aigis_cli/content/verify/checklist-input-validation.md +0 -16
- package/cli-python/aigis_cli/content/verify/checklist-monitoring.md +0 -13
- package/cli-python/aigis_cli/content/verify/checklist-output-sanitization.md +0 -14
- package/cli-python/aigis_cli/content/verify/checklist-pii-handling.md +0 -14
- package/cli-python/aigis_cli/content/verify/checklist-prompt-security.md +0 -13
- package/cli-python/aigis_cli/content/verify/checklist-rag-security.md +0 -12
- package/cli-python/aigis_cli/content/verify/checklist-rate-limiting.md +0 -13
- package/cli-python/aigis_cli/content/verify/checklist-supply-chain.md +0 -13
- package/cli-python/aigis_cli/fetch.py +0 -232
- package/cli-python/aigis_cli/init_ide.py +0 -159
- package/cli-python/aigis_cli/keywords.py +0 -73
- package/cli-python/aigis_cli/search.py +0 -69
- package/cli-python/aigis_cli.egg-info/PKG-INFO +0 -59
- package/cli-python/aigis_cli.egg-info/SOURCES.txt +0 -56
- package/cli-python/aigis_cli.egg-info/dependency_links.txt +0 -1
- package/cli-python/aigis_cli.egg-info/entry_points.txt +0 -2
- package/cli-python/aigis_cli.egg-info/requires.txt +0 -6
- package/cli-python/aigis_cli.egg-info/top_level.txt +0 -1
- package/cli-python/dist/aigis_cli-1.0.3-py3-none-any.whl +0 -0
- package/cli-python/dist/aigis_cli-1.0.3.tar.gz +0 -0
- package/cli-python/pyproject.toml +0 -49
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: audit-scan
|
|
3
|
-
title: Aigis codebase audit scan prompt
|
|
4
|
-
version: "2.0"
|
|
5
|
-
purpose: Structured instructions for an agent to scan a codebase and detect system traits. Control-by-control evaluation is produced separately by `aigis audit --traits <detected>` so the denominator is deterministic.
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# AIGIS CODEBASE AUDIT (DISCOVERY)
|
|
9
|
-
|
|
10
|
-
This prompt covers three phases: project inventory, trait detection, and classify handoff.
|
|
11
|
-
|
|
12
|
-
**Control-by-control evaluation (formerly Phases 4-5) is no longer in this prompt.** Once Phase 3 identifies the traits, run `aigis audit --traits <detected-traits>` to get the scoped checklist. That command emits only the pattern areas recommended by `classify` and prints an explicit total-check denominator, so two runs on the same system produce the same scoring scope.
|
|
13
|
-
|
|
14
|
-
Complete every section in order.
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## PHASE 1: PROJECT INVENTORY
|
|
19
|
-
|
|
20
|
-
Before analyzing governance, build a complete picture of what exists.
|
|
21
|
-
|
|
22
|
-
### 1.1 File discovery
|
|
23
|
-
|
|
24
|
-
Scan the project and document:
|
|
25
|
-
|
|
26
|
-
- [ ] **Primary language(s):** (Python, JavaScript/TypeScript, Go, Java, etc.)
|
|
27
|
-
- [ ] **Package manager files:** (requirements.txt, package.json, pyproject.toml, go.mod, pom.xml)
|
|
28
|
-
- [ ] **Environment/config files:** (.env, .env.example, config.yaml, settings.py, etc.)
|
|
29
|
-
- [ ] **API route definitions:** (FastAPI routes, Express routes, Flask blueprints, etc.)
|
|
30
|
-
- [ ] **Test files:** (test directories, test files, testing frameworks used)
|
|
31
|
-
- [ ] **Deployment files:** (Dockerfile, docker-compose, kubernetes manifests, CI/CD configs)
|
|
32
|
-
- [ ] **Documentation:** (README, docs/, API specs, architecture docs)
|
|
33
|
-
|
|
34
|
-
### 1.2 Dependency analysis
|
|
35
|
-
|
|
36
|
-
Read the dependency files and list:
|
|
37
|
-
|
|
38
|
-
- [ ] **LLM client libraries:** (openai, anthropic, cohere, google-generativeai, langchain, llama-index, transformers, vllm, ollama)
|
|
39
|
-
- [ ] **Vector database clients:** (pinecone-client, chromadb, weaviate-client, qdrant-client, pgvector, faiss, milvus)
|
|
40
|
-
- [ ] **Embedding libraries:** (sentence-transformers, openai embeddings, cohere embed)
|
|
41
|
-
- [ ] **ML/AI frameworks:** (tensorflow, pytorch, scikit-learn, huggingface)
|
|
42
|
-
- [ ] **Web frameworks:** (fastapi, flask, django, express, next.js, nestjs)
|
|
43
|
-
- [ ] **Database clients:** (sqlalchemy, prisma, mongoose, knex, sequelize)
|
|
44
|
-
- [ ] **Authentication libraries:** (jwt, oauth, passport, auth0, clerk)
|
|
45
|
-
- [ ] **Monitoring/logging libraries:** (winston, pino, structlog, loguru, sentry, datadog)
|
|
46
|
-
- [ ] **Data validation libraries:** (pydantic, zod, joi, ajv, marshmallow)
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
## PHASE 2: TRAIT DETECTION
|
|
51
|
-
|
|
52
|
-
For each trait below, search the codebase for the specified indicators. Mark YES, NO, or UNCERTAIN. If UNCERTAIN, explain what you found and why you're unsure.
|
|
53
|
-
|
|
54
|
-
### 2.1 AI architecture traits
|
|
55
|
-
|
|
56
|
-
**uses-llm**
|
|
57
|
-
Search for: imports of openai, anthropic, cohere, google.generativeai, langchain.llms, langchain.chat_models, llama_index, transformers pipeline, any chat.completions.create or messages API calls, any prompt template construction
|
|
58
|
-
- [ ] YES / NO / UNCERTAIN
|
|
59
|
-
- Evidence: [file:line references]
|
|
60
|
-
|
|
61
|
-
**uses-rag**
|
|
62
|
-
Search for: imports of vector database clients (pinecone, chromadb, weaviate, qdrant, pgvector), embedding generation calls, similarity_search or .query() on vector stores, any retrieval chain or retrieval QA construction, documents being chunked and embedded
|
|
63
|
-
- [ ] YES / NO / UNCERTAIN
|
|
64
|
-
- Evidence: [file:line references]
|
|
65
|
-
|
|
66
|
-
**uses-finetuned**
|
|
67
|
-
Search for: training scripts, fine-tuning code (LoRA, QLoRA, PEFT, SFT), custom model loading from local paths or HuggingFace hub with custom model IDs, dataset preparation for training, training configuration files, model checkpoints in the repo
|
|
68
|
-
- [ ] YES / NO / UNCERTAIN
|
|
69
|
-
- Evidence: [file:line references]
|
|
70
|
-
|
|
71
|
-
**uses-thirdparty-api**
|
|
72
|
-
Search for: API keys for model providers (OPENAI_API_KEY, ANTHROPIC_API_KEY, COHERE_API_KEY, etc.) in env files or config, base_url pointing to external providers, client initialization with API keys, any network calls to model inference endpoints
|
|
73
|
-
- [ ] YES / NO / UNCERTAIN
|
|
74
|
-
- Evidence: [file:line references]
|
|
75
|
-
|
|
76
|
-
**is-agentic**
|
|
77
|
-
Search for: tool/function definitions for LLM use (tools=[], functions=[], @tool decorator), LLM output being used to trigger actions (database writes, API calls, file operations, email sending), agent frameworks (langchain agents, autogen, crewai), code execution from LLM output, any loop where LLM decides the next action
|
|
78
|
-
- [ ] YES / NO / UNCERTAIN
|
|
79
|
-
- Evidence: [file:line references]
|
|
80
|
-
|
|
81
|
-
**is-multimodal**
|
|
82
|
-
Search for: image processing with LLMs (vision API calls, image_url in messages), audio transcription (whisper, speech-to-text), text-to-speech, image generation (DALL-E, Stable Diffusion), video processing, document OCR with AI
|
|
83
|
-
- [ ] YES / NO / UNCERTAIN
|
|
84
|
-
- Evidence: [file:line references]
|
|
85
|
-
|
|
86
|
-
### 2.2 Data sensitivity traits
|
|
87
|
-
|
|
88
|
-
**processes-pii**
|
|
89
|
-
Search for: fields or variables named email, phone, ssn, address, name, date_of_birth, social_security, passport, driver_license; user profile or account models with personal fields; form inputs collecting personal data; database tables storing personal information; any data that could identify a specific individual
|
|
90
|
-
- [ ] YES / NO / UNCERTAIN
|
|
91
|
-
- Evidence: [file:line references]
|
|
92
|
-
|
|
93
|
-
**handles-financial**
|
|
94
|
-
Search for: fields named account_number, credit_card, transaction, balance, payment, invoice, claim, policy_number, premium; financial calculation logic; payment processing integrations (stripe, square, plaid); insurance-related models; credit scoring; loan or lending logic
|
|
95
|
-
- [ ] YES / NO / UNCERTAIN
|
|
96
|
-
- Evidence: [file:line references]
|
|
97
|
-
|
|
98
|
-
**handles-health**
|
|
99
|
-
Search for: fields named diagnosis, prescription, patient, medical_record, health_record, condition, symptom, treatment, ICD_code, CPT_code; HIPAA-related configuration; health data models; medical terminology in schemas; clinical data processing
|
|
100
|
-
- [ ] YES / NO / UNCERTAIN
|
|
101
|
-
- Evidence: [file:line references]
|
|
102
|
-
|
|
103
|
-
**handles-proprietary**
|
|
104
|
-
Search for: trade secret markers, confidential labels in code or data, proprietary algorithm implementations, competitive intelligence processing, internal strategy documents being processed, source code analysis features, IP-related data handling
|
|
105
|
-
- [ ] YES / NO / UNCERTAIN
|
|
106
|
-
- Evidence: [file:line references]
|
|
107
|
-
|
|
108
|
-
**handles-minors**
|
|
109
|
-
Search for: age verification logic, date_of_birth fields with age checks, COPPA compliance references, parental consent flows, fields or models related to students/children/minors, age-gating logic, under-13 or under-16 checks
|
|
110
|
-
- [ ] YES / NO / UNCERTAIN
|
|
111
|
-
- Evidence: [file:line references]
|
|
112
|
-
|
|
113
|
-
### 2.3 Impact scope traits
|
|
114
|
-
|
|
115
|
-
**influences-decisions**
|
|
116
|
-
Search for: AI output being used to approve/deny/score/rank/filter people; hiring or recruitment logic; credit or loan decisions; insurance claim assessment; content moderation decisions affecting users; grading or evaluation; benefit eligibility determination; any place where AI output directly affects a specific person's outcome
|
|
117
|
-
- [ ] YES / NO / UNCERTAIN
|
|
118
|
-
- Evidence: [file:line references]
|
|
119
|
-
|
|
120
|
-
**accepts-user-input**
|
|
121
|
-
Search for: API endpoints accepting text body/payload from users, chat input fields, form text areas, file upload endpoints where content is sent to LLM, any route where user-provided text is concatenated into or passed alongside LLM prompts
|
|
122
|
-
- [ ] YES / NO / UNCERTAIN
|
|
123
|
-
- Evidence: [file:line references]
|
|
124
|
-
|
|
125
|
-
**is-external**
|
|
126
|
-
Search for: public API endpoints (no auth required, or auth for external users), customer-facing UI, public documentation referencing the AI feature, deployment configs exposing to internet, CORS configs allowing external origins, public-facing domains in config
|
|
127
|
-
- [ ] YES / NO / UNCERTAIN
|
|
128
|
-
- Evidence: [file:line references]
|
|
129
|
-
|
|
130
|
-
**is-internal**
|
|
131
|
-
Search for: VPN-only access configs, internal domain restrictions, employee-only auth (SSO, corporate identity), admin-only UI, deployment to internal infrastructure only
|
|
132
|
-
- [ ] YES / NO / UNCERTAIN
|
|
133
|
-
- Evidence: [file:line references]
|
|
134
|
-
|
|
135
|
-
**is-high-volume**
|
|
136
|
-
Search for: auto-scaling configs, load balancer references, queue/worker patterns for LLM calls, batch processing of LLM requests, rate limiting configuration suggesting high throughput, production deployment manifests with multiple replicas, usage metrics suggesting >1000 requests/day
|
|
137
|
-
- [ ] YES / NO / UNCERTAIN
|
|
138
|
-
- Evidence: [file:line references]
|
|
139
|
-
|
|
140
|
-
### 2.4 Output type traits
|
|
141
|
-
|
|
142
|
-
**generates-code**
|
|
143
|
-
Search for: LLM output being passed to eval(), exec(), subprocess, child_process, vm.runInContext, or any code execution; SQL generation from LLM output; code generation features; LLM-generated scripts being saved and run; any sandbox or code execution environment
|
|
144
|
-
- [ ] YES / NO / UNCERTAIN
|
|
145
|
-
- Evidence: [file:line references]
|
|
146
|
-
|
|
147
|
-
**generates-content**
|
|
148
|
-
Search for: LLM output being published to websites, sent as emails to customers, posted to social media, included in reports distributed externally, used in marketing materials, displayed in customer-facing UI without human review step
|
|
149
|
-
- [ ] YES / NO / UNCERTAIN
|
|
150
|
-
- Evidence: [file:line references]
|
|
151
|
-
|
|
152
|
-
**multi-model-pipeline**
|
|
153
|
-
Search for: multiple different LLM calls in sequence where one model's output feeds into another's input, chain/pipeline constructions (langchain chains, sequential calls), orchestration logic connecting multiple AI models, ensemble or voting patterns across models
|
|
154
|
-
- [ ] YES / NO / UNCERTAIN
|
|
155
|
-
- Evidence: [file:line references]
|
|
156
|
-
|
|
157
|
-
### 2.5 Regulatory jurisdiction traits
|
|
158
|
-
|
|
159
|
-
**jurisdiction-eu**
|
|
160
|
-
Search for: EU-specific configuration, GDPR references, EU AI Act references, .eu domains, European language localizations, EU data residency settings, European cloud regions in deployment configs, EU-specific compliance documentation
|
|
161
|
-
- [ ] YES / NO / UNCERTAIN
|
|
162
|
-
- Evidence: [file:line references]
|
|
163
|
-
|
|
164
|
-
**jurisdiction-us-regulated**
|
|
165
|
-
Search for: HIPAA references or BAA documentation, FCRA or fair lending references, FERPA references, FedRAMP configuration, SOC2 documentation, US financial regulation references (OCC, CFPB, SEC), state-specific AI regulation references
|
|
166
|
-
- [ ] YES / NO / UNCERTAIN
|
|
167
|
-
- Evidence: [file:line references]
|
|
168
|
-
|
|
169
|
-
**jurisdiction-global**
|
|
170
|
-
Search for: multi-region deployment configs, internationalization (i18n) with multiple country locales, multiple currency support, geo-routing logic, data residency for multiple countries, multi-language support spanning different regulatory zones
|
|
171
|
-
- [ ] YES / NO / UNCERTAIN
|
|
172
|
-
- Evidence: [file:line references]
|
|
173
|
-
|
|
174
|
-
---
|
|
175
|
-
|
|
176
|
-
## PHASE 3: TRAIT SUMMARY
|
|
177
|
-
|
|
178
|
-
Based on Phase 2, compile the detected traits:
|
|
179
|
-
|
|
180
|
-
```
|
|
181
|
-
Detected traits: [comma-separated list of YES traits]
|
|
182
|
-
Uncertain traits: [comma-separated list of UNCERTAIN traits with brief reason]
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
Run: `aigis classify --traits <detected-traits> --json`
|
|
186
|
-
|
|
187
|
-
Record the output:
|
|
188
|
-
- Risk tier: ___
|
|
189
|
-
- Implement files recommended: ___
|
|
190
|
-
- Templates required: ___
|
|
191
|
-
- Guardrails fired: ___
|
|
192
|
-
|
|
193
|
-
---
|
|
194
|
-
|
|
195
|
-
## PHASE 4: SCOPED CONTROL EVALUATION (handoff)
|
|
196
|
-
|
|
197
|
-
Do not evaluate controls inline with this prompt. The scoped checklist is produced by a separate command that uses the classify output from Phase 3.
|
|
198
|
-
|
|
199
|
-
Run:
|
|
200
|
-
|
|
201
|
-
```
|
|
202
|
-
aigis audit --traits <detected-traits>
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
That command:
|
|
206
|
-
|
|
207
|
-
- Includes only the pattern areas that `classify` recommended for this trait set. Areas that are not recommended are not printed at all (no "N/A" placeholders, no agent-side skipping).
|
|
208
|
-
- Prints the deterministic total-check count for this scope at the top and repeats it at the bottom.
|
|
209
|
-
- Prints the exact `Score: <pass> / <total> total checks across <N> recommended areas (areas: ...)` line you should emit once you have filled in the checklists.
|
|
210
|
-
|
|
211
|
-
Use the output of `aigis audit --traits` as your Phase 4 worksheet. Fill every row with PASS / FAIL / PARTIAL and file:line evidence. Then emit the prescribed score line, followed by:
|
|
212
|
-
|
|
213
|
-
- A list of FAIL items in priority order (OWASP controls first, then NIST MEASURE, then NIST MANAGE, then ISO documentation).
|
|
214
|
-
- A list of PARTIAL items.
|
|
215
|
-
- The exact `aigis template ...` commands from your classification output for any required compliance documentation.
|
|
216
|
-
|
|
217
|
-
(End of discovery prompt.)
|
|
@@ -1,439 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_schema_doc": "Auto-verify rules for aigis verify --auto. Each pattern area (key at top level) maps to an object with 'auto', 'overclaim', and 'judgment' sections. AUTO checks pass if ANY of their patterns match any file in the project under the default glob. OVERCLAIM checks run a named recognizer from lib/special-recognizers. JUDGMENT checks are listed without rules and are returned to the agent for evaluation.",
|
|
3
|
-
"_schema_auto_entry": {
|
|
4
|
-
"desc": "What this check is looking for",
|
|
5
|
-
"patterns": ["regex-string-1", "regex-string-2"],
|
|
6
|
-
"require": "any|all (default: any)",
|
|
7
|
-
"file_glob": "optional override of default project glob"
|
|
8
|
-
},
|
|
9
|
-
"_schema_overclaim_entry": {
|
|
10
|
-
"desc": "What this overclaim pattern looks like",
|
|
11
|
-
"recognizer": "name_of_recognizer_function",
|
|
12
|
-
"also_auto": "V1 (optional: run this auto rule first; overclaim only raised if auto passed)"
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
"audit-logging": {
|
|
16
|
-
"auto": {
|
|
17
|
-
"V1": {
|
|
18
|
-
"desc": "Structured log entry with trace_id for LLM interactions",
|
|
19
|
-
"patterns": ["trace_id", "traceId", "correlation_id"],
|
|
20
|
-
"require": "any"
|
|
21
|
-
},
|
|
22
|
-
"V2": {
|
|
23
|
-
"desc": "Trace ID generated and propagated",
|
|
24
|
-
"patterns": ["ContextVar\\s*\\(.*trace", "trace_id_var", "set_trace_id", "x[-_]trace[-_]id", "trace_id\\s*=\\s*str\\s*\\(\\s*uuid\\.uuid4", "trace_id\\s*=\\s*uuid\\.uuid4", "generate_trace_id"],
|
|
25
|
-
"require": "any"
|
|
26
|
-
},
|
|
27
|
-
"V3": {
|
|
28
|
-
"desc": "AI-influenced decisions logged with context",
|
|
29
|
-
"patterns": ["log_decision", "decision_log", "event_type[\"'\\s:=]+(ai_decision|decision)", "_log_audit_event\\s*\\(\\s*[\"']decision"],
|
|
30
|
-
"require": "any"
|
|
31
|
-
},
|
|
32
|
-
"V4": {
|
|
33
|
-
"desc": "Logging is PII-redacted (redact function referenced near logger)",
|
|
34
|
-
"patterns": ["redact_pii|redactPii|RedactPII", "input_hash|inputHash", "hashlib\\.sha256.*input"],
|
|
35
|
-
"require": "any"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"overclaim": {},
|
|
39
|
-
"judgment": {
|
|
40
|
-
"V5": "Are ALL interactions logged (not just errors)? Requires reading log call sites to confirm coverage."
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
"bias-monitoring": {
|
|
45
|
-
"auto": {
|
|
46
|
-
"V1": {
|
|
47
|
-
"desc": "Fairness-enabling fields in logs",
|
|
48
|
-
"patterns": ["fairness", "claim_type", "input_length_bucket", "submission_channel", "bucket_length"],
|
|
49
|
-
"require": "any"
|
|
50
|
-
},
|
|
51
|
-
"V3": {
|
|
52
|
-
"desc": "Fairness report generator exists",
|
|
53
|
-
"patterns": ["generate_fairness_report", "fairness_report", "BiasMonitor"],
|
|
54
|
-
"require": "any"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"overclaim": {},
|
|
58
|
-
"judgment": {
|
|
59
|
-
"V2": "Is distribution monitoring by demographic segments actually wired to a backend (not a stub that returns [])? Requires agent inspection of the monitor implementation.",
|
|
60
|
-
"V4": "Confirm protected characteristics are not collected. Absence is hard to prove by regex.",
|
|
61
|
-
"V5": "Is override pattern analysis actually implemented (not a placeholder)? Requires agent inspection."
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
"confidence-scoring": {
|
|
66
|
-
"auto": {
|
|
67
|
-
"V1": {
|
|
68
|
-
"desc": "Confidence metadata on AI responses",
|
|
69
|
-
"patterns": ["confidence_score", "confidence\\s*:\\s*float", "confidence\\s*[:=]\\s*Field", "ConfidenceScore"],
|
|
70
|
-
"require": "any"
|
|
71
|
-
},
|
|
72
|
-
"V3": {
|
|
73
|
-
"desc": "Recommendation framing (language of suggestion)",
|
|
74
|
-
"patterns": ["recommendation\\s*[:=]", "recommends?\\(", "suggests?\\(", "AI-assisted", "ai_assisted"],
|
|
75
|
-
"require": "any"
|
|
76
|
-
},
|
|
77
|
-
"V4": {
|
|
78
|
-
"desc": "No 'The AI determined' framing (inverse: absence indicates PASS)",
|
|
79
|
-
"patterns": ["The AI determined", "AI has decided", "the model decided"],
|
|
80
|
-
"require": "any",
|
|
81
|
-
"inverse": true
|
|
82
|
-
},
|
|
83
|
-
"V5": {
|
|
84
|
-
"desc": "Low-confidence flagged for human review",
|
|
85
|
-
"patterns": ["requires_human_review", "human_review_required", "(?:confidence|conf|score)\\s*<\\s*0\\.", "confidence_threshold", "DecisionGate"],
|
|
86
|
-
"require": "any"
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
"overclaim": {},
|
|
90
|
-
"judgment": {
|
|
91
|
-
"V2": "Is grounding verification implemented for RAG? N/A for non-RAG systems."
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
"data-integrity": {
|
|
96
|
-
"auto": {
|
|
97
|
-
"V1": {
|
|
98
|
-
"desc": "Data provenance tracking (checksum, ingestion date)",
|
|
99
|
-
"patterns": ["checksum", "hashlib\\..*\\.hexdigest", "ingestion_date|ingested_at", "provenance"],
|
|
100
|
-
"require": "any"
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
"overclaim": {},
|
|
104
|
-
"judgment": {
|
|
105
|
-
"V2": "Pre-embedding validation requires agent evaluation of vector pipeline.",
|
|
106
|
-
"V3": "Dataset versioning requires agent evaluation of training pipeline.",
|
|
107
|
-
"V4": "Absence of unverified data sources is hard to prove by regex."
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
"explainability": {
|
|
112
|
-
"auto": {
|
|
113
|
-
"V1": {
|
|
114
|
-
"desc": "Human-readable explanation field in responses",
|
|
115
|
-
"patterns": ["explanation\\s*[:=]", "reasoning\\s*[:=]", "generate_explanation", "human_readable"],
|
|
116
|
-
"require": "any"
|
|
117
|
-
},
|
|
118
|
-
"V2": {
|
|
119
|
-
"desc": "Model card exists (endpoint, file, or function)",
|
|
120
|
-
"patterns": ["model_card", "model-card", "modelCard", "/model-card"],
|
|
121
|
-
"require": "any"
|
|
122
|
-
},
|
|
123
|
-
"V3": {
|
|
124
|
-
"desc": "Audit-friendly structured logs",
|
|
125
|
-
"patterns": ["audit_logger|audit_log", "json\\.dumps.*decision", "structured.*log", "event_type"],
|
|
126
|
-
"require": "any"
|
|
127
|
-
},
|
|
128
|
-
"V5": {
|
|
129
|
-
"desc": "Appeal / review info in decision outputs",
|
|
130
|
-
"patterns": ["appeal", "override_available", "human_override", "review_endpoint"],
|
|
131
|
-
"require": "any"
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
"overclaim": {},
|
|
135
|
-
"judgment": {
|
|
136
|
-
"V4": "Plain-language vs technical jargon is a stylistic judgment regex can't make reliably."
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
|
|
140
|
-
"fallback-patterns": {
|
|
141
|
-
"auto": {
|
|
142
|
-
"V1": {
|
|
143
|
-
"desc": "Default safe response function for LLM failures",
|
|
144
|
-
"patterns": ["default_safe_response", "default_safe_assessment", "fallback_response", "safe_default", "_?fallback_assessment", "(?:def|function)\\s+\\w*fallback\\w*"],
|
|
145
|
-
"require": "any"
|
|
146
|
-
},
|
|
147
|
-
"V2": {
|
|
148
|
-
"desc": "Circuit breaker with state machine",
|
|
149
|
-
"patterns": ["CircuitBreaker", "circuit_breaker", "(\"|')closed(\"|').*(\"|')open(\"|')", "half[_-]?open"],
|
|
150
|
-
"require": "any"
|
|
151
|
-
},
|
|
152
|
-
"V3": {
|
|
153
|
-
"desc": "Kill switch toggle",
|
|
154
|
-
"patterns": ["ai_system_enabled|AI_SYSTEM_ENABLED|aiSystemEnabled", "kill_switch|killSwitch|KILL_SWITCH", "feature_flag|featureFlag"],
|
|
155
|
-
"require": "any"
|
|
156
|
-
},
|
|
157
|
-
"V4": {
|
|
158
|
-
"desc": "Exception handling around LLM call (try + except + LLM reference all present)",
|
|
159
|
-
"patterns": ["\\btry\\s*[:{]", "\\b(?:except|catch)\\b", "(?:anthropic|openai|messages\\.create|client\\.messages|_assess_with_|call_claude|call_llm|_call_llm|circuit_breaker\\.call|call_with_llm_circuit)"],
|
|
160
|
-
"require": "all"
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
"overclaim": {
|
|
164
|
-
"V3": {
|
|
165
|
-
"desc": "Kill switch is restart-latched (env read only at import, not per request)",
|
|
166
|
-
"recognizer": "kill_switch_restart_latched",
|
|
167
|
-
"also_auto": "V3"
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
"judgment": {
|
|
171
|
-
"V5": "Is there a defined recovery process after kill-switch activation? Requires runbook/docs inspection."
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
|
|
175
|
-
"human-oversight": {
|
|
176
|
-
"auto": {
|
|
177
|
-
"V1": {
|
|
178
|
-
"desc": "Explicit tool allowlist structure",
|
|
179
|
-
"patterns": ["ALLOWED_TOOLS|allowed_tools|allowedTools", "tool_allowlist|tool_policy"],
|
|
180
|
-
"require": "any"
|
|
181
|
-
},
|
|
182
|
-
"V3": {
|
|
183
|
-
"desc": "Action rate limiting on LLM-initiated actions",
|
|
184
|
-
"patterns": ["RateLimiter|rate_limiter|rateLimiter", "rate_limit_check|checkRateLimit"],
|
|
185
|
-
"require": "any"
|
|
186
|
-
},
|
|
187
|
-
"V4": {
|
|
188
|
-
"desc": "Override mechanism surfaced in responses",
|
|
189
|
-
"patterns": ["override(_available|Available|:)|human_override|humanOverride", "appeal"],
|
|
190
|
-
"require": "any"
|
|
191
|
-
},
|
|
192
|
-
"V5": {
|
|
193
|
-
"desc": "Audit trail for LLM-initiated actions",
|
|
194
|
-
"patterns": ["log_decision|audit_logger|audit_log", "controls_applied|controlsApplied"],
|
|
195
|
-
"require": "any"
|
|
196
|
-
},
|
|
197
|
-
"V6": {
|
|
198
|
-
"desc": "Low-confidence routed to human review",
|
|
199
|
-
"patterns": ["requires_human_review|humanReviewRequired", "DecisionGate", "(?:confidence|conf|score)\\s*<\\s*0\\."],
|
|
200
|
-
"require": "any"
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
|
-
"overclaim": {},
|
|
204
|
-
"judgment": {
|
|
205
|
-
"V2": "Whether mutating operations require human approval is architectural; regex can't tell which ops are mutating without project-specific context."
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
|
|
209
|
-
"input-validation": {
|
|
210
|
-
"auto": {
|
|
211
|
-
"V1": {
|
|
212
|
-
"desc": "Maximum input length check",
|
|
213
|
-
"patterns": ["max_length\\s*[:=]\\s*\\d+", "maxLength\\s*[:=]\\s*\\d+", "MAX_INPUT_LENGTH|MAX_LEN|MAX_TOKENS", "validate_input_length"],
|
|
214
|
-
"require": "any"
|
|
215
|
-
},
|
|
216
|
-
"V2": {
|
|
217
|
-
"desc": "System/user role separation in LLM call",
|
|
218
|
-
"patterns": ["[\"']role[\"']\\s*:\\s*[\"']system[\"']", "[\"']role[\"']\\s*:\\s*[\"']user[\"']", "system\\s*=\\s*[A-Z_]*PROMPT", "system\\s*:\\s*SYSTEM_PROMPT"],
|
|
219
|
-
"require": "any"
|
|
220
|
-
},
|
|
221
|
-
"V3": {
|
|
222
|
-
"desc": "Sanitization of control chars / zero-width Unicode",
|
|
223
|
-
"patterns": ["\\\\x00|\\\\u200[B-F]|\\\\u202[A-E]|\\\\uFEFF", "DANGEROUS_CHARS|SANITIZE|sanitize_input", "unicodedata\\.normalize"],
|
|
224
|
-
"require": "any"
|
|
225
|
-
},
|
|
226
|
-
"V4": {
|
|
227
|
-
"desc": "Output schema validation against Pydantic/Zod/equivalent",
|
|
228
|
-
"patterns": ["model_validate|model_validate_json|parse_obj_as", "BaseModel", "ValidationError", "z\\.object|z\\.string"],
|
|
229
|
-
"require": "any"
|
|
230
|
-
},
|
|
231
|
-
"V5": {
|
|
232
|
-
"desc": "Injection pattern detection layer exists",
|
|
233
|
-
"patterns": ["SUSPICIOUS_PATTERNS|INJECTION_PATTERN", "check_injection|detect_injection|scan_injection", "ignore previous instructions"],
|
|
234
|
-
"require": "any"
|
|
235
|
-
},
|
|
236
|
-
"V6": {
|
|
237
|
-
"desc": "No f-string / concat of user input into prompt (anti-pattern: presence = FAIL)",
|
|
238
|
-
"patterns": ["f[\"'][^\"']*\\{(claim|user|input|prompt)[^}]*\\}[^\"']*[\"'].*(?:messages|system|prompt)", "prompt\\s*\\+\\s*(user|input|claim)"],
|
|
239
|
-
"require": "any",
|
|
240
|
-
"inverse": true
|
|
241
|
-
},
|
|
242
|
-
"V7": {
|
|
243
|
-
"desc": "Oversize input raises error (not silent truncation)",
|
|
244
|
-
"patterns": ["raise\\s+(ValueError|HTTPException|ValidationError).*(?:length|too large|exceed)", "HTTPException\\s*\\(\\s*status_code\\s*=\\s*(400|422|413)"],
|
|
245
|
-
"require": "any"
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
|
-
"overclaim": {
|
|
249
|
-
"V5": {
|
|
250
|
-
"desc": "Injection detector is log-only (callsite does not block/branch on result)",
|
|
251
|
-
"recognizer": "injection_log_only",
|
|
252
|
-
"also_auto": "V5"
|
|
253
|
-
}
|
|
254
|
-
},
|
|
255
|
-
"judgment": {
|
|
256
|
-
"V8": "File/document extraction path parity is N/A when no file ingestion exists. Needs agent to confirm."
|
|
257
|
-
}
|
|
258
|
-
},
|
|
259
|
-
|
|
260
|
-
"monitoring": {
|
|
261
|
-
"auto": {
|
|
262
|
-
"V1": {
|
|
263
|
-
"desc": "Key metrics tracked (latency/error/cost)",
|
|
264
|
-
"patterns": ["latency_ms|latencyMs", "error_rate|errorRate", "token_count|tokenCount|usage\\.", "MONITORING_METRICS|metrics_logger"],
|
|
265
|
-
"require": "any"
|
|
266
|
-
},
|
|
267
|
-
"V2": {
|
|
268
|
-
"desc": "Drift detection comparing recent to baseline",
|
|
269
|
-
"patterns": ["drift_detected|driftDetected|DriftDetector", "baseline.*compare|compare.*baseline"],
|
|
270
|
-
"require": "any"
|
|
271
|
-
},
|
|
272
|
-
"V3": {
|
|
273
|
-
"desc": "User feedback mechanism (agree/disagree/escalate)",
|
|
274
|
-
"patterns": ["/feedback|post_feedback|submit_feedback|record_feedback", "feedback_type|feedbackType", "agree.*disagree|thumbs_up.*thumbs_down"],
|
|
275
|
-
"require": "any"
|
|
276
|
-
},
|
|
277
|
-
"V4": {
|
|
278
|
-
"desc": "Structured incident logging",
|
|
279
|
-
"patterns": ["log_incident|logIncident", "incident_type|incidentType", "incident_id|incidentId"],
|
|
280
|
-
"require": "any"
|
|
281
|
-
}
|
|
282
|
-
},
|
|
283
|
-
"overclaim": {},
|
|
284
|
-
"judgment": {
|
|
285
|
-
"V5": "Whether monitoring was active from day one is a process question, not a code question."
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
|
|
289
|
-
"output-sanitization": {
|
|
290
|
-
"auto": {
|
|
291
|
-
"V4": {
|
|
292
|
-
"desc": "Content type / schema validation of LLM output",
|
|
293
|
-
"patterns": ["model_validate|parse_assessment|AssessmentOutput", "schema\\.validate|schemaValidate", "Enum\\s*\\)|enum\\s*\\)"],
|
|
294
|
-
"require": "any"
|
|
295
|
-
},
|
|
296
|
-
"V5": {
|
|
297
|
-
"desc": "No eval/exec on raw LLM output (anti-pattern: presence = FAIL)",
|
|
298
|
-
"patterns": ["\\beval\\s*\\(", "\\bexec\\s*\\(", "Function\\s*\\(.*new Function"],
|
|
299
|
-
"require": "any",
|
|
300
|
-
"inverse": true
|
|
301
|
-
}
|
|
302
|
-
},
|
|
303
|
-
"overclaim": {},
|
|
304
|
-
"judgment": {
|
|
305
|
-
"V1": "HTML escaping only applies when the system renders HTML. API-only services should mark N/A.",
|
|
306
|
-
"V2": "Parameterized DB queries only apply when the system has a DB layer. Absence of DB = N/A.",
|
|
307
|
-
"V3": "Sandbox for code execution only applies when LLM output is executed. Absence = N/A.",
|
|
308
|
-
"V6": "Markdown-to-HTML sanitization only applies if the system renders markdown."
|
|
309
|
-
}
|
|
310
|
-
},
|
|
311
|
-
|
|
312
|
-
"pii-handling": {
|
|
313
|
-
"auto": {
|
|
314
|
-
"V1": {
|
|
315
|
-
"desc": "PII redaction called before LLM request",
|
|
316
|
-
"patterns": ["redact_pii|redactPII|redactPii", "PII_PATTERNS|piiPatterns"],
|
|
317
|
-
"require": "any"
|
|
318
|
-
},
|
|
319
|
-
"V3": {
|
|
320
|
-
"desc": "LLM output scanned for PII",
|
|
321
|
-
"patterns": ["filter_output_pii|filterOutputPii", "redact_pii.*output|redact.*response"],
|
|
322
|
-
"require": "any"
|
|
323
|
-
},
|
|
324
|
-
"V5": {
|
|
325
|
-
"desc": "Logs written with redacted content",
|
|
326
|
-
"patterns": ["redact_pii.*log|logger.*redact", "input_hash|hashlib.*input", "redacted_out|output_redacted"],
|
|
327
|
-
"require": "any"
|
|
328
|
-
}
|
|
329
|
-
},
|
|
330
|
-
"overclaim": {
|
|
331
|
-
"V1": {
|
|
332
|
-
"desc": "PII pattern coverage is incomplete (fewer than the 5 required classes: ssn, email, phone, credit_card, address)",
|
|
333
|
-
"recognizer": "pii_incomplete_classes",
|
|
334
|
-
"also_auto": "V1"
|
|
335
|
-
}
|
|
336
|
-
},
|
|
337
|
-
"judgment": {
|
|
338
|
-
"V2": "Data minimization (only necessary fields sent to LLM) requires agent review of request schema.",
|
|
339
|
-
"V4": "Separated PII storage is architectural.",
|
|
340
|
-
"V6": "Whether full records are sent to LLM requires request-shape inspection."
|
|
341
|
-
}
|
|
342
|
-
},
|
|
343
|
-
|
|
344
|
-
"prompt-security": {
|
|
345
|
-
"auto": {
|
|
346
|
-
"V3": {
|
|
347
|
-
"desc": "Leakage detection on LLM output",
|
|
348
|
-
"patterns": ["detect_prompt_leakage|detectPromptLeakage", "prompt_leakage|promptLeakage", "leakage_detection|PROMPT_LEAK"],
|
|
349
|
-
"require": "any"
|
|
350
|
-
}
|
|
351
|
-
},
|
|
352
|
-
"overclaim": {},
|
|
353
|
-
"judgment": {
|
|
354
|
-
"V1": "Whether a system prompt contains secrets requires inspecting the prompt string's contents. Regex over the whole file produces false positives; agent should inspect the defined SYSTEM_PROMPT string for keys/credentials directly.",
|
|
355
|
-
"V2": "'Minimal' system prompt is subjective.",
|
|
356
|
-
"V4": "Whether business rules live in code vs prompt requires architectural review.",
|
|
357
|
-
"V5": "Presence of 'do not reveal' as SOLE protection is a qualitative judgment."
|
|
358
|
-
}
|
|
359
|
-
},
|
|
360
|
-
|
|
361
|
-
"rag-security": {
|
|
362
|
-
"auto": {},
|
|
363
|
-
"overclaim": {},
|
|
364
|
-
"judgment": {
|
|
365
|
-
"V1": "Vector DB access controls are architectural.",
|
|
366
|
-
"V2": "Tenant isolation is architectural.",
|
|
367
|
-
"V3": "Retrieval validation requires pipeline review.",
|
|
368
|
-
"V4": "Cross-tenant leakage is architectural."
|
|
369
|
-
}
|
|
370
|
-
},
|
|
371
|
-
|
|
372
|
-
"rate-limiting": {
|
|
373
|
-
"auto": {
|
|
374
|
-
"V1": {
|
|
375
|
-
"desc": "Per-user rate limiter",
|
|
376
|
-
"patterns": ["RateLimiter|rate_limiter|rateLimiter", "@limiter|@rate_limit", "rate_limit_check"],
|
|
377
|
-
"require": "any"
|
|
378
|
-
},
|
|
379
|
-
"V2": {
|
|
380
|
-
"desc": "Token budget (daily / per-request limits)",
|
|
381
|
-
"patterns": ["token_budget|tokenBudget", "daily_token|max_tokens_per_day", "TOKEN_BUDGET"],
|
|
382
|
-
"require": "any"
|
|
383
|
-
},
|
|
384
|
-
"V4": {
|
|
385
|
-
"desc": "Timeout configured on LLM calls",
|
|
386
|
-
"patterns": ["timeout\\s*=\\s*\\d", "timeout\\s*:\\s*\\d", "Anthropic\\s*\\([^)]*timeout", "OpenAI\\s*\\([^)]*timeout"],
|
|
387
|
-
"require": "any"
|
|
388
|
-
},
|
|
389
|
-
"V5": {
|
|
390
|
-
"desc": "Rate limit keyed on API key or user id (not IP only)",
|
|
391
|
-
"patterns": ["x[-_]api[-_]key|x[-_]user[-_]id", "(?:x_)?user_id\\s*[:=].*header", "RateLimiter.*user_id|rate_limit.*user_id", "api_limiter\\.check\\s*\\(\\s*user"],
|
|
392
|
-
"require": "any"
|
|
393
|
-
}
|
|
394
|
-
},
|
|
395
|
-
"overclaim": {
|
|
396
|
-
"V1": {
|
|
397
|
-
"desc": "Rate limiter exists but 429 responses do not include Retry-After header",
|
|
398
|
-
"recognizer": "rate_limit_no_retry_after",
|
|
399
|
-
"also_auto": "V1"
|
|
400
|
-
}
|
|
401
|
-
},
|
|
402
|
-
"judgment": {
|
|
403
|
-
"V3": "Cost monitoring / alerting is typically external infrastructure; regex can't detect 'alerts are configured'."
|
|
404
|
-
}
|
|
405
|
-
},
|
|
406
|
-
|
|
407
|
-
"supply-chain": {
|
|
408
|
-
"auto": {
|
|
409
|
-
"V1": {
|
|
410
|
-
"desc": "Model version pinned to date-stamped identifier (not 'latest')",
|
|
411
|
-
"patterns": ["claude-[a-z0-9-]+-\\d{8}", "gpt-[0-9a-z.-]+-\\d{4}", "[a-z_]+_model\\s*[:=]\\s*[\"'][a-z0-9-]+-\\d{4,8}", "MODEL_VERSION\\s*=.*\\d{4}"],
|
|
412
|
-
"require": "any"
|
|
413
|
-
},
|
|
414
|
-
"V2": {
|
|
415
|
-
"desc": "Model version tracked in responses/logs",
|
|
416
|
-
"patterns": ["model_version|modelVersion", "response.*model|response.*MODEL"],
|
|
417
|
-
"require": "any"
|
|
418
|
-
},
|
|
419
|
-
"V3": {
|
|
420
|
-
"desc": "Regression test suite (test files exist in project tree)",
|
|
421
|
-
"type": "exists_path",
|
|
422
|
-
"path_globs": ["**/tests/**", "**/test_*.py", "**/*_test.py", "**/*.test.*", "**/*.spec.*"]
|
|
423
|
-
},
|
|
424
|
-
"V4": {
|
|
425
|
-
"desc": "Fallback provider / safe fallback behavior defined",
|
|
426
|
-
"patterns": ["default_safe|fallback_response|fallback_provider", "_?fallback_assessment", "(?:def|function)\\s+\\w*fallback\\w*", "fallback\\s*=\\s*True"],
|
|
427
|
-
"require": "any"
|
|
428
|
-
},
|
|
429
|
-
"V5": {
|
|
430
|
-
"desc": "Client library versions pinned in requirements/package file",
|
|
431
|
-
"patterns": ["==\\d+\\.\\d+\\.\\d+", "[\"']\\^?\\d+\\.\\d+\\.\\d+[\"']"],
|
|
432
|
-
"require": "any",
|
|
433
|
-
"file_glob": "**/requirements*.txt,**/package.json,**/pyproject.toml,**/Pipfile.lock,**/poetry.lock"
|
|
434
|
-
}
|
|
435
|
-
},
|
|
436
|
-
"overclaim": {},
|
|
437
|
-
"judgment": {}
|
|
438
|
-
}
|
|
439
|
-
}
|