mantis-calibrate
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRisk Calibrator (/mantis-calibrate)
风险校准器 (/mantis-calibrate)
System Goal
系统目标
Risk Analysis Expert. Evaluates confirmed findings against a rigorous risk
matrix, taking into account successful reproduction and production viability to
produce a final risk score (1-10).
风险分析专家。依据严谨的风险矩阵评估已确认的安全检测结果,结合成功复现情况和生产环境可行性,生成最终风险评分(1-10分)。
Command Definition
命令定义
- Command:
/mantis-calibrate - Description: Calibrates the risk level of findings based on evidence and impact.
- 命令:
/mantis-calibrate - 描述: 基于证据和影响校准安全检测结果的风险等级。
Input/Output Contract
输入/输出约定
- Reads:
- (all finding files to load full pipeline state).
workspace/findings/*.json - (if exists, to check threat boundary overrides and asset criticality).
workspace/kb/THREAT_MODEL.md - (to track the current loop pass, and to read
workspace/.mantis_state.json—active_snapshot— for finding provenance and history stamping; absent ⇒ degraded/today's behavior).{snapshot_id, snapshot_pinned, root}
- Writes:
- Updates finding files in-place with scoring/calibration fields
(,
impact_score,likelihood_score,availability_tier,inferred_exposure,attacker_position,mantis_risk_score,priority(may begin withsanity_triage_appliedwhen the STALE-EVIDENCE guard suppresses heuristics),STALE_EVIDENCE(entries may carrycalibration_checklistreasons),STALE_EVIDENCE:,outrage_commentary). Appends aexecutive_summaryentry withhistoryprovenance (see history JSON template in the body).snapshot - Reusable helper script .
workspace/helpers/append_calibrate.py
- Updates finding files in-place with scoring/calibration fields
(
- Preconditions:
- Confirmed or raw findings must exist in .
workspace/findings/
- Confirmed or raw findings must exist in
- Idempotency Guarantee:
- Updates findings in place by overwriting existing keys with the calculated score. Running multiple times on the same inputs yields identical outputs, with no duplicated entries.
- 读取:
- (所有检测结果文件,用于加载完整的流水线状态)。
workspace/findings/*.json - (若存在,用于检查威胁边界覆盖范围和资产关键性)。
workspace/kb/THREAT_MODEL.md - (用于跟踪当前循环轮次,读取
workspace/.mantis_state.json——active_snapshot—— 用于检测结果的来源和历史标记;若不存在则采用降级/当前默认行为)。{snapshot_id, snapshot_pinned, root}
- 写入:
- 原地更新检测结果文件,添加评分/校准字段(、
impact_score、likelihood_score、availability_tier、inferred_exposure、attacker_position、mantis_risk_score、priority(当STALE-EVIDENCE防护机制抑制启发式规则时,可能以sanity_triage_applied开头)、STALE_EVIDENCE(条目可能带有calibration_checklist原因)、STALE_EVIDENCE:、outrage_commentary)。添加带有executive_summary来源信息的snapshot条目(参考正文的历史JSON模板)。history - 可复用辅助脚本 。
workspace/helpers/append_calibrate.py
- 原地更新检测结果文件,添加评分/校准字段(
- 前置条件:
- 目录下必须存在已确认或原始的安全检测结果。
workspace/findings/
- 幂等性保证:
- 通过覆盖现有字段的方式原地更新检测结果。对相同输入多次运行将产生相同输出,不会出现重复条目。
Instructions
操作说明
Convert the raw security findings and their empirical results (repro/patch) into
a prioritized, actionable risk report.
Execute the calibration as follows:
Locator resolution (findings-only). Calibrate never needs to read target
source to compute a score, but some heuristics below may re-inspect code;
resolve the code root the same way every stage does. Block A is inlined
below:
LOCATOR RESOLUTION (before reading ANY target code or artifact):
0. ROLE: If this skill NEVER reads target source (report, calibrate, reflect),
you are a FINDINGS-ONLY stage: skip steps 2-6; still read active_snapshot from
state for provenance/annotation; NEVER stop merely because a code root is unset.
1. Determine CODE_ROOT, in this priority order:
a. If --target_root is passed on THIS invocation, CODE_ROOT = --target_root.
It is AUTHORITATIVE and OVERRIDES SNAPSHOT_ROOT and the state fallback
(used when a caller hands you a prepared tree, e.g. a patched shadow).
b. Else if --snapshot_root (or SNAPSHOT_ROOT) is passed, use it.
c. Else read state_root/workspace/.mantis_state.json (state_root from
--state_root if passed, else ./workspace/... relative to the current dir)
-> active_snapshot.root / .snapshot_id / .snapshot_pinned.
d. Else (no arg AND no readable active_snapshot): CODE_ROOT = current directory,
treat snapshot_pinned = false (MODE-OFF). Do NOT stop.
2. SENTINEL CHECK (only if snapshot_pinned is true AND you did NOT take path 1a):
verify CODE_ROOT/.mantis_snapshot_id exists and equals SNAPSHOT_ID. If missing
or different -> STOP "snapshot sentinel mismatch". (A --target_root tree (1a) is
deliberately mutated and is sentinel-EXEMPT.)
3. PATH FIELDS:
- SNAPSHOT-RELATIVE (read under CODE_ROOT): code_paths entries; plan target_files
that are file paths. Strip ONLY a trailing ":<digits>". A code_paths entry
containing "://" is a URL/endpoint, NOT a file read. A code_paths entry that is
NOT of the form <existing-path>:<integer> is a non-source LOCATOR
(symbol/offset/endpoint): only check that the artifact/symbol exists; skip ALL
line-range and line-existence logic.
- STATE-RELATIVE (read/write under state_root/workspace, NEVER prefix CODE_ROOT):
kb_references, repro_file_path, reattack_file_path, helper scripts, report
files, and all state/findings JSON.
4. Never WRITE under CODE_ROOT when snapshot_pinned is true. Any command that
compiles, generates, or writes artifacts MUST run in a PRIVATE SHADOW copy
(mktemp -d from CODE_ROOT), never with cwd=CODE_ROOT. Read-only inspection may
cd into CODE_ROOT.
5. VCS-METADATA CARVE-OUT: history-log extraction and any VCS diff/blame command
run in the LIVE repository root (which still has .git/.hg/.repo), NOT CODE_ROOT
(the snapshot copy strips VCS metadata). Do NOT stop merely because CODE_ROOT
lacks .git/.hg/.repo.
6. Every shell command uses ABSOLUTE paths and sets its own working directory on
that call. Do NOT assume the working directory persists between calls.[!NOTE] CURRENT-PASS CHECK (defensive; the binding guarantee is on the harness perScenario 2): ifmantis-pipeline-adapteris present ANDactive_snapshot, treat the snapshot as STALE for this pass — STOP "stale active_snapshot: pass mismatch" or degrade as HALT (active_snapshot.pass != state.pass_numbereffectively false: no authoritative verdicts, Block B NOT_MATCHED, reproducesnapshot_pinned). This catches a custom harness that preservednot_attemptedacross the Stage 15 pass increment without re-pinning. The reference meta-agent re-pins every pass, so this check never fires there. Block B itself cannot detect this (it isactive_snapshot-only, notsnapshot_id-aware).pass
Snapshot provenance & STALE-EVIDENCE guard (mechanical; do this before
scoring):
P0. Read () from
(Block A step 0/1c). NEVER stop if it
is absent — calibrate is a FINDINGS-ONLY stage (Block A step 0).
active_snapshot{snapshot_id, snapshot_pinned, root}state_root/workspace/.mantis_state.jsonP1. MODE (single decision for the whole run — branches on
presence, 3-state model): - is ABSENT in state (no
was requested — MODE-OFF = today's default) -> MODE = MODE-OFF. Score exactly
as today: run every heuristic as written, do NOT compute PROVENANCE, do NOT
emit , and do NOT emit any HALT/PINNED banners.
(Backward-compatible default path — byte-for-byte today's behavior.) -
IS present AND is not exactly (HALT
mode — the tree raced or could not be pinned) -> MODE = HALT. =
(a id). Compute PROVENANCE per P2 below
and fire the STALE-EVIDENCE guard conservatively (same as PINNED for guard
purposes), because findings' locators may be stale. Authoritative verdicts
(VERIFIED_SECURE, failed_to_reproduce, DUPLICATE, FALSE_POSITIVE, NON_VIABLE)
are forbidden this pass. - == -> MODE = PINNED.
= . Full provenance + STALE-EVIDENCE
guard as below.
active_snapshotactive_snapshot--syncSTALE_EVIDENCEactive_snapshotsnapshot_pinnedtrueSNAPSHOT_IDactive_snapshot.snapshot_idlive:snapshot_pinnedtrueSNAPSHOT_IDactive_snapshot.snapshot_idP2. In MODE = PINNED or HALT, compute PROVENANCE per finding F using Block B's
compare rule: - missing OR empty OR the literal
-> NOT_MATCHED. - != (exact string compare,
no fuzzy) -> NOT_MATCHED. - == -> MATCHED.
F.discovery_commit"MIXED"F.discovery_commitSNAPSHOT_IDF.discovery_commitSNAPSHOT_IDP3. A per-finding heuristic is STALE for F when MODE is PINNED OR HALT AND
either: - PROVENANCE(F) == NOT_MATCHED, OR - the finding's target
file does NOT exist under CODE_ROOT. (Resolve CODE_ROOT via Block A steps 1 & 3;
strip a trailing ; read ONLY the pinned root, NEVER the live tree. If
you cannot resolve CODE_ROOT at all, treat the file as absent -> STALE.)
code_paths:<digits>P4. When a heuristic is STALE for F, do NOT apply it; keep the conservative
(pre-adjustment) score; and ensure the literal token is the
FIRST token of (add it once, before any UNKNOWN warnings
and any fired-rule list). The four guarded heuristics and their exact STALE
handling are: - Dead-code 0.2 multiplier (Section 2, "Asset Criticality &
Reachability"): do NOT apply the 0.2 reduction; use the multiplier you would
otherwise have. - (Section 3 rule): do NOT force-LOW; set
, beginning
. - (Section 3 rule): do NOT
force-LOW; set ,
beginning . - trace-lift
(Section 3 rule, its "valid external stack trace/sanitizer…" exception): do NOT
apply the trace-lift; KEEP the static HIGH cap in force ( <=
3, 0.8 Hazard multiplier, NOT CRITICAL). Set
,
beginning
.
STALE_EVIDENCEsanity_triage_appliedrepro_failurecalibration_checklist.repro_failure.outcome = "UNKNOWN"reason"STALE_EVIDENCE: "vague_code_pathscalibration_checklist.vague_code_paths.outcome = "UNKNOWN"reason"STALE_EVIDENCE: "static_confirmationlikelihood_scorecalibration_checklist.static_confirmation.outcome = "APPLIES"reason"STALE_EVIDENCE: trace-lift suppressed; trace/crash-log may predate the active snapshot; "P5. NON-SOURCE finding: if the finding's entry is a non-source
LOCATOR (contains , or is not of the form — per Block
A step 3: a symbol / offset / endpoint), SKIP all source-only heuristics for it
— dead-code, file-path/imports/caller-hierarchy exposure inference,
, and static trace re-inspection — and score from the
finding's DECLARED metadata (, ,
, , threat model). A non-source skip is NOT
flagged (it is normal, not drift). Non-source findings default
to (0.8) unless the finding/threat-model
declares otherwise.
code_paths"://"<path>:<integer>vague_code_pathsattacker_positionprivileges_requiredproduction_viabilityrepro_statusSTALE_EVIDENCEinferred_exposure"INTERNAL"-
Load Full Pipeline State:
- Read all JSON files from the directory. Because the pipeline appends data to each finding file at each stage, these files provide the complete picture of each finding's journey (including its
workspace/findings/, reproduction status, and production viability).id - Missing Fields Fallbacks: If any finding is missing viability, or
reproduction fields (such as chained findings), apply the following
fallback defaults before scoring:
- If is missing, treat it as
production_viability."CONDITIONAL_VIABLE" - If is missing, treat it as
repro_status."not_attempted"
- If
- Snapshot provenance (only when MODE is PINNED or HALT): for each finding, compute PROVENANCE (MATCHED / NOT_MATCHED) per preamble step P2 and record it in scratch. This value gates the STALE-EVIDENCE handling in Sections 2 and 3 (preamble steps P3–P4). In MODE == MODE-OFF, skip this — score as today.
- Read from the Knowledge Base (if it exists) to evaluate component exposure, trust boundaries, asset criticality, and any custom Calibration Overrides (e.g., specific threat positions or caps that should be lifted or customized for the project).
workspace/kb/THREAT_MODEL.md - Batch Processing: If there are more than a few findings to calibrate,
split the task into batches (a few findings at a time). If you have the
ability to invoke subagents, delegate each batch to a subagent to process
in parallel, then aggregate the results. Each batch/subagent inspects
ONLY the pinned snapshot: pass ,
--snapshot_root=<active_snapshot.root>, and--snapshot_id=<active_snapshot.snapshot_id>so every subagent resolves the same CODE_ROOT via Block A. Any code inspection a batch performs (exposure inference, dead-code, static-trace verification) MUST read through that CODE_ROOT (the pinned copy), NEVER the live tree, and MUST honor the STALE-EVIDENCE guard (preamble P3–P4). Findings-only fields (score, priority, history stamp) are computed from the finding JSON regardless.--state_root=<workspace parent>
- Read all JSON files from the
-
Calculate Risk Score (1-10): For each unique finding file, calculate the actual technical risk score in a matrix form based on the following formula components, where Hazard = Impact + Likelihood:
- Impact (1-5): Evaluate impact using the CIA triad (Confidentiality,
Integrity, Availability) while strictly considering Blast Radius.
- 5: Complete, systemic loss of Confidentiality (full data breach, leak of root cryptographic/HSM master keys) or Integrity (system compromise, e.g., clear Remote Code Execution (RCE) by an unprivileged attacker who isn't already in an effective position to execute code). MUST NOT be used for attackers who already have execution privileges.
- 4: Substantial loss in one or more areas. This includes systemic Availability loss (total outage of a major service) or major data exposure.
- 3: Moderate loss (e.g., partial data exposure, temporary or partial system disruption).
- 2: Minor loss (e.g., minor information leak, localized disruption). A vulnerability whose blast radius is limited to affecting only a single user's own data MUST NOT be scored higher than 2. Exception: If the action lacks non-repudiation (allowing the user to plausibly deny the action to commit fraud or blame others), or triggers side-effects affecting other users/system stability, it should not be downgraded.
- 1: Negligible impact on CIA, mostly a cosmetic issue. Findings of the type "the code is fragile", "lack of defense-in-depth", or purely theoretical hygiene issues MUST have an Impact score of 1, ensuring they are rated LOW at most.
- Security Control Bypass (Upgrading): If the vulnerability directly bypasses a core security control (e.g., authentication, authorization, cryptographic signature verification) or defeats the primary security purpose of a library (e.g., a library meant to secure keysets allows attacker control), elevate the Impact score to at least 4 (or 5 if it leads to systemic compromise), even if the immediate technical impact seems localized.
- Note on Privileges Required & Lateral Movement:
- If the finding requires HIGH privileges (e.g., administrative privileges, admin-to-super-admin escalation) or only allows lateral movement/pivoting between internal components from an already compromised state, cap its individual Impact score at 2, unless the exploit results in escaping the container boundary (to the host node) or cross-tenant escalation.
- If the finding requires LOW privileges (e.g., standard authenticated user), cap its individual Impact score at 3 (unless it leads to systemic compromise of other tenants/users, OR it directly bypasses a core security control/library purpose, in which case it can be higher).
- These caps apply to individual findings. If successfully chained into an Exploit Chain (Super Finding) by the chainer, the chain itself should be evaluated based on the privilege level required for the entry point (initial step) of the chain.
- Likelihood (1-5): Evaluate the probability of occurrence based on
proven exploitability rather than theoretical difficulty.
- 5: Actively exploited in the wild, OR the agent successfully generated a functional, weaponized exploit (not just a unit test).
- 4: Public Proof of Concept (PoC) exists, OR the agent generated a highly plausible but partially weaponized exploit.
- 3: No functional exploit, but the attack vector is trivial to automate.
- 2: Theoretical and highly complex (requires local access, strict timing).
- 1: Strictly theoretical risk with no known exploit path.
- Reachability-in-Practice Modifier: After determining the base
likelihood, reduce the by 1 or 2 (but not below 1.0) if the exploit path relies on uncommon or non-default usage patterns. This applies if:
likelihood_score- The specific tainted parameter is populated from attacker input only during rare API calls, uncommon configuration fields, or in data formats rarely processed in the wild.
- The vulnerability requires non-standard or administrative-only configurations that are rarely enabled in practice.
- Context Multiplier (0.1 - 1.0):
- If is FALSE_POSITIVE or NEEDS_RESEARCH, or if
statusis NON_VIABLE: Drop this finding completely. Do not score it or update its file with calibration data.production_viability - If is VIABLE, CONDITIONAL_VIABLE, or SAMPLE_OR_TEST:
production_viability- Network/Trust Exposure:
- If the finding resides inside an Exposed Interface / Trust Boundary (directly accessible to untrusted inputs): 1.0.
- If it resides in an Internal Component accepting semi-trusted parsed data: 0.8.
- If deeply nested inside a Privileged/Trusted Zone: 0.5.
- Inference when Threat Model is Missing/Incomplete: If
does not exist or does not mention the component:
workspace/kb/THREAT_MODEL.md- Analyze the file path, imports, and caller hierarchy to infer
exposure (e.g., public APIs vs internal helpers). Read only the
pinned CODE_ROOT (Block A), never the live tree. NON-SOURCE
(preamble P5): skip this file-path/imports/caller analysis for
non-source LOCATOR findings — default to
inferred_exposure(0.8) unless the finding or threat model declares otherwise. When MODE is PINNED or HALT and the finding is NOT_MATCHED or its"INTERNAL"file is absent under CODE_ROOT, do NOT lower the exposure multiplier below the declared/default value on the basis of live re-inspection (keep the conservative, higher multiplier).code_paths - Default the Exposure Multiplier to 0.8 (Internal) and
to
inferred_exposureunless there is clear evidence of direct external exposure (EXPOSED) or deep nested isolation (PRIVILEGED). Local SUID/LPE binaries should default to"INTERNAL"exposure."INTERNAL" - If the finding description, history, or critic reasoning suggests the component is "rarely exposed", "internal only", or "unlikely to be attacker-reachable", reduce the Exposure Multiplier to 0.5 or lower.
- Analyze the file path, imports, and caller hierarchy to infer
exposure (e.g., public APIs vs internal helpers). Read only the
pinned CODE_ROOT (Block A), never the live tree. NON-SOURCE
(preamble P5): skip this file-path/imports/caller analysis for
non-source LOCATOR findings — default
- Map Exposure and Attacker Position Metadata:
- Resolve based on the Network/Trust Exposure multiplier:
inferred_exposure- Multiplier 1.0 (Exposed Interface) ->
"EXPOSED" - Multiplier 0.8 (Internal Component) ->
"INTERNAL" - Multiplier 0.5 (Privileged/Trusted Zone) ->
"PRIVILEGED"
- Multiplier 1.0 (Exposed Interface) ->
- Evaluate Attacker Position (declared in finding):
- Read from the finding JSON.
attacker_position - Determine by Barrier, Not Transport: The must represent the outermost boundary that the first untrusted principal (the ultimate human attacker or external threat actor) must cross to reach the interface. Do not key on the transport protocol (e.g., HTTP, gRPC, IPC) or the immediate protocol peer.
attacker_position- Trace Back to Untrusted Actor: If the immediate peer interacting with the interface is a trusted-by-design component (e.g., an internal proxy, gateway, message queue, or master controller), you must trace back the data flow to find the outermost boundary where the untrusted actor first enters the system.
- If the interface is bound to or uses local IPC (unix sockets, pipes, shared memory), the position is
localhost, even if it uses HTTP/TCP under the hood."LOCAL" - If the interface is only reachable within a private network (VPC,
corporate network, home LAN, local network, internal cluster
control plane), the position is (or
"INTERNAL_NETWORK"if restricted to pod-to-pod), even if it is a web service."IN_CLUSTER" - The position is only if the interface is directly reachable from the public internet.
"EXTERNAL" - If the interface requires physical contact, hardware interaction
(e.g., JTAG, debug probes, chip decapping), or local wireless
proximity (e.g., NFC, Bluetooth), the position must be
or
"PHYSICAL_TEMPORARY", regardless of the protocol used."PHYSICAL_LONG_TERM"
- Normalize Free-text: If the value is present but is a free-text
string that does not exactly match one of the valid enum values
(e.g. legacy phrasings), you MUST normalize it to the closest
valid enum using these mappings:
- Phrases matching ,
"authenticated <role>","customer with","tenant <role>"on a public product ->"Fitbit user"(with"EXTERNAL").privileges_required: "LOW" - Phrases matching ,
"local user","local shell"->"local access"."LOCAL" - Phrases matching ,
"peer <role> in same job/cluster/pod","co-tenant","in-cluster (Kubernetes/container-orchestrator) workload"->"NCCL peer rank"."IN_CLUSTER" - Phrases matching ,
"malicious dependency","upstream package","build-time"->"CI pipeline"."SUPPLY_CHAIN" - Phrases matching ,
"host hypervisor","host OS"->"hypervisor access"."HOST_SYSTEM" - Phrases matching ,
"physical access"->"fault injection"or"PHYSICAL_LONG_TERM"based on barrier."PHYSICAL_TEMPORARY"
- Phrases matching
- If missing altogether, infer it using the following fallback
guidelines (and log a warning to suggest declaring it earlier):
- : If the component is
"EXTERNAL", or it's an auth bypass on a public portal."EXPOSED" - : If it's a local privilege escalation (LPE) or SUID exploit.
"LOCAL" - : If it targets in-cluster infrastructure (CSI/CNI) from a pod.
"IN_CLUSTER" - : If the attacker is the hypervisor, host OS, or an emulated/physical device attacking software it hosts (guest driver, enclave runtime, firmware target). This enum is strictly for the outer-to-inner direction. The reverse direction — guest-to-host (VM escape), sandbox-to-outside, enclave-to-host, or contained-process-to-container — must be classified as
"HOST_SYSTEM"(or"LOCAL"for Kubernetes pod-to-node; a KVM/hypervisor guest attacking its host is "LOCAL"), never"IN_CLUSTER"."HOST_SYSTEM" - /
"PHYSICAL_LONG_TERM": If the bug description, title, or code path indicates hardware fault injection, side-channel, evil maid, or USB physical access."PHYSICAL_TEMPORARY" - : For build-time or dependency modification prerequisites.
"SUPPLY_CHAIN" - : Default fallback for other internal components.
"INTERNAL_NETWORK"
- Align Exposure with Position:
- If the is
attacker_positionor"LOCAL", you MUST resolve"IN_CLUSTER"toinferred_exposure(using 0.8 multiplier) even if the vulnerable code path resides in a folder mapped to"INTERNAL"in the Threat Model, unless the exploit explicitly escapes the container boundary to the host node."EXPOSED" - If the is
attacker_position, you MUST resolve"INTERNAL_NETWORK"to at mostinferred_exposure(using 0.8 multiplier or lower) even if the component is mapped to"INTERNAL"in the Threat Model, as the interface is not directly reachable from the public internet."EXPOSED" - If the is
attacker_position, you MUST resolve"EXTERNAL"toinferred_exposure(using 1.0 multiplier) even if the component is mapped to"EXPOSED"or"INTERNAL"in the Threat Model (reflecting that untrusted external inputs reach the component)."PRIVILEGED"
- If the
- Read
- Resolve
- Asset Criticality & Reachability:
- If the Threat Model indicates the component handles high-value data (e.g., PII, core secrets), keep the multiplier high.
- If it affects a low-value target (e.g., internal analytics, sandboxed test data), reduce the multiplier (e.g., 0.5).
- Availability-Specific Context: If the finding is
availability-only (DoS), check the component's in the Threat Model (if missing, default to STANDARD):
availability_tier- : Reduce multiplier to 0.5.
LOW_CRITICALITY - : Reduce multiplier to 0.8.
STANDARD - : Keep multiplier at 1.0.
CRITICAL
- If static/dynamic analysis proves the vulnerable code is effectively
"dead code" (never called in runtime execution paths), drastically
reduce the multiplier to 0.2. STALE-EVIDENCE GUARD (preamble
P3–P4): do NOT apply this 0.2 reduction if the finding is STALE (MODE
is PINNED or HALT AND the finding is NOT_MATCHED to the active
snapshot, file is absent under the pinned CODE_ROOT) — drifted code can look "uncalled" spuriously; keep the higher multiplier and set
code_pathsas the first token ofSTALE_EVIDENCE. Any dead-code analysis you do run MUST inspect the pinned CODE_ROOT, never the live tree. NON-SOURCE (preamble P5): skip this heuristic entirely for non-source LOCATOR findings.sanity_triage_applied
- User Interaction:
- If is REQUIRED (e.g., CSRF, Clickjacking, or convincing a user to open a malicious file), apply a 0.7 multiplier to the Context Multiplier (e.g., if exposure is Internal (0.8) and user interaction is required, the combined multiplier is 0.8 * 0.7 = 0.56). This ensures these findings are capped below the CRITICAL threshold.
user_interaction
- If
- Network/Trust Exposure:
- If is SAMPLE_OR_TEST:
production_viability- Apply a 0.4 scaling factor to the Context Multiplier (i.e.,
multiply the current Context Multiplier by 0.4) so that severe bugs
in sample code typically land in the MEDIUM bucket rather than HIGH or
CRITICAL. This scaling factor must be applied cumulatively alongside
other modifiers. Do not override the Context Multiplier directly to
, as this would incorrectly increase it if the component's exposure or dead-code status was already calculated to be lower than
0.4(e.g.0.4).0.2 - In the , explicitly state that this is not a production bug. The recommendation MUST focus on fixing the example/test so that developers do not copy insecure patterns into production code.
executive_summary
- Apply a 0.4 scaling factor to the Context Multiplier (i.e.,
multiply the current Context Multiplier by 0.4) so that severe bugs
in sample code typically land in the MEDIUM bucket rather than HIGH or
CRITICAL. This scaling factor must be applied cumulatively alongside
other modifiers. Do not override the Context Multiplier directly to
- If is CONDITIONAL_VIABLE:
production_viability- Apply a 0.7 scaling factor to the Context Multiplier (i.e.,
multiply the current Context Multiplier by 0.7) to reflect that it
requires specific non-default configurations, compiler flags, or
assertions enabled to be exploitable. This scaling factor must be
applied cumulatively alongside other modifiers (such as User
Interaction). Do not override the Context Multiplier directly to , as this would incorrectly increase it if the component's exposure was already deep/isolated (
0.7).0.5 - In the , document the specific conditions required for viability.
executive_summary
- Apply a 0.7 scaling factor to the Context Multiplier (i.e.,
multiply the current Context Multiplier by 0.7) to reflect that it
requires specific non-default configurations, compiler flags, or
assertions enabled to be exploitable. This scaling factor must be
applied cumulatively alongside other modifiers (such as User
Interaction). Do not override the Context Multiplier directly to
- If
Final Score (Hazard) = (Impact + Likelihood) * Multiplier (Capped at 10.0).Note on Outrage: In your reasoning, comment on the broader equation Risk = Hazard + Outrage, where the "outrage risk" (e.g., reputational damage, user sentiment fallout) is taken into account. Do not include the outrage factor in the final numerical score. - Impact (1-5): Evaluate impact using the CIA triad (Confidentiality,
Integrity, Availability) while strictly considering Blast Radius.
-
Critical Sanity Triage (Downgrading & Capping Findings): Before determining the final priority, perform a second-level sanity check on the quality of the finding, its context, and accumulated evidence.Core Principle - Marginal Capability: The final severity and priority of a finding are strictly bounded by the marginal capability gained by the attacker over their prerequisite position. If the exploit does not grant the attacker significant new control, access, or capabilities beyond what is already inherent to their starting position (or already possessed via legitimate means), the finding must be capped or downgraded.The complete, detailed definitions of the 27 calibration sanity rules are stored in the reference catalogue at Calibration Rules. You MUST evaluate each finding against the 27 rules listed there.Check if thedefines any
THREAT_MODEL.md(e.g.,Calibration Overrides). If an override exists for a finding's position or component, it takes precedence and lifts the corresponding cap. Otherwise, the caps and downgrades specified in the reference catalogue (and general applications of the Marginal Capability principle) override any upgrades calculated in Section 2 (including the Security Control Bypass upgrade). You should also apply the general principle to cap or downgrade other findings that offer low marginal capability. Important: A cap (HIGH or MEDIUM) only limits the maximum allowed score/priority. It must NOT upgrade a lower score/priority (e.g., a finding with a score of 5.0 is naturally MEDIUM and must remain MEDIUM, even if it is subject to a cap at HIGH).LIFT_CAP: PHYSICAL_LONG_TERMPrecedence & UNKNOWN Rules Policy:- STALE-EVIDENCE precedence (preamble P3–P4): when MODE is PINNED or HALT
and a finding is STALE (NOT_MATCHED to the active snapshot, OR its
file is absent under the pinned CODE_ROOT), the following rules MUST NOT be used to lower or inflate the score from live re-inspection:
code_paths(do not force-LOW),repro_failure(do not force-LOW), and thevague_code_pathstrace-lift exception (do not treat a stale trace/sanitizer/crash-log as live reproduction — KEEP the static HIGH cap). Also do not apply the Section 2 dead-code 0.2 multiplier (see Section 2). Keep the conservative score and prepend the literal tokenstatic_confirmationas the FIRST token ofSTALE_EVIDENCE(before anysanity_triage_appliedwarnings and before the fired-rule list). Record the guarded rules inIncomplete Calibration (UNKNOWN: …)as specified in preamble P4 (calibration_checklist/repro_failure->vague_code_pathswith aUNKNOWNreason;STALE_EVIDENCE:->static_confirmationwith aAPPLIESreason noting the trace-lift was suppressed). In MODE == MODE-OFF, this bullet does nothing (score as today).STALE_EVIDENCE: - Evaluate ALL rules. If multiple caps apply, the most restrictive wins (Force-LOW > cap-MEDIUM > cap-HIGH).
- Policy for UNKNOWN outcomes: If a rule is evaluated as , do not apply the cap or downgrade (be score-conservative; keep the score/priority at their higher calculated values). However, mark the overall calibration as incomplete/provisional by prepending a warning to the
UNKNOWNstring:"sanity_triage_applied"(or a semicolon-separated list of warnings if there are multiple UNKNOWNs). This signals that manual review is required to resolve the rule status."Incomplete Calibration (UNKNOWN: <rule_name>)" - Record every rule that successfully fired/applied in
as a semicolon-separated list, most restrictive first (e.g.,
sanity_triage_applied), appended after any UNKNOWN warnings if present, so the effective cap remains fully auditable."Local Attack Vector; Internal/Nested"
- STALE-EVIDENCE precedence (preamble P3–P4): when MODE is PINNED or HALT
and a finding is STALE (NOT_MATCHED to the active snapshot, OR its
-
Determine Priority:
- CRITICAL (8.0 - 10.0): Immediate action required. Very high hazard
(e.g. high impact and likelihood). Must NOT be used unless it represents
a clear RCE (or equivalent total loss) by an unprivileged attacker (where
is NONE) who is not already in an effective position to compromise the system, AND
privileges_requiredis NONE (zero-click). This rule is absolute: even if a finding (like a CSI host escape) has its Section 3 caps lifted, if it requires HIGH privileges at entry, it MUST NOT be rated CRITICAL and must be capped at HIGH (7.9). Availability-only findings (DoS) MUST NOT be rated CRITICAL unless theuser_interactionis explicitly documented asavailability_tierin the Threat Model AND no automatic recovery mechanism (e.g. auto-restart, load balancer failover) mitigates the impact.CRITICAL - HIGH (6.0 - 7.9): High priority. Significant hazard, needs prompt resolution.
- MEDIUM (3.0 - 5.9): Standard priority. Moderate hazard, can be scheduled.
- LOW (0.1 - 2.9): Low priority. Minimal hazard. Any finding of the type "the code is fragile", purely hygiene/defense-in-depth, or one that exclusively affects a single user's own data MUST be capped at LOW priority regardless of the calculated score (unless the exception for lack of non-repudiation or broader side-effects applies).
- CRITICAL (8.0 - 10.0): Immediate action required. Very high hazard
(e.g. high impact and likelihood). Must NOT be used unless it represents
a clear RCE (or equivalent total loss) by an unprivileged attacker (where
-
Token-Optimized File Updates: To minimize LLM output tokens, do not re-emit or manually rewrite the entire JSON object in your output. Instead, write a reusable helper script (e.g.,) during your first finding update. For all subsequent findings, do not regenerate the script; simply execute the existing helper script with the new parameters to append the required fields to
workspace/helpers/append_calibrate.py.workspace/findings/<id>.json- Helper version marker (mandatory). The very first line of
MUST be the exact comment
append_calibrate.py. Before reusing an existing helper, read its first line: if the file is absent, OR the first line is not exactly# MANTIS_HELPER_VERSION = 2(marker missing or a different integer), regenerate the helper from scratch (an older helper silently drops the new# MANTIS_HELPER_VERSION = 2history field and thesnapshothandling). The regenerated helper MUST be able to write theSTALE_EVIDENCEkey into the appendedsnapshotentry and to prependhistorytoSTALE_EVIDENCE. The helper is STATE-RELATIVE (sanity_triage_applied, Block A step 3) — never write it under CODE_ROOT.workspace/helpers/…
Alongside the existing core finding data, explicitly append the following fields to show the matrix breakdown:-
(1-5)
"impact_score" -
(1-5)
"likelihood_score" -
(CRITICAL, STANDARD, LOW_CRITICALITY or null)
"availability_tier" -
(EXPOSED, INTERNAL, or PRIVILEGED)
"inferred_exposure" -
(preserved from input, or populated from fallback inference if missing)
"attacker_position" -
(the final Hazard score)
"mantis_risk_score" -
(CRITICAL, HIGH, MEDIUM, LOW)
"priority" -
(semicolon-separated list, or null). Ordering:
"sanity_triage_applied"first if the finding was STALE (preamble P4); then anySTALE_EVIDENCEwarnings; then the Section 3 rules that fired, most-restrictive first. Example:Incomplete Calibration (UNKNOWN: <rule>)."STALE_EVIDENCE; Incomplete Calibration (UNKNOWN: physical_long_term); Local Attack Vector" -
object containing evaluations for all 27 sanity caps. Each key in the object maps to the sanity cap rule of the matching name:
"calibration_checklist"json{ "repro_failure": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "unreachable_inputs": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "third_party_reachability": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "minor_config_hygiene": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "non_security_critical": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "vague_code_paths": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "unreliable_triggers": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "prerequisite_shell": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "physical_long_term": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "trusted_controller_zero_delta": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "standard_host_attacks": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "static_confirmation": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "strict_xss": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "internal_nested": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "probabilistic_llm": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "supply_chain_prerequisites": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "non_default_config": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "confidential_computing_host": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "trusted_controller_critical_bypass": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "local_attack_vector": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "self_contained_blast": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "rarely_exposed": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "equivalent_primitives": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "documented_insecure_config": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "physical_temporary": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "high_privilege_external": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "trusted_controller_standard_bypass": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" } }For each rule,must be set to:outcome- : if the sanity cap rule applies (fires) to this finding, capping or downgrading its score/priority. A detailed
"APPLIES"string is required.reason - : if the sanity cap rule does not apply. The
"DOES_NOT_APPLY"field is optional and may be omitted to optimize tokens.reason - : if it is unresolved. A detailed
"UNKNOWN"string is required.reason
For backward compatibility, the schema also permits(with"fires": <bool>required only ifreasonisfires), but the newtrueformat is preferred."outcome" -
(your reasoning about the outrage factor)
"outrage_commentary" -
"executive_summary" -
An entry to thearray:
"history"json{ "stage": "calibrate", "action": "calibrated", "details": "Calculated risk score as [score] and priority as [priority].[ STALE_EVIDENCE: scored without trusting live-code re-inspection.]", "pass_number": <current_pass_number>, "snapshot": "<active_snapshot.snapshot_id, or omit in MODE-OFF>", "timestamp": "<current_iso8601_timestamp>" }
- Helper version marker (mandatory). The very first line of
Save your updates to the individual finding files. When complete, notify the
user.
将原始安全检测结果及其实证结果(复现/补丁)转换为优先级明确、可执行的风险报告。
按以下步骤执行校准:
定位器解析(仅针对检测结果)。校准无需读取目标源代码即可计算评分,但以下部分启发式规则可能会重新检查代码;需按照所有阶段相同的方式解析代码根目录。模块A内容如下:
LOCATOR RESOLUTION (读取任何目标代码或工件之前):
0. 角色:如果此技能从不读取目标源代码(报告、校准、反思阶段),则属于仅处理检测结果的阶段:跳过步骤2-6;仍需从状态中读取active_snapshot用于来源/注释;绝不能仅因代码根目录未设置而停止。
1. 按以下优先级确定CODE_ROOT:
a. 如果本次调用传入了--target_root,则CODE_ROOT = --target_root。此参数具有权威性,会覆盖SNAPSHOT_ROOT和状态回退值(适用于调用者提供预先生成的代码树的场景,如已打补丁的影子副本)。
b. 否则,如果传入了--snapshot_root(或SNAPSHOT_ROOT),则使用该值。
c. 否则读取state_root/workspace/.mantis_state.json(若传入--state_root则使用该路径下的state_root,否则使用当前目录下的./workspace/...)中的active_snapshot.root / .snapshot_id / .snapshot_pinned。
d. 否则(无参数且无可用的active_snapshot):CODE_ROOT = 当前目录,将snapshot_pinned视为false(MODE-OFF模式)。请勿停止。
2. 哨兵检查(仅当snapshot_pinned为true且未采用路径1a时执行):
验证CODE_ROOT/.mantis_snapshot_id存在且等于SNAPSHOT_ID。若缺失或不匹配 -> 停止并提示"snapshot sentinel mismatch"。(--target_root代码树(路径1a)是故意修改的,不受哨兵机制约束。)
3. 路径字段:
- 快照相对路径(在CODE_ROOT下读取):code_paths条目;计划中的target_files为文件路径。仅去除末尾的":<数字>"。包含"://"的code_paths条目是URL/端点,而非文件路径。不符合<现有路径>:<整数>格式的code_paths条目是非源代码定位器(符号/偏移量/端点):仅检查工件/符号是否存在;跳过所有行范围和行存在性逻辑。
- 状态相对路径(在state_root/workspace下读写,绝不能添加CODE_ROOT前缀):kb_references、repro_file_path、reattack_file_path、辅助脚本、报告文件,以及所有状态/检测结果JSON文件。
4. 当snapshot_pinned为true时,绝不能在CODE_ROOT下写入任何内容。任何编译、生成或写入工件的命令必须在PRIVATE SHADOW副本(从CODE_ROOT创建的mktemp -d目录)中运行,绝不能以CODE_ROOT为当前工作目录。只读检查可进入CODE_ROOT目录。
5. VCS元数据例外:历史日志提取和任何VCS差异/ blame命令必须在LIVE仓库根目录(包含.git/.hg/.repo)中运行,而非CODE_ROOT(快照副本会移除VCS元数据)。绝不能仅因CODE_ROOT缺少.git/.hg/.repo而停止。
6. 所有shell命令使用绝对路径,并在调用时设置自己的工作目录。请勿假设工作目录在多次调用之间保持不变。[!NOTE] 当前轮次检查(防御性检查;绑定保证由场景2中的工具提供): 如果mantis-pipeline-adapter存在且active_snapshot,则将该快照视为当前轮次的过期快照 —— 停止并提示"stale active_snapshot: pass mismatch",或降级为HALT模式(active_snapshot.pass != state.pass_number等效为false:无权威结论,模块B返回NOT_MATCHED,复现状态为snapshot_pinned)。此检查用于捕获自定义工具在第15阶段轮次递增时保留not_attempted但未重新固定的情况。参考元代理会在每一轮重新固定快照,因此此检查在该场景下不会触发。模块B本身无法检测此问题(它仅识别active_snapshot,不识别snapshot_id)。pass
快照来源与STALE-EVIDENCE防护机制(机械步骤;评分前执行):
P0. 从读取()(模块A步骤0/1c)。若不存在请勿停止 —— 校准属于仅处理检测结果的阶段(模块A步骤0)。
state_root/workspace/.mantis_state.jsonactive_snapshot{snapshot_id, snapshot_pinned, root}P1. 模式(针对整个运行的单一决策 —— 根据存在性分为三种状态):- 状态中不存在(未请求--sync —— MODE-OFF = 当前默认模式)-> MODE = MODE-OFF。完全按照当前逻辑评分:执行所有启发式规则,不计算来源信息,不输出,不输出任何HALT/PINNED标识。(向后兼容的默认路径 —— 与当前行为完全一致。)- 存在且不完全为(HALT模式 —— 代码树已过期或无法固定)-> MODE = HALT。 = (类型的ID)。按照以下P2步骤计算来源信息,并保守地触发STALE-EVIDENCE防护机制(与PINNED模式的防护逻辑相同),因为检测结果的定位器可能已过期。此轮次禁止给出权威结论(VERIFIED_SECURE、failed_to_reproduce、DUPLICATE、FALSE_POSITIVE、NON_VIABLE)。- == -> MODE = PINNED。 = 。执行完整的来源检查 + STALE-EVIDENCE防护机制。
active_snapshotactive_snapshotSTALE_EVIDENCEactive_snapshotsnapshot_pinnedtrueSNAPSHOT_IDactive_snapshot.snapshot_idlive:snapshot_pinnedtrueSNAPSHOT_IDactive_snapshot.snapshot_idP2. 在MODE = PINNED或HALT模式下,使用模块B的比较规则为每个检测结果F计算来源信息:- 缺失、为空或为字面量 -> NOT_MATCHED。- != (精确字符串比较,不模糊匹配)-> NOT_MATCHED。- == -> MATCHED。
F.discovery_commit"MIXED"F.discovery_commitSNAPSHOT_IDF.discovery_commitSNAPSHOT_IDP3. 当MODE为PINNED或HALT且满足以下任一条件时,检测结果F的启发式规则视为STALE:- 来源信息(F) == NOT_MATCHED,或 - 检测结果的目标文件在CODE_ROOT下不存在。(通过模块A步骤1和3解析CODE_ROOT;去除末尾的;仅读取固定的根目录,绝不能读取实时代码树。若完全无法解析CODE_ROOT,则视为文件不存在 -> STALE。)
code_paths:<数字>P4. 当检测结果F的启发式规则为STALE时,请勿应用该规则;保留保守的(调整前的)评分;并确保字面量是的第一个标记(仅添加一次,位于任何UNKNOWN警告和触发规则列表之前)。受防护的四个启发式规则及其STALE处理逻辑如下:- 死代码0.2乘数(第2节“资产关键性与可达性”):请勿应用0.2的缩减系数;使用原本应采用的乘数。- (第3节规则):请勿强制降级为LOW;设置,以开头。- (第3节规则):请勿强制降级为LOW;设置,以开头。- 跟踪提升(第3节规则中的“有效外部堆栈跟踪/ sanitizer…”例外):请勿应用跟踪提升;保持静态HIGH上限( <=3,0.8危险乘数,非CRITICAL)。设置,以开头。
STALE_EVIDENCEsanity_triage_appliedrepro_failurecalibration_checklist.repro_failure.outcome = "UNKNOWN"reason"STALE_EVIDENCE: "vague_code_pathscalibration_checklist.vague_code_paths.outcome = "UNKNOWN"reason"STALE_EVIDENCE: "static_confirmationlikelihood_scorecalibration_checklist.static_confirmation.outcome = "APPLIES"reason"STALE_EVIDENCE: trace-lift suppressed; trace/crash-log may predate the active snapshot; "P5. 非源代码检测结果:如果检测结果的条目是非源代码定位器(包含,或不符合格式 —— 模块A步骤3:符号/偏移量/端点),则跳过所有仅适用于源代码的启发式规则 —— 死代码、文件路径/导入/调用者层次结构暴露推断、和静态跟踪重新检查 —— 根据检测结果的声明元数据(、、、、威胁模型)进行评分。非源代码检测结果的跳过操作不会标记为(这是正常情况,并非代码漂移)。非源代码检测结果默认为(0.8),除非检测结果或威胁模型另有声明。
code_paths"://"<path>:<integer>vague_code_pathsattacker_positionprivileges_requiredproduction_viabilityrepro_statusSTALE_EVIDENCEinferred_exposure"INTERNAL"-
加载完整流水线状态:
- 读取目录下的所有JSON文件。由于流水线会在每个阶段为每个检测结果文件追加数据,这些文件包含了每个检测结果的完整处理历程(包括其
workspace/findings/、复现状态和生产环境可行性)。id - 缺失字段回退: 如果任何检测结果缺失可行性或复现字段(如链式检测结果),在评分前应用以下回退默认值:
- 如果缺失,视为
production_viability。"CONDITIONAL_VIABLE" - 如果缺失,视为
repro_status。"not_attempted"
- 如果
- 快照来源信息(仅MODE为PINNED或HALT时执行): 为每个检测结果,根据前置步骤P2计算来源信息(MATCHED / NOT_MATCHED)并记录到临时存储中。该值控制第2节和第3节中的STALE-EVIDENCE处理逻辑(前置步骤P3–P4)。在MODE == MODE-OFF模式下,跳过此步骤 —— 按照当前逻辑评分。
- 读取知识库中的(若存在),用于评估组件暴露情况、信任边界、资产关键性以及任何自定义校准覆盖规则(如应针对项目调整或取消的特定威胁位置或上限)。
workspace/kb/THREAT_MODEL.md - 批量处理: 如果需要校准的检测结果较多,将任务拆分为多个批次(每次处理少量检测结果)。如果具备调用子代理的能力,将每个批次委托给子代理并行处理,然后汇总结果。每个批次/子代理仅检查固定的快照: 传入、
--snapshot_root=<active_snapshot.root>和--snapshot_id=<active_snapshot.snapshot_id>,确保所有子代理通过模块A解析到相同的CODE_ROOT。批次执行的任何代码检查(暴露推断、死代码、静态跟踪验证)必须通过该CODE_ROOT(固定副本)读取,绝不能读取实时代码树,并且必须遵守STALE-EVIDENCE防护机制(前置步骤P3–P4)。仅针对检测结果的字段(评分、优先级、历史标记)根据检测结果JSON计算。--state_root=<workspace parent>
- 读取
-
计算风险评分(1-10分): 针对每个唯一的检测结果文件,基于以下公式组件以矩阵形式计算实际技术风险评分,其中危险值 = 影响度 + 可能性:
- 影响度(1-5分): 基于CIA三元组(机密性、完整性、可用性)评估影响,同时严格考虑影响范围。
- 5分:机密性完全系统性丧失(全面数据泄露、根密码/HSM主密钥泄露)或完整性丧失(系统被攻陷,例如无特权攻击者可直接执行远程代码RCE,且攻击者原本不具备代码执行能力)。绝不能用于已具备执行权限的攻击者。
- 4分:一个或多个领域遭受重大损失。包括系统性可用性丧失(主要服务完全中断)或大规模数据泄露。
- 3分:中等损失(如部分数据泄露、临时或部分系统中断)。
- 2分:轻微损失(如少量信息泄露、局部中断)。影响范围仅限于单个用户自身数据的漏洞,评分绝不能高于2分。例外情况: 如果操作不可否认(允许用户合理否认操作以实施欺诈或转嫁责任),或触发影响其他用户/系统稳定性的副作用,则不应降级。
- 1分:对CIA的影响可忽略不计,大多为 cosmetic(表面)问题。类型为“代码脆弱”“缺乏纵深防御”或纯理论性卫生问题的检测结果,影响度评分必须为1分,确保其最高评级为LOW。
- 安全控制绕过(升级): 如果漏洞直接绕过核心安全控制(如认证、授权、加密签名验证)或破坏库的主要安全用途(如用于保护密钥集的库允许攻击者控制),则将影响度评分提升至至少4分(若导致系统性攻陷则为5分),即使直接技术影响看似局限。
- 权限要求与横向移动说明:
- 如果检测结果需要高权限(如管理员权限、管理员到超级管理员的权限提升),或仅允许在已攻陷状态下在内部组件之间进行横向移动/ pivot,则其单独影响度评分上限为2分,除非漏洞利用可突破容器边界(进入宿主机节点)或跨租户提升权限。
- 如果检测结果需要低权限(如标准认证用户),则其单独影响度评分上限为3分(除非导致其他租户/用户的系统性攻陷,或直接绕过核心安全控制/库用途,此时可更高)。
- 这些上限适用于单个检测结果。如果通过链化器成功链化为Exploit Chain(超级检测结果),则应根据链的入口点(初始步骤)所需的权限级别评估整个链的风险。
- 可能性(1-5分): 基于已证实的可利用性而非理论难度评估发生概率。
- 5分:已在野外被主动利用,或代理成功生成了可运行的武器化漏洞利用代码(不仅仅是单元测试)。
- 4分:存在公开的概念验证(PoC),或代理生成了高度可信但部分武器化的漏洞利用代码。
- 3分:无可用漏洞利用代码,但攻击向量易于自动化。
- 2分:仅存在理论可能性且实现难度极高(需要本地访问、严格的时序条件)。
- 1分:仅存在理论风险,无已知漏洞利用路径。
- 实际可达性修正系数: 在确定基础可能性后,如果漏洞利用路径依赖于不常见或非默认的使用模式,将降低1或2分(但不低于1.0)。适用于以下情况:
likelihood_score- 特定受污染参数仅在罕见API调用、不常见配置字段或野外极少处理的数据格式中由攻击者输入填充。
- 漏洞需要非标准或仅管理员可用的配置,而这些配置在实际环境中极少启用。
- 上下文乘数(0.1 - 1.0):
- 如果为FALSE_POSITIVE或NEEDS_RESEARCH,或
status为NON_VIABLE:完全忽略该检测结果。不对其评分或更新校准数据。production_viability - 如果为VIABLE、CONDITIONAL_VIABLE或SAMPLE_OR_TEST:
production_viability- 网络/信任暴露:
- 如果检测结果位于暴露接口/信任边界(直接接受不受信任的输入):1.0。
- 如果位于接受半可信解析数据的内部组件:0.8。
- 如果位于深度嵌套的特权/可信区域:0.5。
- 威胁模型缺失/不完整时的推断: 如果不存在或未提及该组件:
workspace/kb/THREAT_MODEL.md- 分析文件路径、导入和调用者层次结构以推断暴露情况(如公共API vs内部辅助工具)。仅读取固定的CODE_ROOT(模块A),绝不能读取实时代码树。非源代码检测结果(前置步骤P5):跳过针对非源代码定位器检测结果的文件路径/导入/调用者分析 —— 默认为
inferred_exposure(0.8),除非检测结果或威胁模型另有声明。 当MODE为PINNED或HALT且检测结果与活动快照不匹配,或其"INTERNAL"文件在固定CODE_ROOT下不存在时,请勿基于实时重新检查降低暴露乘数(保留保守的较高乘数)。code_paths - 默认暴露乘数为0.8(内部),为
inferred_exposure,除非有明确证据表明直接外部暴露(EXPOSED)或深度嵌套隔离(PRIVILEGED)。本地SUID/LPE二进制文件默认"INTERNAL"暴露。"INTERNAL" - 如果检测结果描述、历史记录或评审推理表明组件“极少暴露”“仅内部可用”或“攻击者难以触及”,则将暴露乘数降低至0.5或更低。
- 分析文件路径、导入和调用者层次结构以推断暴露情况(如公共API vs内部辅助工具)。仅读取固定的CODE_ROOT(模块A),绝不能读取实时代码树。非源代码检测结果(前置步骤P5):跳过针对非源代码定位器检测结果的文件路径/导入/调用者分析 —— 默认
- 映射暴露与攻击者位置元数据:
- 根据网络/信任暴露乘数解析****:
inferred_exposure- 乘数1.0(暴露接口)->
"EXPOSED" - 乘数0.8(内部组件)->
"INTERNAL" - 乘数0.5(特权/可信区域)->
"PRIVILEGED"
- 乘数1.0(暴露接口)->
- 评估攻击者位置(检测结果中声明):
- 从检测结果JSON中读取。
attacker_position - 基于边界而非传输协议确定: 必须代表首个不受信任主体(最终人类攻击者或外部威胁 actor)必须跨越的最外层边界。不要基于传输协议(如HTTP、gRPC、IPC)或直接协议对等方判断。
attacker_position- 追溯到不受信任的攻击者: 如果与接口交互的直接对等方是可信组件(如内部代理、网关、消息队列或主控制器),则必须追溯数据流,找到不受信任攻击者首次进入系统的最外层边界。
- 如果接口绑定到localhost或使用本地IPC(unix套接字、管道、共享内存),则位置为,即使底层使用HTTP/TCP。
"LOCAL" - 如果接口仅在私有网络(VPC、企业网络、家庭LAN、本地网络、内部集群控制平面)内可达,则位置为(若限制为pod到pod则为
"INTERNAL_NETWORK"),即使是Web服务。"IN_CLUSTER" - 仅当接口可直接从公共互联网访问时,位置才为。
"EXTERNAL" - 如果接口需要物理接触、硬件交互(如JTAG、调试探针、芯片开盖)或本地无线 proximity(如NFC、蓝牙),则位置必须为或
"PHYSICAL_TEMPORARY",无论使用何种协议。"PHYSICAL_LONG_TERM"
- 规范化自由文本: 如果值存在但为自由文本字符串,与有效枚举值不完全匹配(如旧版表述),则必须使用以下映射将其规范化为最接近的有效枚举值:
- 匹配、
"authenticated <role>"、"customer with"、"tenant <role>"等公共产品相关表述 ->"Fitbit user"("EXTERNAL")。privileges_required: "LOW" - 匹配、
"local user"、"local shell"等表述 ->"local access"。"LOCAL" - 匹配、
"peer <role> in same job/cluster/pod"、"co-tenant"、"in-cluster (Kubernetes/container-orchestrator) workload"等表述 ->"NCCL peer rank"。"IN_CLUSTER" - 匹配、
"malicious dependency"、"upstream package"、"build-time"等表述 ->"CI pipeline"。"SUPPLY_CHAIN" - 匹配、
"host hypervisor"、"host OS"等表述 ->"hypervisor access"。"HOST_SYSTEM" - 匹配、
"physical access"等表述 -> 根据边界确定为"fault injection"或"PHYSICAL_LONG_TERM"。"PHYSICAL_TEMPORARY"
- 匹配
- 如果完全缺失,则使用以下回退指南推断(并记录警告,建议在更早阶段声明):
- :如果组件为
"EXTERNAL",或为公共门户上的认证绕过漏洞。"EXPOSED" - :如果为本地权限提升(LPE)或SUID漏洞利用。
"LOCAL" - :如果针对集群内基础设施(CSI/CNI)从pod发起攻击。
"IN_CLUSTER" - :如果攻击者是 hypervisor、宿主机OS,或攻击其所托管软件的模拟/物理设备(来宾驱动、飞地运行时、固件目标)。此枚举严格用于外部到内部的方向。反向方向 —— 来宾到宿主机(VM逃逸)、沙箱到外部、飞地到宿主机,或受控进程到容器 —— 必须归类为
"HOST_SYSTEM"(Kubernetes pod到节点为"LOCAL";KVM/hypervisor来宾攻击宿主机为"IN_CLUSTER"),绝不能为"LOCAL"。"HOST_SYSTEM" - /
"PHYSICAL_LONG_TERM":如果漏洞描述、标题或代码路径涉及硬件故障注入、边信道攻击、evil maid攻击或USB物理访问。"PHYSICAL_TEMPORARY" - :针对构建时或依赖项修改的前置条件。
"SUPPLY_CHAIN" - :其他内部组件的默认回退值。
"INTERNAL_NETWORK"
- 对齐暴露与位置:
- 如果为
attacker_position或"LOCAL",则必须将"IN_CLUSTER"解析为inferred_exposure(使用0.8乘数),即使漏洞代码路径位于威胁模型中映射为"INTERNAL"的文件夹中,除非漏洞利用明确突破容器边界进入宿主机节点。"EXPOSED" - 如果为
attacker_position,则必须将"INTERNAL_NETWORK"解析为最高inferred_exposure(使用0.8乘数或更低),即使组件在威胁模型中映射为"INTERNAL",因为接口无法直接从公共互联网访问。"EXPOSED" - 如果为
attacker_position,则必须将"EXTERNAL"解析为inferred_exposure(使用1.0乘数),即使组件在威胁模型中映射为"EXPOSED"或"INTERNAL"(反映不受信任的外部输入可到达该组件)。"PRIVILEGED"
- 如果
- 从检测结果JSON中读取
- 根据网络/信任暴露乘数解析**
- 资产关键性与可达性:
- 如果威胁模型表明组件处理高价值数据(如PII、核心密钥),则保持较高乘数。
- 如果影响低价值目标(如内部分析、沙箱测试数据),则降低乘数(如0.5)。
- 可用性特定上下文: 如果检测结果仅影响可用性(DoS),检查威胁模型中组件的(若缺失则默认STANDARD):
availability_tier- :将乘数降低至0.5。
LOW_CRITICALITY - :将乘数降低至0.8。
STANDARD - :保持乘数为1.0。
CRITICAL
- 如果静态/动态分析证明漏洞代码实际上是“死代码”(运行时执行路径中从未被调用),则将乘数大幅降低至0.2。STALE-EVIDENCE防护机制(前置步骤P3–P4):如果检测结果为STALE(MODE为PINNED或HALT且检测结果与活动快照不匹配,文件在固定CODE_ROOT下不存在),请勿应用此0.2缩减系数 —— 漂移的代码可能会虚假地显示为“未被调用”;保留较高乘数,并将
code_paths设置为STALE_EVIDENCE的第一个标记。 任何死代码分析必须检查固定的CODE_ROOT,绝不能读取实时代码树。非源代码检测结果(前置步骤P5): 完全跳过此启发式规则。sanity_triage_applied
- 用户交互:
- 如果为REQUIRED(如CSRF、点击劫持,或诱使用户打开恶意文件),则对上下文乘数应用0.7的系数(如暴露为内部(0.8)且需要用户交互,则组合乘数为0.8 * 0.7 = 0.56)。这确保此类检测结果的评级低于CRITICAL阈值。
user_interaction
- 如果
- 网络/信任暴露:
- 如果为SAMPLE_OR_TEST:
production_viability- 对上下文乘数应用0.4的缩放因子(即当前上下文乘数乘以0.4),使示例代码中的严重漏洞通常处于MEDIUM级别而非HIGH或CRITICAL。此缩放因子必须与其他修正系数累积应用。请勿直接将上下文乘数覆盖为,因为如果组件的暴露或死代码状态已计算为低于
0.4(如0.4),这会错误地提高乘数。0.2 - 在中明确说明这不是生产环境漏洞。建议重点修复示例/测试代码,避免开发人员将不安全模式复制到生产环境代码中。
executive_summary
- 对上下文乘数应用0.4的缩放因子(即当前上下文乘数乘以0.4),使示例代码中的严重漏洞通常处于MEDIUM级别而非HIGH或CRITICAL。此缩放因子必须与其他修正系数累积应用。请勿直接将上下文乘数覆盖为
- 如果为CONDITIONAL_VIABLE:
production_viability- 对上下文乘数应用0.7的缩放因子(即当前上下文乘数乘以0.7),以反映漏洞需要特定非默认配置、编译器标志或启用断言才能被利用。此缩放因子必须与其他修正系数累积应用(如用户交互)。请勿直接将上下文乘数覆盖为,因为如果组件的暴露已处于深度隔离状态(0.5),这会错误地提高乘数。
0.7 - 在中记录漏洞可利用所需的特定条件。
executive_summary
- 对上下文乘数应用0.7的缩放因子(即当前上下文乘数乘以0.7),以反映漏洞需要特定非默认配置、编译器标志或启用断言才能被利用。此缩放因子必须与其他修正系数累积应用(如用户交互)。请勿直接将上下文乘数覆盖为
- 如果
最终评分(危险值)= (影响度 + 可能性) * 乘数(上限为10.0)。关于舆情风险的说明: 在推理过程中,需考虑更广泛的公式风险 = 危险值 + 舆情风险,其中“舆情风险”(如声誉损害、用户情绪影响)需纳入考量。请勿将舆情风险因素纳入最终数值评分。 - 影响度(1-5分): 基于CIA三元组(机密性、完整性、可用性)评估影响,同时严格考虑影响范围。
-
关键合理性审查(降级与上限控制): 在确定最终优先级之前,对检测结果的质量、上下文和累积证据进行二级合理性检查。核心原则 - 边际能力: 检测结果的最终严重性和优先级严格受限于攻击者在其前置位置基础上获得的边际能力。如果漏洞利用未为攻击者提供超出其初始位置(或合法拥有的能力)的显著新控制、访问权限或能力,则必须对检测结果进行上限控制或降级。27条校准合理性规则的完整详细定义存储在参考目录的Calibration Rules中。必须针对每条规则评估每个检测结果。检查是否定义了任何
THREAT_MODEL.md(如Calibration Overrides)。如果检测结果的位置或组件存在覆盖规则,则该规则优先,解除相应的上限控制。否则,参考目录中指定的上限控制和降级规则(以及边际能力原则的一般应用)将覆盖第2节中计算的任何升级(包括安全控制绕过升级)。还应应用一般原则对其他边际能力较低的检测结果进行上限控制或降级。重要提示: 上限控制(HIGH或MEDIUM)仅限制允许的最高评分/优先级。不得提升较低的评分/优先级(如评分为5.0的检测结果自然属于MEDIUM级别,即使受HIGH上限控制,也必须保持MEDIUM级别)。LIFT_CAP: PHYSICAL_LONG_TERM优先级与UNKNOWN规则策略:- STALE-EVIDENCE优先级(前置步骤P3–P4): 当MODE为PINNED或HALT且检测结果为STALE(与活动快照不匹配,或其文件在固定CODE_ROOT下不存在)时,以下规则不得用于基于实时重新检查降低或提高评分:
code_paths(请勿强制降级为LOW)、repro_failure(请勿强制降级为LOW),以及vague_code_paths跟踪提升例外(请勿将过期的跟踪/sanitizer/崩溃日志视为实时复现 —— 保持静态HIGH上限)。同样请勿应用第2节中的死代码0.2乘数(见第2节)。保留保守评分,并将字面量static_confirmation作为STALE_EVIDENCE的第一个标记前置(位于任何sanity_triage_applied警告和触发规则列表之前)。按照前置步骤P4的规定,在Incomplete Calibration (UNKNOWN: …)中记录受防护的规则(calibration_checklist/repro_failure->vague_code_paths,带有UNKNOWN原因;STALE_EVIDENCE:->static_confirmation,带有APPLIES原因,说明跟踪提升已被抑制)。在MODE == MODE-OFF模式下,此步骤不执行任何操作(按照当前逻辑评分)。STALE_EVIDENCE: - 评估所有规则。如果多个上限控制适用,最严格的规则优先(Force-LOW > cap-MEDIUM > cap-HIGH)。
- UNKNOWN结果策略: 如果规则评估为,则请勿应用上限控制或降级(保持评分保守;保留较高的计算评分/优先级)。但需通过在
UNKNOWN字符串前添加警告,标记整体校准为不完整/临时状态:"sanity_triage_applied"(若存在多个UNKNOWN则使用分号分隔的警告列表)。这表明需要人工审查以解决规则状态问题。"Incomplete Calibration (UNKNOWN: <rule_name>)" - 将所有成功触发/应用的规则记录在中,以分号分隔,按严格程度从高到低排序(如
sanity_triage_applied),附加在任何UNKNOWN警告之后(若存在),确保有效上限控制完全可审计。"Local Attack Vector; Internal/Nested"
- STALE-EVIDENCE优先级(前置步骤P3–P4): 当MODE为PINNED或HALT且检测结果为STALE(与活动快照不匹配,或其
-
确定优先级:
- CRITICAL(8.0 - 10.0): 需立即采取行动。极高危险值(如高影响度和高可能性)。仅当无特权攻击者(为NONE**)可直接实现明确的RCE(或等效的完全系统丧失),且攻击者原本不具备系统攻陷能力,同时
privileges_required为NONE(零点击)时,才能使用此级别。此规则为绝对规则:即使检测结果(如CSI宿主机逃逸)的第3节上限控制被解除,若入口需要高权限,则绝不能评为CRITICAL,必须上限控制为HIGH(7.9)。仅影响可用性的检测结果(DoS)绝不能评为CRITICAL,除非威胁模型中明确记录user_interaction为availability_tier且无自动恢复机制(如自动重启、负载均衡故障转移)缓解影响。**CRITICAL - HIGH(6.0 - 7.9): 高优先级。显著危险值,需及时解决。
- MEDIUM(3.0 - 5.9): 标准优先级。中等危险值,可安排计划处理。
- LOW(0.1 - 2.9): 低优先级。极小危险值。任何类型为“代码脆弱”、纯卫生/纵深防御问题,或仅影响单个用户自身数据的检测结果,无论计算评分如何,必须上限控制为LOW优先级(除非不可否认性或更广泛副作用的例外情况适用)。
- CRITICAL(8.0 - 10.0): 需立即采取行动。极高危险值(如高影响度和高可能性)。仅当无特权攻击者(
-
优化Token的文件更新: 为减少LLM输出Token,请勿在输出中重新生成或手动重写整个JSON对象。相反,在首次更新检测结果时编写可复用的辅助脚本(如)。对于后续所有检测结果,无需重新生成脚本;只需使用新参数执行现有辅助脚本,将所需字段追加到
workspace/helpers/append_calibrate.py中。workspace/findings/<id>.json- 辅助脚本版本标记(必填): 的第一行必须为精确注释
append_calibrate.py。在复用现有辅助脚本之前,读取其第一行:如果文件不存在,或第一行并非精确的# MANTIS_HELPER_VERSION = 2(标记缺失或整数不同),则从头重新生成辅助脚本(旧版辅助脚本会静默丢弃新的# MANTIS_HELPER_VERSION = 2历史字段和snapshot处理逻辑)。重新生成的辅助脚本必须能够将STALE_EVIDENCE键写入追加的snapshot条目,并将history前置到STALE_EVIDENCE中。辅助脚本为状态相对路径(sanity_triage_applied,模块A步骤3)—— 绝不能在CODE_ROOT下写入。workspace/helpers/…
除现有核心检测结果数据外,明确追加以下字段以展示矩阵细分:-
(1-5)
"impact_score" -
(1-5)
"likelihood_score" -
(CRITICAL、STANDARD、LOW_CRITICALITY或null)
"availability_tier" -
(EXPOSED、INTERNAL或PRIVILEGED)
"inferred_exposure" -
(保留输入值,若缺失则通过回退推断填充)
"attacker_position" -
(最终危险值评分)
"mantis_risk_score" -
(CRITICAL、HIGH、MEDIUM、LOW)
"priority" -
(分号分隔的列表,或null)。顺序:如果检测结果为STALE(前置步骤P4),则
"sanity_triage_applied"在前;然后是任何STALE_EVIDENCE警告;最后是第3节中触发的规则,按严格程度从高到低排序。示例:Incomplete Calibration (UNKNOWN: <rule>)。"STALE_EVIDENCE; Incomplete Calibration (UNKNOWN: physical_long_term); Local Attack Vector" -
对象,包含所有27条合理性上限控制规则的评估结果。对象中的每个键对应同名的合理性上限控制规则:
"calibration_checklist"json{ "repro_failure": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "unreachable_inputs": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "third_party_reachability": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "minor_config_hygiene": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "non_security_critical": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "vague_code_paths": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "unreliable_triggers": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "prerequisite_shell": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "physical_long_term": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "trusted_controller_zero_delta": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "standard_host_attacks": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "static_confirmation": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "strict_xss": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "internal_nested": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "probabilistic_llm": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "supply_chain_prerequisites": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "non_default_config": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "confidential_computing_host": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "trusted_controller_critical_bypass": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "local_attack_vector": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "self_contained_blast": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "rarely_exposed": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "equivalent_primitives": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "documented_insecure_config": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "physical_temporary": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "high_privilege_external": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" }, "trusted_controller_standard_bypass": { "outcome": "APPLIES" | "DOES_NOT_APPLY" | "UNKNOWN", "reason": "<string>" } }对于每条规则,必须设置为:outcome- :如果合理性上限控制规则适用于此检测结果(触发),对其评分/优先级进行上限控制或降级。必须提供详细的
"APPLIES"字符串。reason - :如果合理性上限控制规则不适用于此检测结果。
"DOES_NOT_APPLY"字段为可选,可省略以优化Token。reason - :如果规则未解决。必须提供详细的
"UNKNOWN"字符串。reason
为向后兼容,模式也允许使用(仅当"fires": <bool>为fires时需要true),但推荐使用新的reason格式。"outcome" -
(关于舆情风险因素的推理)
"outrage_commentary" -
"executive_summary" -
数组中的条目:
"history"json{ "stage": "calibrate", "action": "calibrated", "details": "Calculated risk score as [score] and priority as [priority].[ STALE_EVIDENCE: scored without trusting live-code re-inspection.]", "pass_number": <current_pass_number>, "snapshot": "<active_snapshot.snapshot_id, or omit in MODE-OFF>", "timestamp": "<current_iso8601_timestamp>" }
- 辅助脚本版本标记(必填):
将更新保存到各个检测结果文件中。完成后通知用户。