feat(core): port the doors traust development calls from f950dd6 #366
<h3>PR Summary by Qodo</h3>
Port traust development API doors into core
<code>✨ Enhancement</code> <code>🧪 Tests</code> <code>📝 Documentation</code> <code>🕐 40+ Minutes</code>
<img src="https://www.qodo.ai/wp-content/uploads/2025/11/light-grey-line.svg" height="10%" alt="Grey Divider">
<details>
<summary>AI Description</summary>
<dl>
<dd>
<br/>
><pre>
>• Port missing core service, model, and rendering doors required by traust development.
>• Add branch-aware verification, historical signature checks, executive views, and shared secret
detection.
>• Cover the ports with tests while marking contracts and historical LoC work as incomplete.
></pre>
</dd>
</dl>
</details>
<details>
<summary>Diagram</summary>
<dl>
<dd>
<br/>
graph TD
A["Traust consumer"] --> B["Context doors"] --> C["Core services"] --> D["Domain models"]
C --> E["Existing providers"]
C --> F["Rendering modules"]
C --> G["Ledger verification"]
</dd>
</dl>
</details>
<details>
<summary>High-Level Assessment</summary>
<dl>
<dd>
<br/>
>Porting only missing consumer-facing doors into their existing core owners avoids duplicating domain logic or importing the entire side branch. Keeping contract-dependent docs configuration and historical LoC comparisons explicitly incomplete is preferable to implying those capabilities work; complete and review those gaps separately.
</dd>
</dl>
</details>
<details>
<summary> Files changed (57) <code> +4077 / -104 </code> </summary>
<dl>
<dd>
<br/>
<details>
<summary>Enhancement (32) <code> +1459 / -56 </code></summary>
<dl>
<dd>
<details>
<summary>__init__.py<code>Re-export DocsTarget from context</code> <code>+2/-0</code></summary>
<br/>
>Re-export DocsTarget from context
><pre>
>• Makes the documentation target type available through the consumer-facing context package.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-96582525e0c80fdc224862c91b8fd18c2a81b59de0b49202c98f600c349217fb'>src/traust_core/v1/context/__init__.py</a>
</details>
<details>
<summary>benchmark.py<code>Expose benchmark Markdown functions</code> <code>+5/-0</code></summary>
<br/>
>Expose benchmark Markdown functions
><pre>
>• Re-exports the typed benchmark and scorecard renderers at the expected context import path.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-f4ec3a062595d4f393071febb09b90416d0497186bd744e3668ef33eb6b37bb8'>src/traust_core/v1/context/benchmark.py</a>
</details>
<details>
<summary>compliance_precision.py<code>Expose compliance precision rendering</code> <code>+3/-0</code></summary>
<br/>
>Expose compliance precision rendering
><pre>
>• Adds the consumer-facing import for the compliance precision Markdown renderer.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-bef9a2cb667aef90fb81bb8e612aae6073d7833e18f6fd25c95656aed2f171eb'>src/traust_core/v1/context/compliance_precision.py</a>
</details>
<details>
<summary>context.py<code>Wire documentation targets and insight views</code> <code>+42/-11</code></summary>
<br/>
>Wire documentation targets and insight views
><pre>
>• Validates explicitly supplied product documentation targets before provider registration. Reuses and registers the views needed for executive panels and container findings; file-based documentation configuration remains pending a contracts change.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-18a62a7c5b773efeea263d8fbef03b63d1a2bc1a91155735e5ddf82d0f3c14fa'>src/traust_core/v1/context/context.py</a>
</details>
<details>
<summary>tools.py<code>Pass documentation targets to the provider</code> <code>+9/-5</code></summary>
<br/>
>Pass documentation targets to the provider
><pre>
>• Threads the explicit product-to-DocsTarget mapping into the Red Hat documentation source instead of always supplying an empty mapping.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-0f3b187e3314ab24730106db5c09ae07ffa77a5a5f0016ce9aa5135ee3445ee2'>src/traust_core/v1/context/tools.py</a>
</details>
<details>
<summary>candidate_formats.py<code>Make suppressed SARIF intake optional</code> <code>+16/-4</code></summary>
<br/>
>Make suppressed SARIF intake optional
><pre>
>• Allows SARIF parsing to include suppressed results when requested while preserving the default exclusion.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-c93f44917eade5eaac9775c3ef40c81a23905ca5786d3c6408eeb79203198c6f'>src/traust_core/v1/models/candidate_formats.py</a>
</details>
<details>
<summary>dependencies.py<code>Define advisory impact export models</code> <code>+26/-1</code></summary>
<br/>
>Define advisory impact export models
><pre>
>• Adds typed export rows carrying classification, commit and package identity, native evidence, and the complete recorded document.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-29f713821560760f8a46cd80b19b18516db5a49afd398db31839b674564ba507'>src/traust_core/v1/models/dependencies.py</a>
</details>
<details>
<summary>detection_quality.py<code>Carry configurable precision gates in results</code> <code>+5/-1</code></summary>
<br/>
>Carry configurable precision gates in results
><pre>
>• Adds a validated gate to calibration and per-check results, and serializes computed precision and flag status.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-7405d85ded609bdaa4c5192836d4b85b664b7e61caaca21996b886279e8a9164'>src/traust_core/v1/models/detection_quality.py</a>
</details>
<details>
<summary>findings.py<code>Model verified fix timing and suppression intake</code> <code>+17/-1</code></summary>
<br/>
>Model verified fix timing and suppression intake
><pre>
>• Adds the severity-grouped verified-fix MTTA result and passes the SARIF-only suppression option through candidate parsing.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-d30bb132f2c899df0b9594fdc4ad91cb1f0233bec17c0f97bd64afa4720fa088'>src/traust_core/v1/models/findings.py</a>
</details>
<details>
<summary>insight.py<code>Define container and executive insight results</code> <code>+79/-0</code></summary>
<br/>
>Define container and executive insight results
><pre>
>• Adds container-findings, selectable executive-panel, isolation, and declared-IaC types. Extends LoC filters and results with an optional first-party estimate divisor.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-b0a0a982425aebf80119d8c1e9fef5fc82ab3452b7bb841773f33e59855ea31b'>src/traust_core/v1/models/insight.py</a>
</details>
<details>
<summary>inventory.py<code>Identify a repository ref's named line</code> <code>+15/-0</code></summary>
<br/>
>Identify a repository ref's named line
><pre>
>• Adds ref_line to group a default or named branch with matching bare commits without inferring ancestry from unrelated commits.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-e2f6dd665ad5ec3870da363ae7f819ae519231c9dbd58032d89997a83f6ab46d'>src/traust_core/v1/models/inventory.py</a>
</details>
<details>
<summary>ledger.py<code>Model historical document integrity results</code> <code>+22/-0</code></summary>
<br/>
>Model historical document integrity results
><pre>
>• Adds typed Merkle and signature problems, warnings, errors, and a computed pass result for document verification.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-4a3dbe10ae41fe3f87ee417e48bc0fa2c6fa314a2d0c12918ec23b9b5492b62c'>src/traust_core/v1/models/ledger.py</a>
</details>
<details>
<summary>pqc.py<code>Model per-ref PQC scan currency</code> <code>+10/-0</code></summary>
<br/>
>Model per-ref PQC scan currency
><pre>
>• Adds a result identifying the newest scan, its basis, and whether its pack matches the current scanner.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-2588463bb33d5dbabc5ff20fa7fe3aaa94c075f96a3047248abb7ffd70474dd8'>src/traust_core/v1/models/pqc.py</a>
</details>
<details>
<summary>remediation.py<code>Include ref identity in sweep entries</code> <code>+6/-1</code></summary>
<br/>
>Include ref identity in sweep entries
><pre>
>• Adds repository ref ID, branch name, and observed-versus-registered head source to verification worklist entries.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-d5e142d198a26f3cbf016ce56a564b52275f3d1d03b8eec64ad253b2175a18c2'>src/traust_core/v1/models/remediation.py</a>
</details>
<details>
<summary>compliance_sources.py<code>Validate documentation target path segments</code> <code>+11/-1</code></summary>
<br/>
>Validate documentation target path segments
><pre>
>• Checks product, version, and guide slugs for unsafe or duplicate values before constructing documentation requests.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-22ace20a391a192969dbfbe5e920539045f8afe395cbd968863924dc4d988a45'>src/traust_core/v1/providers/tools/compliance_sources.py</a>
</details>
<details>
<summary>__init__.py<code>Export plain Markdown cell escaping</code> <code>+2/-0</code></summary>
<br/>
>Export plain Markdown cell escaping
><pre>
>• Makes markdown_text available from the rendering package.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-62d3ede2acbd134b96bb239945f817cb18849ee26c9bd5b3a2a8755880bd723d'>src/traust_core/v1/rendering/__init__.py</a>
</details>
<details>
<summary>benchmark.py<code>Render benchmark runs and scorecards</code> <code>+166/-0</code></summary>
<br/>
>Render benchmark runs and scorecards
><pre>
>• Adds Markdown reports for recall cuts, target matches, adjudication, canaries, stability, and skipped targets. Distinguishes unavailable aggregate details and unmeasured rates.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-3cf0d07bc0c01950bc3305355ca976df7c3afcd344e2bfcc27e5e58a6371edc5'>src/traust_core/v1/rendering/benchmark.py</a>
</details>
<details>
<summary>compliance.py<code>Build per-assessment compliance reports</code> <code>+84/-0</code></summary>
<br/>
>Build per-assessment compliance reports
><pre>
>• Converts one compliance assessment document into sections for its target, coverage, skipped frameworks, control results, and evidence citations.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-1c91c531bc64b2f412e717cebfb860a4e08746bc6f63af60664c4b7d7a39676b'>src/traust_core/v1/rendering/compliance.py</a>
</details>
<details>
<summary>compliance_precision.py<code>Render compliance calibration results</code> <code>+39/-0</code></summary>
<br/>
>Render compliance calibration results
><pre>
>• Shows assessment population, review gate, and each check's firings, dismissals, precision, and flag in Markdown.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-cad0b926ed6eab6ae636da66170d9188a66b0a5ec47c955647286d7cf257edaf'>src/traust_core/v1/rendering/compliance_precision.py</a>
</details>
<details>
<summary>markdown.py<code>Escape untrusted structured Markdown text</code> <code>+6/-0</code></summary>
<br/>
>Escape untrusted structured Markdown text
><pre>
>• Adds a plain-text cell helper that removes hostile control characters and escapes HTML and Markdown syntax.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-75d3486ee53e79fc407eef9d74db6838b23c2729dce18cc798eb2deee392f881'>src/traust_core/v1/rendering/markdown.py</a>
</details>
<details>
<summary>assessment.py<code>Expose suppressed scan intake and panel reads</code> <code>+34/-1</code></summary>
<br/>
>Expose suppressed scan intake and panel reads
><pre>
>• Threads include_suppressed through scan recording. Adds latest default-line isolation review and cloud-config audit reads for executive panels.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-89865577782c26790d6b00dd07a6c526112cdcd7642abaf7456dca22e5e7fa54'>src/traust_core/v1/services/assessment.py</a>
</details>
<details>
<summary>compliance.py<code>Render a single compliance assessment</code> <code>+7/-0</code></summary>
<br/>
>Render a single compliance assessment
><pre>
>• Adds a service door returning Markdown bytes for a draft or recorded assessment document.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-abe917cf557b8c950d804e0f5c48a40a9f88f2e8ab901c1275de13d6055ca1ce'>src/traust_core/v1/services/compliance.py</a>
</details>
<details>
<summary>detection_quality.py<code>Bootstrap benchmarks and configure precision gates</code> <code>+73/-3</code></summary>
<br/>
>Bootstrap benchmarks and configure precision gates
><pre>
>• Harvests confirmed, located fixes into unadmitted benchmark targets without recording them. Accepts a validated compliance precision review gate and includes it in results.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-b51b287bf3f573c58ee8fd83155a4151ad27bd9a1c12f6d39ae99e3d957c7a49'>src/traust_core/v1/services/detection_quality.py</a>
</details>
<details>
<summary>exposure.py<code>Export recorded advisory impact evidence</code> <code>+55/-1</code></summary>
<br/>
>Export recorded advisory impact evidence
><pre>
>• Exports retained analyses for a recorded advisory with native documents, evidence, classifications, and repository refs without refreshing the advisory.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-649efa6a2bc66b08ec93f3ab1702b0ca7f1f011101891f872b61ee1dfa8d6b6a'>src/traust_core/v1/services/exposure.py</a>
</details>
<details>
<summary>facts.py<code>Support ref-specific finding folds</code> <code>+16/-5</code></summary>
<br/>
>Support ref-specific finding folds
><pre>
>• Lets finding facts classify decisions against a selected repository line while preserving the existing default-line behavior.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-f627bd1651219e63d70acd1be8360b218e6f4fa5058c7809b6307a64447edb28'>src/traust_core/v1/services/findings/facts.py</a>
</details>
<details>
<summary>service.py<code>Add findings-on-ref and verified-fix MTTA</code> <code>+57/-1</code></summary>
<br/>
>Add findings-on-ref and verified-fix MTTA
><pre>
>• Returns findings and resolution folded on a requested line. Calculates severity-grouped time to a standing validation- or verification-backed fix.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-009c4adddb40cd93a92a30814c9f64290098e45b3309a4cf5e7b58ae58bd654b'>src/traust_core/v1/services/findings/service.py</a>
</details>
<details>
<summary>insight.py<code>Compose container and executive insights</code> <code>+420/-0</code></summary>
<br/>
>Compose container and executive insights
><pre>
>• Adds a cumulative, image-scoped container findings view and optional ATT&CK, PQC, isolation, and IaC executive panels. Calculates an explicitly labeled first-party LoC estimate but rejects historical comparisons until historical reads exist.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-33baccc4b7229ac6a008e1deb9111adb23d99dc4414fb04187a3db0db1ce0f73'>src/traust_core/v1/services/insight.py</a>
</details>
<details>
<summary>ledger.py<code>Verify historical layer documents</code> <code>+34/-0</code></summary>
<br/>
>Verify historical layer documents
><pre>
>• Uses traust-ledger Merkle and required public-key signature checks on an in-memory findings layer, returning typed integrity problems.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-4bdbe781e90a6b7f808258d7e51a47bdf4475640d078528994d5d2023067047e'>src/traust_core/v1/services/ledger.py</a>
</details>
<details>
<summary>service.py<code>Report PQC scan state across refs</code> <code>+34/-1</code></summary>
<br/>
>Report PQC scan state across refs
><pre>
>• Returns the newest facts scan for each in-scope ref, including unscanned refs and an unknown currency when no scanner is available.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-027be81a8c2a2bbd8b1e8f7875c9cb175727fe55b3b278ec4e9d82b063c4597d'>src/traust_core/v1/services/pqc/service.py</a>
</details>
<details>
<summary>remediation.py<code>Sweep named branches and render worklists</code> <code>+138/-14</code></summary>
<br/>
>Sweep named branches and render worklists
><pre>
>• Extends verification sweeps to registered branch tips, separating line-specific findings, observations, and completed verifications. Adds a Markdown view of the same classified worklist.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-121ba6e02fa43c531f8660c422c27b3b075f3e4d890c049e467fe6e559222f9e'>src/traust_core/v1/services/remediation.py</a>
</details>
<details>
<summary>checks.py<code>Attach typed integrity to report validation</code> <code>+4/-0</code></summary>
<br/>
>Attach typed integrity to report validation
><pre>
>• Adds an optional document-verification result to report checks and leaves historical layer cryptography to the explicit verification path.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-858128a6106d790790a23791c2a4df98a85902bc0b7261ecee1e25bdf2cbbbc9'>src/traust_core/v1/services/reporting/checks.py</a>
</details>
<details>
<summary>service.py<code>Optionally verify layer signatures during validation</code> <code>+22/-5</code></summary>
<br/>
>Optionally verify layer signatures during validation
><pre>
>• Accepts a signing public key for report sweeps and verifies schema-valid historical layers, appending Merkle and signature findings to their validation results.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-18040b90c5c8627a3a6be6286bf34a2323e946b9e0b3830898f5f36df2bb9d87'>src/traust_core/v1/services/reporting/service.py</a>
</details>
</dd>
</dl>
</details>
<details>
<summary>Refactor (2) <code> +238 / -43 </code></summary>
<dl>
<dd>
<details>
<summary>redaction.py<code>Centralize secret detection rules</code> <code>+227/-0</code></summary>
<br/>
>Centralize secret detection rules
><pre>
>• Defines ordered publication and evidence rules with exact secret spans. Shares the former publication patterns with redaction while adding evidence-oriented patterns and payment-card validation.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-b44ddaca2f9a341dcb288560cec9bfcbed698965670d178e9108dcc5fdd11d3a'>src/traust_core/v1/models/redaction.py</a>
</details>
<details>
<summary>artifact_publishing.py<code>Read publication rules from SecretDetector</code> <code>+11/-43</code></summary>
<br/>
>Read publication rules from SecretDetector
><pre>
>• Replaces the redaction service's private regex catalog with the shared rule owner while retaining PEM and payment-card handling.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-79edf32bf9af96ec95faa4c0b1d09e30137055676c71661350a2e9a464ccae85'>src/traust_core/v1/services/artifact_publishing.py</a>
</details>
</dd>
</dl>
</details>
<details>
<summary>Tests (21) <code> +2369 / -4 </code></summary>
<dl>
<dd>
<details>
<summary>security-hardening-excerpt.html<code>Provide a realistic documentation excerpt</code> <code>+9/-0</code></summary>
<br/>
>Provide a realistic documentation excerpt
><pre>
>• Adds attributed guide markup for the local documentation transport and HTML-to-text regression test.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-3f67aea81e0a3ae4a08cdc60a7afdac1be659fe537bbeb2309ebf2c70e8ee070'>tests/fixtures/compliance/security-hardening-excerpt.html</a>
</details>
<details>
<summary>test_candidate_formats.py<code>Test suppressed SARIF parsing</code> <code>+18/-0</code></summary>
<br/>
>Test suppressed SARIF parsing
><pre>
>• Checks opt-in suppressed results retain their locations and that other candidate formats reject the option.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-f92db67a71047d085b1b6d24eb339b79df0f3c1cc5f517563855d5402d441ed1'>tests/v1/models/test_candidate_formats.py</a>
</details>
<details>
<summary>test_redaction.py<code>Test secret-rule spans and publication overlap</code> <code>+92/-0</code></summary>
<br/>
>Test secret-rule spans and publication overlap
><pre>
>• Covers exact evidence offsets, serialized keys, payment-card checks, publication-pattern compatibility, and overlapping matches.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-f7ba9a6e482dd3033856773e3121a621905e747b0cfa2522ffab6dfd354cffbb'>tests/v1/models/test_redaction.py</a>
</details>
<details>
<summary>test_compliance_sources.py<code>Test explicit docs targets and transport</code> <code>+287/-3</code></summary>
<br/>
>Test explicit docs targets and transport
><pre>
>• Exercises target validation and product registration against a local TLS documentation server. Marks file-configured target scenarios as pending the contracts schema change.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-2a84bc537b1a594ddc489536adaba27ae25fc7380d747110210c3a7b4445b6c1'>tests/v1/providers/tools/test_compliance_sources.py</a>
</details>
<details>
<summary>test_benchmark.py<code>Test benchmark Markdown populations and escaping</code> <code>+173/-0</code></summary>
<br/>
>Test benchmark Markdown populations and escaping
><pre>
>• Checks recall denominators, adjudication, canaries, stability, empty populations, recorded scorecards, and hostile cell content.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-75962cc36db0612399f7a469ad001ffcaf9e427987bb4ac1c3e8b7740f5e982e'>tests/v1/rendering/test_benchmark.py</a>
</details>
<details>
<summary>test_compliance_precision.py<code>Test precision Markdown and gate display</code> <code>+44/-0</code></summary>
<br/>
>Test precision Markdown and gate display
><pre>
>• Covers check flags, unmeasured populations, and escaping of hostile check IDs.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-3ed863aaa10af6d4420f197b82af9635ea4e659d7739bc3bc557e6d1dd9a8323'>tests/v1/rendering/test_compliance_precision.py</a>
</details>
<details>
<summary>test_on_ref.py<code>Test line-scoped findings and resolution</code> <code>+65/-0</code></summary>
<br/>
>Test line-scoped findings and resolution
><pre>
>• Checks that release and default lines retain their own findings and decisions, including empty and unknown refs.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-a8368e51ee61ec7e29aa46848b06a5e3018fc558986cfa1d7d8fa5e2f21a7a9b'>tests/v1/services/findings/test_on_ref.py</a>
</details>
<details>
<summary>test_rollups.py<code>Test evidence-backed fix timing</code> <code>+63/-0</code></summary>
<br/>
>Test evidence-backed fix timing
><pre>
>• Checks severity grouping, historical cutoffs, reopened findings, retracted fixes, and exclusion of human-only closures.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-dcea49489dedc887b7057ab8063e34d33a9dd312dd9e73dfcc09fe8f98344a5f'>tests/v1/services/findings/test_rollups.py</a>
</details>
<details>
<summary>test_signatures.py<code>Test historical Merkle and signature validation</code> <code>+307/-0</code></summary>
<br/>
>Test historical Merkle and signature validation
><pre>
>• Exercises historical signature formats, tampering, missing or wrong keys, unavailable cosign, schema gates, and mixed directory sweeps.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-bdbdf532770c04cf5206ab5342d549481a4be637f652896f35b3e4f083e35870'>tests/v1/services/reporting/test_signatures.py</a>
</details>
<details>
<summary>test_assessment_scan.py<code>Test suppressed SARIF review intake</code> <code>+26/-0</code></summary>
<br/>
>Test suppressed SARIF review intake
><pre>
>• Confirms opt-in suppressed results join the same idempotent scan without creating disposition decisions.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-e4c1704399151c3a16370d0818dc15a3e1541b9244040789557068853a9f94bb'>tests/v1/services/test_assessment_scan.py</a>
</details>
<details>
<summary>test_assessment_scan_boundary.py<code>Test suppressed intake atomicity</code> <code>+16/-0</code></summary>
<br/>
>Test suppressed intake atomicity
><pre>
>• Ensures an invalid included suppressed result leaves the assessment store unchanged.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-56e3c60b51b446a0a2a01af005387141f3ce57a758640bbd4ff925e0c202fa0b'>tests/v1/services/test_assessment_scan_boundary.py</a>
</details>
<details>
<summary>test_compliance_markdown.py<code>Test per-assessment compliance rendering</code> <code>+90/-0</code></summary>
<br/>
>Test per-assessment compliance rendering
><pre>
>• Checks target and coverage data, verdicts, citations, draft-versus-recorded parity, and hostile text containment.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-246024bfaf4fdaf75374e9e5bd861edf251464dfc7b275ee333f8dd4ff5617c4'>tests/v1/services/test_compliance_markdown.py</a>
</details>
<details>
<summary>test_detection_quality_bootstrap.py<code>Test unadmitted benchmark bootstrapping</code> <code>+116/-0</code></summary>
<br/>
>Test unadmitted benchmark bootstrapping
><pre>
>• Checks confirmed-fix selection, exclusions, deterministic ordering and split, path deduplication, and invalid limits.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-089bb454e9863a0943995000eb606ce86b1f525b279d10740030c38fba47a824'>tests/v1/services/test_detection_quality_bootstrap.py</a>
</details>
<details>
<summary>test_detection_quality_doors.py<code>Test configurable precision thresholds</code> <code>+25/-0</code></summary>
<br/>
>Test configurable precision thresholds
><pre>
>• Checks inclusive gate boundaries, serialized computed fields, shared defaults, and rejection of invalid gates.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-c0d5d947061f6727a7619489165eb02adec93cc3a97bd8d0fb9c69a8f3a08486'>tests/v1/services/test_detection_quality_doors.py</a>
</details>
<details>
<summary>test_detection_quality_regression_pairs.py<code>Permit unlocated regression-pair fixtures</code> <code>+4/-1</code></summary>
<br/>
>Permit unlocated regression-pair fixtures
><pre>
>• Adds a fixture option to omit a finding location so benchmark bootstrap exclusions can be tested.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-16691f3237e7fff7a12a1b9c7fc915dbcb4dba4d1adff8ed61fa594b79a7e207'>tests/v1/services/test_detection_quality_regression_pairs.py</a>
</details>
<details>
<summary>test_exposure_export.py<code>Test native advisory impact exports</code> <code>+231/-0</code></summary>
<br/>
>Test native advisory impact exports
><pre>
>• Checks classification and evidence preservation, advisory lookup, empty exports, and latest-record selection. Marks multi-package export coverage as pending.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-2abaaaf4db9357629cff733c686f7eba816f786d57cf72377af72db253341d45'>tests/v1/services/test_exposure_export.py</a>
</details>
<details>
<summary>test_insight_container_findings.py<code>Test cumulative container findings views</code> <code>+186/-0</code></summary>
<br/>
>Test cumulative container findings views
><pre>
>• Covers image-scoped report history, decision-driven state, historical cutoffs, anchor validation, and exclusion from full refreshes.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-8d23360aa452a5600f7812648b18acf40f997ce5ea9f984dd0b33704e3ceb34c'>tests/v1/services/test_insight_container_findings.py</a>
</details>
<details>
<summary>test_insight_executive_composition.py<code>Test selectable executive panels</code> <code>+223/-0</code></summary>
<br/>
>Test selectable executive panels
><pre>
>• Checks isolation and IaC document composition, ATT&CK and PQC embedding, historical PQC unavailability, empty panels, and missing wiring.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-10f59b43ba216a3ad80e34269fe6ab7dc23dc47c417e5a4aba5e6a0dca4a60f4'>tests/v1/services/test_insight_executive_composition.py</a>
</details>
<details>
<summary>test_insight_loc_history.py<code>Test LoC estimates and document history gap</code> <code>+200/-0</code></summary>
<br/>
>Test LoC estimates and document history gap
><pre>
>• Checks finite positive divisors and explicitly labeled estimates while asserting unsupported comparisons fail. Marks historical head and measurement selection as pending.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-f022cbb53ee3b0073b7baf0d567870f727a6b375faa0c9532d6ac35b47ce059b'>tests/v1/services/test_insight_loc_history.py</a>
</details>
<details>
<summary>test_pqc_scan_states.py<code>Test per-ref PQC scan currency</code> <code>+57/-0</code></summary>
<br/>
>Test per-ref PQC scan currency
><pre>
>• Covers unscanned refs, current and stale packs, unavailable scanners, fleet scope, and unknown products.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-830fcaf4906ebed83977d59c4136b606e7a904eef37014865617ab5a17cefc70'>tests/v1/services/test_pqc_scan_states.py</a>
</details>
<details>
<summary>test_verification.py<code>Test branch-aware verification worklists</code> <code>+137/-0</code></summary>
<br/>
>Test branch-aware verification worklists
><pre>
>• Checks separation of default and release evidence, observed branch heads, exclusion of unfinished verifications, ref fields, and Markdown worklist output.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-f02180b47476a1371813101b1371bf2511550fc71af7822b6c9a4c95392a5cc8'>tests/v1/services/test_verification.py</a>
</details>
</dd>
</dl>
</details>
<details>
<summary>Documentation (2) <code> +11 / -1 </code></summary>
<dl>
<dd>
<details>
<summary>README.md<code>Document the ported consumer doors</code> <code>+5/-1</code></summary>
<br/>
>Document the ported consumer doors
><pre>
>• Describes new rendering, secret detection, verification worklist, and historical signature APIs in the core capability table.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5'>README.md</a>
</details>
<details>
<summary>README.md<code>Attribute the documentation HTML fixture</code> <code>+6/-0</code></summary>
<br/>
>Attribute the documentation HTML fixture
><pre>
>• Records the source, license, retrieval date, and purpose of the added Red Hat guide excerpt.
></pre>
><a href='https://github.com/traust-security/traust-core/pull/366/files#diff-34b71f27237587872cc100652af286e95645c99ed96710b6a5c7934eaf303741'>tests/fixtures/compliance/README.md</a>
</details>
</dd>
</dl>
</details>
</dd>
</dl>
</details>
<h3>Code Review by Qodo</h3>
<code>🐞 Bugs (0)</code> <code>📘 Rule violations (0)</code> <code>📜 Skill insights (0)</code>
<img src="https://www.qodo.ai/wp-content/uploads/2025/11/light-grey-line.svg" height="10%" alt="Grey Divider">
<br/>
<img src="https://img.shields.io/badge/High-634FD1?style=flat-square" height="20px" alt="Action required">
<details>
<summary> 1. <s>Rejected suppressions hide scan findings</s> <code>✓ Resolved</code></summary>
<br/>
<p><b>Resolving commit:</b> <a href="https://github.com/traust-security/traust-core/commit/74aa7e722a6c14200847cb5969a9a6f7d06e91d0"><code>74aa7e7</code></a></p>
<details>
><summary>Resolution reason</summary>
><br/>
><pre>
>The filter now computes the suppression status first via _sarif_suppression and skips only when
>suppression["status"] == _STANDING (accepted), so rejected and underReview results are retained by
>default. Mixed-status requests are resolved by precedence (accepted > underReview > rejected), and
>Suppression.stands now returns True only for accepted. Regression tests cover each status and mixed
>cases. This differs from the suggested prompt in structure (it does not add a separate per-status
>mixed-case rule beyond precedence) but addresses the issue.
></pre>
></details>
<!-- qodo-finding-reference
<code>↗ src/traust_core/v1/models/candidate_formats.py[R99-100]</code>
-->
<details>
><summary>Description</summary>
><br/>
><pre>
><b><i>_sarif_run</i></b> skips every result with a nonempty <b><i>suppressions</i></b> array before <b><i>_sarif_suppression</i></b> can
>determine whether any suppression was rejected or remains under review. On a default scan import,
>those results never reach finding intake even though their suppression has not taken effect.
></pre>
></details>
<hr/>
</details>
<br/>
<img src="https://img.shields.io/badge/Medium-634FD1?style=flat-square" height="20px" alt="Remediation recommended">
<details>
<summary> 2. <s>Suppressed findings lose manual review</s> <code>✓ Resolved</code></summary>
<br/>
<p><b>Resolving commit:</b> <a href="https://github.com/traust-security/traust-core/commit/a2aa4a9cc75d6961e8de0d6b5ae2792e152f76b1"><code>a2aa4a9</code></a></p>
<details>
><summary>Resolution reason</summary>
><br/>
><pre>
>The suppression loop no longer uses the label-keyed dict to find each candidate's finding. It now
>iterates over <b><i>took</i></b>, pairs each candidate with its own <b><i>_take</i></b> result (finding_id), and only builds
><b><i>taken</i></b> for other uses. Two same-label candidates therefore each get their own finding, so the
>accepted suppression keeps its manual-review item. A regression test with two same-label candidates
>(one accepted-suppressed, one plain) was added. The fix does not add label-uniqueness validation as
>the suggested prompt proposes, but it resolves the same misassociation.
></pre>
></details>
<!-- qodo-finding-reference
<code>↗ src/traust_core/v1/services/findings/intake.py[R103-105]</code>
-->
<details>
><summary>Description</summary>
><br/>
><pre>
><b><i>accept</i></b> looks up each candidate’s finding through <b><i>taken[c.label]</i></b>, but that dictionary retains
>only the last finding when two candidates share a label. If a directly supplied accepted-suppression
>candidate precedes an unsuppressed candidate with the same label and a different fingerprint, the
>first finding is recorded without its manual-review item.
></pre>
></details>
<hr/>
</details>
<details>
<summary> 3. <s>Closed suppression reviews reopen on every rescan</s> <code>✓ Resolved</code></summary>
<br/>
<p><b>Resolving commit:</b> <a href="https://github.com/traust-security/traust-core/commit/74aa7e722a6c14200847cb5969a9a6f7d06e91d0"><code>74aa7e7</code></a></p>
<details>
><summary>Resolution reason</summary>
><br/>
><pre>
>accept() now checks uow.review_items.list_for_finding(finding_id) for an existing MANUAL_QUEUE item
>(pending or resolved) and only calls request() when none exists, matching the suggested fix. A
>regression test (test_a_closed_suppression_review_is_never_reopened_by_a_rescan) covers resolving
>the queued item and rescanning with include_suppressed=True, asserting the closed item is not
>reopened.
></pre>
></details>
<!-- qodo-finding-reference
<code>↗ src/traust_core/v1/services/findings/intake.py[R103-105]</code>
-->
<details>
><summary>Description</summary>
><br/>
><pre>
><b><i>accept</i></b> calls <b><i>request(uow, finding_id, ReviewReason.MANUAL_QUEUE)</i></b> with no decision id for every
>included suppressed candidate, and <b><i>request</i></b> only reuses an item that is still PENDING. Once a
>reviewer resolves the item, the next <b><i>record_scan(include_suppressed=True)</i></b> queues a fresh
>manual-review item for the same suppression, including a replay of the same assessment, which
><b><i>accept</i></b> documents as "adds nothing".
></pre>
></details>
<hr/>
</details>
<details>
<summary> 4. <s>Malformed suppressions crash scan imports</s> <code>✓ Resolved</code></summary>
<br/>
<p><b>Resolving commit:</b> <a href="https://github.com/traust-security/traust-core/commit/74aa7e722a6c14200847cb5969a9a6f7d06e91d0"><code>74aa7e7</code></a></p>
<details>
><summary>Resolution reason</summary>
><br/>
><pre>
>_sarif_suppression was rewritten to validate each suppression is a dict, that status is a string
>within the allowed set (raising ValidationError otherwise), and that justification is a string or
>None, all before any set insertion. Regression tests cover malformed statuses (including unhashable
>[] and None), non-string justification, non-list/non-dict entries, under both include_suppressed
>settings.
></pre>
></details>
<!-- qodo-finding-reference
<code>↗ src/traust_core/v1/models/candidate_formats.py[R145-146]</code>
-->
<details>
><summary>Description</summary>
><br/>
><pre>
><b><i>_sarif_suppression</i></b> puts scanner-provided status values into a set before validating their types,
>so a status such as <b><i>[]</i></b> raises an uncaught <b><i>TypeError</i></b>. When <b><i>record_scan</i></b> imports such a result
>with <b><i>include_suppressed=True</i></b>, parsing fails before finding intake and the invalid input does not
>produce a typed validation error.
></pre>
></details>
<hr/>
</details>
<details><summary><ins><strong>View medium (4)</strong></ins></summary><br/>
<details>
<summary> 5. <s>Suppressed scanner results become ordinary open findings</s> <code>✓ Resolved</code></summary>
<br/>
<p><b>Resolving commit:</b> <a href="https://github.com/traust-security/traust-core/commit/0d9cc60468719e2504ede62fc222dc8f1c1ace98"><code>0d9cc60</code></a></p>
<details>
><summary>Resolution reason</summary>
><br/>
><pre>
>The commit adds a suppression field to the candidate formats (_sarif_suppression computes status
>accepted/underReview/rejected plus justifications) and carries it through
>FindingCandidate.suppression. In intake.accept, any candidate whose suppression stands (not
>rejected) is queued for manual review via request(...,ReviewReason.MANUAL_QUEUE), so it no longer
>sits as plain open. This records the suppression and routes it to review, a different implementation
>from the suggested label/decision approach but addressing the same issue; a test confirms the queued
>review state.
></pre>
></details>
<!-- qodo-finding-reference
<code>↗ src/traust_core/v1/models/candidate_formats.py[R99-100]</code>
-->
<details>
><summary>Description</summary>
><br/>
><pre>
>With <b><i>include_suppressed=True</i></b>, <b><i>_sarif_run</i></b> stops skipping results that carry <b><i>suppressions</i></b>, but
>the <b><i>Fields</i></b> dict it yields has no suppression status or justification, so <b><i>record_scan</i></b> saves those
>results as ordinary candidates. Once recorded they count as open exposure in rollups, SLA queues,
>executive and sweep counts, and nothing records that the scanner had suppressed them, so the opt-in
>cannot be undone or filtered later.
></pre>
></details>
<hr/>
</details>
<details>
<summary> 6. <s>Benchmarks can expect post-fix paths</s> <code>✓ Resolved</code></summary>
<br/>
<p><b>Resolving commit:</b> <a href="https://github.com/traust-security/traust-core/commit/0d9cc60468719e2504ede62fc222dc8f1c1ace98"><code>0d9cc60</code></a></p>
<details>
><summary>Resolution reason</summary>
><br/>
><pre>
>The fix adds reported_locations to FindingFix, populated from the locations of the earlier report
>that the pre-fix commit was selected from (via the reported occurrence), and bootstrap_benchmark now
>derives paths from fix.reported_locations instead of view.locations. A later report that moves the
>finding no longer changes the expected paths. A regression test covers the fix-then-move scenario.
>The approach differs from the suggested prompt only in that it threads locations through FindingFix
>rather than re-querying per ref, but it addresses the same issue.
></pre>
></details>
<!-- qodo-finding-reference
<code>↗ src/traust_core/v1/services/detection_quality.py[R245-246]</code>
-->
<details>
><summary>Description</summary>
><br/>
><pre>
><b><i>bootstrap_benchmark</i></b> writes <b><i>view.locations</i></b> into the expected match for <b><i>pre_fix_sha</i></b>, although
>the view's locations come from the finding's latest occurrence rather than its selected pre-fix
>report. If a subsequent report moves that finding, the generated benchmark tests the earlier commit
>against paths from the later report.
></pre>
></details>
<hr/>
</details>
<details>
<summary> 7. <s>Compliance reports include injected links</s> <code>✓ Resolved</code></summary>
<br/>
<p><b>Resolving commit:</b> <a href="https://github.com/traust-security/traust-core/commit/0d9cc60468719e2504ede62fc222dc8f1c1ace98"><code>0d9cc60</code></a></p>
<details>
><summary>Resolution reason</summary>
><br/>
><pre>
>Adds assessment_markdown which runs every section heading, table cell and source string through
>markdown_text before rendering, and makes render_assessment use it. Also tightens markdown_text's
>escaping set (keeps # escaped removal aside, adds coverage for HTML/links via escape). Tests cover
>HTML tags and Markdown links in document values being rendered as plain text.
></pre>
></details>
<!-- qodo-finding-reference
<code>↗ src/traust_core/v1/rendering/compliance.py[R55-58]</code>
-->
<details>
><summary>Description</summary>
><br/>
><pre>
><b><i>assessment_report</i></b> inserts artifact result strings and evidence locators into Markdown tables
>without escaping Markdown or HTML syntax. A document containing an HTML tag or Markdown link retains
>that markup in the bytes returned by <b><i>render_assessment</i></b>, so a viewer that renders the report
>interprets it instead of displaying the field as plain text.
></pre>
></details>
<hr/>
</details>
<details>
<summary> 8. <s>Impact exports omit affected packages</s> <code>✓ Resolved</code></summary>
<br/>
<p><b>Resolving commit:</b> <a href="https://github.com/traust-security/traust-core/commit/0d9cc60468719e2504ede62fc222dc8f1c1ace98"><code>0d9cc60</code></a></p>
<details>
><summary>Resolution reason</summary>
><br/>
><pre>
>export_impacts now calls a new _latest_members helper instead of _latest(..., None). The helper keys
>the latest analysis by repository ref, advisory, ecosystem, module, and affected package version, so
>distinct package/version analyses for the same commit and advisory are retained. The test that was
>parked as a todo is un-parked and rewritten to assert one latest document per module and version.
>This is a different implementation from the suggested fix only in that it keys on ecosystem as well,
>and it does not touch the shared _latest helper, but it addresses the finding's core issue.
></pre>
></details>
<!-- qodo-finding-reference
<code>↗ src/traust_core/v1/services/exposure.py[R1246-1249]</code>
-->
<details>
><summary>Description</summary>
><br/>
><pre>
><b><i>export_impacts</i></b> passes its recorded analyses through <b><i>_latest</i></b>, whose key contains only the
>repository ref and advisory, not the module or version. When a commit has multiple affected packages
>or versions, the export keeps just one verdict and understates its analyses and classifications.
></pre>
></details>
<hr/>
</details>
</details>
<br/>
<img src="https://img.shields.io/badge/Low-634FD1?style=flat-square" height="20px" alt="Informational">
<details>
<summary> 9. <s>Verification sweeps re-read every report</s> <code>✓ Resolved</code></summary>
<br/>
<p><b>Resolving commit:</b> <a href="https://github.com/traust-security/traust-core/commit/0d9cc60468719e2504ede62fc222dc8f1c1ace98"><code>0d9cc60</code></a></p>
<details>
><summary>Resolution reason</summary>
><br/>
><pre>
>The commit moves the verification-id computation out of _sweep_entry: sweep now computes
verified =
>{v.verification_id for v in self._verifications(repository_id)} once per repository (line 1241 in>the diff) and passes the set into _sweep_entry for both default and branch entries, so branch
>entries no longer re-read verifications. Branch entries also only weigh their own line's evidence.
>This addresses the repeated per-branch reads, though it still calls _verifications once per
>repository rather than using the assessment-kind-only check the finding mentions.
></pre>
></details>
<!-- qodo-finding-reference
<code>↗ src/traust_core/v1/services/remediation.py[R1365-1366]</code>
-->
<details>
><summary>Description</summary>
><br/>
><pre>
><b><i>_sweep_entry</i></b> now calls <b><i>self._verifications(repository_id)</i></b> to collect verification ids. For every
>verification run, that method reads the stored artifact through <b><i>self._publisher.read</i></b>, loads all of
>the repository's decisions and occurrences, and pages through every work item. With
><b><i>include_branches=True</i></b> this repeats for each branch entry, along with a full <b><i>on_ref</i></b> finding fold
>per branch, so a fleet sweep's cost grows with repositories × branches × verification history. It
>previously needed only an assessment-kind check.
></pre>
></details>
<hr/>
</details>
<img src="https://www.qodo.ai/wp-content/uploads/2025/11/light-grey-line.svg" height="10%" alt="Grey Divider">
<!-- qodo-self-review-slot -->
<!-- qodo-context:start -->
<details><summary><strong>Context sources</strong></summary>
<div>❌ Tickets: failed to load — Ticket collection could not establish complete evidence</div>
<div>Review mode: <code>Auto: ⚖️ Balanced</code>: Suppression-state logic gates finding visibility and review queueing; real risk.</div>
<div>✅ Fix-loop round: <code>fix loop</code></div>
<!-- qodo-context:end -->
</details>
<img src="https://www.qodo.ai/wp-content/uploads/2025/11/light-grey-line.svg" height="10%" alt="Grey Divider">
<!-- qodo-daily-tip:start -->
<details>
<summary><strong>Tip of the day</strong></summary>
<br/>
<pre>💡 Did you know, you can turn these tips off under Display > Comment parts</pre>
<a href="https://docs.qodo.ai/tips-and-tricks">More tips ↗</a> | <a href="https://app.qodo.ai/configurations?tab=display-preferences">Customize Qodo ↗</a> | <a href="https://docs.qodo.ai">Qodo docs ↗</a>
</details>
<img src="https://www.qodo.ai/wp-content/uploads/2025/11/light-grey-line.svg" height="10%" alt="Grey Divider">
<!-- qodo-daily-tip:end -->
<!-- https://github.com/traust-security/traust-core/commit/a2aa4a9cc75d6961e8de0d6b5ae2792e152f76b1 -->
<!-- qodo-previous-reviews:start -->
<!-- FOLDED_SECTION_START -->
<details>
<summary><strong>Previous reviews</strong></summary>
<br/>
Review updated until commit <a href="https://github.com/traust-security/traust-core/commit/a2aa4a9cc75d6961e8de0d6b5ae2792e152f76b1">a2aa4a9</a>
<details><summary>Results up to commit 1ddb4a0 <code>🧠 Deep</code></summary>
<br><code>🐞 Bugs (0)</code> <code>📘 Rule violations (0)</code> <code>📎 Requirement gaps (0)</code> <code>🎨 UX issues (0)</code> <code>🔗 Cross-repo conflicts (0)</code> <code>📜 Skill insights (0)</code>
<br/>
<img src="https://img.shields.io/badge/Medium-634FD1?style=flat-square" height="20px" alt="Remediation recommended">
<details>
<summary> 1. <s>Impact exports omit affected packages</s> <code>✓ Resolved</code></summary>
<br/>
<p><b>Resolving commit:</b> <a href="https://github.com/traust-security/traust-core/commit/0d9cc60468719e2504ede62fc222dc8f1c1ace98"><code>0d9cc60</code></a></p>
<details>
><summary>Resolution reason</summary>
><br/>
><pre>
>export_impacts now calls a new _latest_members helper instead of _latest(..., None). The helper keys
>the latest analysis by repository ref, advisory, ecosystem, module, and affected package version, so
>distinct package/version analyses for the same commit and advisory are retained. The test that was
>parked as a todo is un-parked and rewritten to assert one latest document per module and version.
>This is a different implementation from the suggested fix only in that it keys on ecosystem as well,
>and it does not touch the shared _latest helper, but it addresses the finding's core issue.
></pre>
></details>
<!-- qodo-finding-reference
<code>↗ src/traust_core/v1/services/exposure.py[R1246-1249]</code>
-->
<details>
><summary>Description</summary>
><br/>
><pre>
><b><i>export_impacts</i></b> passes its recorded analyses through <b><i>_latest</i></b>, whose key contains only the
>repository ref and advisory, not the module or version. When a commit has multiple affected packages
>or versions, the export keeps just one verdict and understates its analyses and classifications.
></pre>
></details>
<hr/>
</details>
<details>
<summary> 2. <s>Suppressed scanner results become ordinary open findings</s> <code>✓ Resolved</code></summary>
<br/>
<p><b>Resolving commit:</b> <a href="https://github.com/traust-security/traust-core/commit/0d9cc60468719e2504ede62fc222dc8f1c1ace98"><code>0d9cc60</code></a></p>
<details>
><summary>Resolution reason</summary>
><br/>
><pre>
>The commit adds a suppression field to the candidate formats (_sarif_suppression computes status
>accepted/underReview/rejected plus justifications) and carries it through
>FindingCandidate.suppression. In intake.accept, any candidate whose suppression stands (not
>rejected) is queued for manual review via request(...,ReviewReason.MANUAL_QUEUE), so it no longer
>sits as plain open. This records the suppression and routes it to review, a different implementation
>from the suggested label/decision approach but addressing the same issue; a test confirms the queued
>review state.
></pre>
></details>
<!-- qodo-finding-reference
<code>↗ src/traust_core/v1/models/candidate_formats.py[R99-100]</code>
-->
<details>
><summary>Description</summary>
><br/>
><pre>
>With <b><i>include_suppressed=True</i></b>, <b><i>_sarif_run</i></b> stops skipping results that carry <b><i>suppressions</i></b>, but
>the <b><i>Fields</i></b> dict it yields has no suppression status or justification, so <b><i>record_scan</i></b> saves those
>results as ordinary candidates. Once recorded they count as open exposure in rollups, SLA queues,
>executive and sweep counts, and nothing records that the scanner had suppressed them, so the opt-in
>cannot be undone or filtered later.
></pre>
></details>
<hr/>
</details>
<details>
<summary> 3. <s>Benchmarks can expect post-fix paths</s> <code>✓ Resolved</code></summary>
<br/>
<p><b>Resolving commit:</b> <a href="https://github.com/traust-security/traust-core/commit/0d9cc60468719e2504ede62fc222dc8f1c1ace98"><code>0d9cc60</code></a></p>
<details>
><summary>Resolution reason</summary>
><br/>
><pre>
>The fix adds reported_locations to FindingFix, populated from the locations of the earlier report
>that the pre-fix commit was selected from (via the reported occurrence), and bootstrap_benchmark now
>derives paths from fix.reported_locations instead of view.locations. A later report that moves the
>finding no longer changes the expected paths. A regression test covers the fix-then-move scenario.
>The approach differs from the suggested prompt only in that it threads locations through FindingFix
>rather than re-querying per ref, but it addresses the same issue.
></pre>
></details>
<!-- qodo-finding-reference
<code>↗ src/traust_core/v1/services/detection_quality.py[R245-246]</code>
-->
<details>
><summary>Description</summary>
><br/>
><pre>
><b><i>bootstrap_benchmark</i></b> writes <b><i>view.locations</i></b> into the expected match for <b><i>pre_fix_sha</i></b>, although
>the view's locations come from the finding's latest occurrence rather than its selected pre-fix
>report. If a subsequent report moves that finding, the generated benchmark tests the earlier commit
>against paths from the later report.
></pre>
></details>
<hr/>
</details>
<details><summary><ins><strong>View medium (1)</strong></ins></summary><br/>
<details>
<summary> 4. <s>Compliance reports include injected links</s> <code>✓ Resolved</code></summary>
<br/>
<p><b>Resolving commit:</b> <a href="https://github.com/traust-security/traust-core/commit/0d9cc60468719e2504ede62fc222dc8f1c1ace98"><code>0d9cc60</code></a></p>
<details>
><summary>Resolution reason</summary>
><br/>
><pre>
>Adds assessment_markdown which runs every section heading, table cell and source string through
>markdown_text before rendering, and makes render_assessment use it. Also tightens markdown_text's
>escaping set (keeps # escaped removal aside, adds coverage for HTML/links via escape). Tests cover
>HTML tags and Markdown links in document values being rendered as plain text.
></pre>
></details>
<!-- qodo-finding-reference
<code>↗ src/traust_core/v1/rendering/compliance.py[R55-58]</code>
-->
<details>
><summary>Description</summary>
><br/>
><pre>
><b><i>assessment_report</i></b> inserts artifact result strings and evidence locators into Markdown tables
>without escaping Markdown or HTML syntax. A document containing an HTML tag or Markdown link retains
>that markup in the bytes returned by <b><i>render_assessment</i></b>, so a viewer that renders the report
>interprets it instead of displaying the field as plain text.
></pre>
></details>
<hr/>
</details>
</details>
<br/>
<img src="https://img.shields.io/badge/Low-634FD1?style=flat-square" height="20px" alt="Informational">
<details>
<summary> 5. <s>Verification sweeps re-read every report</s> <code>✓ Resolved</code></summary>
<br/>
<p><b>Resolving commit:</b> <a href="https://github.com/traust-security/traust-core/commit/0d9cc60468719e2504ede62fc222dc8f1c1ace98"><code>0d9cc60</code></a></p>
<details>
><summary>Resolution reason</summary>
><br/>
><pre>
>The commit moves the verification-id computation out of _sweep_entry: sweep now computes
verified =
>{v.verification_id for v in self._verifications(repository_id)} once per repository (line 1241 in>the diff) and passes the set into _sweep_entry for both default and branch entries, so branch
>entries no longer re-read verifications. Branch entries also only weigh their own line's evidence.
>This addresses the repeated per-branch reads, though it still calls _verifications once per
>repository rather than using the assessment-kind-only check the finding mentions.
></pre>
></details>
<!-- qodo-finding-reference
<code>↗ src/traust_core/v1/services/remediation.py[R1365-1366]</code>
-->
<details>
><summary>Description</summary>
><br/>
><pre>
><b><i>_sweep_entry</i></b> now calls <b><i>self._verifications(repository_id)</i></b> to collect verification ids. For every
>verification run, that method reads the stored artifact through <b><i>self._publisher.read</i></b>, loads all of
>the repository's decisions and occurrences, and pages through every work item. With
><b><i>include_branches=True</i></b> this repeats for each branch entry, along with a full <b><i>on_ref</i></b> finding fold
>per branch, so a fleet sweep's cost grows with repositories × branches × verification history. It
>previously needed only an assessment-kind check.
></pre>
></details>
<hr/>
</details>
<!-- qodo-self-review-slot -->
</details>
<details><summary>Results up to commit 0d9cc60 <code>🧠 Deep</code></summary>
<br><code>🐞 Bugs (0)</code> <code>📘 Rule violations (0)</code> <code>📎 Requirement gaps (0)</code> <code>🎨 UX issues (0)</code> <code>🔗 Cross-repo conflicts (0)</code> <code>📜 Skill insights (0)</code>
<br/>
<img src="https://img.shields.io/badge/High-634FD1?style=flat-square" height="20px" alt="Action required">
<details>
<summary> 1. <s>Rejected suppressions hide scan findings</s> <code>✓ Resolved</code></summary>
<br/>
<p><b>Resolving commit:</b> <a href="https://github.com/traust-security/traust-core/commit/74aa7e722a6c14200847cb5969a9a6f7d06e91d0"><code>74aa7e7</code></a></p>
<details>
><summary>Resolution reason</summary>
><br/>
><pre>
>The filter now computes the suppression status first via _sarif_suppression and skips only when
>suppression["status"] == _STANDING (accepted), so rejected and underReview results are retained by
>default. Mixed-status requests are resolved by precedence (accepted > underReview > rejected), and
>Suppression.stands now returns True only for accepted. Regression tests cover each status and mixed
>cases. This differs from the suggested prompt in structure (it does not add a separate per-status
>mixed-case rule beyond precedence) but addresses the issue.
></pre>
></details>
<!-- qodo-finding-reference
<code>↗ src/traust_core/v1/models/candidate_formats.py[R99-100]</code>
-->
<details>
><summary>Description</summary>
><br/>
><pre>
><b><i>_sarif_run</i></b> skips every result with a nonempty <b><i>suppressions</i></b> array before <b><i>_sarif_suppression</i></b> can
>determine whether any suppression was rejected or remains under review. On a default scan import,
>those results never reach finding intake even though their suppression has not taken effect.
></pre>
></details>
<hr/>
</details>
<br/>
<img src="https://img.shields.io/badge/Medium-634FD1?style=flat-square" height="20px" alt="Remediation recommended">
<details>
<summary> 2. <s>Closed suppression reviews reopen on every rescan</s> <code>✓ Resolved</code></summary>
<br/>
<p><b>Resolving commit:</b> <a href="https://github.com/traust-security/traust-core/commit/74aa7e722a6c14200847cb5969a9a6f7d06e91d0"><code>74aa7e7</code></a></p>
<details>
><summary>Resolution reason</summary>
><br/>
><pre>
>accept() now checks uow.review_items.list_for_finding(finding_id) for an existing MANUAL_QUEUE item
>(pending or resolved) and only calls request() when none exists, matching the suggested fix. A
>regression test (test_a_closed_suppression_review_is_never_reopened_by_a_rescan) covers resolving
>the queued item and rescanning with include_suppressed=True, asserting the closed item is not
>reopened.
></pre>
></details>
<!-- qodo-finding-reference
<code>↗ src/traust_core/v1/services/findings/intake.py[R103-105]</code>
-->
<details>
><summary>Description</summary>
><br/>
><pre>
><b><i>accept</i></b> calls <b><i>request(uow, finding_id, ReviewReason.MANUAL_QUEUE)</i></b> with no decision id for every
>included suppressed candidate, and <b><i>request</i></b> only reuses an item that is still PENDING. Once a
>reviewer resolves the item, the next <b><i>record_scan(include_suppressed=True)</i></b> queues a fresh
>manual-review item for the same suppression, including a replay of the same assessment, which
><b><i>accept</i></b> documents as "adds nothing".
></pre>
></details>
<hr/>
</details>
<details>
<summary> 3. <s>Malformed suppressions crash scan imports</s> <code>✓ Resolved</code></summary>
<br/>
<p><b>Resolving commit:</b> <a href="https://github.com/traust-security/traust-core/commit/74aa7e722a6c14200847cb5969a9a6f7d06e91d0"><code>74aa7e7</code></a></p>
<details>
><summary>Resolution reason</summary>
><br/>
><pre>
>_sarif_suppression was rewritten to validate each suppression is a dict, that status is a string
>within the allowed set (raising ValidationError otherwise), and that justification is a string or
>None, all before any set insertion. Regression tests cover malformed statuses (including unhashable
>[] and None), non-string justification, non-list/non-dict entries, under both include_suppressed
>settings.
></pre>
></details>
<!-- qodo-finding-reference
<code>↗ src/traust_core/v1/models/candidate_formats.py[R145-146]</code>
-->
<details>
><summary>Description</summary>
><br/>
><pre>
><b><i>_sarif_suppression</i></b> puts scanner-provided status values into a set before validating their types,
>so a status such as <b><i>[]</i></b> raises an uncaught <b><i>TypeError</i></b>. When <b><i>record_scan</i></b> imports such a result
>with <b><i>include_suppressed=True</i></b>, parsing fails before finding intake and the invalid input does not
>produce a typed validation error.
></pre>
></details>
<hr/>
</details>
<!-- qodo-self-review-slot -->
</details>
<details><summary>Results up to commit 74aa7e7 <code>⚖️ Balanced</code></summary>
<br><code>🐞 Bugs (0)</code> <code>📘 Rule violations (0)</code> <code>📎 Requirement gaps (0)</code> <code>🎨 UX issues (0)</code> <code>🔗 Cross-repo conflicts (0)</code> <code>📜 Skill insights (0)</code>
<br/>
<img src="https://img.shields.io/badge/Medium-634FD1?style=flat-square" height="20px" alt="Remediation recommended">
<details>
<summary> 1. <s>Suppressed findings lose manual review</s> <code>✓ Resolved</code></summary>
<br/>
<p><b>Resolving commit:</b> <a href="https://github.com/traust-security/traust-core/commit/a2aa4a9cc75d6961e8de0d6b5ae2792e152f76b1"><code>a2aa4a9</code></a></p>
<details>
><summary>Resolution reason</summary>
><br/>
><pre>
>The suppression loop no longer uses the label-keyed dict to find each candidate's finding. It now
>iterates over <b><i>took</i></b>, pairs each candidate with its own <b><i>_take</i></b> result (finding_id), and only builds
><b><i>taken</i></b> for other uses. Two same-label candidates therefore each get their own finding, so the
>accepted suppression keeps its manual-review item. A regression test with two same-label candidates
>(one accepted-suppressed, one plain) was added. The fix does not add label-uniqueness validation as
>the suggested prompt proposes, but it resolves the same misassociation.
></pre>
></details>
<!-- qodo-finding-reference
<code>↗ src/traust_core/v1/services/findings/intake.py[R103-105]</code>
-->
<details>
><summary>Description</summary>
><br/>
><pre>
><b><i>accept</i></b> looks up each candidate’s finding through <b><i>taken[c.label]</i></b>, but that dictionary retains
>only the last finding when two candidates share a label. If a directly supplied accepted-suppression
>candidate precedes an unsuppressed candidate with the same label and a different fingerprint, the
>first finding is recorded without its manual-review item.
></pre>
></details>
<hr/>
</details>
<!-- qodo-self-review-slot -->
</details>
</details>
<img src="https://www.qodo.ai/wp-content/uploads/2025/11/light-grey-line.svg" height="10%" alt="Grey Divider">
<!-- qodo-previous-reviews:end -->
<a href="https://www.qodo.ai"><img src="https://www.qodo.ai/wp-content/uploads/2025/03/qodo-logo.svg" width="80" alt="Qodo Logo"></a>
<h3>Code Review by Qodo</h3>
<br/>
<img src="https://img.shields.io/badge/High-634FD1?style=flat-square" height="20px" alt="Action required">
_Nice, no open findings for this group_
<br/>
<img src="https://img.shields.io/badge/Medium-634FD1?style=flat-square" height="20px" alt="Remediation recommended">
_Nice, no open findings for this group_
<br/>
<img src="https://img.shields.io/badge/Low-634FD1?style=flat-square" height="20px" alt="Informational">
_Nice, no open findings for this group_
<br/>
<!-- qodo-self-review-slot -->
<!-- https://github.com/traust-security/traust-core/commit/a2aa4a9cc75d6961e8de0d6b5ae2792e152f76b1 -->
how many more elif do we need :joy:
Qodo's two reviews of 1ddb4a02, all addressed in 0d9cc604. Each fix has a regression test that fails on 1ddb4a02.
Security
render_assessment now goes through rendering.compliance.assessment_markdown, which escapes every cell, heading and source with markdown_text. Test: test_injected_html_and_links_in_document_values_render_as_plain_text. markdown_text no longer escapes #, which is literal mid-line.validate_reports now normalizes layer#… to layer, so a fragment-qualified layer schema still requires the signature. Test: test_a_fragment_qualified_layer_schema_still_requires_the_signature (covers unsigned and tampered input).Correctness
export_impacts keeps the latest analysis per (ref, advisory, ecosystem, module, version), through an export-only _latest_members. Existing callers of _latest are untouched. The parked multi-package test is enabled and rebuilt on development's single-input prepare.FindingFix.reported_locations carries the chosen pre-fix occurrence's locations, and bootstrap_benchmark expects those.Suppression(status, justification), following SARIF (accepted, under review, rejected). Intake raises a pending manual_queue review item for every suppression that isn't rejected.- Still open: these findings count as open in rollups until someone decides them, and the justification isn't stored, which would need a schema change.
verified_fix_mtta counts only resolutions on the line the disposition folds (models.findings.folded_resolutions).sweep(ids) without include_branches no longer filters verified, pinned or claims by line. Only the branch entries that include_branches adds are filtered. Test: test_default_sweep_weighs_off_line_verifications_and_claims_as_development_did. It also passes on an origin/development checkout.CheckPrecision accepts precision/flagged on input, recomputes them, and refuses a mismatch. Round trips through dict and JSON are tested for both models.scope_id isn't required at the pinned contracts, so the scope line is left out when it's absent, instead of raising KeyError.Performance
test_a_branch_sweep_reads_each_repositorys_verifications_once.FindingService.fixes_by_fingerprint(validity, batch) folds limit findings at a time in the same order, so bootstrap stops early.Checks: make lint and make test pass (11,149 passed, 19 skipped). traust's call shapes still bind to every ported door.
🤖 Generated with Claude Code
Code review by qodo was updated up to the latest commit https://github.com/traust-security/traust-core/commit/0d9cc60468719e2504ede62fc222dc8f1c1ace98
come on, who doesn't love an elif? It's the new "go to."
Qodo's re-review of 0d9cc604, all addressed in 74aa7e72. Each fix has a regression test that fails on 0d9cc604.
Scanner suppressions
accepted, or no status. Results whose suppressions are all underReview or rejected import as ordinary findings. underReview doesn't count as standing, because SARIF 2.1.0 §3.35.3 says the team is still deciding. With include_suppressed=True, only standing suppressions get a review item.- Tests:
test_by_default_only_a_standing_suppression_hides_a_result (5 cases) and test_an_under_review_suppression_is_an_ordinary_result_and_queues_nothing.ValidationError, on default imports too:- a non-string
status or justification;- a suppression that isn't an object;
-
suppressions that isn't an array;- a status outside
accepted, underReview, rejected (for example underreview).- Test:
test_a_malformed_suppression_is_refused.manual_queue item only if the finding has none in any status, closed included, using the existing review_items.list_for_finding query. A replay or a later rescan adds nothing. Test: test_a_closed_suppression_review_is_never_reopened_by_a_rescan.Sweep
sweep(ids) again takes its verification runs from the kind == VERIFICATION assessment rows, as development does, and reads no reports. Branch entries read completed verifications once per repository, and only when the repository has branches.- Runs with a verdict but no report count toward
verified_at_head and pinned_sha again. A run with neither a report nor decisions is left out, which the existing test_unfinished_verification_assessment_is_not_a_completed_result requires.- Tests:
test_a_default_sweep_reads_no_verification_reports and test_a_default_sweep_counts_a_verdicted_run_without_a_report_as_development_did. Both pass on an origin/development checkout.Impact export
metadata.ecosystem or "go", because the impact-analysis schema treats an omitted ecosystem as Go. Test: test_a_document_omitting_its_go_ecosystem_is_the_same_package_as_one_naming_it.Checks: make lint and make test pass (11,171 passed, 19 skipped). No existing test changed. traust's call shapes still bind to every ported door.
🤖 Generated with Claude Code
Code review by qodo was updated up to the latest commit https://github.com/traust-security/traust-core/commit/74aa7e722a6c14200847cb5969a9a6f7d06e91d0
Code review by qodo was updated up to the latest commit https://github.com/traust-security/traust-core/commit/a2aa4a9cc75d6961e8de0d6b5ae2792e152f76b1
smith-xyz
chubirka
Plan:
plans/traust-standardization/11-consumer-adoption/15-michele-traust-runs-on-core-development.md(progress-tracker)traust
developmentpins coref950dd6, a side-branch commit carrying the core half of traust#355, which was core#346, closed unmerged. Against coredevelopment, every traust command fails while loading. This PR is step 1 of the plan. It ports into core only the pieces that are genuinely missing, the 18 PORT rows of the plan's gap map, into the doors the api-spec names. It keeps the names and signatures traust calls. Step 2 is a traust PR that moves traust onto the doors core already has, drops what the data model retired, and moves the pin here.Ported (rows of the gap map)
-
rendering/benchmark.py(benchmark_markdown,scorecards_markdown) (1)-
DetectionQualityService.bootstrap_benchmark(2)-
rendering/compliance_precision.py(3)-
calibrate_compliance(gate=), withprecisionandflaggedserialized (4)-
FindingService.on_ref(11)-
verified_fix_mtta(12)-
DocsTarget.validate,Context.register_compliance_sources(targets), and theDocsTargetre-export (16, partial)-
ComplianceService.render_assessmentandrendering/compliance.py(17)ImpactExportandExposureService.export_impacts(19, partial)-
sweep(ids, include_branches), withSweepEntryref fields (25)-
sweep_markdown(24)validate_reports(signing_pubkey=), built overLedgerService.verify_documentand traust-ledger's Merkle checks (26)- executive panels (
ExecutivePanel,ViewFilter.executive_panels,AssessmentService.isolation_reviewsandcloud_config_audits) (38)-
ViewName.CONTAINER_FINDINGS(40, without the claim call)- LoC
first_party_divisor(41, partial)PqcScanStateandPqcService.scan_states(48)record_scan(include_suppressed=)(55)models/redaction.pySecretDetector, now the single owner of the secret patternsRedactionPolicyreads (56). Its 17 publication rules equal the old_PATTERNSexactly.Not ported
- CVE replay (7)
- claim correction (10)
- liveness and the contracts pin (31)
- the pqc-scan adapter (52)
Partial ports, each marked with a
NEED:ComplianceConfig.docs_targetsneeds the traust.yamlcompliancekey, which contracts adds in44a2825(decision 3). Until then, targets are passed explicitly. The marker isNEED(contracts: traust.yaml compliance.docs_targets).development's rule of one latest analysis per commit and advisory. The multi-package snapshot fromf950dd6is a separate change.compare_as_ofis refused with a typedValidationErroruntil historical LoC reads exist. The marker isNEED(core: historical LoC reads).f950dd6behaviour that isn't a gap-map row:- the branch-baseline change on the record path;
- per-finding container descriptions, which an existing test refuses.
Tests
f950dd6's tests and re-pointed atdevelopment's models, plus edge cases: hostile input, empty scopes, typed errors and unwired panels.@pytest.mark.todo: 6 need the contractscompliancekey, 1 needs the multi-package impact snapshot, and 1 needs historical LoC reads.Changed tests
tests/v1/services/test_detection_quality_regression_pairs.py: theLedger.findinghelper gains an optionallocated: bool = True. The default keeps every existing case unchanged;f950dd6added the same flag for the ported scenarios.Checks
make lintandmake testpass: 11,129 passed, 20 skipped. Coverage is 95.4%.🤖 Generated with Claude Code