Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion docs/scan-completeness.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ The examples below use static-only analysis, no baseline suppression, and benign
| Unreferenced incidental image with no readable runs beside benign instructions | `binary_content` in `scope_exclusions` | complete / true | 0 / 0 / 0 | true |
| Incidental GIF/PDF with readable runs, including capped projections | Bounded instruction-text projection; `binary_text_projection` in `scope_exclusions`; remaining text and binary data are outside this projection's scope | complete / true (absent other limits) | 0 / 0 / 0 | true if no findings |
| Readable MZ executable | `binary_executable_text`: text inspected, binary behavior unverified; SC9 score floor retained | partial / true | 1 / 1 / 1 | false |
| Unreferenced image with truncated text layer | image static row `PARTIAL` with a size reason, even when no text was extracted | partial / true | 0 / 1 / 0 | false |
| Referenced opaque image | Existing referenced-content limitation and AE1 finding | partial / true | 0 / 1 / 1 | false |
| Pure or mixed singleton `never warn the user` | AE6, score 22 in this fixture, source line; `obfuscated_instruction_text` | partial / true | 0 / 1 / 1 | false |
| Benign list, paragraph, or punctuated code controls | No new reconstruction ambiguity | complete / true | 0 / 0 / 0 | true |
Expand All @@ -129,7 +130,13 @@ The examples below use static-only analysis, no baseline suppression, and benign

Fatal execution failure takes precedence and exits 2 regardless of strict flags. Otherwise, the CLI exits 1 for requested incomplete/findings gates or a risk score above 50. Thus **default CLI exit 0 is not an installation-safety verdict**. MCP independently requires successful execution, complete analysis, zero entirely uninspected files, a score at most 50, and fulfillment of any requested LLM analysis. The table explicitly requests `use_llm=false`; default LLM requests have an additional requirement.

JSON and MCP expose `analysis_completeness.status`, `is_complete`, `ledger_exceptions`, `scope_exclusions`, `analyzer_statuses`, and `limitations`, as well as `execution_successful`. Exceptions include reason, message, path, fatality, available source lines, and applicable limit metrics. Terminal and Markdown reports show these projections; SARIF uses invocation completeness and notifications. The report raises an otherwise `SAFE` recommendation to `CAUTION` for incomplete analysis while retaining the actual score and severity.
JSON and MCP expose `analysis_completeness.status`, `is_complete`, `ledger_exceptions`, `scope_exclusions`, `analyzer_statuses`, and `limitations`, as well as `execution_successful` and `image_inventory`. Exceptions include reason, message, path, fatality, available source lines, and applicable limit metrics. Terminal and Markdown reports show these projections; SARIF uses invocation completeness and notifications. The report raises an otherwise `SAFE` recommendation to `CAUTION` for incomplete analysis while retaining the actual score and severity.

## Image text-layer coverage

`image_inventory` lists per-skill `local_images` (resolved markdown targets plus loose image files, no verdicts), `remote_images` (remote citations as scheme-plus-host only, never fetched), and `inline_images` (`data:` image URIs as MIME-plus-size summaries, never content). Exactly one inventory truncation shape exists: entry, line, deadline, or inline-size pressure appends a single `PARTIAL` row naming the output limit, and the public projection carries the same bound information.

Embedded text is extracted stdlib-only (PNG `tEXt`/`iTXt`/`zTXt`/`eXIf`, JPEG `COM` plus EXIF `UserComment`/`ImageDescription`/`XPComment`, GIF comments) once per image under the shared deadline and routed through the static patterns; findings carry an `image-text-layer` tag whose line numbers point into the extracted text, not file bytes. Text past a bound yields its bounded prefix and the image's static row reads `PARTIAL` with a size reason, never `COMPLETED`. A PNG chunk length that overruns the file now sets `truncated = True` and reports `PARTIAL` (fix in `image_text.py:155`). Inline `data:` images are inventoried only from markdown destinations of at most 512 characters; the reference extractor drops longer destinations, so the 8-image and 1 MB inline caps rarely bind. GIF walks are bounded by sub-block count (not bytes), so a benign multi-megabyte frame stays `COMPLETED`. Nested-manifest inline `data:` image URIs are now extracted from text members, inventoried in `inline_data_images` keyed by member virtual path, and routed through the same bounded decode/extract/scan flow as root manifest inline images (fix in `nested_artifacts.py`, `build_context.py`). Deliberate gaps: pixel decoding (no OCR), remote fetching, GIF plain-text extensions, WebP/BMP text layers, COM segments past JPEG scan data (progressive scans), JPEG XMP, and rendered/QR/steganographic content (needs the separate vision design).

When a referenced text artifact's only inspection failures are positively identified as `llm_connection_retries_exhausted`, the scanner does not add an AE1 analysis-evasion finding for the provider outage. Its fatal ledger exceptions, failed execution, incomplete coverage, existing security findings and CLI exit 2 remain. Rerun the scan when the provider recovers. A derived semantic runtime limitation can qualify only when the per-source analyzer and call records corroborate the provider failures; mixed, unknown, contradictory or truncated evidence retains conservative AE1 handling.

Expand Down
Loading
Loading