오픈소스 사양 · 엔진 간 일치 v4.0.0 (MIT OR APACHE-2.0)

7-모드 렉서 와이어 포맷, VCSF-36 64-트리 분류기 및 C11 네이티브 ABI.

C11/C++17, Python, JavaScript 엔진은 클레임과 모델, 판정 규격을 공유합니다. CLI와 WebCrypto는 Ed25519 영수증을 검증합니다.

01 · 7-모드 렉서 마스킹 오토마톤 · 매직 0x56434e44

VERICULL_MAX_CLAIMS = 32 한도까지 바이트 단위로 정확히 일치하는 7-모드 렉서 분류.

Vericull은 모든 UTF-8 바이트를 CODE, LINE_COMMENT(역슬래시 개행 지원), BLOCK_COMMENT, DOUBLE_STRING, 범위 제한 SINGLE_CHAR(Rust 라이프타임 <'a, 'b> 보존 및 '"' 마스킹), Rust r#*"..."#* 원시 문자열, C++11 R"delim(...)delim" 원시 문자열의 7개 상태로 분류합니다.

vcnd-v4-claim-schema.json — SARIF 2.1.0 properties.claims
{
  "ruleId": "CWE-362",
  "level": "error",
  "locations": [{ "physicalLocation": { "artifactLocation": { "uri": "pkg/raft/lease_renew.go" } } }],
  "properties": {
    "has_static_invariant": 1,
    "claims": [
      { "needle": "lease := node.currentLeasePtr()", "span_start": 0, "span_end": 0, "must_be_absent": 0 },
      { "needle": "lease.expiryUnixNano = proposedDeadline", "span_start": 0, "span_end": 0, "must_be_absent": 0 },
      { "needle": "node.mu.TryLock()", "span_start": 96, "span_end": 310, "must_be_absent": 1 }
    ]
  }
}

02 · VCSF-36 64-트리 GBDT & VCPC 4-스코프 카탈로그

피처 36종(제출된 소스·클레임에서 18종, 제출자가 보고한 증거에서 18종), 픽스처 분리 5-폴드 교차검증 및 Fail-Closed float32 연산.

VCSF-36은 렉서 경계, 클레임 구간, 가드·카탈로그 일치, 제출된 새니타이저 결과의 네 묶음으로 피처를 구성합니다. 48개 픽스처 계열의 합성 레코드 480건을 묶음 단위로 나눈 5-폴드 평가 결과는 AUROC 0.9946, F1 0.9500입니다.

03 · VC-R04 Wilson 하한 게이트 & VERICULL-VCVD-V4

Wilson 회귀 기준과 영수증의 정규 직렬화.

동적 증거 판정을 통과하려면 보고된 시행 횟수가 4회 이상이고 Wilson 95% 하한 0.50을 충족해야 합니다. 아래 서명 참조 예시에는 합성 사례를 사용했습니다.

VERICULL-VCVD-V4 — RFC 8032 Ed25519로 서명하는 정규 UTF-8 원문
VERICULL-VCVD-V4
{"action_code":"ACTION_CULL","best_pattern_id":"VCPC-01-HPACK-SHADOW","best_pattern_overlap":8,"case_id":"VC-2026-401","claims":[{"must_be_absent":0,"needle":"hdr_buf = kmalloc(cap_len, GFP_KERNEL);","span_end":0,"span_start":0},{"must_be_absent":0,"needle":"memcpy(hdr_buf + dst_off, wire_src, copy_len);","span_end":0,"span_start":0}],"claims_passed":1,"claims_total":2,"comment_shadow_offsets":[-1,288],"failed_claim_index":1,"file_path":"src/http2/hpack_decoder.c","has_static_invariant":0,"highest_stage":-1,"matched_offsets":[124,-1],"provenance_seal_hash":"0xaf945cb54ebb13e9","repro_attempts":5,"repro_passes":0,"repro_quorum_met":false,"router_action":0,"source_snippet":"int hpack_emit_literal(u8 *wire_src, size_t dst_off, size_t copy_len, size_t cap_len) {\n    char quote_delim = '\"';\n    u8 *hdr_buf = kmalloc(cap_len, GFP_KERNEL);\n    if (!hdr_buf || dst_off + copy_len > cap_len)\n        return -EINVAL;\n    /* legacy unsafe path removed in v3.9:\n       memcpy(hdr_buf + dst_off, wire_src, copy_len); */\n    return hpack_checked_copy(hdr_buf, cap_len, dst_off, wire_src, copy_len, quote_delim);\n}\n","stage_code":"NONE","stage_mask":0,"sweep_digest_hex":"0xdd916352cc9e4eb3","telemetry":{"analysis_text":"Scanner flagged unchecked memcpy in hpack_emit_literal header literal decoder.","confidence":0.94,"sanitizer_log":"","severity":"critical","witness_log":""},"top_pattern_score":5.9388,"tp_probability":0.0092,"verdict_code":"CULLED_UNANCHORED_CLAIM","verdict_state":0,"vuln_class":"CWE-787: Out-of-Bounds Write","wilson_ci95":[0,0.4345]}

