Skip to main content

allow_report/
lib.rs

1//! Human and machine artifact rendering for cargo-allow.
2//!
3//! This crate renders reports, receipts, PR summaries, explanations, lists,
4//! worklists, migration summaries, SARIF, and HTML while preserving the
5//! source-tree claim boundary. Renderers describe what cargo-allow scanned and
6//! what it did not execute; they do not perform scanning or validation.
7
8mod add;
9#[cfg(test)]
10mod add_tests;
11mod allow_entry_json;
12#[cfg(test)]
13mod allow_entry_json_tests;
14mod artifacts;
15mod audit_remediation;
16mod contracts;
17mod diff;
18mod diff_human;
19mod diff_json;
20mod diff_markdown;
21mod diff_policy_detail;
22mod diff_posture;
23mod doctor;
24#[cfg(test)]
25mod doctor_tests;
26mod evidence_reference_human;
27mod evidence_repair;
28mod explain;
29mod explain_common;
30mod explain_human;
31mod explain_json;
32#[cfg(test)]
33mod explain_tests;
34mod html;
35#[cfg(test)]
36mod html_tests;
37mod json;
38#[cfg(test)]
39mod json_tests;
40mod list;
41#[cfg(test)]
42mod list_tests;
43mod migrate;
44#[cfg(test)]
45mod migrate_tests;
46mod non_rust;
47mod path_text;
48#[cfg(test)]
49mod path_text_tests;
50mod propose;
51#[cfg(test)]
52mod propose_tests;
53mod prune;
54#[cfg(test)]
55mod prune_tests;
56mod receipt;
57#[cfg(test)]
58mod receipt_tests;
59mod report_json;
60mod report_text;
61mod sarif;
62#[cfg(test)]
63mod sarif_tests;
64mod source_inventory;
65mod summary;
66mod text;
67mod worklist;
68mod worklist_human;
69mod worklist_json;
70mod worklist_summary;
71
72pub use add::{render_add_human, render_add_json};
73pub use allow_entry_json::{render_allow_entry_json, render_last_seen_json, render_selector_json};
74pub use artifacts::{
75    AddReport, DiffEvidenceChange, DiffExceptionIdentityChange, DiffFindingChange,
76    DiffLifecycleChange, DiffMetadataChange, DiffOccurrenceLimitChange, DiffPolicyChange,
77    DiffPolicyStatusChange, DiffPostureSummary, DiffReport, DiffRequirementChange, DiffScopeChange,
78    DiffSelectorIdentityChange, DiffSelectorPrecisionChange, DoctorReport, EvidenceReference,
79    ExplainReport, ListFilters, ListRow, MigrateReport, ProposeReport, PruneCandidate,
80    PruneModeContext, WorklistFilters, WorklistItem,
81};
82pub use contracts::{
83    ADD_SCHEMA_ID, ADD_SCHEMA_VERSION, ARTIFACT_CONTRACTS, ARTIFACT_STATUS_FAILED,
84    ARTIFACT_STATUS_PASSED, ARTIFACT_STATUSES, ArtifactContract, CLAIM_BOUNDARY,
85    CLAIM_BOUNDARY_TEXT, DOCTOR_SCHEMA_ID, DOCTOR_SCHEMA_VERSION, EXPLAIN_SCHEMA_ID,
86    EXPLAIN_SCHEMA_VERSION, INVENTORY_SCANNER_POLICY_MIGRATION, INVENTORY_SCANNER_SOURCE_SYNTAX,
87    INVENTORY_SCOPE_SOURCE_TREE, INVENTORY_SOURCE_UNKNOWN, InventoryContext, LIST_SCHEMA_ID,
88    LIST_SCHEMA_VERSION, MIGRATE_SCHEMA_ID, MIGRATE_SCHEMA_VERSION, PROPOSE_SCHEMA_ID,
89    PROPOSE_SCHEMA_VERSION, PRUNE_SCHEMA_ID, PRUNE_SCHEMA_VERSION, RECEIPT_COMMAND_CHECK,
90    RECEIPT_SCHEMA_ID, RECEIPT_SCHEMA_VERSION, REPORT_COMMAND_AUDIT, REPORT_COMMAND_CHECK,
91    REPORT_COMMAND_DIFF, REPORT_COMMANDS, REPORT_SCHEMA_ID, REPORT_SCHEMA_VERSION, ReportContext,
92    SCANNER_LIMITATIONS, WORKLIST_SCHEMA_ID, WORKLIST_SCHEMA_VERSION,
93    artifact_contract_for_schema_id,
94};
95pub use diff::{
96    DiffNetPosture, diff_net_posture, diff_posture_summary, insert_markdown_pr_summary,
97    render_diff_finding_changes_human, render_diff_finding_changes_markdown,
98    render_diff_json_with_posture, render_diff_policy_changes_human,
99    render_diff_policy_changes_markdown, render_diff_posture_summary_human,
100    render_diff_posture_summary_human_with_evidence_health,
101    render_diff_posture_summary_human_with_evidence_health_counts, render_diff_pr_summary_markdown,
102    render_diff_pr_summary_markdown_with_evidence_health,
103    render_diff_pr_summary_markdown_with_evidence_health_counts,
104};
105pub use doctor::{render_doctor_human, render_doctor_json};
106pub(crate) use explain::finding_location_text;
107pub use explain::{render_explain_finding_json, render_explain_human, render_explain_json};
108pub use html::{render_html, render_html_with_context};
109pub use json::{
110    render_claim_boundary_json, render_inventory_json, render_scanner_limitations_json,
111};
112pub use list::{render_list_human, render_list_json};
113pub use migrate::{render_migrate_human, render_migrate_json};
114pub use path_text::source_tree_path_text;
115pub use propose::{render_propose_human, render_propose_json};
116pub use prune::{render_prune_human, render_prune_human_with_context, render_prune_json};
117pub use receipt::{
118    render_receipt, render_receipt_with_context, render_receipt_with_context_and_inventory,
119};
120pub use report_json::{render_json, render_json_with_context, render_json_with_context_and_diff};
121pub use report_text::{
122    render_human, render_human_with_context, render_markdown, render_markdown_with_context,
123};
124pub use sarif::{render_sarif, render_sarif_with_context};
125pub use summary::{
126    Summary, matched_policy_missing_evidence_entries, policy_baseline_debt_entries,
127    policy_missing_evidence_entries,
128};
129pub use worklist::{render_worklist_human, render_worklist_json};
130
131pub(crate) use non_rust::{FilePosture, non_rust_file_rows};
132pub(crate) use source_inventory::{
133    render_source_inventory_html, render_source_inventory_human, render_source_inventory_json,
134    render_source_inventory_markdown,
135};
136pub(crate) use summary::{
137    AUDIT_REVIEW_QUEUE_STATUSES, ReviewSignals, STATUS_COUNT_ORDER, audit_review_queue,
138    baseline_debt_count, broken_evidence_link_count, policy_missing_evidence_count,
139    render_count_fields_with_policy_context, weak_evidence_reference_count,
140};
141
142#[cfg(test)]
143mod diff_human_tests;
144#[cfg(test)]
145mod diff_json_detail_tests;
146#[cfg(test)]
147mod diff_json_tests;
148#[cfg(test)]
149mod diff_markdown_tests;
150#[cfg(test)]
151mod schema_tests;
152#[cfg(test)]
153mod text_tests;
154#[cfg(test)]
155mod worklist_tests;