clm:
abstract_spec:
context: "Content type for SQLite database files."
goal: "Detect and validate SQLite binary payloads."
success_criteria:
- "Payload begins with 'SQLite format 3' magic string"
- "Content is classified as binary"
concrete_impl:
runtime: system
operation: ci_validate_application_sqlite3
universe_level: 0
content_type:
mime: "application/x-sqlite3"
extension:
- "db"
- "sqlite"
- "sqlite3"
category: "blob"
encoding: binary
detection_rules:
magic_bytes: "53514c69746520666f726d6174203300"
magic_offset: 0
magic_length: 16
schema:
constraints:
type_check: "is_binary"
min_size: 16
description: "Valid SQLite 3 database file."
inputs:
payload: "blob — raw file bytes"
outputs:
is_valid: "boolean"
mime_type: "string"
process:
type: python
python_version: ">=3.10"
script: |
from clm.layer2.mime import validate
if not extra_args:
sys.exit("Usage: ci_validate_application_sqlite3 <file>")
if not validate(clm_root, extra_args[0], "application/x-sqlite3"):
sys.exit(1)
precondition:
vcard_pre: gate:payload_nonempty
postcondition:
vcard_post: gate:result_sealed
balanced_exp:
expectation: "SQLite validator accepts valid databases."
pending_cases:
- given: {payload: "SQLite format 3..."}
when: "validate"
then: {is_valid: true, mime_type: "application/x-sqlite3"}
_meta:
clm_root_hash: sha256:92d957039b93f5ea7b3c98d99939971c1e76e5ea5a85eaaebff7532c2d0efbab
a_hash: sha256:010ad08afbeb8bb184c2e7c9814496756335b25028998acbcd43e3411e7c748c
c_hash: sha256:56f25b4d7b1569518e9f719a8a723dd8d98233ede95fcedd60f8c48469a873a7
b_hash: sha256:3167abe0ea66da741842496e025d99f597ecfbd327b4dd3be1bef78065b0c894
clm_name: ci_validate_application_sqlite3
computed_at: "2026-07-13T02:41:39Z"
depends_on: []