|
|
@@ -77,7 +77,7 @@ GENERATED_BINARY_SUFFIXES = {
|
|
|
".vvp",
|
|
|
}
|
|
|
TRANSIENT_SUFFIXES = {".pyc", ".pyo", ".tmp", ".partial", ".part", ".swp", ".swo"}
|
|
|
-ARCHIVE_SUFFIXES = {".zip", ".rar", ".7z"}
|
|
|
+ARCHIVE_SUFFIXES = {".zip", ".rar", ".7z", ".tgz", ".tar"}
|
|
|
RUNTIME_EVIDENCE_SUFFIXES = {".log", ".logw", ".vcd", ".fst", ".lxt", ".gtkw", ".raw", ".bin"}
|
|
|
BOARD_VIEWER_GENERATED_ASSETS = {
|
|
|
"board-copper.svg",
|
|
|
@@ -207,6 +207,7 @@ class SourceSnapshot(NamedTuple):
|
|
|
extra_exclusions: tuple[dict[str, str], ...]
|
|
|
candidates: tuple[tuple[object, ...], ...]
|
|
|
excluded: tuple[tuple[str, str], ...]
|
|
|
+ profile: str = "full"
|
|
|
|
|
|
|
|
|
class AnalysisCollection(NamedTuple):
|
|
|
@@ -321,6 +322,7 @@ def _source_snapshot(
|
|
|
for candidate in candidates
|
|
|
),
|
|
|
excluded=tuple((item["path"], item["rule"]) for item in excluded),
|
|
|
+ profile=profile,
|
|
|
)
|
|
|
|
|
|
|
|
|
@@ -456,6 +458,13 @@ def analysis_exclusion_reason(
|
|
|
secret_reason = handoff.secret_path_reason(relative, is_dir=is_dir)
|
|
|
if secret_reason:
|
|
|
return secret_reason
|
|
|
+ # Shared vendor/toolchain installer and generated-file policy (handoff common rules).
|
|
|
+ # Critical for review-compact: root oss-cad-suite*.tgz / td_release_*.zip must never
|
|
|
+ # enter the package and then hit fail-closed archive secret inspection.
|
|
|
+ if not is_dir:
|
|
|
+ common_reason = handoff.common_file_exclusion_reason(relative)
|
|
|
+ if common_reason:
|
|
|
+ return common_reason
|
|
|
if profile == "code-only":
|
|
|
for prefix, reason in handoff.CODE_ONLY_ROOT_EXCLUSIONS.items():
|
|
|
if handoff.is_under(lower, prefix):
|
|
|
@@ -2156,11 +2165,14 @@ def _assert_items_unchanged(
|
|
|
|
|
|
def _assert_source_trees_unchanged(collection: AnalysisCollection, *, profile: str = "full") -> None:
|
|
|
for snapshot in collection.source_snapshots:
|
|
|
+ # Prefer the profile captured at collection time so review-compact
|
|
|
+ # snapshots are not re-scanned under the create_analysis_package default.
|
|
|
+ check_profile = snapshot.profile or profile
|
|
|
current = _source_snapshot(
|
|
|
snapshot.root,
|
|
|
source_id=snapshot.source_id,
|
|
|
extra_exclusions=snapshot.extra_exclusions,
|
|
|
- profile=profile,
|
|
|
+ profile=check_profile,
|
|
|
)
|
|
|
if (
|
|
|
current.candidates != snapshot.candidates
|