04 · EDGE REST 엔드포인트 14개

핵심 판정, SARIF 게이트, KV 키, Vericull Suite 5대 서비스 전체.

메서드·경로 인증 동작
GET /api/v1/health공개v4.0.0 엔진, 64-트리 해시, 5대 스위트 서비스와 KV 상태를 보고합니다
POST /api/v1/tokens/issue공개500회 무료 vc_oss_... 키를 발급합니다 (ci-gate, kernel-lab, suite-api)
GET /api/v1/tokens/inspectBearerVERICULL-TOKEN-V4를 검증하고 실시간 quota_remaining을 조회합니다
POST /api/v1/adjudicateBearer(선택)사건 기록 1건을 판정하고 VERICULL-VCVD-V4로 서명합니다
POST /api/v1/sarif-gateBearer(선택)SARIF 2.1.0 결과를 최대 50건까지 검사합니다. 해소되지 않은 결과가 있으면 CI를 통과시키기 전에 검토해야 합니다.
POST /api/v1/suite/auditBearer(선택)서비스 1: 기계식 감사 게이트 (VERICULL-SUITE-V4)
POST /api/v1/suite/arenaBearer(선택)제출된 승인 로그에서 필수 승인 표지를 확인합니다
POST /api/v1/suite/rtl-proveBearer(선택)Verilog/SV 소스를 검사하고 보고된 회귀 시행 수가 정족 기준(quorum)을 충족하는지 평가합니다
POST /api/v1/suite/route-budgetBearer(선택)입력한 토큰 예산과 단가로 패널 검토 비용을 추정합니다
POST /api/v1/suite/memory-promoteBearer(선택)서비스 5: 사후강평 기억 승격기
POST /api/v1/verify공개설정된 기준 키로 서명된 사건 기록, 번들, 증명, 스위트 영수증을 검증합니다
GET /api/v1/receipts/:id발급에 사용한 Bearer 토큰발급 시 사용한 토큰으로 작업공간 영수증을 조회합니다. 익명 발급분은 ID로 조회합니다.
POST /api/v1/attestations공개자체 신고한 배포 프로필에 VERICULL-ATTEST-V4로 서명합니다. 신고 항목은 측정값이 아닙니다.
GET /api/v1/attestations/:idID로 공개 조회연락처 이메일을 포함한 서명된 VC-OSS-... 등록 기록을 조회합니다

05 · C11 네이티브 ABI (VERICULL_ABI_VERSION = 401) & 계보

MIT OR Apache-2.0로 배포하는 크로스플랫폼 include/vericull_core.h (.dylib·.so).

include/vericull_core.h — ABI v401 발췌
#define VERICULL_ABI_VERSION    401u
/* ABI 402 adds trusted lexer-mode selection, per-stage S3/S4 evidence with presence flags
 * (issuance semantics "vericull.stage-evidence.v2"), buffer-level lexer ambiguity reporting,
 * status-returning pattern recall and documented length caps. `vericull_abi_version()` returns
 * this value. */
#define VERICULL_ABI_VERSION_402 402u
#define VERICULL_NEEDLE_MAGIC   0x56434E44u /* "VCND": Vericull Claim Needle Descriptor */
#define VERICULL_VERDICT_MAGIC  0x56435644u /* "VCVD": Vericull Cryptographic Verdict Digest */
#define VERICULL_MAX_CLAIMS     32
#define VERICULL_MAX_NODES      32
#define VERICULL_NUM_FEATURES   36

int32_t vericull_adjudicate(
    const uint8_t* haystack,
    uint32_t haystack_len,
    const VericullClaim* claims,
    uint32_t num_claims,
    const VericullGBDTTree* trees,
    uint32_t num_trees,
    float base_score_logit,
    const float* features,
    uint32_t num_features,
    const uint8_t* query_bytes,
    uint32_t query_len,
    uint32_t query_cwe_id,
    const VericullPatternItem* patterns,
    uint32_t num_patterns,
    uint32_t repro_passes,
    uint32_t repro_attempts,
    int32_t  has_static_invariant,
    int32_t  stage_mask,
    VericullReport* out_report
);