Loading...
Loading...
Generates a human-readable security review packet compiled from confirmed findings and exploit chains. Use at the end of a review cycle to produce stakeholder-facing documentation. Don't use for auditing code or verifying patches directly.
npx skill4agent add google/mantis mantis-report/mantis-reportworkspace/findings/*.jsonworkspace/archive/findings_pass_*/*.jsonworkspace/archive/loop*_findings/*.jsonworkspace/.mantis_state.jsonvcs_infoactive_snapshotrootsnapshot_idsnapshot_pinneddiscovery_commitrepro_snapshot_idpatch_base_snapshotworkspace/report/review_packet_pass_<N>_<snapshot_tag>.mdreview_packet_pass_<N>.mdworkspace/report/review_packet-latest.mdworkspace/findings/workspace/archive/review_packet-latest.md<snapshot_tag>review_packet_pass_<N>.mdLOCATOR 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.active_snapshotrootsnapshot_idsnapshot_pinnedvcs_infoworkspace/.mantis_state.jsonworkspace/findings/*.jsonworkspace/.mantis_state.jsonworkspace/report/*workspace/archive/*idlineage_idsignaturecode_paths:linelineage_idsignaturesignaturemantis-plancode_pathscode_pathssignaturelineage_idworkspace/findings/*.jsonidVERIFIED_SECUREMITIGATION_PROPOSEDlineage_idsignatureidworkspace/archive/findings_pass_<N>/loop<N>_findings/lineage_idsignaturesignaturelineage_idreproducednot_attemptedcode_pathsconstituent_findingsrepro_statusreproducedrepro_statusstatically_confirmedNON_VIABLEDUPLICATEfailed_to_reproducestatically_confirmedpatch_statusVERIFIED_SECUREMITIGATION_PROPOSEDstatusFALSE_POSITIVEDUPLICATEproduction_viabilityNON_VIABLEpatch_status"LOW"discovered pass 2 · still open as of pass 7pass_numberhistorypossible_duplicate_ofmantis-dedupePossibly related to finding <UUID> (cross-pass candidate; snapshots differ — not confirmed duplicate).Discovery Snapshot: <discovery_commit>discovery_commitDiscovery Snapshot: (legacy — not recorded)repro_file_pathrun_commandrepro_outputEvidence base: <repro_snapshot_id>repro_snapshot_idEvidence base: (not recorded)reasoningcritic_reasoningoutrage_commentarypatch_diffApply against: <patch_base_snapshot>patch_base_snapshotApply against: (not recorded)patch_base_snapshotdiscovery_commit<REDACTED_SECRET><REDACTED_PII><REDACTED_INTERNAL_HOST><REDACTED_PAYLOAD>active_snapshotworkspace/.mantis_state.jsonactive_snapshot--syncVERIFIED_SECUREactive_snapshotsnapshot_pinnedfalse> **WARNING — NON-AUTHORITATIVE RESULTS:** The target could not be pinned to an immutable snapshot for this pass (HALT mode: the tree raced or was too big / live / copy-failed). Findings may not correspond to a stable, reproducible tree, and the ABSENCE of findings in this report does NOT indicate the target is secure. Treat all results as provisional.active_snapshotactive_snapshot.snapshot_pinnedtruevcs_info.dirtytrue> **WARNING — DIRTY WORKING TREE:** The target had uncommitted local modifications when it was scanned. Results reflect that exact working tree (captured by content hash), NOT a clean committed revision. The recorded commit alone will not reproduce this state.active_snapshot.snapshot_iddiscovery_commit> **WARNING — MIXED SNAPSHOTS:** This report combines findings discovered on different code snapshots (e.g. findings retried from earlier passes). The pass snapshot is <HEADER_SID>. Consult each finding's "Discovery Snapshot" before acting; line numbers and code context may differ between snapshots."vcs_info"workspace/.mantis_state.json"vcs_type""git"Target Version: Git branch [branch] at commit [commit_hash] [(dirty) if dirty is true]"vcs_type""hg"Target Version: Mercurial branch [branch] at revision [commit_hash] [(dirty) if dirty is true]"vcs_type""multi-vcs"Target Version: Multi-VCS (repo) manifest [revision] [(dirty) if dirty is true]"vcs_type""none"Target Version: None (No version control detected)"vcs_type""unknown"vcs_infoTarget Version: Unknown (VCS detection failed/error)Target Version:active_snapshot.snapshot_idSnapshot ID: [snapshot_id] (pinned: [snapshot_pinned])active_snapshotsnapshot_idSnapshot ID: (legacy — snapshot not recorded)patch_status"VERIFIED_SECURE"patch_status["MITIGATION_PROPOSED", "VERIFICATION_INCOMPLETE"]patch_diffpatch_statuspatch_status["VERIFICATION_FAILED", "ERROR"]patch_diffpatch_status"Exploit Chains (Not End-to-End Reproduced)"review_packet.mdN"pass_number"workspace/.mantis_state.jsonworkspace/archive/findings_pass_NloopN_findingsNmax_found + 1<snapshot_tag>active_snapshot.snapshot_id[A-Za-z0-9.-]_workspace/report/review_packet_pass_<N>_<snapshot_tag>.mdactive_snapshot.snapshot_idreview_packet_pass_1_content_9f86d081884c...md<snapshot_tag>workspace/report/review_packet_pass_<N>.mdactive_snapshotsnapshot_id<snapshot_tag>workspace/report/review_packet-latest.mdreview_packet-latest.mdpatch_statusVERIFIED_SECUREMITIGATION_PROPOSEDstate_root/workspace/archive/.repro_attempts.jsonsignaturesignaturestable_keynormalized_title + "@" + primary_file_pathmantis-reproducesignaturestable_key{count: V, last_snapshot: UNKNOWN}{count: V.count, last_snapshot: V.last_snapshot or UNKNOWN}[!NOTE] De-dup caveat: de-dup is by finding identity, per the SAME-BUG PREDICATE at the top of this stage: two findings fold only if EITHER (i) they share the exact same(UUID), OR (ii) ALL THREE hold — a shared non-emptyid, a shared non-emptylineage_id, AND at least one line-inclusivesignaturematch. NEVER fold oncode_pathsalone or onlineage_idalone (basename-derived lineage can link two distinct same-named files; asignaturestrips the line number so it collides between distinct same-file bugs) — collapsing on either alone can silently drop a real finding. A bug re-discovered under a new UUID that does NOT satisfy predicate (ii) — a regression, a file rename that shifts the line, or a non-deterministic re-find — lists as a SEPARATE entry from its archived ancestor: over-reporting (safe), never hiding. With stable finding signatures and lineage tracking landed (Phase 3), a re-discovered finding folds into its ancestor's single entry ONLY when predicate (ii) is fully satisfied; the UUID-only match remains the safe branch for legacy/un-upgraded findings.signature
review_packet-latest.mdreview_packet-latest.mdreview_packet_pass_<N>_<snapshot_tag>.md